Moti Asayag has uploaded a new change for review.

Change subject: core: Maintain Java style for UpdateVdsActionParameters
......................................................................

core: Maintain Java style for UpdateVdsActionParameters

Change-Id: Icdf57cbffac354873bb37ef92944ba1de6b0c71c
Signed-off-by: Moti Asayag <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/UpdateVdsActionParameters.java
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
5 files changed, 52 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/66/37466/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
index a42144f..2177e15 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
@@ -262,8 +262,8 @@
                 getParameters().getVdsPort(),
                 IsPending);
         UpdateVdsActionParameters p = new 
UpdateVdsActionParameters(vds.getStaticData(), "", false);
-        p.setInstallVds(!IsPending);
-        p.setIsReinstallOrUpgrade(!IsPending);
+        p.setInstallHost(!IsPending);
+        p.setReinstallOrUpgrade(!IsPending);
         
p.setAuthMethod(VdsOperationActionParameters.AuthenticationMethod.PublicKey);
         if (vds.isFenceAgentsExist()) {
             p.setFenceAgents(vds.getFenceAgents());
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
index 28a60bf..4123778 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
@@ -98,17 +98,17 @@
                         .getHostName())
                         && getVdsDAO().getAllForHostname(hostName).size() != 
0) {
                     
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VDS_WITH_SAME_HOST_EXIST);
-                } else if (getParameters().getInstallVds() && 
_oldVds.getStatus() != VDSStatus.Maintenance
+                } else if (getParameters().isInstallHost() && 
_oldVds.getStatus() != VDSStatus.Maintenance
                         && _oldVds.getStatus() != VDSStatus.NonOperational
                         && _oldVds.getStatus() != VDSStatus.InstallFailed
                         && _oldVds.getStatus() != VDSStatus.InstallingOS) {
                     
addCanDoActionMessage(VdcBllMessages.VDS_CANNOT_INSTALL_STATUS_ILLEGAL);
-                } else if (getParameters().getInstallVds()
+                } else if (getParameters().isInstallHost()
                         && getParameters().getAuthMethod() == 
AuthenticationMethod.Password
                         && StringUtils.isEmpty(getParameters().getPassword())
                         && getParameters().getVdsStaticData().getVdsType() == 
VDSType.VDS) {
                     
addCanDoActionMessage(VdcBllMessages.VDS_CANNOT_INSTALL_EMPTY_PASSWORD);
-                } else if (!getParameters().getInstallVds()
+                } else if (!getParameters().isInstallHost()
                         && _oldVds.getPort() != 
getParameters().getVdsStaticData().getPort()) {
                     
addCanDoActionMessage(VdcBllMessages.VDS_PORT_CHANGE_REQUIRE_INSTALL);
                 } else if 
(!_oldVds.getVdsGroupId().equals(getParameters().getVdsStaticData().getVdsGroupId()))
 {
@@ -117,7 +117,7 @@
                     // This is due to permission check that must be done both 
on
                     // the VDS and on the VDSGroup
                     
addCanDoActionMessage(VdcBllMessages.VDS_CANNOT_UPDATE_CLUSTER);
-                } else if (getParameters().getInstallVds() && 
getParameters().getNetworkProviderId() != null) {
+                } else if (getParameters().isInstallHost() && 
getParameters().getNetworkProviderId() != null) {
                     returnValue =
                             
validateNetworkProviderProperties(getParameters().getNetworkProviderId(),
                                     getParameters().getNetworkMappings());
@@ -157,9 +157,9 @@
             initializeVds();
         }
 
-        if (getParameters().getInstallVds()) {
+        if (getParameters().isInstallHost()) {
             InstallVdsParameters tempVar = new 
InstallVdsParameters(getVdsId(), getParameters().getPassword());
-            
tempVar.setIsReinstallOrUpgrade(getParameters().getIsReinstallOrUpgrade());
+            
tempVar.setIsReinstallOrUpgrade(getParameters().isReinstallOrUpgrade());
             tempVar.setoVirtIsoFile(getParameters().getoVirtIsoFile());
             if (getVdsDAO().get(getVdsId()).getStatus() ==  
VDSStatus.InstallingOS) {
                 // TODO: remove hack when reinstall api will provider 
override-firewall parameter.
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/UpdateVdsActionParameters.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/UpdateVdsActionParameters.java
index cf4ab89..0dfab08 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/UpdateVdsActionParameters.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/UpdateVdsActionParameters.java
@@ -8,50 +8,48 @@
 public class UpdateVdsActionParameters extends VdsOperationActionParameters {
     private static final long serialVersionUID = -7467029979089285065L;
     private List<FenceAgent> fenceAgents;
-
-    public UpdateVdsActionParameters(VdsStatic vdsStatic, String password, 
boolean installVds) {
-        super(vdsStatic, password);
-        _installVds = installVds;
-    }
-
-    public UpdateVdsActionParameters(VdsStatic vdsStatic, boolean installVds) {
-        super(vdsStatic);
-        _installVds = installVds;
-    }
-
-    private boolean _installVds;
-
-    public boolean getInstallVds() {
-        return _installVds;
-    }
-
-    public void setInstallVds(boolean value) {
-        _installVds = value;
-    }
-
-    private boolean privateIsReinstallOrUpgrade;
-
-    public boolean getIsReinstallOrUpgrade() {
-        return privateIsReinstallOrUpgrade;
-    }
-
-    public void setIsReinstallOrUpgrade(boolean value) {
-        privateIsReinstallOrUpgrade = value;
-    }
-
-    private String privateoVirtIsoFile;
-
-    public String getoVirtIsoFile() {
-        return privateoVirtIsoFile;
-    }
-
-    public void setoVirtIsoFile(String value) {
-        privateoVirtIsoFile = value;
-    }
+    private boolean installHost;
+    private boolean reinstallOrUpgrade;
+    private String oVirtIsoFile;
 
     public UpdateVdsActionParameters() {
     }
 
+    public UpdateVdsActionParameters(VdsStatic vdsStatic, boolean installHost) 
{
+        super(vdsStatic);
+        this.installHost = installHost;
+    }
+
+    public UpdateVdsActionParameters(VdsStatic vdsStatic, String password, 
boolean installHost) {
+        super(vdsStatic, password);
+        this.installHost = installHost;
+    }
+
+    public boolean isInstallHost() {
+        return installHost;
+    }
+
+    public void setInstallHost(boolean installHost) {
+        this.installHost = installHost;
+    }
+
+    public boolean isReinstallOrUpgrade() {
+        return reinstallOrUpgrade;
+    }
+
+    public void setReinstallOrUpgrade(boolean reinstallOrUpgrade) {
+        this.reinstallOrUpgrade = reinstallOrUpgrade;
+    }
+
+    public String getoVirtIsoFile() {
+        return oVirtIsoFile;
+    }
+
+    public void setoVirtIsoFile(String oVirtIsoFile) {
+        this.oVirtIsoFile = oVirtIsoFile;
+    }
+
+
     public List<FenceAgent> getFenceAgents() {
         return fenceAgents;
     }
diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
index c7641bb..51ea997 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
@@ -169,7 +169,7 @@
         params = (UpdateVdsActionParameters) getMapper
                 (Action.class, VdsOperationActionParameters.class).map(action, 
(VdsOperationActionParameters) params);
         if (vds.getVdsType()==VDSType.oVirtNode) {
-            params.setIsReinstallOrUpgrade(true);
+            params.setReinstallOrUpgrade(true);
             if (action.isSetImage()) {
                 params.setoVirtIsoFile(action.getImage());
             }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
index 1e41f50..cfe05a8 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
@@ -1021,7 +1021,7 @@
             parameters.setvds(host);
             parameters.setVdsId(host.getId());
             parameters.setPassword(""); //$NON-NLS-1$
-            parameters.setInstallVds(false);
+            parameters.setInstallHost(false);
             parameters.setRebootAfterInstallation(isVirt);
             parameters.setAuthMethod(model.getAuthenticationMethod());
             parameters.setFenceAgents(getFenceAgents(model));
@@ -1401,8 +1401,8 @@
         param.setvds(host);
         param.setVdsId(host.getId());
         param.setPassword(model.getUserPassword().getEntity());
-        param.setIsReinstallOrUpgrade(true);
-        param.setInstallVds(true);
+        param.setReinstallOrUpgrade(true);
+        param.setInstallHost(true);
         param.setoVirtIsoFile(null);
         param.setOverrideFirewall(model.getOverrideIpTables().getEntity());
         param.setActivateHost(model.getActivateHostAfterInstall().getEntity());
@@ -1528,8 +1528,8 @@
         param.setvds(host);
         param.setVdsId(host.getId());
         param.setPassword(model.getUserPassword().getEntity());
-        param.setIsReinstallOrUpgrade(true);
-        param.setInstallVds(true);
+        param.setReinstallOrUpgrade(true);
+        param.setInstallHost(true);
         param.setoVirtIsoFile(isOVirt ? 
model.getOVirtISO().getSelectedItem().getRpmName() : null);
         param.setOverrideFirewall(model.getOverrideIpTables().getEntity());
         param.setActivateHost(model.getActivateHostAfterInstall().getEntity());


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

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

Reply via email to