cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [18/48] All Checkstyle problems corrected
Date Thu, 12 Dec 2013 21:01:18 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
index 7e812db..7b1eade 100644
--- a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
+++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java
@@ -250,14 +250,14 @@ public class LibvirtComputingResourceTest {
         Mockito.when(domain.interfaceStats(Matchers.anyString())).thenAnswer(new Answer<DomainInterfaceStats>() {
             // increment with less than a KB, so this should be less than 1 KB
             final static int increment = 1000;
-            int rx_bytes = 1000;
-            int tx_bytes = 1000;
+            int rxBytes = 1000;
+            int txBytes = 1000;
 
             @Override
             public DomainInterfaceStats answer(InvocationOnMock invocation) throws Throwable {
                 DomainInterfaceStats domainInterfaceStats = new DomainInterfaceStats();
-                domainInterfaceStats.rx_bytes = (this.rx_bytes += increment);
-                domainInterfaceStats.tx_bytes = (this.tx_bytes += increment);
+                domainInterfaceStats.rx_bytes = (rxBytes += increment);
+                domainInterfaceStats.tx_bytes = (txBytes += increment);
                 return domainInterfaceStats;
 
             }
@@ -268,15 +268,15 @@ public class LibvirtComputingResourceTest {
             // a little less than a KB
             final static int increment = 1000;
 
-            int rd_bytes = 0;
-            int wr_bytes = 1024;
+            int rdBytes = 0;
+            int wrBytes = 1024;
 
             @Override
             public DomainBlockStats answer(InvocationOnMock invocation) throws Throwable {
                 DomainBlockStats domainBlockStats = new DomainBlockStats();
 
-                domainBlockStats.rd_bytes = (rd_bytes += increment);
-                domainBlockStats.wr_bytes = (wr_bytes += increment);
+                domainBlockStats.rd_bytes = (rdBytes += increment);
+                domainBlockStats.wr_bytes = (wrBytes += increment);
                 return domainBlockStats;
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java
index 0b7fb91..5d13536 100644
--- a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java
+++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java
@@ -42,9 +42,9 @@ public class LibvirtVifDriverTest {
 
     private Map<TrafficType, VifDriver> assertions;
 
-    final String LIBVIRT_VIF_DRIVER = "libvirt.vif.driver";
-    final String FAKE_VIF_DRIVER_CLASS_NAME = "com.cloud.hypervisor.kvm.resource.FakeVifDriver";
-    final String NONEXISTENT_VIF_DRIVER_CLASS_NAME = "com.cloud.hypervisor.kvm.resource.NonExistentVifDriver";
+    final String LibVirtVifDriver = "libvirt.vif.driver";
+    final String FakeVifDriverClassName = "com.cloud.hypervisor.kvm.resource.FakeVifDriver";
+    final String NonExistentVifDriverClassName = "com.cloud.hypervisor.kvm.resource.NonExistentVifDriver";
 
     private VifDriver fakeVifDriver, bridgeVifDriver, ovsVifDriver;
 
@@ -64,7 +64,7 @@ public class LibvirtVifDriverTest {
 
             doReturn(bridgeVifDriver).when(res).getVifDriverClass(eq(LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME), anyMap());
             doReturn(ovsVifDriver).when(res).getVifDriverClass(eq(LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME), anyMap());
-            doReturn(fakeVifDriver).when(res).getVifDriverClass(eq(FAKE_VIF_DRIVER_CLASS_NAME), anyMap());
+            doReturn(fakeVifDriver).when(res).getVifDriverClass(eq(FakeVifDriverClassName), anyMap());
 
         } catch (final ConfigurationException ex) {
             fail("Unexpected ConfigurationException while configuring VIF drivers: " + ex.getMessage());
@@ -120,13 +120,13 @@ public class LibvirtVifDriverTest {
         Map<String, Object> params = new HashMap<String, Object>();
 
         // Switch res' bridge type for test purposes
-        params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME);
         res._bridgeType = BridgeType.NATIVE;
         configure(params);
         checkAllSame(bridgeVifDriver);
 
         params.clear();
-        params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME);
         res._bridgeType = BridgeType.OPENVSWITCH;
         configure(params);
         checkAllSame(ovsVifDriver);
@@ -139,13 +139,13 @@ public class LibvirtVifDriverTest {
         Map<String, Object> params = new HashMap<String, Object>();
 
         // Switch res' bridge type for test purposes
-        params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME);
         res._bridgeType = BridgeType.NATIVE;
         configure(params);
         checkAllSame(ovsVifDriver);
 
         params.clear();
-        params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME);
         res._bridgeType = BridgeType.OPENVSWITCH;
         configure(params);
         checkAllSame(bridgeVifDriver);
@@ -155,8 +155,8 @@ public class LibvirtVifDriverTest {
     public void testOverrideSomeTrafficTypes() throws ConfigurationException {
 
         Map<String, Object> params = new HashMap<String, Object>();
-        params.put(LIBVIRT_VIF_DRIVER + "." + "Public", FAKE_VIF_DRIVER_CLASS_NAME);
-        params.put(LIBVIRT_VIF_DRIVER + "." + "Guest", LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver + "." + "Public", FakeVifDriverClassName);
+        params.put(LibVirtVifDriver + "." + "Guest", LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME);
         res._bridgeType = BridgeType.NATIVE;
         configure(params);
 
@@ -174,7 +174,7 @@ public class LibvirtVifDriverTest {
     @Test
     public void testBadTrafficType() throws ConfigurationException {
         Map<String, Object> params = new HashMap<String, Object>();
-        params.put(LIBVIRT_VIF_DRIVER + "." + "NonExistentTrafficType", FAKE_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver + "." + "NonExistentTrafficType", FakeVifDriverClassName);
         res._bridgeType = BridgeType.NATIVE;
         configure(params);
 
@@ -189,7 +189,7 @@ public class LibvirtVifDriverTest {
     @Test
     public void testEmptyTrafficType() throws ConfigurationException {
         Map<String, Object> params = new HashMap<String, Object>();
-        params.put(LIBVIRT_VIF_DRIVER + ".", FAKE_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver + ".", FakeVifDriverClassName);
         res._bridgeType = BridgeType.NATIVE;
         configure(params);
 
@@ -204,7 +204,7 @@ public class LibvirtVifDriverTest {
     @Test(expected = ConfigurationException.class)
     public void testBadVifDriverClassName() throws ConfigurationException {
         Map<String, Object> params = new HashMap<String, Object>();
-        params.put(LIBVIRT_VIF_DRIVER + "." + "Public", NONEXISTENT_VIF_DRIVER_CLASS_NAME);
+        params.put(LibVirtVifDriver + "." + "Public", NonExistentVifDriverClassName);
         res._bridgeType = BridgeType.NATIVE;
         configure(params);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java
index 225ab0d..2eb0736 100755
--- a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java
+++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java
@@ -19,47 +19,47 @@ package com.cloud.ovm.hypervisor;
 import java.util.HashMap;
 
 public class OvmHelper {
-    private static final HashMap<String, String> _ovmMap = new HashMap<String, String>();
+    private static final HashMap<String, String> s_ovmMap = new HashMap<String, String>();
 
     public static final String ORACLE_LINUX = "Oracle Linux";
     public static final String ORACLE_SOLARIS = "Oracle Solaris";
     public static final String WINDOWS = "Windows";
 
     static {
-        _ovmMap.put("Oracle Enterprise Linux 6.0 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 6.0 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.0 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.0 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.1 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.1 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.2 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.2 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.3 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.3 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.4 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.4 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.5 (32-bit)", ORACLE_LINUX);
-        _ovmMap.put("Oracle Enterprise Linux 5.5 (64-bit)", ORACLE_LINUX);
-        _ovmMap.put("Windows 7 (32-bit)", WINDOWS);
-        _ovmMap.put("Windows 7 (64-bit)", WINDOWS);
-        _ovmMap.put("Windows Server 2003 (32-bit)", WINDOWS);
-        _ovmMap.put("Windows Server 2003 (64-bit)", WINDOWS);
-        _ovmMap.put("Windows Server 2008 (32-bit)", WINDOWS);
-        _ovmMap.put("Windows Server 2008 (64-bit)", WINDOWS);
-        _ovmMap.put("Windows Server 2008 R2 (64-bit)", WINDOWS);
-        _ovmMap.put("Windows 2000 SP4 (32-bit)", WINDOWS);
-        _ovmMap.put("Windows Vista (32-bit)", WINDOWS);
-        _ovmMap.put("Windows XP SP2 (32-bit)", WINDOWS);
-        _ovmMap.put("Windows XP SP3 (32-bit)", WINDOWS);
-        _ovmMap.put("Sun Solaris 10(32-bit)", ORACLE_SOLARIS);
-        _ovmMap.put("Sun Solaris 10(64-bit)", ORACLE_SOLARIS);
-        _ovmMap.put("Sun Solaris 9(Experimental)", ORACLE_SOLARIS);
-        _ovmMap.put("Sun Solaris 8(Experimental)", ORACLE_SOLARIS);
-        _ovmMap.put("Sun Solaris 11 (32-bit)", ORACLE_SOLARIS);
-        _ovmMap.put("Sun Solaris 11 (64-bit)", ORACLE_SOLARIS);
+        s_ovmMap.put("Oracle Enterprise Linux 6.0 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 6.0 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.0 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.0 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.1 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.1 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.2 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.2 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.3 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.3 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.4 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.4 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.5 (32-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Oracle Enterprise Linux 5.5 (64-bit)", ORACLE_LINUX);
+        s_ovmMap.put("Windows 7 (32-bit)", WINDOWS);
+        s_ovmMap.put("Windows 7 (64-bit)", WINDOWS);
+        s_ovmMap.put("Windows Server 2003 (32-bit)", WINDOWS);
+        s_ovmMap.put("Windows Server 2003 (64-bit)", WINDOWS);
+        s_ovmMap.put("Windows Server 2008 (32-bit)", WINDOWS);
+        s_ovmMap.put("Windows Server 2008 (64-bit)", WINDOWS);
+        s_ovmMap.put("Windows Server 2008 R2 (64-bit)", WINDOWS);
+        s_ovmMap.put("Windows 2000 SP4 (32-bit)", WINDOWS);
+        s_ovmMap.put("Windows Vista (32-bit)", WINDOWS);
+        s_ovmMap.put("Windows XP SP2 (32-bit)", WINDOWS);
+        s_ovmMap.put("Windows XP SP3 (32-bit)", WINDOWS);
+        s_ovmMap.put("Sun Solaris 10(32-bit)", ORACLE_SOLARIS);
+        s_ovmMap.put("Sun Solaris 10(64-bit)", ORACLE_SOLARIS);
+        s_ovmMap.put("Sun Solaris 9(Experimental)", ORACLE_SOLARIS);
+        s_ovmMap.put("Sun Solaris 8(Experimental)", ORACLE_SOLARIS);
+        s_ovmMap.put("Sun Solaris 11 (32-bit)", ORACLE_SOLARIS);
+        s_ovmMap.put("Sun Solaris 11 (64-bit)", ORACLE_SOLARIS);
     }
 
     public static String getOvmGuestType(String stdType) {
-        return _ovmMap.get(stdType);
+        return s_ovmMap.get(stdType);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java
index ed25fa8..238ac51 100755
--- a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java
+++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java
@@ -153,30 +153,30 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
     String _publicNetworkName;
     String _guestNetworkName;
     boolean _canBridgeFirewall;
-    static boolean _isHeartBeat = false;
+    static boolean s_isHeartBeat = false;
     List<String> _bridges = null;
     private final Map<String, Pair<Long, Long>> _vmNetworkStats = new ConcurrentHashMap<String, Pair<Long, Long>>();
-    private static String _ovsAgentPath = "/opt/ovs-agent-latest";
+    private static String s_ovsAgentPath = "/opt/ovs-agent-latest";
 
     // TODO vmsync {
-    static HashMap<String, State> _stateMaps;
+    static HashMap<String, State> s_stateMaps;
     protected HashMap<String, State> _vms = new HashMap<String, State>(50);
     static {
-        _stateMaps = new HashMap<String, State>();
-        _stateMaps.put("RUNNING", State.Running);
-        _stateMaps.put("DOWN", State.Stopped);
-        _stateMaps.put("ERROR", State.Error);
-        _stateMaps.put("SUSPEND", State.Stopped);
+        s_stateMaps = new HashMap<String, State>();
+        s_stateMaps.put("RUNNING", State.Running);
+        s_stateMaps.put("DOWN", State.Stopped);
+        s_stateMaps.put("ERROR", State.Error);
+        s_stateMaps.put("SUSPEND", State.Stopped);
     }
     // TODO vmsync }
 
-    static HashMap<String, PowerState> _powerStateMaps;
+    static HashMap<String, PowerState> s_powerStateMaps;
     static {
-        _powerStateMaps = new HashMap<String, PowerState>();
-        _powerStateMaps.put("RUNNING", PowerState.PowerOn);
-        _powerStateMaps.put("DOWN", PowerState.PowerOff);
-        _powerStateMaps.put("ERROR", PowerState.PowerUnknown);
-        _powerStateMaps.put("SUSPEND", PowerState.PowerOff);
+        s_powerStateMaps = new HashMap<String, PowerState>();
+        s_powerStateMaps.put("RUNNING", PowerState.PowerOn);
+        s_powerStateMaps.put("DOWN", PowerState.PowerOff);
+        s_powerStateMaps.put("ERROR", PowerState.PowerUnknown);
+        s_powerStateMaps.put("SUSPEND", PowerState.PowerOff);
     }
 
     @Override
@@ -259,7 +259,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
         }
 
         /* set to false so each time ModifyStoragePoolCommand will re-setup heartbeat*/
-        _isHeartBeat = false;
+        s_isHeartBeat = false;
 
         /*
         try {
@@ -369,9 +369,9 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
             }
 
             if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Copying " + script.getPath() + " to " + _ovsAgentPath + " on " + _ip + " with permission 0644");
+                s_logger.debug("Copying " + script.getPath() + " to " + s_ovsAgentPath + " on " + _ip + " with permission 0644");
             }
-            scp.put(script.getPath(), _ovsAgentPath, "0644");
+            scp.put(script.getPath(), s_ovsAgentPath, "0644");
         }
 
         sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password);
@@ -409,7 +409,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
         try {
             OvmHost.ping(_conn);
             HashMap<String, State> newStates = sync();
-            return new PingRoutingCommand(getType(), id, newStates, this.getHostVmStateReport());
+            return new PingRoutingCommand(getType(), id, newStates, getHostVmStateReport());
         } catch (XmlRpcException e) {
             s_logger.debug("Check agent status failed", e);
             return null;
@@ -454,13 +454,13 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
 
     private void setupHeartBeat(String poolUuid) {
         try {
-            if (!_isHeartBeat) {
+            if (!s_isHeartBeat) {
                 OvmHost.setupHeartBeat(_conn, poolUuid, _ip);
-                _isHeartBeat = true;
+                s_isHeartBeat = true;
             }
         } catch (Exception e) {
             s_logger.debug("setup heart beat for " + _ip + " failed", e);
-            _isHeartBeat = false;
+            s_isHeartBeat = false;
         }
     }
 
@@ -786,7 +786,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
     }
 
     private State toState(String vmName, String s) {
-        State state = _stateMaps.get(s);
+        State state = s_stateMaps.get(s);
         if (state == null) {
             s_logger.debug("Unkown state " + s + " for " + vmName);
             state = State.Unknown;
@@ -795,7 +795,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
     }
 
     private PowerState toPowerState(String vmName, String s) {
-        PowerState state = _powerStateMaps.get(s);
+        PowerState state = s_powerStateMaps.get(s);
         if (state == null) {
             s_logger.debug("Unkown state " + s + " for " + vmName);
             state = PowerState.PowerUnknown;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java
index 9af4016..9bb42ac 100755
--- a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java
+++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java
@@ -32,10 +32,10 @@ import com.google.gson.JsonParseException;
 import com.google.gson.reflect.TypeToken;
 
 public class Coder {
-    private static Gson _gson;
-    private static Gson _mapGson;
+    private static Gson s_gson;
+    private static Gson s_mapGson;
 
-    public static Object[] EMPTY_PARAMS = new Object[0];
+    public static Object[] s_emptyParams = new Object[0];
 
     private static class MapDecoder implements JsonDeserializer<Map<String, String>> {
         @Override
@@ -59,26 +59,26 @@ public class Coder {
     static {
         GsonBuilder _builder = new GsonBuilder();
         _builder.registerTypeAdapter(Map.class, new MapDecoder());
-        _mapGson = _builder.create();
-        _gson = new Gson();
+        s_mapGson = _builder.create();
+        s_gson = new Gson();
     }
 
     public static String toJson(Object obj) {
-        return _gson.toJson(obj);
+        return s_gson.toJson(obj);
     }
 
     public static <T> T fromJson(String str, Class<T> clz) {
-        return _gson.fromJson(str, clz);
+        return s_gson.fromJson(str, clz);
     }
 
     @SuppressWarnings("unchecked")
     public static Map<String, String> mapFromJson(String str) {
-        return _mapGson.fromJson(str, Map.class);
+        return s_mapGson.fromJson(str, Map.class);
     }
 
     public static List<String> listFromJson(String str) {
         Type listType = new TypeToken<List<String>>() {
         }.getType();
-        return _gson.fromJson(str, listType);
+        return s_gson.fromJson(str, listType);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java
index 19bbd85..6d2867e 100755
--- a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java
+++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java
@@ -42,7 +42,7 @@ public class OvmBridge extends OvmObject {
     }
 
     public static List<String> getAllBridges(Connection c) throws XmlRpcException {
-        String res = (String)c.call("OvmNetwork.getAllBridges", Coder.EMPTY_PARAMS);
+        String res = (String)c.call("OvmNetwork.getAllBridges", Coder.s_emptyParams);
         return Coder.listFromJson(res);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java
index 32eab09..ad1b2f6 100755
--- a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java
+++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java
@@ -53,7 +53,7 @@ public class OvmHost extends OvmObject {
     }
 
     public static Details getDetails(Connection c) throws XmlRpcException {
-        String res = (String)c.call("OvmHost.getDetails", Coder.EMPTY_PARAMS);
+        String res = (String)c.call("OvmHost.getDetails", Coder.s_emptyParams);
         return Coder.fromJson(res, OvmHost.Details.class);
     }
 
@@ -69,7 +69,7 @@ public class OvmHost extends OvmObject {
     }
 
     public static Map<String, String> getAllVms(Connection c) throws XmlRpcException {
-        String res = (String)c.call("OvmHost.getAllVms", Coder.EMPTY_PARAMS);
+        String res = (String)c.call("OvmHost.getAllVms", Coder.s_emptyParams);
         return Coder.mapFromJson(res);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java b/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java
index dbfbba0..3cc9115 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java
@@ -258,8 +258,8 @@ public class AgentResourceBase implements ServerResource {
         return _type;
     }
 
-    public void setType(Host.Type _type) {
-        this._type = _type;
+    public void setType(Host.Type type) {
+        this._type = type;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index f9da9de..b326c54 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -96,7 +96,7 @@ import com.cloud.vm.VirtualMachineProfile;
 import com.cloud.vm.VmDetailConstants;
 import com.cloud.vm.dao.NicDao;
 
-@Local(value=HypervisorGuru.class)
+@Local(value = HypervisorGuru.class)
 public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Configurable {
     private static final Logger s_logger = Logger.getLogger(VMwareGuru.class);
 
@@ -128,17 +128,20 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
     VMInstanceDao _vmDao;
     @Inject
     ClusterDao _clusterDao;
-    @Inject ClusterManager _clusterMgr;
+    @Inject
+    ClusterManager _clusterMgr;
 
     protected VMwareGuru() {
         super();
     }
 
     static final ConfigKey<Boolean> VmwareReserveCpu = new ConfigKey<Boolean>(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
-            "Specify whether or not to reserve CPU when not overprovisioning, In case of cpu overprovisioning we will always reserve cpu.", true, ConfigKey.Scope.Cluster, null);
+        "Specify whether or not to reserve CPU when not overprovisioning, In case of cpu overprovisioning we will always reserve cpu.", true, ConfigKey.Scope.Cluster,
+        null);
 
     static final ConfigKey<Boolean> VmwareReserveMemory = new ConfigKey<Boolean>(Boolean.class, "vmware.reserve.cpu", "Advanced", "false",
-            "Specify whether or not to reserve memory when not overprovisioning, In case of memory overprovisioning we will always reserve memory.", true, ConfigKey.Scope.Cluster, null);
+        "Specify whether or not to reserve memory when not overprovisioning, In case of memory overprovisioning we will always reserve memory.", true,
+        ConfigKey.Scope.Cluster, null);
 
     @Override
     public HypervisorType getHypervisorType() {
@@ -200,7 +203,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co
                 break;
             }
         }
-        long clusterId = _hostDao.findById( _vmDao.findById(vm.getId()).getHostId()).getClusterId();
+        long clusterId = _hostDao.findById(_vmDao.findById(vm.getId()).getHostId()).getClusterId();
         details.put(Config.VmwareReserveCpu.key(), VmwareReserveCpu.valueIn(clusterId).toString());
         details.put(Config.VmwareReserveMem.key(), VmwareReserveMemory.valueIn(clusterId).toString());
         to.setDetails(details);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index e63999c..96f411e 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -904,7 +904,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
         }
     }
 
-    protected final int DEFAULT_DOMR_SSHPORT = 3922;
+    protected final static int DEFAULT_DOMR_SSHPORT = 3922;
 
     protected boolean shutdownRouterVM(DomainRouterVO router) {
         if (s_logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 71894a8..ade46d2 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -45,9 +45,6 @@ import java.util.concurrent.TimeUnit;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import com.cloud.configuration.Config;
-import com.cloud.agent.api.routing.*;
-
 import org.apache.log4j.Logger;
 import org.apache.log4j.NDC;
 
@@ -264,6 +261,7 @@ import com.cloud.agent.api.to.StaticNatRuleTO;
 import com.cloud.agent.api.to.StorageFilerTO;
 import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.agent.api.to.VolumeTO;
+import com.cloud.configuration.Config;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.Vlan;
 import com.cloud.exception.InternalErrorException;
@@ -337,9 +335,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
     protected String _name;
 
-    protected final long _ops_timeout = 900000; 		// 15 minutes time out to time
+    protected final long _opsTimeout = 900000;   // 15 minutes time out to time
 
-    protected final int _shutdown_waitMs = 300000;		// wait up to 5 minutes for shutdown
+    protected final int _shutdownWaitMs = 300000;  // wait up to 5 minutes for shutdown
 
     @Inject
     protected VolumeOrchestrationService volMgr;
@@ -347,8 +345,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
     // out an operation
     protected final int _retry = 24;
     protected final int _sleep = 10000;
-    protected final int DEFAULT_DOMR_SSHPORT = 3922;
-    protected final int MAX_CMD_MBEAN = 100;
+    protected final int DefaultDomRSshPort = 3922;
+    protected final int MazCmdMBean = 100;
 
     protected String _url;
     protected String _dcId;
@@ -365,8 +363,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
     protected int _portsPerDvPortGroup;
     protected boolean _fullCloneFlag = false;
     protected boolean _instanceNameFlag = false;
-    protected boolean  _reserveCpu;
-    protected boolean  _reserveMem;
+    protected boolean _reserveCpu;
+    protected boolean _reserveMem;
 
     protected boolean _recycleHungWorker = false;
     protected DiskControllerType _rootDiskController = DiskControllerType.ide;
@@ -602,7 +600,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     JmxUtil.registerMBean("VMware " + _morHyperHost.getValue(), "Command " + cmdSequence + "-" + cmd.getClass().getSimpleName(), mbean);
                     _cmdMBeans.add(mbean);
 
-                    if (_cmdMBeans.size() >= MAX_CMD_MBEAN) {
+                    if (_cmdMBeans.size() >= MazCmdMBean) {
                         PropertyMapDynamicBean mbeanToRemove = _cmdMBeans.get(0);
                         _cmdMBeans.remove(0);
 
@@ -725,7 +723,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticroute.sh " + args);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticroute.sh " + args);
 
             if (s_logger.isDebugEnabled())
                 s_logger.debug("Executing script on domain router " + controlIp + ": /opt/cloud/bin/vpc_staticroute.sh " + args);
@@ -774,7 +772,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
 
             Pair<Boolean, String> resultPair =
-                SshHelper.sshExecute(privateIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_netusage.sh " + args);
+                SshHelper.sshExecute(privateIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_netusage.sh " + args);
 
             if (!resultPair.first()) {
                 throw new Exception(" vpc network usage plugin call failed ");
@@ -821,7 +819,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/monitor_service.sh " + args);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/monitor_service.sh " + args);
 
             if (!result.first()) {
                 String msg = "monitor_service.sh failed on domain router " + controlIp + " failed " + result.second();
@@ -858,7 +856,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
             try {
                 VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
-                Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args);
+                Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args);
 
                 if (s_logger.isDebugEnabled())
                     s_logger.debug("Executing script on domain router " + controlIp + ": /root/firewall.sh " + args);
@@ -916,9 +914,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             Pair<Boolean, String> result = null;
 
             if (trafficType == FirewallRule.TrafficType.Egress) {
-                result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewallRule_egress.sh " + args);
+                result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewallRule_egress.sh " + args);
             } else {
-                result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall_rule.sh " + args);
+                result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall_rule.sh " + args);
             }
 
             if (s_logger.isDebugEnabled()) {
@@ -971,7 +969,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             // Invoke command on VPC VR.
             try {
                 Pair<Boolean, String> result =
-                    SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticnat.sh " + args);
+                    SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticnat.sh " + args);
 
                 if (s_logger.isDebugEnabled())
                     s_logger.debug("Executing script on domain router " + controlIp + ": /opt/cloud/bin/vpc_staticnat.sh " + args);
@@ -1023,7 +1021,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             try {
                 VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
                 String controlIp = getRouterSshControlIp(cmd);
-                Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args);
+                Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args);
 
                 if (s_logger.isDebugEnabled())
                     s_logger.debug("Executing script on domain router " + controlIp + ": /root/firewall.sh " + args);
@@ -1064,7 +1062,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         }
 
         try {
-            SshHelper.scpTo(controlIp, DEFAULT_DOMR_SSHPORT, "root", keyFile, null, "/etc/haproxy/", tmpCfgFileContents.getBytes(), "haproxy.cfg.new", null);
+            SshHelper.scpTo(controlIp, DefaultDomRSshPort, "root", keyFile, null, "/etc/haproxy/", tmpCfgFileContents.getBytes(), "haproxy.cfg.new", null);
 
             try {
                 String[][] rules = cfgtr.generateFwRules(cmd);
@@ -1105,7 +1103,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
                 // Invoke the command
                 Pair<Boolean, String> result =
-                    SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_loadbalancer.sh " + args);
+                    SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_loadbalancer.sh " + args);
 
                 if (!result.first()) {
                     String msg = "LoadBalancerConfigCommand on domain router " + routerIp + " failed. message: " + result.second();
@@ -1118,7 +1116,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     s_logger.info("VPCLoadBalancerConfigCommand on domain router " + routerIp + " completed");
                 }
             } finally {
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath);
             }
             return new Answer(cmd);
         } catch (Throwable e) {
@@ -1153,7 +1151,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         }
 
         try {
-            SshHelper.scpTo(controlIp, DEFAULT_DOMR_SSHPORT, "root", keyFile, null, "/tmp/", tmpCfgFileContents.getBytes(), routerIp.replace('.', '_') + ".cfg", null);
+            SshHelper.scpTo(controlIp, DefaultDomRSshPort, "root", keyFile, null, "/tmp/", tmpCfgFileContents.getBytes(), routerIp.replace('.', '_') + ".cfg", null);
 
             try {
                 String[] addRules = rules[LoadBalancerConfigurator.ADD];
@@ -1192,7 +1190,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 }
 
                 Pair<Boolean, String> result =
-                    SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "scp " + tmpCfgFilePath +
+                    SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "scp " + tmpCfgFilePath +
                         " /etc/haproxy/haproxy.cfg.new");
 
                 if (!result.first()) {
@@ -1204,7 +1202,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     s_logger.debug("Run command on domain router " + routerIp + ",  /root/loadbalancer.sh " + args);
                 }
 
-                result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/loadbalancer.sh " + args);
+                result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/loadbalancer.sh " + args);
 
                 if (!result.first()) {
                     String msg = "LoadBalancerConfigCommand on domain router " + routerIp + " failed. message: " + result.second();
@@ -1217,7 +1215,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     s_logger.info("LoadBalancerConfigCommand on domain router " + routerIp + " completed");
                 }
             } finally {
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath);
             }
 
             return new Answer(cmd);
@@ -1234,7 +1232,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
     private int allocRouterEthDeviceIndex(String domrName, String routerIp) throws Exception {
         VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
 
-        Pair<Boolean, String> result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf");
+        Pair<Boolean, String> result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf");
 
         if (result.first()) {
             String[] tokens = result.second().split("\\s+");
@@ -1275,7 +1273,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         s_logger.info("findRouterEthDeviceIndex. mac: " + mac);
 
         // TODO : this is a temporary very inefficient solution, will refactor it later
-        Pair<Boolean, String> result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf");
+        Pair<Boolean, String> result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf");
 
         // when we dynamically plug in a new NIC into virtual router, it may take time to show up in guest OS
         // we use a waiting loop here as a workaround to synchronize activities in systems
@@ -1289,7 +1287,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
                         if (s_logger.isDebugEnabled())
                             s_logger.debug("Run domr script " + cmd);
-                        Pair<Boolean, String> result2 = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null,
+                        Pair<Boolean, String> result2 = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null,
                             // TODO need to find the dev index inside router based on IP address
                             cmd);
                         if (s_logger.isDebugEnabled())
@@ -1368,7 +1366,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             }
 
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_guestnw.sh " + args);
+                SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_guestnw.sh " + args);
 
             if (!result.first()) {
                 String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second();
@@ -1435,7 +1433,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             args += "eth" + ethDeviceNum;
 
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_snat.sh " + args);
+                SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_snat.sh " + args);
 
             if (!result.first()) {
                 String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second();
@@ -1484,7 +1482,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 s_logger.debug("Private gateway configuration is set");
                 args += " -d " + "eth" + ethDeviceNum;
                 args += " -a " + sb.toString();
-                result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privategw_acl.sh " + args);
+                result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privategw_acl.sh " + args);
 
                 if (!result.first()) {
                     String msg = "SetNetworkACLAnswer on domain router " + routerIp + " failed. message: " + result.second();
@@ -1498,7 +1496,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 args += " -m " + Long.toString(NetUtils.getCidrSize(nic.getNetmask()));
                 args += " -a " + sb.toString();
 
-                result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_acl.sh " + args);
+                result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_acl.sh " + args);
 
                 if (!result.first()) {
                     String msg = "SetNetworkACLAnswer on domain router " + routerIp + " failed. message: " + result.second();
@@ -1540,7 +1538,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
             try {
                 Pair<Boolean, String> sshResult =
-                    SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_portforwarding.sh " + args);
+                    SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_portforwarding.sh " + args);
 
                 if (!sshResult.first()) {
                     results[i++] = "Failed";
@@ -1609,7 +1607,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
         Pair<Boolean, String> result;
         try {
-            result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipsectunnel.sh " + args);
+            result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipsectunnel.sh " + args);
 
             if (!result.first()) {
                 s_logger.error("Setup site2site VPN " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second());
@@ -1809,7 +1807,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         args += NetUtils.getSubNet(ip.getPublicIp(), ip.getVlanNetmask());
 
         Pair<Boolean, String> result =
-            SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_ipassoc.sh " + args);
+            SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_ipassoc.sh " + args);
 
         if (!result.first()) {
             throw new InternalErrorException("Unable to assign public IP address");
@@ -1822,7 +1820,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             snatArgs += "eth" + ethDeviceNum;
 
             Pair<Boolean, String> result_gateway =
-                SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privateGateway.sh " + snatArgs);
+                SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privateGateway.sh " + snatArgs);
 
             if (!result_gateway.first()) {
                 throw new InternalErrorException("Unable to configure source NAT for public IP address.");
@@ -1914,7 +1912,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
         VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
         Pair<Boolean, String> result =
-            SshHelper.sshExecute(privateIpAddress, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipassoc.sh " + args);
+            SshHelper.sshExecute(privateIpAddress, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipassoc.sh " + args);
 
         if (!result.first()) {
             s_logger.error("ipassoc command on domain router " + privateIpAddress + " failed. message: " + result.second());
@@ -1958,12 +1956,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             synchronized (vmMo.getRunningHost().getMor().getValue().intern()) {
                 networkInfo =
                     HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), "cloud.public", vmMo.getRunningHost(), vlanId, null, null,
-                        _ops_timeout, true, BroadcastDomainType.Vlan, null);
+                        _opsTimeout, true, BroadcastDomainType.Vlan, null);
             }
         } else {
             networkInfo =
                 HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), "cloud.public", vmMo.getRunningHost(), vlanId, null, null, null,
-                    _ops_timeout, vSwitchType, _portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan);
+                    _opsTimeout, vSwitchType, _portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan);
         }
 
         int nicIndex = allocPublicNicIndex(vmMo);
@@ -2099,7 +2097,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/savepassword.sh " + args);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/savepassword.sh " + args);
 
             if (!result.first()) {
                 s_logger.error("savepassword command on domain router " + controlIp + " failed, message: " + result.second());
@@ -2160,7 +2158,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             String controlIp = getRouterSshControlIp(cmd);
-            Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/edithosts.sh " + args);
+            Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/edithosts.sh " + args);
 
             if (!result.first()) {
                 s_logger.error("dhcp_entry command on domR " + controlIp + " failed, message: " + result.second());
@@ -2199,7 +2197,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             String controlIp = getRouterSshControlIp(cmd);
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/createIpAlias.sh " + args);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/createIpAlias.sh " + args);
 
             if (!result.first()) {
                 s_logger.error("CreateIpAlias command on domr " + controlIp + " failed, message: " + result.second());
@@ -2243,7 +2241,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             String controlIp = getRouterSshControlIp(cmd);
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/deleteIpAlias.sh " + args);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/deleteIpAlias.sh " + args);
 
             if (!result.first()) {
                 s_logger.error("deleteIpAlias command on domr " + controlIp + " failed, message: " + result.second());
@@ -2282,7 +2280,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         File keyFile = mgr.getSystemVMKeyFile();
 
         try {
-            Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/dnsmasq.sh " + args);
+            Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/dnsmasq.sh " + args);
             if (s_logger.isDebugEnabled()) {
                 s_logger.debug("Run command on domain router " + routerIp + ",  /root/dnsmasq.sh");
             }
@@ -2319,7 +2317,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 cmdline += " " + ip;
             }
 
-            result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, cmdline);
+            result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, cmdline);
 
             if (!result.first()) {
                 s_logger.error("check site-to-site vpn connections command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " +
@@ -2349,7 +2347,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             String controlIp = getRouterSshControlIp(cmd);
-            result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/checkrouter.sh ");
+            result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/checkrouter.sh ");
 
             if (!result.first()) {
                 s_logger.error("check router command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second());
@@ -2378,7 +2376,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             String controlIp = getRouterSshControlIp(cmd);
-            result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/get_template_version.sh ");
+            result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/get_template_version.sh ");
 
             if (!result.first()) {
                 s_logger.error("GetDomRVersionCmd on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second());
@@ -2411,7 +2409,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             String controlIp = getRouterSshControlIp(cmd);
-            result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/bumpup_priority.sh ");
+            result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/bumpup_priority.sh ");
 
             if (!result.first()) {
                 s_logger.error("BumpUpPriority command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second());
@@ -2468,11 +2466,11 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
-            SshHelper.scpTo(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/tmp", content.getBytes(), tmpFileName, null);
+            SshHelper.scpTo(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/tmp", content.getBytes(), tmpFileName, null);
 
             try {
                 Pair<Boolean, String> result =
-                    SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/userdata.py " + tmpFileName);
+                    SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/userdata.py " + tmpFileName);
 
                 if (!result.first()) {
                     s_logger.error("vm_data command on domain router " + controlIp + " failed. messge: " + result.second());
@@ -2480,7 +2478,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 }
             } finally {
 
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "rm /tmp/" + tmpFileName);
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "rm /tmp/" + tmpFileName);
             }
 
             if (s_logger.isInfoEnabled()) {
@@ -2669,7 +2667,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             if (vmMo != null) {
                 s_logger.info("VM " + vmInternalCSName + " already exists, tear down devices for reconfiguration");
                 if (getVmPowerState(vmMo) != PowerState.PowerOff)
-                    vmMo.safePowerOff(_shutdown_waitMs);
+                    vmMo.safePowerOff(_shutdownWaitMs);
 
                 // retrieve disk information before we tear down
                 diskInfoBuilder = vmMo.getDiskInfoBuilder();
@@ -2692,7 +2690,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     takeVmFromOtherHyperHost(hyperHost, vmInternalCSName);
 
                     if (getVmPowerState(vmMo) != PowerState.PowerOff)
-                        vmMo.safePowerOff(_shutdown_waitMs);
+                        vmMo.safePowerOff(_shutdownWaitMs);
 
                     diskInfoBuilder = vmMo.getDiskInfoBuilder();
                     hasSnapshot = vmMo.hasSnapshot();
@@ -2719,8 +2717,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     }
 
                     if (!hyperHost.createBlankVm(vmNameOnVcenter, vmInternalCSName, vmSpec.getCpus(), vmSpec.getMaxSpeed().intValue(),
-                            getReservedCpuMHZ(vmSpec), vmSpec.getLimitCpuUse(),(int)(vmSpec.getMaxRam()/(1024*1024)), getReservedMemoryMb(vmSpec),
-                            translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(), rootDiskDataStoreDetails.first(), false)) {
+                        getReservedCpuMHZ(vmSpec), vmSpec.getLimitCpuUse(), (int)(vmSpec.getMaxRam() / (1024 * 1024)), getReservedMemoryMb(vmSpec),
+                        translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(), rootDiskDataStoreDetails.first(), false)) {
                         throw new Exception("Failed to create VM. vmName: " + vmInternalCSName);
                     }
                 }
@@ -2747,8 +2745,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             String guestOsId = translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value();
 
             VmwareHelper.setBasicVmConfig(vmConfigSpec, vmSpec.getCpus(), vmSpec.getMaxSpeed(),
-                    getReservedCpuMHZ(vmSpec),(int) (vmSpec.getMaxRam()/(1024*1024)), getReservedMemoryMb(vmSpec),
-                    guestOsId, vmSpec.getLimitCpuUse());
+                getReservedCpuMHZ(vmSpec), (int)(vmSpec.getMaxRam() / (1024 * 1024)), getReservedMemoryMb(vmSpec),
+                guestOsId, vmSpec.getLimitCpuUse());
 
             // Check for hotadd settings
             vmConfigSpec.setMemoryHotAddEnabled(vmMo.isMemoryHotAddSupported(guestOsId));
@@ -3006,22 +3004,23 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
     int getReservedMemoryMb(VirtualMachineTO vmSpec) {
         if (vmSpec.getDetails().get(Config.VmwareReserveMem.key()).equalsIgnoreCase("true")) {
-              return  (int) (vmSpec.getMinRam() / (1024 * 1024));
-        }  else if (vmSpec.getMinRam() != vmSpec.getMaxRam()) {
-              s_logger.warn("memory overprovisioning factor is set to "+ (vmSpec.getMaxRam()/vmSpec.getMinRam())+" ignoring the flag vmware.reserve.mem");
-              return  (int) (vmSpec.getMinRam() / (1024 * 1024));
+            return (int)(vmSpec.getMinRam() / (1024 * 1024));
+        } else if (vmSpec.getMinRam() != vmSpec.getMaxRam()) {
+            s_logger.warn("memory overprovisioning factor is set to " + (vmSpec.getMaxRam() / vmSpec.getMinRam()) + " ignoring the flag vmware.reserve.mem");
+            return (int)(vmSpec.getMinRam() / (1024 * 1024));
         }
         return 0;
     }
 
     int getReservedCpuMHZ(VirtualMachineTO vmSpec) {
-         if (vmSpec.getDetails().get(Config.VmwareReserveCpu.key()).equalsIgnoreCase("true")) {
-              return vmSpec.getMinSpeed();
-         }else if (vmSpec.getMinSpeed().intValue() != vmSpec.getMaxSpeed().intValue()) {
-              s_logger.warn("cpu overprovisioning factor is set to "+ (vmSpec.getMaxSpeed().intValue()/vmSpec.getMinSpeed().intValue())+" ignoring the flag vmware.reserve.cpu");
-              return vmSpec.getMinSpeed();
-         }
-         return 0;
+        if (vmSpec.getDetails().get(Config.VmwareReserveCpu.key()).equalsIgnoreCase("true")) {
+            return vmSpec.getMinSpeed();
+        } else if (vmSpec.getMinSpeed().intValue() != vmSpec.getMaxSpeed().intValue()) {
+            s_logger.warn("cpu overprovisioning factor is set to " + (vmSpec.getMaxSpeed().intValue() / vmSpec.getMinSpeed().intValue()) +
+                " ignoring the flag vmware.reserve.cpu");
+            return vmSpec.getMinSpeed();
+        }
+        return 0;
     }
 
     // return the finalized disk chain for startup, from top to bottom
@@ -3562,7 +3561,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             synchronized (hostMo.getMor().getValue().intern()) {
                 networkInfo =
                     HypervisorHostHelper.prepareNetwork(switchName.first(), namePrefix, hostMo, getVlanInfo(nicTo, switchName.second()), nicTo.getNetworkRateMbps(),
-                        nicTo.getNetworkRateMulticastMbps(), _ops_timeout, !namePrefix.startsWith("cloud.private"), nicTo.getBroadcastType(), nicTo.getUuid());
+                        nicTo.getNetworkRateMulticastMbps(), _opsTimeout, !namePrefix.startsWith("cloud.private"), nicTo.getBroadcastType(), nicTo.getUuid());
             }
         } else {
             String vlanId = getVlanInfo(nicTo, switchName.second());
@@ -3577,7 +3576,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             }
             networkInfo =
                 HypervisorHostHelper.prepareNetwork(switchName.first(), namePrefix, hostMo, vlanId, svlanId, nicTo.getNetworkRateMbps(),
-                    nicTo.getNetworkRateMulticastMbps(), _ops_timeout, switchType, _portsPerDvPortGroup, nicTo.getGateway(), configureVServiceInNexus,
+                    nicTo.getNetworkRateMulticastMbps(), _opsTimeout, switchType, _portsPerDvPortGroup, nicTo.getGateway(), configureVServiceInNexus,
                     nicTo.getBroadcastType());
         }
 
@@ -3663,7 +3662,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             }
 
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString());
+                SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString());
 
             if (!result.first()) {
                 s_logger.error("RemoteAccessVpnCfg command on domR failed, message: " + result.second());
@@ -3708,7 +3707,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                 }
 
                 Pair<Boolean, String> result =
-                    SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString());
+                    SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString());
 
                 if (!result.first()) {
                     s_logger.error("VpnUserCfg command on domR failed, message: " + result.second());
@@ -3920,7 +3919,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
                     vmMo.setCustomFieldValue(CustomFieldConstants.CLOUD_NIC_MASK, "0");
 
                     if (getVmPowerState(vmMo) != PowerState.PowerOff) {
-                        if (vmMo.safePowerOff(_shutdown_waitMs)) {
+                        if (vmMo.safePowerOff(_shutdownWaitMs)) {
                             state = State.Stopped;
                             return new StopAnswer(cmd, "Stop VM " + cmd.getVmName() + " Succeed", true);
                         } else {
@@ -5311,7 +5310,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         String args = " -c 1 -n -q " + cmd.getPrivateIp();
         try {
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
-            Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/bin/ping" + args);
+            Pair<Boolean, String> result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/bin/ping" + args);
             if (result.first())
                 return new Answer(cmd);
         } catch (Exception e) {
@@ -5516,7 +5515,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
                         // tear down all devices first before we destroy the VM to avoid accidently delete disk backing files
                         if (getVmPowerState(vmMo) != PowerState.PowerOff)
-                            vmMo.safePowerOff(_shutdown_waitMs);
+                            vmMo.safePowerOff(_shutdownWaitMs);
                         vmMo.tearDownDevices(new Class<?>[] { /* VirtualDisk.class, */VirtualEthernetCard.class});
                         vmMo.destroy();
 
@@ -6583,7 +6582,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
 
             Pair<Boolean, String> result =
-                SshHelper.sshExecute(privateIpAddress, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/netusage.sh " + args);
+                SshHelper.sshExecute(privateIpAddress, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/netusage.sh " + args);
 
             if (!result.first()) {
                 return null;
@@ -6624,7 +6623,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
         // at least have tried _retry times, this is to coordinate with system
         // VM patching/rebooting time that may need
         int retry = _retry;
-        while (System.currentTimeMillis() - startTick <= _ops_timeout || --retry > 0) {
+        while (System.currentTimeMillis() - startTick <= _opsTimeout || --retry > 0) {
             SocketChannel sch = null;
             try {
                 s_logger.info("Trying to connect to " + ipAddress);
@@ -6838,7 +6837,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             int timeout = NumbersUtil.parseInt(value, 1440) * 1000;
             VmwareManager mgr = context.getStockObject(VmwareManager.CONTEXT_STOCK_NAME);
             VmwareStorageProcessor storageProcessor =
-                new VmwareStorageProcessor((VmwareHostService)this, _fullCloneFlag, (VmwareStorageMount)mgr, timeout, this, _shutdown_waitMs, null);
+                new VmwareStorageProcessor((VmwareHostService)this, _fullCloneFlag, (VmwareStorageMount)mgr, timeout, this, _shutdownWaitMs, null);
             storageHandler = new VmwareStorageSubsystemCommandHandler(storageProcessor);
 
             return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index 747d5d6..7c3e73a 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -92,7 +92,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
     private VmwareStorageMount mountService;
     private VmwareResource resource;
     private Integer _timeout;
-    protected Integer _shutdown_waitMs;
+    protected Integer _shutdownWaitMs;
     private final Gson _gson;
     private final StorageLayer _storage = new JavaStorageLayer();
 
@@ -103,7 +103,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
         this.mountService = mountService;
         _timeout = timeout;
         this.resource = resource;
-        _shutdown_waitMs = shutdownWaitMs;
+        _shutdownWaitMs = shutdownWaitMs;
         _gson = GsonHelper.getGsonLogger();
     }
 
@@ -1455,7 +1455,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
 
                         // tear down all devices first before we destroy the VM to avoid accidently delete disk backing files
                         if (VmwareResource.getVmState(vmMo) != State.Stopped) {
-                            vmMo.safePowerOff(_shutdown_waitMs);
+                            vmMo.safePowerOff(_shutdownWaitMs);
                         }
 
                         // call this before calling detachAllDisksExcept

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5e5cc6/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
index 705aa4c..ecdb821 100755
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java
@@ -748,10 +748,10 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
     }
 
     @Override
-    protected HashMap<String, Object> buildConfigParams(HostVO host){
+    protected HashMap<String, Object> buildConfigParams(HostVO host) {
         HashMap<String, Object> params = super.buildConfigParams(host);
         DataCenterVO zone = _dcDao.findById(host.getDataCenterId());
-        if ( zone != null ) {
+        if (zone != null) {
             boolean securityGroupEnabled = zone.isSecurityGroupEnabled();
             params.put("securitygroupenabled", Boolean.toString(securityGroupEnabled));
         }


Mime
View raw message