[ovirt-devel] Useless AddVmPoolCommand class

Shmuel Melamud smelamud at redhat.com
Sun Mar 29 14:45:52 UTC 2015


Hi!

Do we really need the AddVmPoolCommand class? What I see currently:

1. VdcActionType.AddVmPool is never used.
2. CommonVmPoolWithVmsCommand extends AddVmPoolCommand, but this inheritance is useless:
  a. AddVmPoolCommand.executeCommand() is never called from CommonVmPoolWithVmsCommand.executeCommand(), the same work is done by AddVmPoolWithVmsCommand.getPoolId().
  b. AddVmPoolCommand.getAuditLogTypeValue() is never called.
  c. AddVmPoolCommand.getValidationGroups() does the same as AddVmPoolWithVmsCommand.getValidationGroups() and may be merged to UpdateVmPoolWithVmsCommand.getValidationGroups() if needed (I'm not sure).
  d. AddVmPoolCommand() constructor code may be merged to CommonVmPoolWithVmsCommand() constructor.
3. The hierarchy where UpdateVmPoolWithVmsCommand is inherited indirectly from AddVmPoolCommand seems illogical.

So can AddVmPoolCommand be safely removed?

-- 
Shmuel



More information about the Devel mailing list