Muli Salem has uploaded a new change for review.

Change subject: core: Rename Methods in ActivateDeactivateVmNicCommand (#850854)
......................................................................

core: Rename Methods in ActivateDeactivateVmNicCommand (#850854)

https://bugzilla.redhat.com/850854

This patch changes the method names:
isActivateDeactivateAllowedForVmStatus to activateDeactivateVmNicAllowed
isHotPlugNicAllowedForVmStatus to hotPlugVmNicRequired

Change-Id: I02e005bb6c3448d8114f96b2b6cc3ab4967eed25
Signed-off-by: Muli Salem <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateDeactivateVmNicCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/85/7685/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateDeactivateVmNicCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateDeactivateVmNicCommand.java
index d352bcb..af9428f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateDeactivateVmNicCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateDeactivateVmNicCommand.java
@@ -36,9 +36,9 @@
     protected boolean canDoAction() {
         boolean returnValue = true;
 
-        if (isActivateDeactivateAllowedForVmStatus(getVm().getstatus())) {
+        if (activateDeactivateVmNicAllowed(getVm().getstatus())) {
             // HotPlug in the host needs to be called only if the Vm is UP
-            if (VmHandler.isHotPlugNicAllowedForVmStatus(getVm().getstatus())) 
{
+            if (VmHandler.hotPlugVmNicRequired(getVm().getstatus())) {
                 setVdsId(getVm().getrun_on_vds().getValue());
                 returnValue = canPerformHotPlug();
                 if (returnValue && !networkAttachedToVds(getNetworkName(), 
getVdsId())) {
@@ -70,7 +70,7 @@
     @Override
     protected void ExecuteVmCommand() {
         // HotPlug in the host is called only if the Vm is UP
-        if (VmHandler.isHotPlugNicAllowedForVmStatus(getVm().getstatus())) {
+        if (VmHandler.hotPlugVmNicRequired(getVm().getstatus())) {
             runVdsCommand(getParameters().getAction().getCommandType(),
                     new HotPlugUnplgNicVDSParameters(getVdsId(), 
getVm().getId(),
                             
DbFacade.getInstance().getVmNetworkInterfaceDAO().get(getParameters().getNicId()),
@@ -101,7 +101,7 @@
         addCanDoActionMessage(VdcBllMessages.VAR__TYPE__INTERFACE);
     }
 
-    private boolean isActivateDeactivateAllowedForVmStatus(VMStatus vmStatus) {
+    private boolean activateDeactivateVmNicAllowed(VMStatus vmStatus) {
         return vmStatus == VMStatus.Up || vmStatus == VMStatus.Down;
     }
 
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
index 5917583..98d38b9 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
@@ -472,7 +472,7 @@
      *            The VM's Status
      * @return
      */
-    public static boolean isHotPlugNicAllowedForVmStatus(VMStatus vmStatus) {
+    public static boolean hotPlugVmNicRequired(VMStatus vmStatus) {
         return vmStatus == VMStatus.Up;
     }
 


--
To view, visit http://gerrit.ovirt.org/7685
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02e005bb6c3448d8114f96b2b6cc3ab4967eed25
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Muli Salem <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to