Moti Asayag has uploaded a new change for review.

Change subject: core: Javanize AddVdsActionParameters
......................................................................

core: Javanize AddVdsActionParameters

* Format the class
* Maintain naming conventions
* Remove redundant code
* Organize the class

Change-Id: Idcb067baa3b6f4f3be057d881e29c29e22dcad21
Signed-off-by: Moti Asayag <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java
1 file changed, 45 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/44/37144/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java
index 731b594..8619a02 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AddVdsActionParameters.java
@@ -11,55 +11,51 @@
 public class AddVdsActionParameters extends VdsOperationActionParameters {
     private static final long serialVersionUID = 8452910234577071082L;
 
-    private Guid vdsId;
-    private boolean privateAddPending;
+    private Guid hostId;
+    private boolean pending;
     private boolean glusterPeerProbeNeeded;
-    private boolean privateAddProvisioned;
+    private boolean provisioned;
     private ExternalHostGroup hostGroup;
     private String hostMac;
     private String discoverName;
     private ExternalComputeResource computeResource;
     private String discoverIp;
-    public String getDiscoverIp() { return discoverIp; }
     private List<FenceAgent> fenceAgents;
-    public ExternalHostGroup getHostGroup() { return hostGroup; };
-    public String getHostMac() { return hostMac; };
-    public String getDiscoverName() { return discoverName; };
-    public ExternalComputeResource getComputeResource() { return 
computeResource; }
 
     public AddVdsActionParameters(VdsStatic vdsStatic, String password) {
         super(vdsStatic, password);
         glusterPeerProbeNeeded = true;
-        privateAddProvisioned = false;
     }
 
-    public void initVdsActionParametersForProvision(Guid pid,
-                                                    ExternalHostGroup hg,
-                                                    ExternalComputeResource cr,
-                                                    String mac,
-                                                    String discover_name,
-                                                    String discover_ip) {
-        privateAddProvisioned = true;
-        hostMac = mac;
-        hostGroup = hg;
-        getVdsStaticData().setHostProviderId(pid);
-        discoverName = discover_name;
-        computeResource = cr;
-        discoverIp = discover_ip;
+    public void initVdsActionParametersForProvision(Guid providerId,
+            ExternalHostGroup hostGroup,
+            ExternalComputeResource computeResource,
+            String hostMac,
+            String discoverName,
+            String discoverIp) {
+        provisioned = true;
+        this.hostMac = hostMac;
+        this.hostGroup = hostGroup;
+        this.getVdsStaticData().setHostProviderId(providerId);
+        this.discoverName = discoverName;
+        this.computeResource = computeResource;
+        this.discoverIp = discoverIp;
     }
 
     public boolean getAddProvisioned() {
-        return privateAddProvisioned;
+        return provisioned;
     }
 
-    public AddVdsActionParameters() { glusterPeerProbeNeeded = true; }
+    public AddVdsActionParameters() {
+        glusterPeerProbeNeeded = true;
+    }
 
     public void setVdsForUniqueId(Guid serverForUniqueId) {
-        this.vdsId = serverForUniqueId;
+        this.hostId = serverForUniqueId;
     }
 
     public Guid getVdsForUniqueId() {
-        return vdsId;
+        return hostId;
     }
 
     public void setGlusterPeerProbeNeeded(boolean glusterPeerProbeNeeded) {
@@ -67,15 +63,15 @@
     }
 
     public boolean isGlusterPeerProbeNeeded() {
-        return this.glusterPeerProbeNeeded;
+        return glusterPeerProbeNeeded;
     }
 
     public boolean getAddPending() {
-        return privateAddPending;
+        return pending;
     }
 
     public void setAddPending(boolean value) {
-        privateAddPending = value;
+        pending = value;
     }
 
     public List<FenceAgent> getFenceAgents() {
@@ -85,4 +81,24 @@
     public void setFenceAgents(List<FenceAgent> fenceAgents) {
         this.fenceAgents = fenceAgents;
     }
+
+    public String getDiscoverIp() {
+        return discoverIp;
+    }
+
+    public ExternalHostGroup getHostGroup() {
+        return hostGroup;
+    }
+
+    public String getHostMac() {
+        return hostMac;
+    }
+
+    public String getDiscoverName() {
+        return discoverName;
+    }
+
+    public ExternalComputeResource getComputeResource() {
+        return computeResource;
+    }
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcb067baa3b6f4f3be057d881e29c29e22dcad21
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