cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [52/58] [abbrv] Broke up some long strings
Date Thu, 21 Nov 2013 16:10:56 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/CloudOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/CloudOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/CloudOrchestrator.java
index 303f1e0..f55f58c 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/CloudOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/CloudOrchestrator.java
@@ -154,7 +154,8 @@ public class CloudOrchestrator implements OrchestrationService {
         int speed, long memory, Long diskSize, List<String> computeTags, List<String> rootDiskTags, Map<String, NicProfile> networkNicMap, DeploymentPlan plan,
         Long rootDiskSize) throws InsufficientCapacityException {
 
-        // VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, networks, vmEntityManager);
+        // VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, networks,
+        // vmEntityManager);
 
         LinkedHashMap<NetworkVO, NicProfile> networkIpMap = new LinkedHashMap<NetworkVO, NicProfile>();
         for (String uuid : networkNicMap.keySet()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java b/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
index de5a370..cb916c3 100755
--- a/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
+++ b/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
@@ -163,10 +163,10 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
     *     */
     private static final String LIST_CLUSTERS_CROSSING_THRESHOLD =
         "SELECT clusterList.cluster_id "
-            + "FROM (    SELECT cluster.cluster_id cluster_id, ( (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, cluster.configValue value "
-            + "FROM (    SELECT capacity.cluster_id cluster_id, capacity.used_capacity used, capacity.reserved_capacity reserved, capacity.total_capacity * overcommit.value total, "
+            + "FROM (SELECT cluster.cluster_id cluster_id, ( (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, cluster.configValue value "
+            + "FROM (SELECT capacity.cluster_id cluster_id, capacity.used_capacity used, capacity.reserved_capacity reserved, capacity.total_capacity * overcommit.value total, "
             + "CASE (SELECT count(*) FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) "
-            + "WHEN 1 THEN (    CASE WHEN (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL "
+            + "WHEN 1 THEN (CASE WHEN (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL "
             + "THEN (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?)"
             + "ELSE (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) END )"
             + "ELSE (    SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?) " + "END configValue "
@@ -561,7 +561,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
 
         public SummedCapacity(long sumUsed, long sumReserved, long sumTotal, short capacityType, Long clusterId, Long podId, Long zoneId) {
             this(sumUsed, sumReserved, sumTotal, capacityType, clusterId, podId);
-            this.dcId = zoneId;
+            dcId = zoneId;
         }
 
         public SummedCapacity(long sumUsed, long sumTotal, float percentUsed, short capacityType, Long zoneId, Long podId, Long clusterId) {
@@ -572,7 +572,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
             this.capacityType = capacityType;
             this.clusterId = clusterId;
             this.podId = podId;
-            this.dcId = zoneId;
+            dcId = zoneId;
         }
 
         public SummedCapacity(long sumUsed, long sumReserved, long sumTotal, float percentUsed, short capacityType, Long zoneId, Long podId, Long clusterId) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
index d4fb1b4..80936c0 100755
--- a/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
+++ b/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
@@ -113,8 +113,8 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
     @DB
     public void addIpRange(long dcId, long podId, String start, String end) {
         TransactionLegacy txn = TransactionLegacy.currentTxn();
-        String insertSql =
-            "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
+        String insertSql = "INSERT INTO `cloud`.`op_dc_ip_address_alloc` (ip_address, data_center_id, pod_id, mac_address) " +
+            "VALUES (?, ?, ?, (select mac_address from `cloud`.`data_center` where id=?))";
         String updateSql = "UPDATE `cloud`.`data_center` set mac_address = mac_address+1 where id=?";
         PreparedStatement stmt = null;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java
index ce41563..3edefcb 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java
@@ -300,14 +300,15 @@ public class Upgrade2213to2214 implements DbUpgrade {
         DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, true);
         DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, false);
         try {
-            PreparedStatement pstmt =
-                conn.prepareStatement("ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)");
+            PreparedStatement pstmt = conn.prepareStatement(
+                    "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)");
             pstmt.executeUpdate();
-            pstmt =
-                conn.prepareStatement("ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__vlan_db_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan`(`id`) ON DELETE CASCADE");
+            pstmt = conn.prepareStatement(
+                    "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__vlan_db_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan`(`id`) ON DELETE CASCADE");
             pstmt.executeUpdate();
-            pstmt =
-                conn.prepareStatement("ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__data_center_id` FOREIGN KEY (`data_center_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE");
+            pstmt = conn.prepareStatement(
+                "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__data_center_id`" +
+                    " FOREIGN KEY (`data_center_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE");
             pstmt.executeUpdate();
             pstmt.close();
         } catch (SQLException e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java
index 26d7a43..410c1cc 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2214to30.java
@@ -183,26 +183,29 @@ public class Upgrade2214to30 extends Upgrade30xBase implements DbUpgrade {
                     if (vnet != null) {
                         //check if any vnet is allocated and guest networks are using vnets.
                         PreparedStatement pstmt4 =
-                            conn.prepareStatement("SELECT v.* FROM `cloud`.`op_dc_vnet_alloc` v JOIN `cloud`.`networks` n ON CONCAT('vlan://' , v.vnet) = n.broadcast_uri WHERE v.taken IS NOT NULL AND v.data_center_id = ? AND n.removed IS NULL");
+                            conn.prepareStatement("SELECT v.* FROM `cloud`.`op_dc_vnet_alloc` v JOIN `cloud`.`networks` n ON CONCAT('vlan://' , v.vnet) = " +
+                                "n.broadcast_uri WHERE v.taken IS NOT NULL AND v.data_center_id = ? AND n.removed IS NULL");
                         pstmt4.setLong(1, zoneId);
                         ResultSet rsVNet = pstmt4.executeQuery();
 
                         if (rsVNet.next()) {
-                            String message =
-                                "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
-                                    + "1. Please rollback to your 2.2.14 setup\n"
-                                    + "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
-                                    + "3. Run following query to find if any networks still have nics allocated:\n\t"
-                                    + "a) check if any virtual guest networks still have allocated nics by running:\n\t"
-                                    + "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
-                                    + "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
-                                    + "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
-                                    + "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE  id = <enter id of virtual network>\n\t"
-                                    + "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
-                                    + "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
-                                    + "5. Run upgrade. This will allocate all your guest vnet range to first physical network.  \n"
-                                    + "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n"
-                                    + "7. Start all your VMs";
+                            String message = "Cannot upgrade. Your setup has multiple Physical Networks and is using guest "
+                                + "Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
+                                + "1. Please rollback to your 2.2.14 setup\n"
+                                + "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
+                                + "3. Run following query to find if any networks still have nics allocated:\n\t"
+                                + "a) check if any virtual guest networks still have allocated nics by running:\n\t"
+                                + "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on "
+                                + "op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
+                                + "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
+                                + "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
+                                + "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE  id = <enter id of virtual network>\n\t"
+                                + "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be "
+                                + "determined by network.gc.interval and network.gc.wait seconds] \n"
+                                + "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
+                                + "5. Run upgrade. This will allocate all your guest vnet range to first physical network.  \n"
+                                + "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n"
+                                + "7. Start all your VMs";
 
                             s_logger.error(message);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java
index ec75be3..ab5d213 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade302to40.java
@@ -297,24 +297,25 @@ public class Upgrade302to40 extends Upgrade30xBase implements DbUpgrade {
                         s_logger.error("Guest Vnet assignment is set wrongly . Cannot upgrade until that is corrected. Example- Vnet: " + vnet +
                             " has physical network id: " + vpid + " ,but the guest network: " + networkId + " that uses it has physical network id: " + npid);
 
-                        String message =
-                            "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
-                                + "1. Please rollback to your 2.2.14 setup\n"
-                                + "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
-                                + "3. Run following query to find if any networks still have nics allocated:\n\t"
-                                + "a) check if any virtual guest networks still have allocated nics by running:\n\t"
-                                + "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
-                                + "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
-                                + "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
-                                + "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE  id = <enter id of virtual network>\n\t"
-                                + "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
-                                + "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
-                                + "5. Run upgrade. This will allocate all your guest vnet range to first physical network.  \n"
-                                + "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
+                        String message = "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. "
+                            + "To upgrade, first correct the setup by doing the following: \n"
+                            + "1. Please rollback to your 2.2.14 setup\n"
+                            + "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
+                            + "3. Run following query to find if any networks still have nics allocated:\n\t"
+                            + "a) check if any virtual guest networks still have allocated nics by running:\n\t"
+                            + "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
+                            + "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
+                            + "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
+                            + "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE  id = <enter id of virtual network>\n\t"
+                            + "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by "
+                            + "network.gc.interval and network.gc.wait seconds] \n"
+                            + "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
+                            + "5. Run upgrade. This will allocate all your guest vnet range to first physical network.  \n"
+                            + "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
 
                         s_logger.error(message);
-                        throw new CloudRuntimeException(
-                            "Cannot upgrade this setup since Guest Vnet assignment to the multiple physical networks is incorrect. Please check the logs for details on how to proceed");
+                        throw new CloudRuntimeException("Cannot upgrade this setup since Guest Vnet assignment to the multiple physical " +
+                            "networks is incorrect. Please check the logs for details on how to proceed");
 
                     }
                     rsVNet.close();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade303to304.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade303to304.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade303to304.java
index 1e9c652..5c74bca 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade303to304.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade303to304.java
@@ -268,24 +268,25 @@ public class Upgrade303to304 extends Upgrade30xBase implements DbUpgrade {
                         s_logger.error("Guest Vnet assignment is set wrongly . Cannot upgrade until that is corrected. Example- Vnet: " + vnet +
                             " has physical network id: " + vpid + " ,but the guest network: " + networkId + " that uses it has physical network id: " + npid);
 
-                        String message =
-                            "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. To upgrade, first correct the setup by doing the following: \n"
-                                + "1. Please rollback to your 2.2.14 setup\n"
-                                + "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
-                                + "3. Run following query to find if any networks still have nics allocated:\n\t"
-                                + "a) check if any virtual guest networks still have allocated nics by running:\n\t"
-                                + "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
-                                + "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
-                                + "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
-                                + "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE  id = <enter id of virtual network>\n\t"
-                                + "d) Restart management server and wait for all networks to shutdown. [Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
-                                + "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
-                                + "5. Run upgrade. This will allocate all your guest vnet range to first physical network.  \n"
-                                + "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
+                        String message = "Cannot upgrade. Your setup has multiple Physical Networks and is using guest Vnet that is assigned wrongly. "
+                            + "To upgrade, first correct the setup by doing the following: \n"
+                            + "1. Please rollback to your 2.2.14 setup\n"
+                            + "2. Please stop all VMs using isolated(virtual) networks through CloudStack\n"
+                            + "3. Run following query to find if any networks still have nics allocated:\n\t"
+                            + "a) check if any virtual guest networks still have allocated nics by running:\n\t"
+                            + "SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual';\n\t"
+                            + "b) If this returns any networkd ids, then ensure that all VMs are stopped, no new VM is being started, and then shutdown management server\n\t"
+                            + "c) Clean up the nics count for the 'virtual' network id's returned in step (a) by running this:\n\t"
+                            + "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE  id = <enter id of virtual network>\n\t"
+                            + "d) Restart management server and wait for all networks to shutdown. "
+                            + "[Networks shutdown will be determined by network.gc.interval and network.gc.wait seconds] \n"
+                            + "4. Please ensure all networks are shutdown and all guest Vnet's are free.\n"
+                            + "5. Run upgrade. This will allocate all your guest vnet range to first physical network.  \n"
+                            + "6. Reconfigure the vnet ranges for each physical network as desired by using updatePhysicalNetwork API \n" + "7. Start all your VMs";
 
                         s_logger.error(message);
-                        throw new CloudRuntimeException(
-                            "Cannot upgrade this setup since Guest Vnet assignment to the multiple physical networks is incorrect. Please check the logs for details on how to proceed");
+                        throw new CloudRuntimeException("Cannot upgrade this setup since Guest Vnet assignment to the multiple physical networks " +
+                            "is incorrect. Please check the logs for details on how to proceed");
 
                     }
                     rsVNet.close();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java
index 9eb4fc4..622f7ea 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade305to306.java
@@ -168,8 +168,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade {
         ResultSet rsNw = null;
         try {
             // update the existing ingress rules traffic type
-            pstmt =
-                conn.prepareStatement("update `cloud`.`firewall_rules`  set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is not null and traffic_type is null");
+            pstmt = conn.prepareStatement("update `cloud`.`firewall_rules`" +
+                "  set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is not null and traffic_type is null");
             s_logger.debug("Updating firewall Ingress rule traffic type: " + pstmt);
             pstmt.executeUpdate();
 
@@ -179,8 +179,8 @@ public class Upgrade305to306 extends Upgrade30xBase implements DbUpgrade {
                 long netId = rs.getLong(1);
                 //When upgraded from 2.2.14 to 3.0.6 guest_type is updated to Isolated in the 2214to30 clean up sql. clean up executes
                 //after this. So checking for Isolated OR Virtual
-                pstmt =
-                    conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR guest_type='Virtual') and traffic_type='Guest' and vpc_id is NULL and (state='implemented' OR state='Shutdown') and id=? ");
+                pstmt = conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR guest_type='" +
+                    "Virtual') and traffic_type='Guest' and vpc_id is NULL and (state='implemented' OR state='Shutdown') and id=? ");
                 pstmt.setLong(1, netId);
                 s_logger.debug("Getting account_id, domain_id from networks table: " + pstmt);
                 rsNw = pstmt.executeQuery();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java
index 38c46c6..77e2a6f 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java
@@ -109,8 +109,8 @@ public class Upgrade40to41 implements DbUpgrade {
         ResultSet rsNw = null;
         try {
             // update the existing ingress rules traffic type
-            pstmt =
-                conn.prepareStatement("update `cloud`.`firewall_rules`  set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is not null and traffic_type is null");
+            pstmt = conn.prepareStatement("update `cloud`.`firewall_rules`  set traffic_type='Ingress' where purpose='Firewall' and ip_address_id is " +
+                "not null and traffic_type is null");
             s_logger.debug("Updating firewall Ingress rule traffic type: " + pstmt);
             pstmt.executeUpdate();
 
@@ -120,8 +120,9 @@ public class Upgrade40to41 implements DbUpgrade {
                 long netId = rs.getLong(1);
                 //When upgraded from 2.2.14 to 3.0.6 guest_type is updated to Isolated in the 2214to30 clean up sql. clean up executes
                 //after this. So checking for Isolated OR Virtual
-                pstmt =
-                    conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR guest_type='Virtual') and traffic_type='Guest' and vpc_id is NULL and (state='implemented' OR state='Shutdown') and id=? ");
+                pstmt = conn.prepareStatement("select account_id, domain_id FROM `cloud`.`networks` where (guest_type='Isolated' OR " +
+                    "guest_type='Virtual') and traffic_type='Guest' and vpc_id is NULL and " +
+                    "(state='implemented' OR state='Shutdown') and id=? ");
                 pstmt.setLong(1, netId);
                 s_logger.debug("Getting account_id, domain_id from networks table: " + pstmt);
                 rsNw = pstmt.executeQuery();
@@ -132,8 +133,7 @@ public class Upgrade40to41 implements DbUpgrade {
 
                     //Add new rule for the existing networks
                     s_logger.debug("Adding default egress firewall rule for network " + netId);
-                    pstmt =
-                        conn.prepareStatement("INSERT INTO firewall_rules (uuid, state, protocol, purpose, account_id, domain_id, network_id, xid, created,  traffic_type) VALUES (?, 'Active', 'all', 'Firewall', ?, ?, ?, ?, now(), 'Egress')");
+                    pstmt = conn.prepareStatement("INSERT INTO firewall_rules (uuid, state, protocol, purpose, account_id, domain_id, network_id, xid, created,  traffic_type) VALUES (?, 'Active', 'all', 'Firewall', ?, ?, ?, ?, now(), 'Egress')");
                     pstmt.setString(1, UUID.randomUUID().toString());
                     pstmt.setLong(2, accountId);
                     pstmt.setLong(3, domainId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
index 57b2483..80497d4 100755
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -2380,10 +2380,10 @@ public class Upgrade410to420 implements DbUpgrade {
             storeDetailInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store_details` (store_id, name, value) values(?, ?, ?)");
 
             // migrate S3 to image_store
-            storeInsert =
-                conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, scope, role, created) values(?, ?, 'S3', ?, 'REGION', 'Image', ?)");
-            s3Query =
-                conn.prepareStatement("select id, uuid, access_key, secret_key, end_point, bucket, https, connection_timeout, max_error_retry, socket_timeout, created from `cloud`.`s3`");
+            storeInsert = conn.prepareStatement("INSERT INTO `cloud`.`image_store` (uuid, name, image_provider_name, protocol, scope, role, created) " +
+                "values(?, ?, 'S3', ?, 'REGION', 'Image', ?)");
+            s3Query = conn.prepareStatement("select id, uuid, access_key, secret_key, end_point, bucket, https, connection_timeout, " +
+                "max_error_retry, socket_timeout, created from `cloud`.`s3`");
             rs = s3Query.executeQuery();
 
             while (rs.next()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
index 530860f..3be101b 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java
@@ -146,8 +146,8 @@ public class VersionDaoImpl extends GenericDaoBase<VersionVO, Long> implements V
                     } else {
                         pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules");
                         pstmt.executeQuery();
-                        throw new CloudRuntimeException(
-                            "Unable to determine the current version, version table exists and empty, nics table doesn't exist, is_static_nat field exists in firewall_rules table");
+                        throw new CloudRuntimeException("Unable to determine the current version, version table exists and empty, " +
+                            "nics table doesn't exist, is_static_nat field exists in firewall_rules table");
                     }
                 } catch (SQLException e) {
                     s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index a2039ec..9582033 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -69,9 +69,9 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long> implements Usage
     private static final String UPDATE_VM_DISK_STATS =
         "UPDATE cloud_usage.vm_disk_statistics SET net_io_read=?, net_io_write=?, current_io_read=?, current_io_write=?, agg_io_read=?, agg_io_write=?, "
             + "net_bytes_read=?, net_bytes_write=?, current_bytes_read=?, current_bytes_write=?, agg_bytes_read=?, agg_bytes_write=?  WHERE id=?";
-    private static final String INSERT_USGAE_RECORDS =
-        "INSERT INTO cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, usage_display, usage_type, raw_usage, vm_instance_id, vm_name, offering_id, template_id, "
-            + "usage_id, type, size, network_id, start_date, end_date, virtual_size) VALUES (?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?,?)";
+    private static final String INSERT_USGAE_RECORDS = "INSERT INTO cloud_usage.cloud_usage (zone_id, account_id, domain_id, description, usage_display, " +
+        "usage_type, raw_usage, vm_instance_id, vm_name, offering_id, template_id, "
+        + "usage_id, type, size, network_id, start_date, end_date, virtual_size) VALUES (?,?,?,?,?,?,?,?,?, ?, ?, ?,?,?,?,?,?,?)";
 
     protected final static TimeZone s_gmtTimeZone = TimeZone.getTimeZone("GMT");
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
index afa730b..3e75930 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageVmDiskDaoImpl.java
@@ -39,13 +39,13 @@ public class UsageVmDiskDaoImpl extends GenericDaoBase<UsageVmDiskVO, Long> impl
     private static final String SELECT_LATEST_STATS =
         "SELECT uvd.account_id, uvd.zone_id, uvd.vm_id, uvd.volume_id, uvd.io_read, uvd.io_write, uvd.agg_io_read, uvd.agg_io_write, "
             + "uvd.bytes_read, uvd.bytes_write, uvd.agg_bytes_read, uvd.agg_bytes_write, uvd.event_time_millis "
-            + "FROM cloud_usage.usage_vm_disk uvd INNER JOIN (SELECT vmdiskusage.account_id as acct_id, vmdiskusage.zone_id as z_id, max(vmdiskusage.event_time_millis) as max_date "
-            + "FROM cloud_usage.usage_vm_disk vmdiskusage " + "GROUP BY vmdiskusage.account_id, vmdiskusage.zone_id "
+            + "FROM cloud_usage.usage_vm_disk uvd INNER JOIN (SELECT vmdiskusage.account_id as acct_id, vmdiskusage.zone_id as z_id, max(vmdiskusage.event_time_millis) as "
+            + "max_date FROM cloud_usage.usage_vm_disk vmdiskusage " + "GROUP BY vmdiskusage.account_id, vmdiskusage.zone_id "
             + ") joinnet on uvd.account_id = joinnet.acct_id and uvd.zone_id = joinnet.z_id and uvd.event_time_millis = joinnet.max_date";
     private static final String DELETE_OLD_STATS = "DELETE FROM cloud_usage.usage_vm_disk WHERE event_time_millis < ?";
 
-    private static final String INSERT_USAGE_VM_DISK =
-        "INSERT INTO cloud_usage.usage_vm_disk (account_id, zone_id, vm_id, volume_id, io_read, io_write, agg_io_read, agg_io_write, bytes_read, bytes_write, agg_bytes_read, agg_bytes_write, event_time_millis) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
+    private static final String INSERT_USAGE_VM_DISK = "INSERT INTO cloud_usage.usage_vm_disk (account_id, zone_id, vm_id, volume_id, io_read, io_write, agg_io_read," +
+        " agg_io_write, bytes_read, bytes_write, agg_bytes_read, agg_bytes_write, event_time_millis) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
 
     public UsageVmDiskDaoImpl() {
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
index d84016e..43bdef1 100755
--- a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java
@@ -82,25 +82,25 @@ public class UserVmDaoImpl extends GenericDaoBase<UserVmVO, Long> implements Use
         "SELECT pod_id FROM cloud.vm_instance WHERE data_center_id = ? AND account_id = ? AND pod_id IS NOT NULL AND (state = 'Running' OR state = 'Stopped') "
             + "GROUP BY pod_id HAVING count(id) > 0 ORDER BY count(id) DESC";
 
-    private static String VM_DETAILS =
-        "select vm_instance.id, "
-            + "account.id, account.account_name, account.type, domain.name, instance_group.id, instance_group.name,"
-            + "data_center.id, data_center.name, data_center.is_security_group_enabled, host.id, host.name, "
-            + "vm_template.id, vm_template.name, vm_template.display_text, iso.id, iso.name, "
-            + "vm_template.enable_password, service_offering.id, disk_offering.name, storage_pool.id, storage_pool.pool_type, "
-            + "service_offering.cpu, service_offering.speed, service_offering.ram_size, volumes.id, volumes.device_id, volumes.volume_type, security_group.id, security_group.name, "
-            + "security_group.description, nics.id, nics.ip4_address, nics.default_nic, nics.gateway, nics.network_id, nics.netmask, nics.mac_address, nics.broadcast_uri, nics.isolation_uri, "
-            + "networks.traffic_type, networks.guest_type, user_ip_address.id, user_ip_address.public_ip_address from vm_instance "
-            + "left join account on vm_instance.account_id=account.id  " + "left join domain on vm_instance.domain_id=domain.id "
-            + "left join instance_group_vm_map on vm_instance.id=instance_group_vm_map.instance_id "
-            + "left join instance_group on instance_group_vm_map.group_id=instance_group.id " + "left join data_center on vm_instance.data_center_id=data_center.id "
-            + "left join host on vm_instance.host_id=host.id " + "left join vm_template on vm_instance.vm_template_id=vm_template.id "
-            + "left join user_vm on vm_instance.id=user_vm.id " + "left join vm_template iso on iso.id=user_vm.iso_id "
-            + "left join service_offering on vm_instance.service_offering_id=service_offering.id "
-            + "left join disk_offering  on vm_instance.service_offering_id=disk_offering.id " + "left join volumes on vm_instance.id=volumes.instance_id "
-            + "left join storage_pool on volumes.pool_id=storage_pool.id " + "left join security_group_vm_map on vm_instance.id=security_group_vm_map.instance_id "
-            + "left join security_group on security_group_vm_map.security_group_id=security_group.id " + "left join nics on vm_instance.id=nics.instance_id "
-            + "left join networks on nics.network_id=networks.id " + "left join user_ip_address on user_ip_address.vm_id=vm_instance.id " + "where vm_instance.id in (";
+    private static String VM_DETAILS = "select vm_instance.id, "
+        + "account.id, account.account_name, account.type, domain.name, instance_group.id, instance_group.name,"
+        + "data_center.id, data_center.name, data_center.is_security_group_enabled, host.id, host.name, "
+        + "vm_template.id, vm_template.name, vm_template.display_text, iso.id, iso.name, "
+        + "vm_template.enable_password, service_offering.id, disk_offering.name, storage_pool.id, storage_pool.pool_type, "
+        + "service_offering.cpu, service_offering.speed, service_offering.ram_size, volumes.id, volumes.device_id, volumes.volume_type, security_group.id, security_group.name, "
+        + "security_group.description, nics.id, nics.ip4_address, nics.default_nic, nics.gateway, nics.network_id, nics.netmask, nics.mac_address, nics.broadcast_uri, " +
+        "nics.isolation_uri, "
+        + "networks.traffic_type, networks.guest_type, user_ip_address.id, user_ip_address.public_ip_address from vm_instance "
+        + "left join account on vm_instance.account_id=account.id  " + "left join domain on vm_instance.domain_id=domain.id "
+        + "left join instance_group_vm_map on vm_instance.id=instance_group_vm_map.instance_id "
+        + "left join instance_group on instance_group_vm_map.group_id=instance_group.id " + "left join data_center on vm_instance.data_center_id=data_center.id "
+        + "left join host on vm_instance.host_id=host.id " + "left join vm_template on vm_instance.vm_template_id=vm_template.id "
+        + "left join user_vm on vm_instance.id=user_vm.id " + "left join vm_template iso on iso.id=user_vm.iso_id "
+        + "left join service_offering on vm_instance.service_offering_id=service_offering.id "
+        + "left join disk_offering  on vm_instance.service_offering_id=disk_offering.id " + "left join volumes on vm_instance.id=volumes.instance_id "
+        + "left join storage_pool on volumes.pool_id=storage_pool.id " + "left join security_group_vm_map on vm_instance.id=security_group_vm_map.instance_id "
+        + "left join security_group on security_group_vm_map.security_group_id=security_group.id " + "left join nics on vm_instance.id=nics.instance_id "
+        + "left join networks on nics.network_id=networks.id " + "left join user_ip_address on user_ip_address.vm_id=vm_instance.id " + "where vm_instance.id in (";
 
     private static final int VM_DETAILS_BATCH_SIZE = 100;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
index 2381e5f..f45042c 100644
--- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
+++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java
@@ -95,18 +95,18 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
 
     protected Attribute _updateTimeAttr;
 
-    private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART1 =
-        "SELECT host.cluster_id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE ";
-    private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 =
-        " AND host.type = 'Routing' AND host.removed is null GROUP BY host.cluster_id ORDER BY 2 ASC ";
+    private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART1 = "SELECT host.cluster_id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) " +
+        "FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE ";
+    private static final String ORDER_CLUSTERS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 = " AND host.type = 'Routing' AND host.removed is null GROUP BY host.cluster_id " +
+        "ORDER BY 2 ASC ";
 
-    private static final String ORDER_PODS_NUMBER_OF_VMS_FOR_ACCOUNT =
-        "SELECT pod.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host_pod_ref` pod LEFT JOIN `cloud`.`vm_instance` vm ON pod.id = vm.pod_id WHERE pod.data_center_id = ? AND pod.removed is null "
+    private static final String ORDER_PODS_NUMBER_OF_VMS_FOR_ACCOUNT = "SELECT pod.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`" +
+        "host_pod_ref` pod LEFT JOIN `cloud`.`vm_instance` vm ON pod.id = vm.pod_id WHERE pod.data_center_id = ? AND pod.removed is null "
             + " GROUP BY pod.id ORDER BY 2 ASC ";
 
     private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT =
-        "SELECT host.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id WHERE host.data_center_id = ? "
-            + " AND host.type = 'Routing' AND host.removed is null ";
+        "SELECT host.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id " +
+            "WHERE host.data_center_id = ? AND host.type = 'Routing' AND host.removed is null ";
 
     private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT_PART2 = " GROUP BY host.id ORDER BY 2 ASC ";
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fb4765d..c271a42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -445,6 +445,7 @@
     <outputDirectory>${basedir}/${cs.target.dir}/classes</outputDirectory>
     <testOutputDirectory>${basedir}/${cs.target.dir}/test-classes</testOutputDirectory>
     <plugins>
+	<!--
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
@@ -471,9 +472,10 @@
           <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <sourceDirectory>${project.basedir}</sourceDirectory>
           <includes>**\/*.java</includes>
-          <excludes>**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</excludes>
+          <excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</excludes>
         </configuration>
       </plugin>
+	  -->
     </plugins>
     <pluginManagement>
       <plugins>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/server/src/com/cloud/capacity/CapacityManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/capacity/CapacityManagerImpl.java b/server/src/com/cloud/capacity/CapacityManagerImpl.java
index 1ec2e74..c733c03 100755
--- a/server/src/com/cloud/capacity/CapacityManagerImpl.java
+++ b/server/src/com/cloud/capacity/CapacityManagerImpl.java
@@ -327,7 +327,8 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
                         /* alloc from free resource */
                         if (!((reservedCpu + usedCpu + cpu <= totalCpu) && (reservedMem + usedMem + ram <= totalMem))) {
                             if (s_logger.isDebugEnabled()) {
-                                s_logger.debug("Host doesnt seem to have enough free capacity, but increasing the used capacity anyways, since the VM is already starting on this host ");
+                                s_logger.debug("Host doesnt seem to have enough free capacity, but increasing the used capacity anyways, " +
+                                    "since the VM is already starting on this host ");
                             }
                         }
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
index a14c880..848ef1f 100644
--- a/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
+++ b/server/src/com/cloud/network/firewall/FirewallManagerImpl.java
@@ -399,13 +399,14 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
                 continue;
             } else if (!oneOfRulesIsFirewall &&
                 !(bothRulesFirewall && !duplicatedCidrs) &&
-                ((rule.getSourcePortStart().intValue() <= newRule.getSourcePortStart().intValue() && rule.getSourcePortEnd().intValue() >= newRule.getSourcePortStart()
-                    .intValue()) ||
-                    (rule.getSourcePortStart().intValue() <= newRule.getSourcePortEnd().intValue() && rule.getSourcePortEnd().intValue() >= newRule.getSourcePortEnd()
-                        .intValue()) ||
-                    (newRule.getSourcePortStart().intValue() <= rule.getSourcePortStart().intValue() && newRule.getSourcePortEnd().intValue() >= rule.getSourcePortStart()
-                        .intValue()) || (newRule.getSourcePortStart().intValue() <= rule.getSourcePortEnd().intValue() && newRule.getSourcePortEnd().intValue() >= rule.getSourcePortEnd()
-                    .intValue()))) {
+                ((rule.getSourcePortStart().intValue() <= newRule.getSourcePortStart().intValue() &&
+                    rule.getSourcePortEnd().intValue() >= newRule.getSourcePortStart().intValue()) ||
+                    (rule.getSourcePortStart().intValue() <= newRule.getSourcePortEnd().intValue() &&
+                    rule.getSourcePortEnd().intValue() >= newRule.getSourcePortEnd().intValue()) ||
+                    (newRule.getSourcePortStart().intValue() <= rule.getSourcePortStart().intValue() &&
+                    newRule.getSourcePortEnd().intValue() >= rule.getSourcePortStart().intValue()) ||
+                (newRule.getSourcePortStart().intValue() <= rule.getSourcePortEnd().intValue() &&
+                newRule.getSourcePortEnd().intValue() >= rule.getSourcePortEnd().intValue()))) {
 
                 // we allow port forwarding rules with the same parameters but different protocols
                 boolean allowPf =
@@ -928,7 +929,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
     @Inject
     public void setFirewallElements(List<FirewallServiceProvider> firewallElements) {
-        this._firewallElements = firewallElements;
+        _firewallElements = firewallElements;
     }
 
     public List<PortForwardingServiceProvider> getPfElements() {
@@ -937,7 +938,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
     @Inject
     public void setPfElements(List<PortForwardingServiceProvider> pfElements) {
-        this._pfElements = pfElements;
+        _pfElements = pfElements;
     }
 
     public List<StaticNatServiceProvider> getStaticNatElements() {
@@ -946,7 +947,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
     @Inject
     public void setStaticNatElements(List<StaticNatServiceProvider> staticNatElements) {
-        this._staticNatElements = staticNatElements;
+        _staticNatElements = staticNatElements;
     }
 
     public List<NetworkACLServiceProvider> getNetworkAclElements() {
@@ -955,7 +956,7 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
 
     @Inject
     public void setNetworkAclElements(List<NetworkACLServiceProvider> networkAclElements) {
-        this._networkAclElements = networkAclElements;
+        _networkAclElements = networkAclElements;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
index 2388a7f..56ba66a 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -658,9 +658,6 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkOrches
         return null;
     }
 
-    /* (non-Javadoc)
-     * @see com.cloud.network.NetworkManager#prepareNic(com.cloud.vm.VirtualMachineProfile, com.cloud.deploy.DeployDestination, com.cloud.vm.ReservationContext, long, com.cloud.network.NetworkVO)
-     */
     @Override
     public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
         throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/test/src/com/cloud/test/regression/PortForwardingTest.java
----------------------------------------------------------------------
diff --git a/test/src/com/cloud/test/regression/PortForwardingTest.java b/test/src/com/cloud/test/regression/PortForwardingTest.java
index dd95c89..24415fd 100644
--- a/test/src/com/cloud/test/regression/PortForwardingTest.java
+++ b/test/src/com/cloud/test/regression/PortForwardingTest.java
@@ -29,15 +29,15 @@ public class PortForwardingTest extends TestCase {
     public static final Logger s_logger = Logger.getLogger(PortForwardingTest.class.getName());
 
     public PortForwardingTest() {
-        this.setClient();
-        this.setParam(new HashMap<String, String>());
+        setClient();
+        setParam(new HashMap<String, String>());
     }
 
     @Override
     public boolean executeTest() {
 
         int error = 0;
-        Element rootElement = this.getInputFile().get(0).getDocumentElement();
+        Element rootElement = getInputFile().get(0).getDocumentElement();
         NodeList commandLst = rootElement.getElementsByTagName("command");
 
         //Analyze each command, send request and build the array list of api commands
@@ -47,10 +47,10 @@ public class PortForwardingTest extends TestCase {
             Element fstElmnt = (Element)fstNode;
 
             //new command
-            ApiCommand api = new ApiCommand(fstElmnt, this.getParam(), this.getCommands());
+            ApiCommand api = new ApiCommand(fstElmnt, getParam(), getCommands());
 
             //send a command
-            api.sendCommand(this.getClient(), null);
+            api.sendCommand(getClient(), null);
 
             //verify the response of the command
             if ((api.getResponseType() != ResponseType.ERROR) && (api.getResponseCode() == 200)) {
@@ -70,7 +70,7 @@ public class PortForwardingTest extends TestCase {
                         s_logger.error("Test case " + api.getTestCaseInfo() + " failed. Non-empty response was expected. Command was sent with url " + api.getUrl());
                     else {
                         //set parameters for the future use
-                        if (api.setParam(this.getParam()) == false) {
+                        if (api.setParam(getParam()) == false) {
                             s_logger.error("Exiting the test...Command " + api.getName() +
                                 " didn't return parameters needed for the future use. The command was sent with url " + api.getUrl());
                             return false;
@@ -119,7 +119,8 @@ public class PortForwardingTest extends TestCase {
 //        //try all private ports
 //        for (String portValue : port) {
 //            try {
-//                String url = this.getHost() + ":8096/?command=createOrUpdateIpForwardingRule&account=" + this.getParam().get("accountname") + "&publicip=" + this.getParam().get("boundaryip") +
+//                String url = this.getHost() + ":8096/?command=createOrUpdateIpForwardingRule&account=" +
+//        this.getParam().get("accountname") + "&publicip=" + this.getParam().get("boundaryip") +
 //                "&privateip=" + this.getParam().get("vmipaddress") + "&publicport=22&protocol=tcp&privateport=" + portValue;
 //                HttpClient client = new HttpClient();
 //                HttpMethod method = new GetMethod(url);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/170f32f1/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java
index 0ddbea2..44d9f0c 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java
@@ -540,7 +540,6 @@ public class VmwareContext {
             vmware-6.log</a></td><td align="right">15-Aug-2010 00:11</td><td align="right">59742</td></tr>
             <tr><td><a href="/folder/Fedora%2dclone%2dtest/vmware%2d7%2elog?dcPath=cupertino&amp;dsName=NFS%20datastore">
             vmware-7.log</a></td><td align="right">15-Aug-2010 00:13</td><td align="right">59859</td></tr>
-            
             <tr><td><a href="/folder/Fedora%2dclone%2dtest/vmware%2elog?dcPath=cupertino&amp;dsName=NFS%20datastore">
             vmware.log</a></td><td align="right">15-Aug-2010 00:23</td><td align="right">47157</td></tr>
             <tr><th colspan="5"><hr></th></tr>


Mime
View raw message