Change in ovirt-engine[master]: core: Move status check methods from VM to VMStatus

Roy Golan has submitted this change and it was merged. Change subject: core: Move status check methods from VM to VMStatus ...................................................................... core: Move status check methods from VM to VMStatus VM class contained methods which only check the value of the status of the VM, to see if it's one of several values that reflect some state of the VM. these methods should be places in VMStatus class (without being static methods) - instance of VMStatus should be able to return whether it reflects certain state of the VM, instead of using the previous methods. While moving those methods to VMStatus, they were renamed such that they'll be less confusing (isStatusUp is not a good name for a method that returns true even if the status is not UP for example). The method VM#isStatusUpOrPausedOrSuspended is removed as it wasn't used anywhere. The method VM#isStatusUp was renamed to VM#isRunning, to describe itself better. Change-Id: I82b4f109751773ff2d46407ccea26ea0be2661f5 Signed-off-by: Arik Hadas <ahadas@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeDiskCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeFloppyCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/PauseVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmOperationCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmRunHandler.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/GetVmsAndNetworkInterfacesByNetworkIdQuery.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmValidator.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VMStatus.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/ResourceManager.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/SetVmStatusVDSCommand.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/resources/ResourcesModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java 20 files changed, 119 insertions(+), 77 deletions(-) Approvals: Roy Golan: Looks good to me, approved Arik Hadas: Verified -- To view, visit http://gerrit.ovirt.org/10795 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I82b4f109751773ff2d46407ccea26ea0be2661f5 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com>
participants (1)
-
rgolan@redhat.com