You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/06/25 15:51:37 UTC

[1/8] Fix typo and add the right exception to the error map.

Repository: cloudstack
Updated Branches:
  refs/heads/master 17850c7af -> ab0dca038


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/StorageNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/StorageNetworkGuru.java b/server/src/com/cloud/network/guru/StorageNetworkGuru.java
index 33a5569..716d5a0 100755
--- a/server/src/com/cloud/network/guru/StorageNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/StorageNetworkGuru.java
@@ -26,7 +26,7 @@ import com.cloud.dc.StorageNetworkIpAddressVO;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkProfile;
 import com.cloud.network.Networks.AddressFormat;
@@ -96,7 +96,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert network.getTrafficType() == TrafficType.Storage : "Why are you sending this configuration to me " + network;
         if (!_sNwMgr.isStorageIpRangeAvailable(destination.getDataCenter().getId())) {
             return super.implement(network, offering, destination, context);
@@ -105,7 +105,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
         assert network.getTrafficType() == TrafficType.Storage : "Well, I can't take care of this config now can I? " + network;
         if (!_sNwMgr.isStorageIpRangeAvailable(network.getDataCenterId())) {
@@ -117,7 +117,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         if (!_sNwMgr.isStorageIpRangeAvailable(dest.getDataCenter().getId())) {
             super.reserve(nic, network, vm, dest, context);
             return;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 271602d..885de83 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -143,7 +143,7 @@ import com.cloud.exception.ConnectionException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InsufficientServerCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.OperationTimedoutException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -1481,7 +1481,7 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
     private final static int DEFAULT_DELTA = 2;
 
     protected int getUpdatedPriority(final Network guestNetwork, final List<DomainRouterVO> routers, final DomainRouterVO exclude)
-            throws InsufficientVirtualNetworkCapcityException {
+            throws InsufficientVirtualNetworkCapacityException {
         int priority;
         if (routers.size() == 0) {
             priority = DEFAULT_PRIORITY;
@@ -1501,10 +1501,10 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
             }
             if (maxPriority < 20) {
                 s_logger.error("Current maximum priority is too low!");
-                throw new InsufficientVirtualNetworkCapcityException("Current maximum priority is too low as " + maxPriority + "!", guestNetwork.getId());
+                throw new InsufficientVirtualNetworkCapacityException("Current maximum priority is too low as " + maxPriority + "!", guestNetwork.getId());
             } else if (maxPriority > 200) {
                 s_logger.error("Too many times fail-over happened! Current maximum priority is too high as " + maxPriority + "!");
-                throw new InsufficientVirtualNetworkCapcityException("Too many times fail-over happened! Current maximum priority is too high as " + maxPriority + "!",
+                throw new InsufficientVirtualNetworkCapacityException("Too many times fail-over happened! Current maximum priority is too high as " + maxPriority + "!",
                         guestNetwork.getId());
             }
             priority = maxPriority - DEFAULT_DELTA + 1;
@@ -2325,7 +2325,7 @@ VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.
                 final int priority = getUpdatedPriority(guestNetwork, routers, router);
                 router.setPriority(priority);
                 router = _routerDao.persist(router);
-            } catch (final InsufficientVirtualNetworkCapcityException e) {
+            } catch (final InsufficientVirtualNetworkCapacityException e) {
                 s_logger.error("Failed to get update priority!", e);
                 throw new CloudRuntimeException("Failed to get update priority!");
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java b/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
index 6854347..af8dc82 100644
--- a/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
+++ b/server/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerManagerImpl.java
@@ -38,7 +38,7 @@ import com.cloud.event.ActionEvent;
 import com.cloud.event.EventTypes;
 import com.cloud.event.UsageEventUtils;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.NetworkRuleConflictException;
 import com.cloud.exception.UnsupportedServiceException;
@@ -106,7 +106,7 @@ public class ApplicationLoadBalancerManagerImpl extends ManagerBase implements A
     @ActionEvent(eventType = EventTypes.EVENT_LOAD_BALANCER_CREATE, eventDescription = "creating load balancer")
     public ApplicationLoadBalancerRule createApplicationLoadBalancer(String name, String description, Scheme scheme, long sourceIpNetworkId, String sourceIp,
         int sourcePort, int instancePort, String algorithm, long networkId, long lbOwnerId, Boolean forDisplay) throws InsufficientAddressCapacityException, NetworkRuleConflictException,
-        InsufficientVirtualNetworkCapcityException {
+        InsufficientVirtualNetworkCapacityException {
 
         //Validate LB rule guest network
         Network guestNtwk = _networkModel.getNetwork(networkId);
@@ -132,7 +132,7 @@ public class ApplicationLoadBalancerManagerImpl extends ManagerBase implements A
 
     protected ApplicationLoadBalancerRule createApplicationLoadBalancer(String name, String description, Scheme scheme, Network sourceIpNtwk, String sourceIp,
         int sourcePort, int instancePort, String algorithm, Account lbOwner, Network guestNtwk, Boolean forDisplay) throws NetworkRuleConflictException,
-        InsufficientVirtualNetworkCapcityException {
+        InsufficientVirtualNetworkCapacityException {
 
         //Only Internal scheme is supported in this release
         if (scheme != Scheme.Internal) {
@@ -255,9 +255,9 @@ public class ApplicationLoadBalancerManagerImpl extends ManagerBase implements A
      * @param sourceIpNtwk
      * @param requestedIp
      * @return
-     * @throws InsufficientVirtualNetworkCapcityException
+     * @throws InsufficientVirtualNetworkCapacityException
      */
-    protected Ip getSourceIp(Scheme scheme, Network sourceIpNtwk, String requestedIp) throws InsufficientVirtualNetworkCapcityException {
+    protected Ip getSourceIp(Scheme scheme, Network sourceIpNtwk, String requestedIp) throws InsufficientVirtualNetworkCapacityException {
 
         if (requestedIp != null) {
             if (_lbDao.countBySourceIp(new Ip(requestedIp), sourceIpNtwk.getId()) > 0)  {
@@ -271,7 +271,7 @@ public class ApplicationLoadBalancerManagerImpl extends ManagerBase implements A
         requestedIp = allocateSourceIpForLbRule(scheme, sourceIpNtwk, requestedIp);
 
         if (requestedIp == null) {
-            throw new InsufficientVirtualNetworkCapcityException("Unable to acquire IP address for network " + sourceIpNtwk, Network.class, sourceIpNtwk.getId());
+            throw new InsufficientVirtualNetworkCapacityException("Unable to acquire IP address for network " + sourceIpNtwk, Network.class, sourceIpNtwk.getId());
         }
         return new Ip(requestedIp);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/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 387a710..1ed8b6e 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -43,7 +43,7 @@ import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.GuestVlan;
@@ -651,14 +651,14 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkOrches
      */
     @Override
     public Pair<NicProfile, Integer> allocateNic(NicProfile requested, Network network, Boolean isDefaultNic, int deviceId, VirtualMachineProfile vm)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
     public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
         ResourceUnavailableException {
         // TODO Auto-generated method stub
         return null;
@@ -696,7 +696,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkOrches
      */
     @Override
     public NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
         ResourceUnavailableException {
         // TODO Auto-generated method stub
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/test/org/apache/cloudstack/network/lb/ApplicationLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/network/lb/ApplicationLoadBalancerTest.java b/server/test/org/apache/cloudstack/network/lb/ApplicationLoadBalancerTest.java
index 32ac86c..33de3cd 100644
--- a/server/test/org/apache/cloudstack/network/lb/ApplicationLoadBalancerTest.java
+++ b/server/test/org/apache/cloudstack/network/lb/ApplicationLoadBalancerTest.java
@@ -51,7 +51,7 @@ import org.apache.cloudstack.test.utils.SpringUtils;
 
 import com.cloud.event.dao.UsageEventDao;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.NetworkRuleConflictException;
 import com.cloud.exception.UnsupportedServiceException;
@@ -235,14 +235,14 @@ public class ApplicationLoadBalancerTest extends TestCase {
     /**
      * TESTS FOR .createApplicationLoadBalancer
      * @throws NetworkRuleConflictException
-     * @throws InsufficientVirtualNetworkCapcityException
+     * @throws InsufficientVirtualNetworkCapacityException
      * @throws InsufficientAddressCapacityException
      */
 
     @Test(expected = CloudRuntimeException.class)
     //Positive test
         public
-        void createValidLoadBalancer() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createValidLoadBalancer() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Internal, validGuestNetworkId, validRequestedIp, 22, 22, "roundrobin", validGuestNetworkId,
             validAccountId, true);
     }
@@ -250,7 +250,7 @@ public class ApplicationLoadBalancerTest extends TestCase {
     @Test(expected = UnsupportedServiceException.class)
     //Negative test - only internal scheme value is supported in the current release
         public
-        void createPublicLoadBalancer() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createPublicLoadBalancer() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Public, validGuestNetworkId, validRequestedIp, 22, 22, "roundrobin", validGuestNetworkId,
             validAccountId, true);
     }
@@ -258,7 +258,7 @@ public class ApplicationLoadBalancerTest extends TestCase {
     @Test(expected = InvalidParameterValueException.class)
     //Negative test - invalid SourcePort
         public
-        void createWithInvalidSourcePort() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createWithInvalidSourcePort() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Internal, validGuestNetworkId, validRequestedIp, 65536, 22, "roundrobin", validGuestNetworkId,
             validAccountId, true);
     }
@@ -266,7 +266,7 @@ public class ApplicationLoadBalancerTest extends TestCase {
     @Test(expected = InvalidParameterValueException.class)
     //Negative test - invalid instancePort
         public
-        void createWithInvalidInstandePort() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createWithInvalidInstandePort() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Internal, validGuestNetworkId, validRequestedIp, 22, 65536, "roundrobin", validGuestNetworkId,
             validAccountId, true);
 
@@ -275,7 +275,7 @@ public class ApplicationLoadBalancerTest extends TestCase {
     @Test(expected = InvalidParameterValueException.class)
     //Negative test - invalid algorithm
         public
-        void createWithInvalidAlgorithm() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createWithInvalidAlgorithm() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
         String expectedExcText = null;
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Internal, validGuestNetworkId, validRequestedIp, 22, 22, "invalidalgorithm",
             validGuestNetworkId, validAccountId, true);
@@ -285,7 +285,7 @@ public class ApplicationLoadBalancerTest extends TestCase {
     @Test(expected = InvalidParameterValueException.class)
     //Negative test - invalid sourceNetworkId (of Public type, which is not supported)
         public
-        void createWithInvalidSourceIpNtwk() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createWithInvalidSourceIpNtwk() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Internal, validPublicNetworkId, validRequestedIp, 22, 22, "roundrobin", validGuestNetworkId,
             validAccountId, true);
 
@@ -294,7 +294,7 @@ public class ApplicationLoadBalancerTest extends TestCase {
     @Test(expected = InvalidParameterValueException.class)
     //Negative test - invalid requested IP (outside of guest network cidr range)
         public
-        void createWithInvalidRequestedIp() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapcityException, NetworkRuleConflictException {
+        void createWithInvalidRequestedIp() throws InsufficientAddressCapacityException, InsufficientVirtualNetworkCapacityException, NetworkRuleConflictException {
 
         _appLbSvc.createApplicationLoadBalancer("alena", "alena", Scheme.Internal, validGuestNetworkId, "10.2.1.1", 22, 22, "roundrobin", validGuestNetworkId,
             validAccountId, true);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
index 7af8dbf..2837ccb 100755
--- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
+++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
@@ -52,6 +52,7 @@ public class CSExceptionErrorCode {
             ExceptionErrorCodeMap.put("com.cloud.exception.InsufficientAddressCapacityException", 4320);
             ExceptionErrorCodeMap.put("com.cloud.exception.InsufficientCapacityException", 4325);
             ExceptionErrorCodeMap.put("com.cloud.exception.InsufficientNetworkCapacityException", 4330);
+            ExceptionErrorCodeMap.put("com.cloud.exception.InsufficientVirtualNetworkCapacityException", 4331);
             ExceptionErrorCodeMap.put("com.cloud.exception.InsufficientServerCapacityException", 4335);
             ExceptionErrorCodeMap.put("com.cloud.exception.InsufficientStorageCapacityException", 4340);
             ExceptionErrorCodeMap.put("com.cloud.exception.InternalErrorException", 4345);


[4/8] These should have been gone a long time ago

Posted by hu...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d781824a/client/tomcatconf/simulatorComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in
deleted file mode 100644
index ef480b0..0000000
--- a/client/tomcatconf/simulatorComponentContext.xml.in
+++ /dev/null
@@ -1,286 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
-  <!--
-    OSS deployment component configuration
-  -->
-  <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker"/>
-  <bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl"/>
-
-  <bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
-    <property name="name" value="Simulator Agent"/>
-  </bean>
-  <bean id="SimulatorSecondaryDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">
-  </bean>
-  <bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
-    <property name="name" value="Simulator Guru"/>
-  </bean>
-  <bean id="mockConfigurationDaoImpl" class="com.cloud.simulator.dao.MockConfigurationDaoImpl" />
-  <bean id="mockHostDaoImpl" class="com.cloud.simulator.dao.MockHostDaoImpl" />
-  <bean id="mockSecStorageDaoImpl" class="com.cloud.simulator.dao.MockSecStorageDaoImpl" />
-  <bean id="mockSecurityRulesDaoImpl" class="com.cloud.simulator.dao.MockSecurityRulesDaoImpl" />
-  <bean id="mockStoragePoolDaoImpl" class="com.cloud.simulator.dao.MockStoragePoolDaoImpl" />
-  <bean id="mockVMDaoImpl" class="com.cloud.simulator.dao.MockVMDaoImpl" />
-  <bean id="mockVolumeDaoImpl" class="com.cloud.simulator.dao.MockVolumeDaoImpl" />
-  <bean id="simulatorManagerImpl" class="com.cloud.agent.manager.SimulatorManagerImpl" />
-  <bean id="mockStorageManagerImpl" class="com.cloud.agent.manager.MockStorageManagerImpl" />
-  <bean id="mockVmManagerImpl" class="com.cloud.agent.manager.MockVmManagerImpl" />
-  <bean id="mockNetworkManagerImpl" class="com.cloud.agent.manager.MockNetworkManagerImpl" />
-  <bean id="mockAgentManagerImpl" class="com.cloud.agent.manager.MockAgentManagerImpl" />
-
-  <bean id="SimulatorImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.SimulatorImageStoreProviderImpl"/>
-
-  <!--Storage Providers-->
-  <!--<bean id="dataStoreProviderManagerChild" parent="dataStoreProviderManager">-->
-  <bean id="dataStoreProviderManager"
-        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
-    <property name="providers">
-      <!--Override the cloudstack default image store provider to use simulator defined provider-->
-      <list>
-        <!--Data Store Providers-->
-        <ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
-        <ref bean="SimulatorImageStoreProviderImpl"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-    Managers & pluggable adapters configuration under OSS deployment
-  -->
-  <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="SHA256SaltedUserAuthenticator"/>
-        <ref bean="MD5UserAuthenticator"/>
-        <ref bean="LdapAuthenticator"/>
-        <ref bean="PlainTextUserAuthenticator"/>
-      </list>
-    </property>
-  </bean>
-  <bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="SHA256SaltedUserAuthenticator"/>
-        <ref bean="MD5UserAuthenticator"/>
-        <ref bean="LdapAuthenticator"/>
-        <ref bean="PlainTextUserAuthenticator"/>
-      </list>
-    </property>
-  </bean>
-
-
-  <bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="roleBasedEntityAccessChecker"/>
-	    <ref bean="affinityGroupAccessChecker"/>
-        <ref bean="domainChecker"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Resource discoverers -->
-  <bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="SimulatorDiscoverer"/>
-        <ref bean="SimulatorSecondaryDiscoverer"/>
-        <ref bean="XcpServerDiscoverer"/>
-        <ref bean="SecondaryStorageDiscoverer"/>
-        <ref bean="KvmServerDiscoverer"/>
-        <ref bean="LxcServerDiscoverer"/>
-        <ref bean="OvmDiscoverer"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- HA adapters -->
-  <bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="CheckOnAgentInvestigator"/>
-        <ref bean="XenServerInvestigator"/>
-        <ref bean="UserVmDomRInvestigator"/>
-        <ref bean="ManagementIPSystemVMInvestigator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="XenServerFencer"/>
-        <ref bean="KVMFencer"/>
-        <ref bean="OvmFencer"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Deployment/allocation adapters -->
-  <bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="FirstFitPlanner"/>
-        <ref bean="UserDispersingPlanner"/>
-        <ref bean="UserConcentratedPodPlanner"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="UserConcentratedAllocator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="LocalStoragePoolAllocator"/>
-        <ref bean="clusterScopeStoragePoolAllocator"/>
-        <ref bean="zoneWideStoragePoolAllocator"/>
-        <ref bean="garbageCollectingStoragePoolAllocator"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Networking adapters -->
-  <bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="elasticLoadBalancerElement"/>
-        <ref bean="VirtualRouter"/>
-        <ref bean="VpcVirtualRouter"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="VirtualRouter"/>
-        <ref bean="VpcVirtualRouter"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="StorageNetworkGuru"/>
-        <ref bean="ExternalGuestNetworkGuru"/>
-        <ref bean="PublicNetworkGuru"/>
-        <ref bean="PodBasedNetworkGuru"/>
-        <ref bean="DirectPodBasedNetworkGuru"/>
-        <ref bean="ControlNetworkGuru"/>
-        <ref bean="DirectNetworkGuru"/>
-        <ref bean="OvsGuestNetworkGuru"/>
-        <ref bean="PrivateNetworkGuru"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="networkElements" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-        <ref bean="VirtualRouter"/>
-        <ref bean="Ovs"/>
-        <ref bean="SecurityGroupProvider"/>
-        <ref bean="VpcVirtualRouter"/>
-        <ref bean="InternalLbVm"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-    UCS support components
-  -->
-  <bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl"/>
-  <bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl"/>
-
-  <bean id="GlobalLoadBalancingRulesServiceImpl"
-        class="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl"/>
-
-  <!--
-   AffinityGroup Processors
-  -->
-  <bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
-    <property name="name" value="HostAntiAffinityProcessor"/>
-    <property name="type" value="host anti-affinity"/>
-  </bean>
-
-  <bean id="affinityProcessors" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="HostAntiAffinityProcessor" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
-  <bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
-    <property name="name" value="ExplicitDedicationProcessor"/>
-    <property name="type" value="ExplicitDedication"/>
-  </bean>
-  <!--
-    RPC/Async/EventBus
-  -->
-
-  <bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
-    init-method="scan" >
-    <property name="packages">
-      <list>
-        <value>org.apache.cloudstack.framework</value>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
-    <property name="onwireClassRegistry" ref="onwireRegistry" />
-  </bean>
-
-  <bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider"  init-method="initialize">
-    <property name="workerPoolSize" value="5" />
-    <property name="nodeId" value="Node1" />
-    <property name="messageSerializer" ref="messageSerializer" />
-  </bean>
-  
-  <bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
-    <constructor-arg ref="transportProvider" />
-    <property name="messageSerializer" ref="messageSerializer" />
-  </bean>
-
-  <bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
-  <bean id="configDepot" class = "org.apache.cloudstack.framework.config.ConfigDepotImpl" />
-</beans>


[8/8] git commit: updated refs/heads/master to ab0dca0

Posted by hu...@apache.org.
Catch possible exceptions in finally so they won't shadow the original exception.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab0dca03
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab0dca03
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab0dca03

Branch: refs/heads/master
Commit: ab0dca038523619194a97e289e3251affa5daae0
Parents: 99b7cc8
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Jun 25 15:49:31 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Jun 25 15:51:29 2014 +0200

----------------------------------------------------------------------
 .../orchestration/NetworkOrchestrator.java      | 113 ++++++++++---------
 1 file changed, 59 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab0dca03/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 06944b1..025514b 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -703,7 +703,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
     @Override
     @DB
     public void allocate(final VirtualMachineProfile vm, final LinkedHashMap<? extends Network, List<? extends NicProfile>> networks) throws InsufficientCapacityException,
-            ConcurrentOperationException {
+    ConcurrentOperationException {
 
         Transaction.execute(new TransactionCallbackWithExceptionNoReturn<InsufficientCapacityException>() {
             @Override
@@ -736,44 +736,44 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
                     }
 
                     for (NicProfile requested : requestedProfiles) {
-                    Boolean isDefaultNic = false;
-                    if (vm != null && (requested != null && requested.isDefaultNic())) {
-                        isDefaultNic = true;
-                    }
+                        Boolean isDefaultNic = false;
+                        if (vm != null && (requested != null && requested.isDefaultNic())) {
+                            isDefaultNic = true;
+                        }
 
-                    while (deviceIds[deviceId] && deviceId < deviceIds.length) {
-                        deviceId++;
-                    }
+                        while (deviceIds[deviceId] && deviceId < deviceIds.length) {
+                            deviceId++;
+                        }
 
-                    Pair<NicProfile, Integer> vmNicPair = allocateNic(requested, config, isDefaultNic, deviceId, vm);
+                        Pair<NicProfile, Integer> vmNicPair = allocateNic(requested, config, isDefaultNic, deviceId, vm);
 
-                    NicProfile vmNic = vmNicPair.first();
-                    if (vmNic == null) {
-                        continue;
-                    }
+                        NicProfile vmNic = vmNicPair.first();
+                        if (vmNic == null) {
+                            continue;
+                        }
 
-                    deviceId = vmNicPair.second();
+                        deviceId = vmNicPair.second();
 
-                    int devId = vmNic.getDeviceId();
-                    if (devId > deviceIds.length) {
-                        throw new IllegalArgumentException("Device id for nic is too large: " + vmNic);
-                    }
-                    if (deviceIds[devId]) {
-                        throw new IllegalArgumentException("Conflicting device id for two different nics: " + vmNic);
-                    }
+                        int devId = vmNic.getDeviceId();
+                        if (devId > deviceIds.length) {
+                            throw new IllegalArgumentException("Device id for nic is too large: " + vmNic);
+                        }
+                        if (deviceIds[devId]) {
+                            throw new IllegalArgumentException("Conflicting device id for two different nics: " + vmNic);
+                        }
 
-                    deviceIds[devId] = true;
+                        deviceIds[devId] = true;
 
-                    if (vmNic.isDefaultNic()) {
-                        if (defaultNic != null) {
-                            throw new IllegalArgumentException("You cannot specify two nics as default nics: nic 1 = " + defaultNic + "; nic 2 = " + vmNic);
+                        if (vmNic.isDefaultNic()) {
+                            if (defaultNic != null) {
+                                throw new IllegalArgumentException("You cannot specify two nics as default nics: nic 1 = " + defaultNic + "; nic 2 = " + vmNic);
+                            }
+                            defaultNic = vmNic;
                         }
-                        defaultNic = vmNic;
-                    }
 
-                    nics.add(vmNic);
-                    vm.addNic(vmNic);
-                }
+                        nics.add(vmNic);
+                        vm.addNic(vmNic);
+                    }
                 }
                 if (nics.size() != size) {
                     s_logger.warn("Number of nics " + nics.size() + " doesn't match number of requested nics " + size);
@@ -939,7 +939,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
     @Override
     @DB
     public Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
-            ResourceUnavailableException, InsufficientCapacityException {
+    ResourceUnavailableException, InsufficientCapacityException {
         Pair<NetworkGuru, NetworkVO> implemented = new Pair<NetworkGuru, NetworkVO>(null, null);
 
         NetworkVO network = _networksDao.findById(networkId);
@@ -1021,7 +1021,12 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
                     s_logger.error(e.getMessage());
                 }
 
-                shutdownNetwork(networkId, context, false);
+                try {
+                    shutdownNetwork(networkId, context, false);
+                } catch (Exception e) {
+                    // Don't throw this exception as it would hide the original thrown exception, just log
+                    s_logger.error("Exception caught while shutting down a network as part of a failed implementation", e);
+                }
             }
 
             _networksDao.releaseFromLockTable(networkId);
@@ -1095,16 +1100,16 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
         }
 
         try {
-        // reapply all the firewall/staticNat/lb rules
-        s_logger.debug("Reprogramming network " + network + " as a part of network implement");
-        if (!reprogramNetworkRules(network.getId(), CallContext.current().getCallingAccount(), network)) {
-            s_logger.warn("Failed to re-program the network as a part of network " + network + " implement");
-            // see DataCenterVO.java
-            ResourceUnavailableException ex = new ResourceUnavailableException("Unable to apply network rules as a part of network " + network + " implement", DataCenter.class,
-                    network.getDataCenterId());
-            ex.addProxyObject(_entityMgr.findById(DataCenter.class, network.getDataCenterId()).getUuid());
-            throw ex;
-        }
+            // reapply all the firewall/staticNat/lb rules
+            s_logger.debug("Reprogramming network " + network + " as a part of network implement");
+            if (!reprogramNetworkRules(network.getId(), CallContext.current().getCallingAccount(), network)) {
+                s_logger.warn("Failed to re-program the network as a part of network " + network + " implement");
+                // see DataCenterVO.java
+                ResourceUnavailableException ex = new ResourceUnavailableException("Unable to apply network rules as a part of network " + network + " implement", DataCenter.class,
+                        network.getDataCenterId());
+                ex.addProxyObject(_entityMgr.findById(DataCenter.class, network.getDataCenterId()).getUuid());
+                throw ex;
+            }
             for (NetworkElement element : networkElements) {
                 if ((element instanceof AggregatedCommandExecutor) && (providersToImplement.contains(element.getProvider()))) {
                     if (!((AggregatedCommandExecutor)element).completeAggregatedExecution(network, dest)) {
@@ -1254,7 +1259,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
     @Override
     public void prepare(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context) throws InsufficientCapacityException, ConcurrentOperationException,
-            ResourceUnavailableException {
+    ResourceUnavailableException {
         List<NicVO> nics = _nicDao.listByVmId(vmProfile.getId());
 
         // we have to implement default nics first - to ensure that default network elements start up first in multiple
@@ -1273,7 +1278,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
         for (NicVO nic : nics) {
             Pair<NetworkGuru, NetworkVO> implemented = implementNetwork(nic.getNetworkId(), dest, context);
-            if (implemented.first() == null) {
+            if (implemented == null || implemented.first() == null) {
                 s_logger.warn("Failed to implement network id=" + nic.getNetworkId() + " as a part of preparing nic id=" + nic.getId());
                 throw new CloudRuntimeException("Failed to implement network id=" + nic.getNetworkId() + " as a part preparing nic id=" + nic.getId());
             }
@@ -1307,7 +1312,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
             profile = new NicProfile(nic, network, broadcastUri, isolationUri,
 
-            networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vmProfile.getHypervisorType(), network));
+                    networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vmProfile.getHypervisorType(), network));
             guru.reserve(profile, network, vmProfile, dest, context);
             nic.setIp4Address(profile.getIp4Address());
             nic.setAddressFormat(profile.getFormat());
@@ -1599,12 +1604,12 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
                 && network.getTrafficType() == TrafficType.Guest
                 && network.getGuestType() == GuestType.Shared
                 && isLastNicInSubnet(nic)) {
-        // remove the dhcpservice ip if this is the last nic in subnet.
-        DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network);
-        if (dhcpServiceProvider != null
+            // remove the dhcpservice ip if this is the last nic in subnet.
+            DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network);
+            if (dhcpServiceProvider != null
                     && isDhcpAccrossMultipleSubnetsSupported(dhcpServiceProvider)) {
-            removeDhcpServiceInSubnet(nic);
-        }
+                removeDhcpServiceInSubnet(nic);
+            }
         }
 
         NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName());
@@ -1675,7 +1680,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
     public Network createGuestNetwork(long networkOfferingId, final String name, final String displayText, final String gateway, final String cidr, String vlanId,
             String networkDomain, final Account owner, final Long domainId, final PhysicalNetwork pNtwk, final long zoneId, final ACLType aclType, Boolean subdomainAccess,
             final Long vpcId, final String ip6Gateway, final String ip6Cidr, final Boolean isDisplayNetworkEnabled, final String isolatedPvlan)
-            throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException {
+                    throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException {
 
         final NetworkOfferingVO ntwkOff = _networkOfferingDao.findById(networkOfferingId);
         // this method supports only guest network creation
@@ -2379,7 +2384,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
     @Override
     public boolean startNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
-            InsufficientCapacityException {
+    InsufficientCapacityException {
 
         // Check if network exists
         NetworkVO network = _networksDao.findById(networkId);
@@ -2402,7 +2407,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
     @Override
     public boolean restartNetwork(Long networkId, Account callerAccount, User callerUser, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException,
-            InsufficientCapacityException {
+    InsufficientCapacityException {
 
         NetworkVO network = _networksDao.findById(networkId);
 
@@ -2518,7 +2523,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
                         || _networkModel.areServicesSupportedByNetworkOffering(networkOfferingId, Service.StaticNat)
                         || _networkModel.areServicesSupportedByNetworkOffering(networkOfferingId, Service.Firewall)
                         || _networkModel.areServicesSupportedByNetworkOffering(networkOfferingId, Service.PortForwarding) || _networkModel.areServicesSupportedByNetworkOffering(
-                        networkOfferingId, Service.Lb))) {
+                                networkOfferingId, Service.Lb))) {
             return true;
         }
         return false;


[5/8] git commit: updated refs/heads/master to ab0dca0

Posted by hu...@apache.org.
These should have been gone a long time ago


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d781824a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d781824a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d781824a

Branch: refs/heads/master
Commit: d781824aa97714b08b4d6a2f93f14e805d5ec747
Parents: 0ef61f7
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Jun 25 10:04:31 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Jun 25 15:51:28 2014 +0200

----------------------------------------------------------------------
 client/tomcatconf/applicationContext.xml.in     | 951 -------------------
 client/tomcatconf/componentContext.xml.in       | 317 -------
 client/tomcatconf/nonossComponentContext.xml.in | 422 --------
 .../tomcatconf/simulatorComponentContext.xml.in | 286 ------
 4 files changed, 1976 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d781824a/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
deleted file mode 100644
index 37cb3dd..0000000
--- a/client/tomcatconf/applicationContext.xml.in
+++ /dev/null
@@ -1,951 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-
-
-
-
-                      http://www.springframework.org/schema/context
-                      http://www.springframework.org/schema/context/spring-context-3.0.xsd">                     
-
-  <context:annotation-config />
-
-<!--=====================================================================================================-->
-<!--                                                                                                     -->
-<!--                           core OSS/non-OSS Common components                                        -->  
-<!--                                                                                                     -->
-<!--=====================================================================================================-->
-
-  <!--
-    @DB support
-  -->
-  <bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
-  <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
-  <bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
-
-  <bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
-    <property name="Interceptors">
-        <list>
-            <ref bean="transactionContextBuilder" />
-            <ref bean="actionEventInterceptor" />
-        </list>
-    </property>
-  </bean>
-
-  <!--
-    RPC/Async/EventBus
-  -->
-
-  <bean id="onwireRegistry" class="org.apache.cloudstack.framework.serializer.OnwireClassRegistry"
-    init-method="scan" >
-    <property name="packages">
-      <list>
-        <value>org.apache.cloudstack.framework</value>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="messageSerializer" class="org.apache.cloudstack.framework.serializer.JsonMessageSerializer">
-    <property name="onwireClassRegistry" ref="onwireRegistry" />
-  </bean>
-
-  <bean id="transportProvider" class="org.apache.cloudstack.framework.server.ServerTransportProvider"  init-method="initialize">
-    <property name="workerPoolSize" value="5" />
-    <property name="nodeId" value="Node1" />
-    <property name="messageSerializer" ref="messageSerializer" />
-  </bean>
-  
-  <bean id="rpcProvider" class="org.apache.cloudstack.framework.rpc.RpcProviderImpl" init-method="initialize">
-    <constructor-arg ref="transportProvider" />
-    <property name="messageSerializer" ref="messageSerializer" />
-  </bean>
-
-  <bean id="messageBus" class = "org.apache.cloudstack.framework.messagebus.MessageBusBase" />
-  <bean id="configDepot" class = "org.apache.cloudstack.framework.config.impl.ConfigDepotImpl" />
-
-  <!--
-    DAO with customized configuration
-  -->
-  <bean id="serviceOfferingDaoImpl" class="com.cloud.service.dao.ServiceOfferingDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="50" />
-        <entry key="cache.time.to.live" value="600" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="diskOfferingDaoImpl" class="com.cloud.storage.dao.DiskOfferingDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="50" />
-        <entry key="cache.time.to.live" value="600" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="dataCenterDaoImpl" class="com.cloud.dc.dao.DataCenterDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="50" />
-        <entry key="cache.time.to.live" value="600" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="hostPodDaoImpl" class="com.cloud.dc.dao.HostPodDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="50" />
-        <entry key="cache.time.to.live" value="600" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="vlanDaoImpl" class="com.cloud.dc.dao.VlanDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="30" />
-        <entry key="cache.time.to.live" value="3600" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="userDaoImpl" class="com.cloud.user.dao.UserDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="5000" />
-        <entry key="cache.time.to.live" value="300" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="VMTemplateDaoImpl" class="com.cloud.storage.dao.VMTemplateDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="100" />
-        <entry key="cache.time.to.live" value="600" />
-      </map>
-    </property>  
-  </bean>
-
-  <bean id="hypervisorCapabilitiesDaoImpl" class="com.cloud.hypervisor.dao.HypervisorCapabilitiesDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="100" />
-        <entry key="cache.time.to.live" value="600" />
-      </map>
-    </property>  
-  </bean>
-  <bean id="dedicatedResourceDaoImpl" class="com.cloud.dc.dao.DedicatedResourceDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="cache.size" value="30" />
-        <entry key="cache.time.to.live" value="3600" />
-      </map>
-    </property>
-  </bean>
-  
-  <!--
-    DAOs with default configuration
-  -->
-  <bean id="accountDaoImpl" class="com.cloud.user.dao.AccountDaoImpl" />
-  <bean id="accountDetailsDaoImpl" class="com.cloud.user.AccountDetailsDaoImpl" />
-  <bean id="accountJoinDaoImpl" class="com.cloud.api.query.dao.AccountJoinDaoImpl" />
-  <bean id="accountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl" />
-  <bean id="accountVlanMapDaoImpl" class="com.cloud.dc.dao.AccountVlanMapDaoImpl" />
-  <bean id="alertDaoImpl" class="com.cloud.alert.dao.AlertDaoImpl" />
-  <bean id="asyncJobJoinDaoImpl" class="com.cloud.api.query.dao.AsyncJobJoinDaoImpl" />
-  <bean id="autoScalePolicyConditionMapDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyConditionMapDaoImpl" />
-  <bean id="autoScalePolicyDaoImpl" class="com.cloud.network.as.dao.AutoScalePolicyDaoImpl" />
-  <bean id="autoScaleVmGroupDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupDaoImpl" />
-  <bean id="autoScaleVmGroupPolicyMapDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmGroupPolicyMapDaoImpl" />
-  <bean id="autoScaleVmProfileDaoImpl" class="com.cloud.network.as.dao.AutoScaleVmProfileDaoImpl" />
-  <bean id="capacityDaoImpl" class="com.cloud.capacity.dao.CapacityDaoImpl" />
-  <bean id="certificateDaoImpl" class="com.cloud.certificate.dao.CertificateDaoImpl" />
-  <bean id="clusterDaoImpl" class="com.cloud.dc.dao.ClusterDaoImpl" />
-  <bean id="clusterDetailsDaoImpl" class="com.cloud.dc.ClusterDetailsDaoImpl" />
-  <bean id="clusterVSMMapDaoImpl" class="com.cloud.dc.dao.ClusterVSMMapDaoImpl" />
-  <bean id="commandExecLogDaoImpl" class="com.cloud.secstorage.CommandExecLogDaoImpl" />
-  <bean id="conditionDaoImpl" class="com.cloud.network.as.dao.ConditionDaoImpl" />
-  <bean id="consoleProxyDaoImpl" class="com.cloud.vm.dao.ConsoleProxyDaoImpl" />
-  <bean id="counterDaoImpl" class="com.cloud.network.as.dao.CounterDaoImpl" />
-  <bean id="dataCenterIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterIpAddressDaoImpl" />
-  <bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
-  <bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
-  <bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
-  <bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
-  <bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
-  <bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
-  <bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
-  <bean id="domainRouterDaoImpl" class="com.cloud.vm.dao.DomainRouterDaoImpl" />
-  <bean id="domainRouterJoinDaoImpl" class="com.cloud.api.query.dao.DomainRouterJoinDaoImpl" />
-  <bean id="elasticLbVmMapDaoImpl" class="com.cloud.network.lb.dao.ElasticLbVmMapDaoImpl" />
-  <bean id="engineClusterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDaoImpl" />
-  <bean id="engineDataCenterDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDaoImpl" />
-  <bean id="engineHostDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDaoImpl" />
-  <bean id="engineHostPodDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDaoImpl" />
-  <bean id="eventDaoImpl" class="com.cloud.event.dao.EventDaoImpl" />
-  <bean id="eventJoinDaoImpl" class="com.cloud.event.dao.EventJoinDaoImpl" />
-  <bean id="externalFirewallDeviceDaoImpl" class="com.cloud.network.dao.ExternalFirewallDeviceDaoImpl" />
-  <bean id="externalLoadBalancerDeviceDaoImpl" class="com.cloud.network.dao.ExternalLoadBalancerDeviceDaoImpl" />
-  <bean id="externalPublicIpStatisticsDaoImpl" class="com.cloud.usage.dao.ExternalPublicIpStatisticsDaoImpl" />
-  <bean id="firewallRulesCidrsDaoImpl" class="com.cloud.network.dao.FirewallRulesCidrsDaoImpl" />
-  <bean id="firewallRulesDaoImpl" class="com.cloud.network.dao.FirewallRulesDaoImpl" />
-  <bean id="globalLoadBalancerDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerDaoImpl" />
-  <bean id="globalLoadBalancerLbRuleMapDaoImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancerLbRuleMapDaoImpl" />
-  <bean id="guestOSCategoryDaoImpl" class="com.cloud.storage.dao.GuestOSCategoryDaoImpl" />
-  <bean id="guestOSDaoImpl" class="com.cloud.storage.dao.GuestOSDaoImpl" />
-  <bean id="guestOSHypervisorDaoImpl" class="com.cloud.storage.dao.GuestOSHypervisorDaoImpl" />
-  <bean id="highAvailabilityDaoImpl" class="com.cloud.ha.dao.HighAvailabilityDaoImpl" />
-  <bean id="hostDaoImpl" class="com.cloud.host.dao.HostDaoImpl" />
-  <bean id="engineHostDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostDetailsDaoImpl" />
-  <bean id="hostDetailsDaoImpl" class="com.cloud.host.dao.HostDetailsDaoImpl" />
-  <bean id="hostJoinDaoImpl" class="com.cloud.api.query.dao.HostJoinDaoImpl" />
-  <bean id="engineHostTagsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.HostTagsDaoImpl" />
-  <bean id="hostTagsDaoImpl" class="com.cloud.host.dao.HostTagsDaoImpl" />
-  <bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
-  <bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
-  <bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
-  <bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl" />
-  <bean id="imageStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDetailsDaoImpl" /> 
-  <bean id="imageStoreJoinDaoImpl" class="com.cloud.api.query.dao.ImageStoreJoinDaoImpl" />   
-  <bean id="snapshotDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.SnapshotDataStoreDaoImpl" /> 
-  <bean id="templateDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl" /> 
-  <bean id="templateJoinDaoImpl" class="com.cloud.api.query.dao.TemplateJoinDaoImpl" />
-  <bean id="volumeDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.VolumeDataStoreDaoImpl" />   
-  <bean id="inlineLoadBalancerNicMapDaoImpl" class="com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl" />
-  <bean id="instanceGroupDaoImpl" class="com.cloud.vm.dao.InstanceGroupDaoImpl" />
-  <bean id="instanceGroupJoinDaoImpl" class="com.cloud.api.query.dao.InstanceGroupJoinDaoImpl" />
-  <bean id="instanceGroupVMMapDaoImpl" class="com.cloud.vm.dao.InstanceGroupVMMapDaoImpl" />
-  <bean id="itWorkDaoImpl" class="com.cloud.vm.ItWorkDaoImpl" />
-  <bean id="keystoreDaoImpl" class="com.cloud.keystore.KeystoreDaoImpl" />
-  <bean id="lBHealthCheckPolicyDaoImpl" class="com.cloud.network.dao.LBHealthCheckPolicyDaoImpl" />
-  <bean id="lBStickinessPolicyDaoImpl" class="com.cloud.network.dao.LBStickinessPolicyDaoImpl" />
-  <bean id="launchPermissionDaoImpl" class="com.cloud.storage.dao.LaunchPermissionDaoImpl" />
-  <bean id="loadBalancerDaoImpl" class="com.cloud.network.dao.LoadBalancerDaoImpl" />
-  <bean id="loadBalancerVMMapDaoImpl" class="com.cloud.network.dao.LoadBalancerVMMapDaoImpl" />
-  <bean id="managementServerHostDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostDaoImpl" />
-  <bean id="managementServerHostPeerDaoImpl" class="com.cloud.cluster.dao.ManagementServerHostPeerDaoImpl" />
-  <bean id="networkAccountDaoImpl" class="com.cloud.network.dao.NetworkAccountDaoImpl" />
-  <bean id="networkACLDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLDaoImpl" />
-  <bean id="networkACLItemDaoImpl" class="com.cloud.network.vpc.dao.NetworkACLItemDaoImpl" />
-  <bean id="networkDaoImpl" class="com.cloud.network.dao.NetworkDaoImpl" />
-  <bean id="networkDomainDaoImpl" class="com.cloud.network.dao.NetworkDomainDaoImpl" />
-  <bean id="networkExternalFirewallDaoImpl" class="com.cloud.network.dao.NetworkExternalFirewallDaoImpl" />
-  <bean id="networkExternalLoadBalancerDaoImpl" class="com.cloud.network.dao.NetworkExternalLoadBalancerDaoImpl" />
-  <bean id="networkOfferingDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDaoImpl" />
-  <bean id="networkOfferingServiceMapDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingServiceMapDaoImpl" />
-  <bean id="networkOpDaoImpl" class="com.cloud.network.dao.NetworkOpDaoImpl" />
-  <bean id="networkRuleConfigDaoImpl" class="com.cloud.network.dao.NetworkRuleConfigDaoImpl" />
-  <bean id="networkServiceMapDaoImpl" class="com.cloud.network.dao.NetworkServiceMapDaoImpl" />
-  <bean id="nicDaoImpl" class="com.cloud.vm.dao.NicDaoImpl" />
-  <bean id="nicDetailDaoImpl" class="com.cloud.vm.dao.NicDetailDaoImpl" />
-  <bean id="nicSecondaryIpDaoImpl" class="com.cloud.vm.dao.NicSecondaryIpDaoImpl" />
-  <bean id="nicIpAliasDaoImpl" class="com.cloud.vm.dao.NicIpAliasDaoImpl" />
-  <bean id="objectInDataStoreDaoImpl" class="org.apache.cloudstack.storage.db.ObjectInDataStoreDaoImpl" />
-  <bean id="ovsTunnelInterfaceDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelInterfaceDaoImpl" />
-  <bean id="ovsTunnelNetworkDaoImpl" class="com.cloud.network.ovs.dao.OvsTunnelNetworkDaoImpl" />
-  <bean id="physicalNetworkDaoImpl" class="com.cloud.network.dao.PhysicalNetworkDaoImpl" />
-  <bean id="physicalNetworkIsolationMethodDaoImpl" class="com.cloud.network.dao.PhysicalNetworkIsolationMethodDaoImpl" />
-  <bean id="physicalNetworkServiceProviderDaoImpl" class="com.cloud.network.dao.PhysicalNetworkServiceProviderDaoImpl" />
-  <bean id="physicalNetworkTagDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTagDaoImpl" />
-  <bean id="physicalNetworkTrafficTypeDaoImpl" class="com.cloud.network.dao.PhysicalNetworkTrafficTypeDaoImpl" />
-  <bean id="podVlanDaoImpl" class="com.cloud.dc.dao.PodVlanDaoImpl" />
-  <bean id="podVlanMapDaoImpl" class="com.cloud.dc.dao.PodVlanMapDaoImpl" />
-  <bean id="PortableIpDaoImpl" class="org.apache.cloudstack.region.PortableIpDaoImpl" />
-  <bean id="PortableIpRangeDaoImpl" class="org.apache.cloudstack.region.PortableIpRangeDaoImpl" />
-  <bean id="portForwardingRulesDaoImpl" class="com.cloud.network.rules.dao.PortForwardingRulesDaoImpl" />
-  <bean id="portProfileDaoImpl" class="com.cloud.network.dao.PortProfileDaoImpl" />
-  <bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
-  <bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.volume.db.PrimaryDataStoreDetailsDaoImpl" />
-  <bean id="privateIpDaoImpl" class="com.cloud.network.vpc.dao.PrivateIpDaoImpl" />
-  <bean id="projectAccountDaoImpl" class="com.cloud.projects.dao.ProjectAccountDaoImpl" />
-  <bean id="projectAccountJoinDaoImpl" class="com.cloud.api.query.dao.ProjectAccountJoinDaoImpl" />
-  <bean id="projectDaoImpl" class="com.cloud.projects.dao.ProjectDaoImpl" />
-  <bean id="projectInvitationDaoImpl" class="com.cloud.projects.dao.ProjectInvitationDaoImpl" />
-  <bean id="projectInvitationJoinDaoImpl" class="com.cloud.api.query.dao.ProjectInvitationJoinDaoImpl" />
-  <bean id="projectJoinDaoImpl" class="com.cloud.api.query.dao.ProjectJoinDaoImpl" />
-  <bean id="regionDaoImpl" class="org.apache.cloudstack.region.dao.RegionDaoImpl" />
-  <bean id="remoteAccessVpnDaoImpl" class="com.cloud.network.dao.RemoteAccessVpnDaoImpl" />
-  <bean id="resourceCountDaoImpl" class="com.cloud.configuration.dao.ResourceCountDaoImpl" />
-  <bean id="resourceLimitDaoImpl" class="com.cloud.configuration.dao.ResourceLimitDaoImpl" />
-  <bean id="resourceTagJoinDaoImpl" class="com.cloud.api.query.dao.ResourceTagJoinDaoImpl" />
-  <bean id="resourceTagsDaoImpl" class="com.cloud.tags.dao.ResourceTagsDaoImpl" />
-  <bean id="routerNetworkDaoImpl" class="com.cloud.network.dao.RouterNetworkDaoImpl" />
-  <bean id="sSHKeyPairDaoImpl" class="com.cloud.user.dao.SSHKeyPairDaoImpl" />
-  <bean id="secondaryStorageVmDaoImpl" class="com.cloud.vm.dao.SecondaryStorageVmDaoImpl" />
-  <bean id="securityGroupDaoImpl" class="com.cloud.network.security.dao.SecurityGroupDaoImpl" />
-  <bean id="securityGroupJoinDaoImpl" class="com.cloud.api.query.dao.SecurityGroupJoinDaoImpl" />
-  <bean id="securityGroupRuleDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRuleDaoImpl" />
-  <bean id="securityGroupRulesDaoImpl" class="com.cloud.network.security.dao.SecurityGroupRulesDaoImpl" />
-  <bean id="securityGroupVMMapDaoImpl" class="com.cloud.network.security.dao.SecurityGroupVMMapDaoImpl" />
-  <bean id="securityGroupWorkDaoImpl" class="com.cloud.network.security.dao.SecurityGroupWorkDaoImpl" />
-  <bean id="serviceOfferingJoinDaoImpl" class="com.cloud.api.query.dao.ServiceOfferingJoinDaoImpl" />
-  <bean id="site2SiteCustomerGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteCustomerGatewayDaoImpl" />
-  <bean id="site2SiteVpnConnectionDaoImpl" class="com.cloud.network.dao.Site2SiteVpnConnectionDaoImpl" />
-  <bean id="site2SiteVpnGatewayDaoImpl" class="com.cloud.network.dao.Site2SiteVpnGatewayDaoImpl" />
-  <bean id="snapshotDaoImpl" class="com.cloud.storage.dao.SnapshotDaoImpl" />
-  <bean id="snapshotPolicyDaoImpl" class="com.cloud.storage.dao.SnapshotPolicyDaoImpl" />
-  <bean id="snapshotScheduleDaoImpl" class="com.cloud.storage.dao.SnapshotScheduleDaoImpl" />
-  <bean id="staticRouteDaoImpl" class="com.cloud.network.vpc.dao.StaticRouteDaoImpl" />
-  <bean id="storageNetworkIpAddressDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpAddressDaoImpl" />
-  <bean id="storageNetworkIpRangeDaoImpl" class="com.cloud.dc.dao.StorageNetworkIpRangeDaoImpl" />
-  <bean id="storagePoolDetailsDaoImpl" class="com.cloud.storage.dao.StoragePoolDetailsDaoImpl" />
-  <bean id="storagePoolHostDaoImpl" class="com.cloud.storage.dao.StoragePoolHostDaoImpl" />
-  <bean id="storagePoolJoinDaoImpl" class="com.cloud.api.query.dao.StoragePoolJoinDaoImpl" />
-  <bean id="storagePoolWorkDaoImpl" class="com.cloud.storage.dao.StoragePoolWorkDaoImpl" />
-  <bean id="templatePrimaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.volume.db.TemplatePrimaryDataStoreDaoImpl" />
-  <bean id="uploadDaoImpl" class="com.cloud.storage.dao.UploadDaoImpl" />
-  <bean id="usageDaoImpl" class="com.cloud.usage.dao.UsageDaoImpl" />
-  <bean id="usageEventDaoImpl" class="com.cloud.event.dao.UsageEventDaoImpl" />
-  <bean id="usageIPAddressDaoImpl" class="com.cloud.usage.dao.UsageIPAddressDaoImpl" />
-  <bean id="usageJobDaoImpl" class="com.cloud.usage.dao.UsageJobDaoImpl" />
-  <bean id="usageLoadBalancerPolicyDaoImpl" class="com.cloud.usage.dao.UsageLoadBalancerPolicyDaoImpl" />
-  <bean id="usageNetworkDaoImpl" class="com.cloud.usage.dao.UsageNetworkDaoImpl" />
-  <bean id="usageNetworkOfferingDaoImpl" class="com.cloud.usage.dao.UsageNetworkOfferingDaoImpl" />
-  <bean id="usagePortForwardingRuleDaoImpl" class="com.cloud.usage.dao.UsagePortForwardingRuleDaoImpl" />
-  <bean id="usageSecurityGroupDaoImpl" class="com.cloud.usage.dao.UsageSecurityGroupDaoImpl" />
-  <bean id="usageStorageDaoImpl" class="com.cloud.usage.dao.UsageStorageDaoImpl" />
-  <bean id="usageVMInstanceDaoImpl" class="com.cloud.usage.dao.UsageVMInstanceDaoImpl" />
-  <bean id="usageVPNUserDaoImpl" class="com.cloud.usage.dao.UsageVPNUserDaoImpl" />
-  <bean id="usageVolumeDaoImpl" class="com.cloud.usage.dao.UsageVolumeDaoImpl" />
-  <bean id="usageVmDiskDaoImpl" class="com.cloud.usage.dao.UsageVmDiskDaoImpl" />
-  <bean id="userAccountDaoImpl" class="com.cloud.user.dao.UserAccountDaoImpl" />
-  <bean id="userAccountJoinDaoImpl" class="com.cloud.api.query.dao.UserAccountJoinDaoImpl" />
-  <bean id="userIpv6AddressDaoImpl" class="com.cloud.network.dao.UserIpv6AddressDaoImpl" />
-  <bean id="userStatisticsDaoImpl" class="com.cloud.user.dao.UserStatisticsDaoImpl" />
-  <bean id="userStatsLogDaoImpl" class="com.cloud.user.dao.UserStatsLogDaoImpl" />
-  <bean id="userVmDiskStatsDaoImpl" class="com.cloud.user.dao.VmDiskStatisticsDaoImpl" />
-  <bean id="userVmCloneSettingDaoImpl" class="com.cloud.vm.dao.UserVmCloneSettingDaoImpl" />
-  <bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
-  <bean id="userVmDetailsDaoImpl" class="com.cloud.vm.dao.UserVmDetailsDaoImpl" />
-  <bean id="userVmJoinDaoImpl" class="com.cloud.api.query.dao.UserVmJoinDaoImpl" />
-  <bean id="vMComputeTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMComputeTagDaoImpl" />
-  <bean id="vMEntityDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMEntityDaoImpl" />
-  <bean id="vMInstanceDaoImpl" class="com.cloud.vm.dao.VMInstanceDaoImpl" />
-  <bean id="vMNetworkMapDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMNetworkMapDaoImpl" />
-  <bean id="vMReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMReservationDaoImpl" />
-  <bean id="vMRootDiskTagDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMRootDiskTagDaoImpl" />
-  <bean id="vMSnapshotDaoImpl" class="com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl" />
-  <bean id="vMTemplateDetailsDaoImpl" class="com.cloud.storage.dao.VMTemplateDetailsDaoImpl" />
-  <bean id="vMTemplateHostDaoImpl" class="com.cloud.storage.dao.VMTemplateHostDaoImpl" />
-  <bean id="vMTemplatePoolDaoImpl" class="com.cloud.storage.dao.VMTemplatePoolDaoImpl" />
-  <bean id="vMTemplateZoneDaoImpl" class="com.cloud.storage.dao.VMTemplateZoneDaoImpl" />
-  <bean id="versionDaoImpl" class="com.cloud.upgrade.dao.VersionDaoImpl" />
-  <bean id="virtualRouterProviderDaoImpl" class="com.cloud.network.dao.VirtualRouterProviderDaoImpl" />
-  <bean id="vmRulesetLogDaoImpl" class="com.cloud.network.security.dao.VmRulesetLogDaoImpl" />
-  <bean id="volumeDaoImpl" class="com.cloud.storage.dao.VolumeDaoImpl" />
-  <bean id="volumeDetailsDaoImpl" class="com.cloud.storage.dao.VolumeDetailsDaoImpl" />
-  <bean id="volumeHostDaoImpl" class="com.cloud.storage.dao.VolumeHostDaoImpl" />
-  <bean id="volumeJoinDaoImpl" class="com.cloud.api.query.dao.VolumeJoinDaoImpl" />
-  <bean id="volumeReservationDaoImpl" class="org.apache.cloudstack.engine.cloud.entity.api.db.dao.VolumeReservationDaoImpl" />
-  <bean id="vpcDaoImpl" class="com.cloud.network.vpc.dao.VpcDaoImpl" />
-  <bean id="vpcGatewayDaoImpl" class="com.cloud.network.vpc.dao.VpcGatewayDaoImpl" />
-  <bean id="vpcOfferingDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingDaoImpl" />
-  <bean id="vpcOfferingServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcOfferingServiceMapDaoImpl" />
-  <bean id="vpcServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcServiceMapDaoImpl" />
-  <bean id="vpnUserDaoImpl" class="com.cloud.network.dao.VpnUserDaoImpl" />
-  <bean id="applicationLbRuleDaoImpl" class="org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDaoImpl" />
-  <bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
-  <bean id="serviceOfferingDetailsDaoImpl" class="com.cloud.service.dao.ServiceOfferingDetailsDaoImpl"/>
-  <bean id="AclGroupDaoImpl" class="org.apache.cloudstack.acl.dao.AclGroupDaoImpl"/>
-  <bean id="AclGroupJoinDaoImpl" class="com.cloud.api.query.dao.AclGroupJoinDaoImpl"/>      
-  <bean id="AclRoleDaoImpl" class="org.apache.cloudstack.acl.dao.AclRoleDaoImpl"/>  
-  <bean id="AclRoleJoinDaoImpl" class="com.cloud.api.query.dao.AclRoleJoinDaoImpl"/>    
-  <bean id="AclGroupAccountMapDaoImpl" class="org.apache.cloudstack.acl.dao.AclGroupAccountMapDaoImpl"/>
-  <bean id="AclGroupRoleMapDaoImpl" class="org.apache.cloudstack.acl.dao.AclGroupRoleMapDaoImpl"/> 
-  <bean id="AclApiPermissionDaoImpl" class="org.apache.cloudstack.acl.dao.AclApiPermissionDaoImpl"/>
-  <bean id="AclEntityPermissionDaoImpl" class="org.apache.cloudstack.acl.dao.AclEntityPermissionDaoImpl"/>  
-  <bean id="AclRolePermissionDaoImpl" class="org.apache.cloudstack.acl.dao.AclRolePermissionDaoImpl"/>  
-  <bean id="AclServiceImpl" class="org.apache.cloudstack.acl.AclServiceImpl"/>      
-  
-   
-  <!--
-    Checkers
-  -->
-  <bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
-  <bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
-  <bean id="databaseIntegrityChecker" class="com.cloud.upgrade.DatabaseIntegrityChecker" />
-  <bean id="domainChecker" class="com.cloud.acl.DomainChecker" />
-  <bean id="affinityGroupAccessChecker" class="com.cloud.acl.AffinityGroupAccessChecker" />
-  <bean id="roleBasedEntityAccessChecker" class="org.apache.cloudstack.acl.entity.RoleBasedEntityAccessChecker" />
-  
-  <!--
-    Authenticators
-  --> 
-  <bean id="basicAgentAuthManager" class="com.cloud.agent.manager.authn.impl.BasicAgentAuthManager">
-    <property name="name" value="BASIC"/>
-  </bean>
-  <bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
-    <property name="name" value="MD5"/>
-  </bean>
-  <bean id="LdapAuthenticator" class="org.apache.cloudstack.ldap.LdapAuthenticator">
-    <property name="name" value="LDAP"/>
-  </bean>
-  <bean id="SHA256SaltedUserAuthenticator" class="com.cloud.server.auth.SHA256SaltedUserAuthenticator">
-    <property name="name" value="SHA256SALT"/>
-  </bean>
-  <bean id="PlainTextUserAuthenticator" class="com.cloud.server.auth.PlainTextUserAuthenticator">
-    <property name="name" value="PLAINTEXT"/>
-  </bean>
-  <bean id="LdapManager" class="org.apache.cloudstack.ldap.LdapManagerImpl" />
-  <bean id="LdapUserManager" class="org.apache.cloudstack.ldap.LdapUserManager" />
-  <bean id="LdapContextFactory" class="org.apache.cloudstack.ldap.LdapContextFactory" />
-  <bean id="LdapConfigurationDao" class="org.apache.cloudstack.ldap.dao.LdapConfigurationDaoImpl" />
-  <bean id="LdapConfiguration" class="org.apache.cloudstack.ldap.LdapConfiguration" />
-
-  <!--
-      Network Elements
-  -->
-  <bean id="Ovs" class="com.cloud.network.element.OvsElement">
-    <property name="name" value="Ovs"/>
-  </bean>
-  <bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
-    <property name="name" value="SecurityGroupProvider"/>
-  </bean>
-  <bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
-    <property name="name" value="VirtualRouter"/>
-  </bean>
-  <bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
-    <property name="name" value="VpcVirtualRouter"/>
-  </bean>
-  <bean id="elasticLoadBalancerElement" class="com.cloud.network.element.ElasticLoadBalancerElement">
-    <property name="name" value="ElasticLoadBalancerElement"/>
-  </bean>
-  <bean id="InternalLbVm" class="org.apache.cloudstack.network.element.InternalLoadBalancerElement">
-    <property name="name" value="InternalLbVm"/>
-  </bean>
-
-  <!-- 
-    General allocators
-  -->             
-  <bean id="firstFitAllocator" class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator" />
-  <bean id="randomAllocator" class="com.cloud.agent.manager.allocator.impl.RandomAllocator" />
-
-  <!--
-     Host Allocators
-  -->
-  <bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
-    <property name="name" value="FirstFitRouting"/>
-  </bean>
-  
-  <!--
-    Storage pool allocators
-  -->
-  <bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
-    <property name="name" value="LocalStorage"/>
-  </bean>
-  <bean id="clusterScopeStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ClusterScopeStoragePoolAllocator" />
-  <bean id="zoneWideStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.ZoneWideStoragePoolAllocator" />
-  <bean id="garbageCollectingStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.GarbageCollectingStoragePoolAllocator">
-    <property name="name" value="GCStorage"/>
-  </bean>
-
-  <bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
-    <property name="name" value="UserFirst"/>
-  </bean>
-  
-  
-  <bean id="recreatableFencer" class="com.cloud.ha.RecreatableFencer" />
-  <bean id="recreateHostAllocator" class="com.cloud.agent.manager.allocator.impl.RecreateHostAllocator" />
-  <bean id="secondaryStorageVmDefaultAllocator" class="com.cloud.storage.secondary.SecondaryStorageVmDefaultAllocator" />
-
-
-  <!--
-    Misc allocator & Adapters
-  -->
-  <bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
-    <property name="name" value="Balance"/>
-  </bean>
-
-  <bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator">
-    <property name="name" value="Basic"/>
-  </bean>
-
-  <bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" />
-  <bean id="clusterAlertAdapter" class="com.cloud.alert.ClusterAlertAdapter" />
-  <bean id="consoleProxyAlertAdapter" class="com.cloud.alert.ConsoleProxyAlertAdapter" />
-  <bean id="secondaryStorageVmAlertAdapter" class="com.cloud.alert.SecondaryStorageVmAlertAdapter" />
-  <bean id="clusterServiceServletAdapter" class="com.cloud.cluster.ClusterServiceServletAdapter" />
-
-  <!--
-    Investigators
-  -->
-  <bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
-    <property name="name" value="SimpleInvestigator"/>
-  </bean>
-
-  <bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
-    <property name="name" value="XenServerInvestigator"/>
-  </bean>
-  
-  <bean id="KVMInvestigator" class="com.cloud.ha.KVMInvestigator">
-    <property name="name" value="KVMInvestigator"/>
-  </bean>
-
-  <bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
-    <property name="name" value="PingInvestigator"/>
-  </bean>
-
-  <bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
-    <property name="name" value="ManagementIPSysVMInvestigator"/>
-  </bean>
-
-  <!--
-    Fencers
-  -->
-  <bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
-    <property name="name" value="XenServerFenceBuilder"/>
-  </bean>
-  <bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
-    <property name="name" value="KVMFenceBuilder"/>
-  </bean>
-  <bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
-    <property name="name" value="OvmFenceBuilder"/>
-  </bean>
-
-  <!--
-    Discovers
-  -->
-  <bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xenserver.discoverer.XcpServerDiscoverer">
-    <property name="name" value="XCP Agent"/>
-  </bean>
-
-  <bean id="SecondaryStorageDiscoverer" class="org.apache.cloudstack.storage.resource.SecondaryStorageDiscoverer">
-    <property name="name" value="SecondaryStorage"/>
-  </bean>
-
-  <bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
-    <property name="name" value="KVM Agent"/>
-  </bean>
-
-  <bean id="LxcServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.LxcServerDiscoverer">
-    <property name="name" value="Lxc Discover"/>
-  </bean>
-
-  <bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
-    <property name="name" value="Ovm Discover"/>
-  </bean>
-
-  <bean id="dummyHostDiscoverer" class="com.cloud.resource.DummyHostDiscoverer">
-    <property name="name" value="dummyHostDiscoverer" />
-  </bean>
-
-  <!--
-    Deployment planners
-  -->
-  <bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
-    <property name="name" value="UserDispersingPlanner"/>
-  </bean>
-  
-  <bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
-    <property name="name" value="UserConcentratedPodPlanner"/>
-  </bean>
-
-  <bean id="ImplicitDedicationPlanner" class="com.cloud.deploy.ImplicitDedicationPlanner">
-    <property name="name" value="ImplicitDedicationPlanner"/>
-  </bean>
-
-  <bean id="clusterBasedAgentLoadBalancerPlanner" class="com.cloud.cluster.agentlb.ClusterBasedAgentLoadBalancerPlanner">
-    <property name="name" value="ClusterBasedAgentLoadBalancerPlanner"/>
-  </bean>
-
-  <!--
-    Network Gurus
-  -->
-  <bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
-    <property name="name" value="StorageNetworkGuru"/>
-  </bean>
-  <bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
-    <property name="name" value="ExternalGuestNetworkGuru"/>
-  </bean>
-  <bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
-    <property name="name" value="PublicNetworkGuru"/>
-  </bean>
-  <bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
-    <property name="name" value="PodBasedNetworkGuru"/>
-  </bean>
-  <bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
-    <property name="name" value="ControlNetworkGuru"/>
-  </bean>
-  <bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
-    <property name="name" value="DirectNetworkGuru"/>
-  </bean>
-  <bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
-    <property name="name" value="DirectPodBasedNetworkGuru"/>
-  </bean>
-  <bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
-    <property name="name" value="OvsGuestNetworkGuru"/>
-  </bean>
-  <bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
-    <property name="name" value="PrivateNetworkGuru"/>
-  </bean>
- 
-  <!--
-   Hypervisor Gurus
-  -->
-  <bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
-    <property name="name" value="XenServerGuru"/>
-  </bean>
-  
-  <bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
-    <property name="name" value="KVMGuru"/>
-  </bean>
-
-  <bean id="LXCGuru" class="com.cloud.hypervisor.LXCGuru">
-    <property name="name" value="LXCGuru"/>
-  </bean>
-
-  <bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
-    <property name="name" value="OvmGuru"/>
-  </bean>
-
-  <!--=====================================================================================================-->
-  <!--                                                                                                     -->
-  <!--                           Storage Subsystem Components and Helpers                                  -->
-  <!--                                                                                                     -->
-  <!--=====================================================================================================-->
-
-  <!--Filesystem types-->
-  <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
-  <bean id="networkFileSystem" class="org.apache.cloudstack.storage.datastore.type.NetworkFileSystem" />
-
-  <!--Image formats-->
-  <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
-  <bean id="OVA" class="org.apache.cloudstack.storage.image.format.OVA" />
-  <bean id="QCOW2" class="org.apache.cloudstack.storage.image.format.QCOW2" />
-  <bean id="VHD" class="org.apache.cloudstack.storage.image.format.VHD" />
-  <bean id="VHDX" class="org.apache.cloudstack.storage.image.format.VHDX" />
-  <bean id="unknown" class="org.apache.cloudstack.storage.image.format.Unknown" />
-
-  <!--Data Store Services -->
-  <bean id="snapshotServiceImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl"
-        depends-on="snapshotStateMachineManagerImpl, snapshotDataFactoryImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl"/>
-  <bean id="templateServiceImpl" class="org.apache.cloudstack.storage.image.TemplateServiceImpl"
-        depends-on="dataObjectManagerImpl, dataStoreManagerImpl, dataMotionServiceImpl, objectInDataStoreManagerImpl, defaultEndPointSelector, templateDataFactoryImpl"/>
-  <bean id="volumeServiceImpl" class="org.apache.cloudstack.storage.volume.VolumeServiceImpl"
-        depends-on="snapshotManagerImpl, dataMotionServiceImpl"/>
-
-  <bean id="xenserverSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.XenserverSnapshotStrategy" />
-
-  <!--Data Store Factory-->
-  <bean id="templateDataFactoryImpl" class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl" />
-  <bean id="snapshotDataFactoryImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotDataFactoryImpl"
-        depends-on="dataStoreManagerImpl, snapshotDataStoreDaoImpl, volumeDataFactoryImpl"/>
-  <bean id="volumeDataFactoryImpl" class="org.apache.cloudstack.storage.volume.VolumeDataFactoryImpl" />
-
-  <bean id="objectInDataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.ObjectInDataStoreManagerImpl" />
-  <bean id="dataObjectManagerImpl" class="org.apache.cloudstack.storage.datastore.DataObjectManagerImpl" />
-
-  <!--Data Store Helpers-->
-  <bean id="primaryDataStoreHelper" class="org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper" />
-  <bean id="imageStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
-  <bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
-
-  <bean id="storageCacheRandomAllocator" class="org.apache.cloudstack.storage.cache.allocator.StorageCacheRandomAllocator" />
-  <bean id="storageCacheManagerImpl" class="org.apache.cloudstack.storage.cache.manager.StorageCacheManagerImpl"  />
-  <bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU" />
-
-  <bean id="snapshotStateMachineManagerImpl" class="org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManagerImpl" />
-  <bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
-
-
-  <bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" />
-  <bean id="xenserverStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.XenServerStorageMotionStrategy" />
-
-  <!--Data Motion Services-->
-  <bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
-    <property name="strategies">
-      <list>
-        <ref local="ancientDataMotionStrategy"/>
-        <ref local="xenserverStorageMotionStrategy"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-    Data Store Provider Manager
-  -->
-  <bean id="primaryDataStoreProviderMgr"
-        class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl"/>
-  <bean id="imageStoreProviderMgr" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"/>
-
-  <bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
-        depends-on="dataStoreProviderManager">
-    <property name="primaryStoreMgr" ref="primaryDataStoreProviderMgr"/>
-    <property name="imageDataStoreMgr" ref="imageStoreProviderMgr"/>
-  </bean>
-
-  <bean id="cloudStackPrimaryDataStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl"/>
-
-  <bean id="dataStoreProviderManager"
-        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
-    <property name="providers">
-      <list>
-        <!--Data Store Providers-->
-        <ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-    Managers
-  -->
-  <bean id="accountManagerImpl" class="com.cloud.user.AccountManagerImpl" >
-    <property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
-    <property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
-    <property name="SecurityCheckers" value="#{securityCheckers.Adapters}" />
-  </bean>
-
-  <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl">
-    <property name="UserAuthenticators" value="#{userAuthenticators.Adapters}" />
-    <property name="UserPasswordEncoders" value="#{userPasswordEncoders.Adapters}" />
-    <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
-    <property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
-    <property name="Planners" value="#{deploymentPlanners.Adapters}" />
-  </bean>
-
-  <bean id="storageManagerImpl" class="com.cloud.storage.StorageManagerImpl"/>
-  
-  <bean id="volumeOrchestrator" class="org.apache.cloudstack.engine.orchestration.VolumeOrchestrator">
-    <property name="PodAllocators" value="#{podAllocators.Adapters}" />
-    <property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
-  </bean>
-
-  <bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
-    <property name="name" value="FirstFitPlanner"/>
-  </bean>
-
-  <bean id="resourceManagerImpl" class="com.cloud.resource.ResourceManagerImpl" >
-    <property name="Discoverers" value="#{resourceDiscoverers.Adapters}" />
-  </bean>
-
-  <bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" >
-    <property name="Investigators" value="#{haInvestigators.Adapters}" />
-    <property name="FenceBuilders" value="#{haFenceBuilders.Adapters}" />
-  </bean>
-
-  <bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" >
-    <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
-  </bean>
-
-  <bean id="networkOrchestrator" class="org.apache.cloudstack.engine.orchestration.NetworkOrchestrator" >
-    <property name="NetworkGurus" value="#{networkGurus.Adapters}" />
-    <property name="NetworkElements" value="#{networkElements.Adapters}" />
-    <property name="IpDeployers" value="#{ipDeployers.Adapters}" />
-    <property name="DhcpProviders" value="#{dhcpProviders.Adapters}" />
-  </bean>
-
-  <bean id="ipAddressManagerImpl" class="com.cloud.network.IpAddressManagerImpl" >
-  </bean>
-  <bean id="networkModelImpl" class="com.cloud.network.NetworkModelImpl">
-    <property name="NetworkElements" value="#{networkElements.Adapters}" />
-  </bean>
-
-  <bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
-
-  <bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
-  <bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
-
-  <bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
-  <bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
-  <bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
-  <bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
-
-  <bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
-
-  <bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
-  <bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
-  <bean id="autoScaleManagerImpl" class="com.cloud.network.as.AutoScaleManagerImpl" />
-  <bean id="capacityManagerImpl" class="com.cloud.capacity.CapacityManagerImpl" />
-  <bean id="clusterFenceManagerImpl" class="com.cloud.cluster.ClusterFenceManagerImpl" />
-  <bean id="configurationManagerImpl" class="com.cloud.configuration.ConfigurationManagerImpl" />
-
-  <bean id="elasticLoadBalancerManagerImpl" class="com.cloud.network.lb.ElasticLoadBalancerManagerImpl" />
-  <bean id="entityManagerImpl" class="com.cloud.dao.EntityManagerImpl" />
-  <bean id="externalDeviceUsageManagerImpl" class="com.cloud.network.ExternalDeviceUsageManagerImpl" />
-  <bean id="externalNetworkDeviceManagerImpl" class="com.cloud.network.ExternalNetworkDeviceManagerImpl" />
-  <bean id="firewallManagerImpl" class="com.cloud.network.firewall.FirewallManagerImpl" />
-  <bean id="hypervisorGuruManagerImpl" class="com.cloud.hypervisor.HypervisorGuruManagerImpl" />
-  <bean id="identityServiceImpl" class="com.cloud.uuididentity.IdentityServiceImpl" />
-  <bean id="keystoreManagerImpl" class="com.cloud.keystore.KeystoreManagerImpl" />
-  <bean id="loadBalancingRulesManagerImpl" class="com.cloud.network.lb.LoadBalancingRulesManagerImpl" />
-  <bean id="networkACLManagerImpl" class="com.cloud.network.vpc.NetworkACLManagerImpl" />
-  <bean id="networkACLServiceImpl" class="com.cloud.network.vpc.NetworkACLServiceImpl" />
-  <bean id="networkServiceImpl" class="com.cloud.network.NetworkServiceImpl" />
-  <bean id="networkUsageManagerImpl" class="com.cloud.network.NetworkUsageManagerImpl" />
-  <bean id="oCFS2ManagerImpl" class="com.cloud.storage.OCFS2ManagerImpl" />
-  <bean id="ovsTunnelManagerImpl" class="com.cloud.network.ovs.OvsTunnelManagerImpl" />
-  <bean id="projectManagerImpl" class="com.cloud.projects.ProjectManagerImpl" />
-  <bean id="queryManagerImpl" class="com.cloud.api.query.QueryManagerImpl" />
-  <bean id="regionManagerImpl" class="org.apache.cloudstack.region.RegionManagerImpl" />
-  <bean id="regionServiceImpl" class="org.apache.cloudstack.region.RegionServiceImpl" />
-  <bean id="remoteAccessVpnManagerImpl" class="com.cloud.network.vpn.RemoteAccessVpnManagerImpl" />
-  <bean id="resourceLimitManagerImpl" class="com.cloud.resourcelimit.ResourceLimitManagerImpl" />
-  <bean id="rulesManagerImpl" class="com.cloud.network.rules.RulesManagerImpl" />
-    <bean id="site2SiteVpnManagerImpl" class="com.cloud.network.vpn.Site2SiteVpnManagerImpl" />
-  <bean id="snapshotManagerImpl" class="com.cloud.storage.snapshot.SnapshotManagerImpl" />
-  <bean id="snapshotSchedulerImpl" class="com.cloud.storage.snapshot.SnapshotSchedulerImpl" />
-  <bean id="storageNetworkManagerImpl" class="com.cloud.network.StorageNetworkManagerImpl" />
-  <bean id="taggedResourceManagerImpl" class="com.cloud.tags.TaggedResourceManagerImpl" />
-  <bean id="resourceMetaDataManagerImpl" class="com.cloud.metadata.ResourceMetaDataManagerImpl" />
-  <bean id="templateManagerImpl" class="com.cloud.template.TemplateManagerImpl" />
-  <bean id="uploadMonitorImpl" class="com.cloud.storage.upload.UploadMonitorImpl" />
-  <bean id="usageServiceImpl" class="com.cloud.usage.UsageServiceImpl" />
-  <bean id="virtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VirtualNetworkApplianceManagerImpl" />
-  <bean id="vpcManagerImpl" class="com.cloud.network.vpc.VpcManagerImpl" />
-  <bean id="vpcVirtualNetworkApplianceManagerImpl" class="com.cloud.network.router.VpcVirtualNetworkApplianceManagerImpl" />
-
-  <!-- Async management -->
-  <bean id="asyncJobDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobDaoImpl" />
-  <bean id="asyncJobJournalDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJournalDaoImpl" />
-  <bean id="asyncJobJoinMapDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.AsyncJobJoinMapDaoImpl" />
-  <bean id="asyncJobManagerImpl" class="org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl"/>
-  <bean id="asyncJobMonitor" class="org.apache.cloudstack.framework.jobs.impl.AsyncJobMonitor"/>
-  <bean id="syncQueueDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.SyncQueueDaoImpl" />
-  <bean id="syncQueueItemDaoImpl" class="org.apache.cloudstack.framework.jobs.dao.SyncQueueItemDaoImpl" />
-  <bean id="syncQueueManagerImpl" class="org.apache.cloudstack.framework.jobs.impl.SyncQueueManagerImpl" />
-
-  <bean id="ApiAsyncJobDispatcher" class="com.cloud.api.ApiAsyncJobDispatcher">
-    <property name="name" value="ApiAsyncJobDispatcher" />
-  </bean>
-
-
-  <!--
-    Misc components
-  -->
-  <bean id="actionEventUtils" class="com.cloud.event.ActionEventUtils" />
-  <bean id="alertGenerator" class="com.cloud.event.AlertGenerator" />
-  <bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" />
-  <bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl" />
-  <bean id="apiDispatcher" class="com.cloud.api.ApiDispatcher" />
-  <bean id="apiResponseHelper" class="com.cloud.api.ApiResponseHelper" />
-  <bean id="apiServer" class="com.cloud.api.ApiServer" />
-  <bean id="apiServlet" class="com.cloud.api.ApiServlet" />
-  <bean id="bAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
-  <bean id="cloudOrchestrator" class="org.apache.cloudstack.engine.orchestration.CloudOrchestrator" />
-  <bean id="clusterRestService" class="org.apache.cloudstack.engine.rest.service.api.ClusterRestService" />
-  <bean id="consoleProxyServlet" class="com.cloud.servlet.ConsoleProxyServlet" />
-  <bean id="dataCenterResourceManagerImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManagerImpl" />
-  <bean id="dataDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.DataDisk" />
-
-
-  <bean id="podRestService" class="org.apache.cloudstack.engine.rest.service.api.PodRestService" />
-  <bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />
-  <bean id="networkRestService" class="org.apache.cloudstack.engine.rest.service.api.NetworkRestService" />
-  <bean id="provisioningServiceImpl" class="org.apache.cloudstack.engine.service.api.ProvisioningServiceImpl" />
-  <bean id="rootDisk" class="org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk" />
-  <bean id="registerCompleteServlet" class="com.cloud.servlet.RegisterCompleteServlet" />
-  <bean id="statsCollector" class="com.cloud.server.StatsCollector" />
-  <bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl" />
-  <bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
-  <bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" />
-  <bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
-  <bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
-  <bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />
-  <bean id="volumeTypeHelper" class="org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeTypeHelper" />
-  <bean id="zoneRestService" class="org.apache.cloudstack.engine.rest.service.api.ZoneRestService" />
-  <bean id="cloudZonesStartupProcessor" class="com.cloud.hypervisor.CloudZonesStartupProcessor" />
-  <bean id="managementServerNode" class="org.apache.cloudstack.utils.identity.ManagementServerNode" />
-  <bean id="testingAllocator" class="com.cloud.agent.manager.allocator.impl.TestingAllocator" />
-  <bean id="domainManagerImpl" class="com.cloud.user.DomainManagerImpl" />
-  <bean id="downloadMonitorImpl" class="com.cloud.storage.download.DownloadMonitorImpl" />
-  <bean id="lBHealthCheckManagerImpl" class="com.cloud.network.lb.LBHealthCheckManagerImpl" />
-  <bean id="volumeApiServiceImpl" class="com.cloud.storage.VolumeApiServiceImpl"/>
-  <bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl" />
-  <bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl" />
-
-  <bean id="vMSnapshotManagerImpl" class="com.cloud.vm.snapshot.VMSnapshotManagerImpl" />
-
-
-<!--=======================================================================================================-->
-<!--                                                                                                       -->
-<!--                           Module-basis OSS/non-OSS Common components                                  -->
-<!--                                                                                                       -->
-<!--=======================================================================================================-->
-
-  <!--
-    Baremetal components
-  -->
-  
-  <bean id="BareMetalDhcp" class="com.cloud.baremetal.networkservice.BaremetalDhcpElement">
-    <property name="name" value="BareMetalDhcp"/>
-  </bean>
-  <bean id="BareMetalPxe" class="com.cloud.baremetal.networkservice.BaremetalPxeElement">
-    <property name="name" value="BareMetalPxe"/>
-  </bean>
-  <bean id="BareMetalUserdata" class="com.cloud.baremetal.networkservice.BaremetalUserdataElement">
-      <property name="name" value="BareMetalUserdata"/>
-  </bean>
-
-  <bean id="BareMetalTemplateAdapter" class="com.cloud.baremetal.manager.BareMetalTemplateAdapter" />
-
-  <bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
-    <property name="name" value="Bare Metal Agent"/>
-  </bean>
-
-  <bean id="BareMetalPlanner" class="com.cloud.baremetal.manager.BareMetalPlanner">
-    <property name="name" value="BareMetalPlanner"/>
-  </bean>
-  
-  <bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru">
-    <property name="name" value="BaremetalGuru"/>
-  </bean>
-
-  <bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl"/>
-  <bean id="BaremetalDhcpManager" class="com.cloud.baremetal.networkservice.BaremetalDhcpManagerImpl"/>
-  <bean id="BaremetalKickStartPxeService" class="com.cloud.baremetal.networkservice.BaremetalKickStartServiceImpl"/>
-  <bean id="BaremetalPingPxeService" class="com.cloud.baremetal.networkservice.BareMetalPingServiceImpl" />
-  <bean id="BaremetalPxeManager" class="com.cloud.baremetal.networkservice.BaremetalPxeManagerImpl" /> 
-    
-  <bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
-  <bean id="baremetalDhcpDaoImpl" class="com.cloud.baremetal.database.BaremetalDhcpDaoImpl" />
-  <bean id="baremetalPxeDaoImpl" class="com.cloud.baremetal.database.BaremetalPxeDaoImpl" />
-
-  <bean id="UcsManager" class="com.cloud.ucs.manager.UcsManagerImpl" />
-
-  <bean id="AffinityGroupServiceImpl" class="org.apache.cloudstack.affinity.AffinityGroupServiceImpl">
-  	<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
-  </bean>
-  <bean id="DeploymentPlanningManager" class="com.cloud.deploy.DeploymentPlanningManagerImpl">
-    <property name="Planners" value="#{deploymentPlanners.Adapters}" />
-	<property name="AffinityGroupProcessors" value="#{affinityProcessors.Adapters}" />
-    <property name="StoragePoolAllocators" value="#{storagePoolAllocators.Adapters}" />
-    <property name="HostAllocators" value="#{hostAllocators.Adapters}" />
-  </bean>
-  
-  <bean id="AffinityGroupJoinDaoImpl" class="com.cloud.api.query.dao.AffinityGroupJoinDaoImpl">
-  </bean>
-  <bean id="AffinityGroupDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDaoImpl">
-  </bean>
-  <bean id="AffinityGroupVMMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDaoImpl">
-  </bean>
-  <bean id="AffinityGroupDomainMapDaoImpl" class="org.apache.cloudstack.affinity.dao.AffinityGroupDomainMapDaoImpl">
-  </bean>
-  
-  <bean id="PlannerHostReservationDaoImpl" class="com.cloud.deploy.dao.PlannerHostReservationDaoImpl">
-  </bean>
-  
-</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d781824a/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
deleted file mode 100644
index 28b8d92..0000000
--- a/client/tomcatconf/componentContext.xml.in
+++ /dev/null
@@ -1,317 +0,0 @@
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:context="http://www.springframework.org/schema/context"
-  xmlns:tx="http://www.springframework.org/schema/tx"
-  xmlns:aop="http://www.springframework.org/schema/aop"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/tx
-                      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
-                      http://www.springframework.org/schema/aop
-                      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
-                      http://www.springframework.org/schema/context
-                      http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
-  <context:annotation-config />
-
-
-<!--
-
-  OSS deployment configuration
-
-  OSS/non-OSS counter-exclusive components and related configurations should be put here
-  for example, configurationDaoImpl component, it has exclusive configuration settings in OSS and non-OSS deployment,
-  its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in, each with
-  independent configuration
-
--->
-  
-  <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
-  <bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl" />
-  <bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
-
-  <!--
-    Nicira support components
-  -->
-  <bean id="niciraNvpDaoImpl" class="com.cloud.network.dao.NiciraNvpDaoImpl" />
-  <bean id="niciraNvpNicMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpNicMappingDaoImpl" />
-  <bean id="niciraNvpRouterMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpRouterMappingDaoImpl" />
-  <bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
-    <property name="name" value="NiciraNvpGuestNetworkGuru"/>
-  </bean>
-  <bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
-    <property name="name" value="NiciraNvp"/>
-  </bean>
-
-  <!-- 
-    Midonet support components
-  -->
-  <bean id="MidoNetGuestNetworkGuru" class="com.cloud.network.guru.MidoNetGuestNetworkGuru">
-    <property name="name" value="MidoNetGuestNetworkGuru"/>
-  </bean>
-  <bean id="MidoNetElement" class="com.cloud.network.element.MidoNetElement">
-    <property name="name" value="MidoNetElement"/>
-  </bean>
-
-  <!--
-    Stratosphere SSP support components
-  -->
-  <bean id="sspCredentialDaoImpl" class="org.apache.cloudstack.network.dao.SspCredentialDaoImpl"/>
-  <bean id="sspTenantDaoImpl" class="org.apache.cloudstack.network.dao.SspTenantDaoImpl"/>
-  <bean id="sspUuidDaoImpl" class="org.apache.cloudstack.network.dao.SspUuidDaoImpl"/>
-  <bean id="SspGuestNetworkGuru" class="org.apache.cloudstack.network.guru.SspGuestNetworkGuru">
-    <property name="name" value="SspGuestNetworkGuru"/>
-  </bean>
-  <bean id="StratosphereSsp" class="org.apache.cloudstack.network.element.SspElement">
-    <property name="name" value="StratosphereSsp"/>
-  </bean>
-
-  <!--
-    UCS support components
-  -->
-  <bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
-  <bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
-
-<!--
-
-  Deployment configurations of various adapters
-
-  It determines whether or not a adapter is activated or how it is loaded in order in its managing provider,
-
--->
-  <bean id="cloudStackImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"/>
-  <bean id="s3ImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"/>
-  <bean id="swiftImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"/>
-  <bean id="solidFireDataStoreProvider"
-        class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider"/>
-
-  <!--Storage Providers-->
-  <bean id="dataStoreProviderManager"
-        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
-    <property name="providers">
-      <list merge="true">
-        <ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
-        <ref local="cloudStackImageStoreProviderImpl"/>
-        <ref local="s3ImageStoreProviderImpl"/>
-        <ref local="swiftImageStoreProviderImpl"/>
-        <ref local="solidFireDataStoreProvider"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Security adapters -->
-  <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="SHA256SaltedUserAuthenticator"/>
-          <ref bean="MD5UserAuthenticator"/>
-          <ref bean="LdapAuthenticator"/>
-          <ref bean="PlainTextUserAuthenticator"/>
-      </list>
-    </property>
-  </bean>
-  <bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="SHA256SaltedUserAuthenticator"/>
-          <ref bean="MD5UserAuthenticator"/>
-          <ref bean="LdapAuthenticator"/>
-          <ref bean="PlainTextUserAuthenticator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-      	  <ref bean="roleBasedEntityAccessChecker"/>
-		  <ref bean="affinityGroupAccessChecker"/>
-          <ref bean="domainChecker"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Resource discoverers -->
-  <bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="XcpServerDiscoverer"/>
-          <ref bean="SecondaryStorageDiscoverer"/>
-          <ref bean="KvmServerDiscoverer"/>
-          <ref bean="LxcServerDiscoverer"/>
-          <ref bean="BareMetalDiscoverer"/>
-          <ref bean="OvmDiscoverer"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- HA adapters -->
-  <bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="CheckOnAgentInvestigator"/>
-          <ref bean="XenServerInvestigator"/>
-          <ref bean="UserVmDomRInvestigator"/>
-          <ref bean="ManagementIPSystemVMInvestigator"/>
-          <ref bean="KVMInvestigator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="XenServerFencer"/>
-          <ref bean="KVMFencer"/>
-          <ref bean="OvmFencer"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Deployment/allocation adapters -->
-  <bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="FirstFitPlanner" />
-          <ref bean="UserDispersingPlanner" />
-          <ref bean="UserConcentratedPodPlanner" />
-          <ref bean="ImplicitDedicationPlanner" />
-          <ref bean="BareMetalPlanner" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="UserConcentratedAllocator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="LocalStoragePoolAllocator"/>
-          <ref bean="clusterScopeStoragePoolAllocator"/>
-          <ref bean="zoneWideStoragePoolAllocator"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Networking adapters -->
-  <bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="elasticLoadBalancerElement"/>
-          <ref bean="VirtualRouter"/>
-          <ref bean="VpcVirtualRouter"/>
-          <ref bean="NiciraNvp"/>
-          <ref bean="InternalLbVm"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="VirtualRouter"/>
-          <ref bean="VpcVirtualRouter"/>
-          <ref bean="BareMetalDhcp"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="StorageNetworkGuru"/>
-          <ref bean="ExternalGuestNetworkGuru"/>
-          <ref bean="PublicNetworkGuru"/>
-          <ref bean="PodBasedNetworkGuru"/>
-          <ref bean="DirectPodBasedNetworkGuru"/>
-          <ref bean="ControlNetworkGuru"/>
-          <ref bean="DirectNetworkGuru"/>
-          <ref bean="OvsGuestNetworkGuru"/>
-          <ref bean="PrivateNetworkGuru"/>
-          <ref bean="NiciraNvpGuestNetworkGuru"/>
-          <ref bean="MidoNetGuestNetworkGuru"/>
-          <ref bean="SspGuestNetworkGuru"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="networkElements" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="VirtualRouter"/>
-          <ref bean="Ovs"/>
-          <ref bean="SecurityGroupProvider"/>
-          <ref bean="VpcVirtualRouter"/>
-          <ref bean="NiciraNvp" />
-          <ref bean="MidoNetElement"/>
-          <ref bean="StratosphereSsp"/>
-          <ref bean="InternalLbVm"/>
-          <ref bean="BareMetalDhcp"/>
-          <ref bean="BareMetalPxe"/>
-          <ref bean="BareMetalUserdata"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-   AffinityGroup Processors
-  -->
-  <bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
-   	<property name="name" value="HostAntiAffinityProcessor"/>
-   	<property name="type" value="host anti-affinity"/>
-  </bean>
-
-  <bean id="affinityProcessors" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="HostAntiAffinityProcessor" />
-          <ref bean="ExplicitDedicationProcessor"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-    Dedicated Resources components
-  -->
-  <bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
-  <bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
-    <property name="name" value="ExplicitDedicationProcessor"/>
-    <property name="type" value="ExplicitDedication"/>
-  </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d781824a/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
deleted file mode 100644
index 187b63d..0000000
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ /dev/null
@@ -1,422 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-  xmlns:context="http://www.springframework.org/schema/context"
-  xmlns:tx="http://www.springframework.org/schema/tx" 
-  xmlns:aop="http://www.springframework.org/schema/aop"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans
-                      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/tx 
-                      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
-                      http://www.springframework.org/schema/aop
-                      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
-                      http://www.springframework.org/schema/context
-                      http://www.springframework.org/schema/context/spring-context-3.0.xsd">                     
-
-
-<!--
- 
-  non-OSS deployment configuration
-      
-  OSS/non-OSS counter-exclusive components and related configurations should be put here
-  for example, configurationDaoImpl component, it has exclusive configuration settings in OSS and non-OSS deployment,
-  its component declaration should be put in both componentContext.xml.in and nonossComponentContext.xml.in, each with
-  independent configuration
-    
--->
-  <bean id="DatabaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker"/>
-  <bean id="GlobalLoadBalancingRulesServiceImpl" class ="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" >
-    <property name="GslbServiceProvider">
-      <ref bean="Netscaler"/>
-    </property>
-  </bean>
-
-  <!--
-    DAO with customized configuration under non-OSS deployment
-  -->
-  <bean id="configurationDaoImpl" class="org.apache.cloudstack.framework.config.dao.ConfigurationDaoImpl">
-    <property name="configParams">
-      <map>
-        <entry key="premium" value="true" />
-      </map>
-    </property>  
-  </bean>
-
-  <!--
-    VMware support components
-  -->  
-  <bean id="VmwareFencer" class="com.cloud.ha.VmwareFencer">
-    <property name="name" value="VMwareFenceBuilder"/>
-  </bean>
-  <bean id="vmwareServerDiscoverer" class="com.cloud.hypervisor.vmware.VmwareServerDiscoverer">
-    <property name="name" value="VMware Discover"/>
-  </bean>
-  <bean id="VMwareGuru" class="com.cloud.hypervisor.guru.VMwareGuru">
-    <property name="name" value="VMwareGuru"/>
-  </bean>
-  <bean id="VmwareInvestigator" class="com.cloud.ha.VmwareInvestigator">
-    <property name="name" value="VMwareInvestigator"/>
-  </bean>
-  <bean id="VmwareManager" class="com.cloud.hypervisor.vmware.manager.VmwareManagerImpl"/>
-  <bean id="vmwareContextFactory" class="com.cloud.hypervisor.vmware.resource.VmwareContextFactory" />
-  <bean id="VmwareDatacenterDaoImpl" class="com.cloud.hypervisor.vmware.dao.VmwareDatacenterDaoImpl" />
-  <bean id="VmwareDatacenterZoneMapDaoImpl" class="com.cloud.hypervisor.vmware.dao.VmwareDatacenterZoneMapDaoImpl" />
-  <bean id="LegacyZoneDaoImpl" class="com.cloud.hypervisor.vmware.dao.LegacyZoneDaoImpl" />
-
-  <!--
-    Nicira support components
-  -->
-  <bean id="niciraNvpDaoImpl" class="com.cloud.network.dao.NiciraNvpDaoImpl" />
-  <bean id="niciraNvpNicMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpNicMappingDaoImpl" />
-  <bean id="niciraNvpRouterMappingDaoImpl" class="com.cloud.network.dao.NiciraNvpRouterMappingDaoImpl" />
-  <bean id="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru">
-    <property name="name" value="NiciraNvpGuestNetworkGuru"/>
-  </bean>
-  <bean id="NiciraNvp" class="com.cloud.network.element.NiciraNvpElement">
-    <property name="name" value="NiciraNvp"/>
-  </bean>
-  
-  <!--
-      BigSwitch Components
-  -->
-  <bean id="BigSwitchVns" class="com.cloud.network.element.BigSwitchVnsElement">
-    <property name="name" value="BigSwitchVns"/>
-  </bean>
-
-  <!--
-    Netapp support components
-  -->  
-  <bean id="lunDaoImpl" class="com.cloud.netapp.dao.LunDaoImpl" />
-  <bean id="poolDaoImpl" class="com.cloud.netapp.dao.PoolDaoImpl" />
-  <bean id="netappVolumeDaoImpl" class="com.cloud.netapp.dao.VolumeDaoImpl" />
-  <bean id="NetappManager" class="com.cloud.netapp.NetappManagerImpl"/>
-
-  <!--
-   JuniperSRX support components
-  -->
-  <bean id="JuniperSRX" class="com.cloud.network.element.JuniperSRXExternalFirewallElement">
-    <property name="name" value="JuniperSRX"/>
-  </bean>
-  
-  <!--
-    NetScalar support components
-  -->
-  <bean id="netScalerPodDaoImpl" class="com.cloud.network.dao.NetScalerPodDaoImpl" />
-  <bean id="Netscaler" class="com.cloud.network.element.NetscalerElement">
-    <property name="name" value="Netscaler"/>
-  </bean>
-  
-  <!--
-    F5BigIP support components
-  -->
-  <bean id="F5BigIP" class="com.cloud.network.element.F5ExternalLoadBalancerElement">
-    <property name="name" value="F5BigIP"/>
-  </bean>
-  
-  <!--
-    Cisco Nexus support components
-  -->  
-  <bean id="ciscoNexusVSMDeviceDaoImpl" class="com.cloud.network.dao.CiscoNexusVSMDeviceDaoImpl" />
-  <bean id="CiscoNexus1000vVSM" class="com.cloud.network.element.CiscoNexusVSMElement">
-    <property name="name" value="CiscoNexus1000vVSM"/>
-  </bean>
-  
-  <!--
-    Cisco VNMC support components
-  -->
-  <bean id="ciscoVnmcDaoImpl" class="com.cloud.network.dao.CiscoVnmcDaoImpl" />
-  <bean id="ciscoAsa1000vDaoImpl" class="com.cloud.network.dao.CiscoAsa1000vDaoImpl" />
-  <bean id="networkAsa1000vMapDaoImpl" class="com.cloud.network.dao.NetworkAsa1000vMapDaoImpl" />
-  <bean id="CiscoVNMC" class="com.cloud.network.element.CiscoVnmcElement">
-    <property name="name" value="CiscoVNMC"/>
-  </bean>
-  
-  <!--
-    BigSwitch support components
-  -->  
-  <bean id="bigSwitchVnsDaoImpl" class="com.cloud.network.dao.BigSwitchVnsDaoImpl" />
-  <bean id="bigSwitchVnsElement" class="com.cloud.network.element.BigSwitchVnsElement">
-    <property name="name" value="BigSwitchVnsElement"/>
-  </bean>
-
-
-  <!--
-    Midonet support components
-  -->
-  <bean id="MidoNetGuestNetworkGuru" class="com.cloud.network.guru.MidoNetGuestNetworkGuru">
-    <property name="name" value="MidoNetGuestNetworkGuru"/>
-  </bean>
-  <bean id="MidoNetElement" class="com.cloud.network.element.MidoNetElement">
-    <property name="name" value="MidoNetElement"/>
-  </bean>
-
-
-  <!--
-    UCS support components
-  -->
-  <bean id="ucsBladeDaoImpl" class="com.cloud.ucs.database.UcsBladeDaoImpl" />
-  <bean id="ucsManagerDaoImpl" class="com.cloud.ucs.database.UcsManagerDaoImpl" />
-  
-<!--
-
-  Deployment configurations of various adapters
-    
-  It determines whether or not a adapter is activated or how it is loaded in order in its managing provider,
-     
--->
-
-  <!--Motion Strategies-->
-  <bean id="vmwareStorageMotionStrategy" class="org.apache.cloudstack.storage.motion.VmwareStorageMotionStrategy" />
-  <bean id="dataMotionServiceImpl" class="org.apache.cloudstack.storage.motion.DataMotionServiceImpl">
-    <property name="strategies">
-      <list>
-        <ref bean="ancientDataMotionStrategy"/>
-        <ref bean="xenserverStorageMotionStrategy"/>
-        <ref local="vmwareStorageMotionStrategy"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="cloudStackImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl"/>
-  <bean id="s3ImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl"/>
-  <bean id="swiftImageStoreProviderImpl"
-        class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"/>
-  <bean id="solidFireDataStoreProvider"
-        class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider"/>
-
-  <!--Storage Providers-->
-  <bean id="dataStoreProviderManager"
-        class="org.apache.cloudstack.storage.datastore.provider.DataStoreProviderManagerImpl">
-    <property name="providers">
-      <list merge="true">
-        <ref bean="cloudStackPrimaryDataStoreProviderImpl"/>
-        <ref bean="cloudStackImageStoreProviderImpl"/>
-        <ref bean="s3ImageStoreProviderImpl"/>
-        <ref local="swiftImageStoreProviderImpl"/>
-        <ref bean="solidFireDataStoreProvider"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Security adapters -->
-  <bean id="userAuthenticators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="SHA256SaltedUserAuthenticator"/>
-          <ref bean="MD5UserAuthenticator"/>
-          <ref bean="LdapAuthenticator"/>
-          <ref bean="PlainTextUserAuthenticator"/>
-      </list>
-    </property>
-  </bean>
-  <bean id="userPasswordEncoders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="SHA256SaltedUserAuthenticator"/>
-          <ref bean="MD5UserAuthenticator"/>
-          <ref bean="LdapAuthenticator"/>
-          <ref bean="PlainTextUserAuthenticator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="securityCheckers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-	      <ref bean="roleBasedEntityAccessChecker"/>
-	      <ref bean="affinityGroupAccessChecker"/>
-          <ref bean="domainChecker"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Resource discoverers -->
-  <bean id="resourceDiscoverers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="XcpServerDiscoverer"/>
-          <ref bean="SecondaryStorageDiscoverer"/>
-          <ref bean="KvmServerDiscoverer"/>
-          <ref bean="BareMetalDiscoverer"/>
-          <ref bean="OvmDiscoverer"/>
-          <ref bean="vmwareServerDiscoverer"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- HA adapters -->
-  <bean id="haInvestigators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="CheckOnAgentInvestigator"/>
-          <ref bean="XenServerInvestigator"/>
-          <ref bean="VmwareInvestigator"/>
-          <ref bean="UserVmDomRInvestigator"/>
-          <ref bean="ManagementIPSystemVMInvestigator"/>
-          <ref bean="KVMInvestigator"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="haFenceBuilders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="XenServerFencer"/>
-          <ref bean="KVMFencer"/>
-          <ref bean="OvmFencer"/>
-          <ref bean="VmwareFencer"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Deployment/allocation adapters -->
-  <bean id="deploymentPlanners" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="FirstFitPlanner" />
-          <ref bean="UserDispersingPlanner" />
-          <ref bean="UserConcentratedPodPlanner" />
-          <ref bean="ImplicitDedicationPlanner" />
-          <ref bean="BareMetalPlanner" />
-      </list>
-    </property>
-  </bean>
-
-  <bean id="podAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="UserConcentratedAllocator"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="hostAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="FirstFitRouting"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="storagePoolAllocators" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="LocalStoragePoolAllocator"/>
-          <ref bean="clusterScopeStoragePoolAllocator"/>
-          <ref bean="zoneWideStoragePoolAllocator"/>
-      </list>
-    </property>
-  </bean>
-
-  <!-- Networking adapters -->
-  <bean id="ipDeployers" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="elasticLoadBalancerElement"/>
-          <ref bean="VirtualRouter"/>
-          <ref bean="VpcVirtualRouter"/>
-          <ref bean="NiciraNvp"/>
-          <ref bean="InternalLbVm"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="dhcpProviders" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="VirtualRouter"/>
-          <ref bean="VpcVirtualRouter"/>
-          <ref bean="BareMetalDhcp"/>
-      </list>
-    </property>
-  </bean>
-
-  <bean id="networkGurus" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="StorageNetworkGuru"/>
-          <ref bean="ExternalGuestNetworkGuru"/>
-          <ref bean="PublicNetworkGuru"/>
-          <ref bean="PodBasedNetworkGuru"/>
-          <ref bean="DirectPodBasedNetworkGuru"/>
-          <ref bean="ControlNetworkGuru"/>
-          <ref bean="DirectNetworkGuru"/>
-          <ref bean="OvsGuestNetworkGuru"/>
-          <ref bean="PrivateNetworkGuru"/>
-          <ref bean="NiciraNvpGuestNetworkGuru"/>
-          <ref bean="MidoNetGuestNetworkGuru"/>
-      </list>
-    </property>
-  </bean>
-  
-  <bean id="networkElements" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="JuniperSRX"/>
-          <ref bean="Netscaler"/>
-          <ref bean="F5BigIP"/>
-          <ref bean="CiscoNexus1000vVSM"/>
-          <ref bean="CiscoVNMC"/>
-          <ref bean="NiciraNvp" />
-          <ref bean="MidoNetElement" />
-          <ref bean="bigSwitchVnsElement"/>
-          <ref bean="VirtualRouter"/>
-          <ref bean="Ovs"/>
-          <ref bean="SecurityGroupProvider"/>
-          <ref bean="VpcVirtualRouter"/>
-          <ref bean="InternalLbVm"/>
-          <ref bean="BareMetalDhcp"/>
-          <ref bean="BareMetalPxe"/>
-          <ref bean="BareMetalUserdata"/>
-      </list>
-    </property>
-  </bean>
-  
-  <!--
-   AffinityGroup Processors
-  -->
-  <bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
-   	<property name="name" value="HostAntiAffinityProcessor"/>
-   	<property name="type" value="host anti-affinity"/>
-  </bean>
-  
-  <bean id="affinityProcessors" class="com.cloud.utils.component.AdapterList">
-    <property name="Adapters">
-      <list>
-          <ref bean="HostAntiAffinityProcessor" />
-          <ref bean="ExplicitDedicationProcessor"/>
-      </list>
-    </property>
-  </bean>
-
-  <!--
-    Dedicated Resources components
-  -->
-
-  <bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
-  <bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
-    <property name="name" value="ExplicitDedicationProcessor"/>
-    <property name="type" value="ExplicitDedication"/>
-  </bean>
-
-</beans>


[7/8] git commit: updated refs/heads/master to ab0dca0

Posted by hu...@apache.org.
Add provisioning_type to the devcloud offerings.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99b7cc80
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99b7cc80
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99b7cc80

Branch: refs/heads/master
Commit: 99b7cc80ec74b7100558982e86215b350df8ee3f
Parents: cd0ef09
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Jun 25 10:31:24 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Jun 25 15:51:29 2014 +0200

----------------------------------------------------------------------
 tools/devcloud/devcloud.sql | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99b7cc80/tools/devcloud/devcloud.sql
----------------------------------------------------------------------
diff --git a/tools/devcloud/devcloud.sql b/tools/devcloud/devcloud.sql
index 009c2b5..88a9942 100644
--- a/tools/devcloud/devcloud.sql
+++ b/tools/devcloud/devcloud.sql
@@ -16,9 +16,9 @@
 -- under the License.
 
 
-INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, use_local_storage, type, disk_size) VALUES (17, 'tinyOffering', UUID(), 'tinyOffering', NOW(), 1, 'Service', 0);
+INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, use_local_storage, type, disk_size, provisioning_type) VALUES (17, 'tinyOffering', UUID(), 'tinyOffering', NOW(), 1, 'Service', 0, 'thin');
 INSERT INTO `cloud`.`service_offering` (id, cpu, speed, ram_size) VALUES (17, 1, 100, 100);
-INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, type, disk_size) VALUES (18, 'tinyDiskOffering', UUID(), 'tinyDiskOffering', NOW(), 'Disk', 1073741824);
+INSERT INTO `cloud`.`disk_offering` (id, name, uuid, display_text, created, type, disk_size,provisioning_type) VALUES (18, 'tinyDiskOffering', UUID(), 'tinyDiskOffering', NOW(), 'Disk', 1073741824,'thin');
 INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','router.ram.size', '100');
 INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','router.cpu.mhz','100');
 INSERT INTO `cloud`.`configuration` (instance, name,value) VALUE('DEFAULT','console.ram.size','100');


[2/8] git commit: updated refs/heads/master to ab0dca0

Posted by hu...@apache.org.
Fix typo and add the right exception to the error map.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cd0ef093
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cd0ef093
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cd0ef093

Branch: refs/heads/master
Commit: cd0ef09344e1eca0429b7c5e69c7e603dd672828
Parents: d781824
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Jun 25 10:30:44 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Jun 25 15:51:28 2014 +0200

----------------------------------------------------------------------
 ...fficientVirtualNetworkCapacityException.java | 32 ++++++++++++++++++++
 ...ufficientVirtualNetworkCapcityException.java | 32 --------------------
 api/src/com/cloud/network/guru/NetworkGuru.java | 14 ++++-----
 .../CreateApplicationLoadBalancerCmd.java       |  4 +--
 .../lb/ApplicationLoadBalancerService.java      |  4 +--
 .../service/NetworkOrchestrationService.java    | 12 ++++----
 .../src/com/cloud/network/IpAddressManager.java |  4 +--
 .../com/cloud/vm/VirtualMachineManagerImpl.java |  4 +--
 .../orchestration/NetworkOrchestrator.java      |  8 ++---
 .../networkservice/BaremetaNetworkGuru.java     |  6 ++--
 .../guru/BigSwitchVnsGuestNetworkGuru.java      |  8 ++---
 .../contrail/management/ContrailGuru.java       |  8 ++---
 .../network/guru/MidoNetGuestNetworkGuru.java   |  6 ++--
 .../network/guru/MidoNetPublicNetworkGuru.java  | 10 +++---
 .../network/guru/NiciraNvpGuestNetworkGuru.java |  6 ++--
 .../guru/NiciraNvpGuestNetworkGuruTest.java     | 10 +++---
 .../OpendaylightGuestNetworkGuru.java           | 12 ++++----
 .../cloud/network/guru/OvsGuestNetworkGuru.java | 10 +++---
 .../network/guru/SspGuestNetworkGuru.java       |  8 ++---
 .../network/guru/VxlanGuestNetworkGuru.java     | 10 +++---
 .../network/guru/VxlanGuestNetworkGuruTest.java |  8 ++---
 .../com/cloud/network/IpAddressManagerImpl.java |  4 +--
 .../cloud/network/guru/ControlNetworkGuru.java  |  8 ++---
 .../cloud/network/guru/DirectNetworkGuru.java   | 14 ++++-----
 .../network/guru/DirectPodBasedNetworkGuru.java |  8 ++---
 .../network/guru/ExternalGuestNetworkGuru.java  | 10 +++---
 .../cloud/network/guru/GuestNetworkGuru.java    | 14 ++++-----
 .../cloud/network/guru/PodBasedNetworkGuru.java |  8 ++---
 .../cloud/network/guru/PrivateNetworkGuru.java  | 10 +++---
 .../cloud/network/guru/PublicNetworkGuru.java   | 10 +++---
 .../cloud/network/guru/StorageNetworkGuru.java  |  8 ++---
 .../VirtualNetworkApplianceManagerImpl.java     | 10 +++---
 .../lb/ApplicationLoadBalancerManagerImpl.java  | 12 ++++----
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |  8 ++---
 .../network/lb/ApplicationLoadBalancerTest.java | 18 +++++------
 .../utils/exception/CSExceptionErrorCode.java   |  1 +
 36 files changed, 180 insertions(+), 179 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/api/src/com/cloud/exception/InsufficientVirtualNetworkCapacityException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/InsufficientVirtualNetworkCapacityException.java b/api/src/com/cloud/exception/InsufficientVirtualNetworkCapacityException.java
new file mode 100644
index 0000000..3637660
--- /dev/null
+++ b/api/src/com/cloud/exception/InsufficientVirtualNetworkCapacityException.java
@@ -0,0 +1,32 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.exception;
+
+import com.cloud.dc.Pod;
+import com.cloud.utils.SerialVersionUID;
+
+public class InsufficientVirtualNetworkCapacityException extends InsufficientNetworkCapacityException {
+    private static final long serialVersionUID = SerialVersionUID.InsufficientVirtualNetworkCapacityException;
+
+    public InsufficientVirtualNetworkCapacityException(String msg, Class<?> scope, Long id) {
+        super(msg, scope, id);
+    }
+
+    public InsufficientVirtualNetworkCapacityException(String msg, long podId) {
+        this(msg, Pod.class, podId);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/api/src/com/cloud/exception/InsufficientVirtualNetworkCapcityException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/InsufficientVirtualNetworkCapcityException.java b/api/src/com/cloud/exception/InsufficientVirtualNetworkCapcityException.java
deleted file mode 100644
index 4741baa..0000000
--- a/api/src/com/cloud/exception/InsufficientVirtualNetworkCapcityException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.exception;
-
-import com.cloud.dc.Pod;
-import com.cloud.utils.SerialVersionUID;
-
-public class InsufficientVirtualNetworkCapcityException extends InsufficientNetworkCapacityException {
-    private static final long serialVersionUID = SerialVersionUID.InsufficientVirtualNetworkCapacityException;
-
-    public InsufficientVirtualNetworkCapcityException(String msg, Class<?> scope, Long id) {
-        super(msg, scope, id);
-    }
-
-    public InsufficientVirtualNetworkCapcityException(String msg, long podId) {
-        this(msg, Pod.class, podId);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/api/src/com/cloud/network/guru/NetworkGuru.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/guru/NetworkGuru.java b/api/src/com/cloud/network/guru/NetworkGuru.java
index 6c39285..59ceb09 100755
--- a/api/src/com/cloud/network/guru/NetworkGuru.java
+++ b/api/src/com/cloud/network/guru/NetworkGuru.java
@@ -20,7 +20,7 @@ import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkProfile;
 import com.cloud.network.Networks.TrafficType;
@@ -103,13 +103,13 @@ public interface NetworkGuru extends Adapter {
      * @param offering network offering that the network was created with.
      * @param destination where the network is being deployed in.
      * @return a fully implemented Network.
-     * @throws InsufficientVirtualNetworkCapcityException  if there's not
+     * @throws InsufficientVirtualNetworkCapacityException  if there's not
      * enough resources to make the guest network usable in the physical
      * environment.  At this time, the admin generally must be involved to
      * allocate more resources before any more guest network can be implemented.
      */
     Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException;
+        throws InsufficientVirtualNetworkCapacityException;
 
     /**
      * Once a guest network has been designed, virtual machines can be
@@ -122,12 +122,12 @@ public interface NetworkGuru extends Adapter {
      *            network settings to make sure everything will work.
      * @param vm virtual machine that is about to be deployed.
      * @return NicProfile nic with all of the information
-     * @throws InsufficientVirtualNetworkCapcityException if there's
+     * @throws InsufficientVirtualNetworkCapacityException if there's
      *         insufficient capacity within the guest network.
      * @throws InsufficientAddressCapacityException if there are not addresses
      *         to be assigned.
      */
-    NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException;
 
     /**
@@ -141,7 +141,7 @@ public interface NetworkGuru extends Adapter {
      * @param vm vm
      * @param dest destination the vm is deployed to
      * @param context Reservation context from which to get the owner, caller, and reservation id
-     * @throws InsufficientVirtualNetworkCapcityException if there's not enough
+     * @throws InsufficientVirtualNetworkCapacityException if there's not enough
      *         resources.
      * @throws InsufficientAddressCapacityException if there's not enough ip
      *         addresses.
@@ -149,7 +149,7 @@ public interface NetworkGuru extends Adapter {
      *         happening on this guest network or vm.
      */
     void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException;
 
     /**
      * When a virtual machine is stopped, the NetworkGuru is informed via the

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
index fa9c22e..2257180 100644
--- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
@@ -32,7 +32,7 @@ import org.apache.log4j.Logger;
 
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.NetworkRuleConflictException;
 import com.cloud.exception.ResourceAllocationException;
@@ -231,7 +231,7 @@ public class CreateApplicationLoadBalancerCmd extends BaseAsyncCreateCmd {
         } catch (InsufficientAddressCapacityException e) {
             s_logger.warn("Exception: ", e);
             throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, e.getMessage());
-        } catch (InsufficientVirtualNetworkCapcityException e) {
+        } catch (InsufficientVirtualNetworkCapacityException e) {
             s_logger.warn("Exception: ", e);
             throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, e.getMessage());
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/api/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerService.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerService.java b/api/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerService.java
index a05e9f4..8cab622 100644
--- a/api/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerService.java
+++ b/api/src/org/apache/cloudstack/network/lb/ApplicationLoadBalancerService.java
@@ -22,7 +22,7 @@ import java.util.List;
 import org.apache.cloudstack.api.command.user.loadbalancer.ListApplicationLoadBalancersCmd;
 
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.NetworkRuleConflictException;
 import com.cloud.network.rules.LoadBalancerContainer.Scheme;
 import com.cloud.utils.Pair;
@@ -31,7 +31,7 @@ public interface ApplicationLoadBalancerService {
 
     ApplicationLoadBalancerRule createApplicationLoadBalancer(String name, String description, Scheme scheme, long sourceIpNetworkId, String sourceIp, int sourcePort,
         int instancePort, String algorithm, long networkId, long lbOwnerId, Boolean forDisplay) throws InsufficientAddressCapacityException, NetworkRuleConflictException,
-        InsufficientVirtualNetworkCapcityException;
+        InsufficientVirtualNetworkCapacityException;
 
     boolean deleteApplicationLoadBalancer(long id);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java
index 1061c4d..b2108ac 100755
--- a/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java
+++ b/engine/api/src/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java
@@ -29,7 +29,7 @@ import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.Network;
@@ -147,12 +147,12 @@ public interface NetworkOrchestrationService {
      * @param deviceId
      * @param vm
      * @return
-     * @throws InsufficientVirtualNetworkCapcityException
+     * @throws InsufficientVirtualNetworkCapacityException
      * @throws InsufficientAddressCapacityException
      * @throws ConcurrentOperationException
      */
     Pair<NicProfile, Integer> allocateNic(NicProfile requested, Network network, Boolean isDefaultNic, int deviceId, VirtualMachineProfile vm)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException;
 
     /**
      * @param vmProfile
@@ -161,14 +161,14 @@ public interface NetworkOrchestrationService {
      * @param nicId
      * @param network
      * @return
-     * @throws InsufficientVirtualNetworkCapcityException
+     * @throws InsufficientVirtualNetworkCapacityException
      * @throws InsufficientAddressCapacityException
      * @throws ConcurrentOperationException
      * @throws InsufficientCapacityException
      * @throws ResourceUnavailableException
      */
     NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
         ResourceUnavailableException;
 
     void removeNic(VirtualMachineProfile vm, Nic nic);
@@ -183,7 +183,7 @@ public interface NetworkOrchestrationService {
     void releaseNic(VirtualMachineProfile vmProfile, Nic nic) throws ConcurrentOperationException, ResourceUnavailableException;
 
     NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
         ResourceUnavailableException;
 
     NetworkProfile convertNetworkToNetworkProfile(long networkId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/engine/components-api/src/com/cloud/network/IpAddressManager.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/network/IpAddressManager.java b/engine/components-api/src/com/cloud/network/IpAddressManager.java
index 98ff55c..d8999ed 100644
--- a/engine/components-api/src/com/cloud/network/IpAddressManager.java
+++ b/engine/components-api/src/com/cloud/network/IpAddressManager.java
@@ -25,7 +25,7 @@ import com.cloud.dc.Vlan.VlanType;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.addr.PublicIp;
@@ -107,7 +107,7 @@ public interface IpAddressManager {
     boolean handleSystemIpRelease(IpAddress ip);
 
     void allocateDirectIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network, String requestedIpv4, String requestedIpv6)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException;
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException;
 
     /**
      * @param owner

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 728f04c..19f29ec 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -134,7 +134,7 @@ import com.cloud.exception.ConnectionException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InsufficientServerCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.OperationTimedoutException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -1740,7 +1740,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
         } catch (ConcurrentOperationException e) {
             s_logger.debug("Failed to migration: " + e.toString());
             throw new CloudRuntimeException("Failed to migration: " + e.toString());
-        } catch (InsufficientVirtualNetworkCapcityException e) {
+        } catch (InsufficientVirtualNetworkCapacityException e) {
             s_logger.debug("Failed to migration: " + e.toString());
             throw new CloudRuntimeException("Failed to migration: " + e.toString());
         } catch (InsufficientAddressCapacityException e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index 1e5a58c..06944b1 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -86,7 +86,7 @@ import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.ConnectionException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -790,7 +790,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
     @DB
     @Override
     public Pair<NicProfile, Integer> allocateNic(NicProfile requested, Network network, Boolean isDefaultNic, int deviceId, VirtualMachineProfile vm)
-            throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+            throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
 
         NetworkVO ntwkVO = _networksDao.findById(network.getId());
         s_logger.debug("Allocating nic for vm " + vm.getVirtualMachine() + " in network " + network + " with requested profile " + requested);
@@ -1286,7 +1286,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
     @Override
     public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
-            throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
+            throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
             ResourceUnavailableException {
 
         Integer networkRate = _networkModel.getNetworkRate(network.getId(), vmProfile.getId());
@@ -3020,7 +3020,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
     @Override
     public NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare)
-            throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
+            throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
             ResourceUnavailableException {
 
         VirtualMachine vm = vmProfile.getVirtualMachine();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
index 808c61e..596b84e 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
@@ -37,7 +37,7 @@ import com.cloud.dc.dao.VlanDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
@@ -81,7 +81,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         if (dest.getHost().getHypervisorType() != HypervisorType.BareMetal) {
             super.reserve(nic, network, vm, dest, context);
             return;
@@ -153,7 +153,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru {
         s_logger.debug("Allocated a nic " + nic + " for " + vm);
     }
 
-    private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile vm, Network network, String requiredIp) throws InsufficientVirtualNetworkCapcityException,
+    private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile vm, Network network, String requiredIp) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
         DataCenter dc = _dcDao.findById(pod.getDataCenterId());
         if (nic.getIp4Address() == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
index 17a2140..9805144 100644
--- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
+++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/guru/BigSwitchVnsGuestNetworkGuru.java
@@ -38,7 +38,7 @@ import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.host.dao.HostDetailsDao;
@@ -128,7 +128,7 @@ public class BigSwitchVnsGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == State.Implementing) : "Why are we implementing " + network;
 
         long dcId = dest.getDataCenter().getId();
@@ -151,7 +151,7 @@ public class BigSwitchVnsGuestNetworkGuru extends GuestNetworkGuru {
         String vnet =
             _dcDao.allocateVnet(dcId, physicalNetworkId, network.getAccountId(), context.getReservationId(), UseSystemGuestVlans.valueIn(network.getAccountId()));
         if (vnet == null) {
-            throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet as a " + "part of network " + network + " implement ", DataCenter.class, dcId);
+            throw new InsufficientVirtualNetworkCapacityException("Unable to allocate vnet as a " + "part of network " + network + " implement ", DataCenter.class, dcId);
         }
         // when supporting more types of networks this need to become
 //        int vlan = Integer.parseInt(BroadcastDomainType.getValue(vnet));
@@ -198,7 +198,7 @@ public class BigSwitchVnsGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         // TODO Auto-generated method stub
         super.reserve(nic, network, vm, dest, context);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
index f81c0d0..391a9b3 100644
--- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
+++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java
@@ -41,7 +41,7 @@ import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Network;
 import com.cloud.network.Network.State;
@@ -143,7 +143,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-            throws InsufficientVirtualNetworkCapcityException {
+            throws InsufficientVirtualNetworkCapacityException {
         s_logger.debug("Implement network: " + network.getName() + ", traffic type: " + network.getTrafficType());
 
         VirtualNetworkModel vnModel = _manager.getDatabase().lookupVirtualNetwork(network.getUuid(), _manager.getCanonicalName(network), network.getTrafficType());
@@ -189,7 +189,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
      * until the reserve API is called because of this reason.
      */
     @Override
-    public NicProfile allocate(Network network, NicProfile profile, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile profile, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
     InsufficientAddressCapacityException, ConcurrentOperationException {
         s_logger.debug("allocate NicProfile on " + network.getName());
 
@@ -217,7 +217,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru {
      */
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-            throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+            throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         s_logger.debug("reserve NicProfile on network id: " + network.getId() + " " + network.getName());
         s_logger.debug("deviceId: " + nic.getDeviceId());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
index 51dac3b..e24fa5c 100644
--- a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
+++ b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
@@ -29,7 +29,7 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkProfile;
 import com.cloud.network.Networks;
@@ -93,7 +93,7 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == Network.State.Implementing) : "Why are we implementing " + network;
         s_logger.debug("implement called network: " + network.toString());
 
@@ -133,7 +133,7 @@ public class MidoNetGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         s_logger.debug("reserve called with network: " + network.toString() + " nic: " + nic.toString() + " vm: " + vm.toString());
 
         super.reserve(nic, network, vm, dest, context);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
index 5f0b155..6af97c8 100644
--- a/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
+++ b/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetPublicNetworkGuru.java
@@ -31,7 +31,7 @@ import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkModel;
@@ -92,7 +92,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
     }
 
     @Override
-    protected void getIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network) throws InsufficientVirtualNetworkCapcityException,
+    protected void getIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
         if (nic.getIp4Address() == null) {
             PublicIp ip = _ipAddrMgr.assignPublicIpAddress(dc.getId(), null, vm.getOwner(), Vlan.VlanType.VirtualNetwork, null, null, false);
@@ -131,7 +131,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
 
         if (nic == null) {
@@ -161,7 +161,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         s_logger.debug("reserve called with network: " + network + " nic: " + nic + " vm: " + vm);
         if (nic.getIp4Address() == null) {
             getIp(nic, dest.getDataCenter(), vm, network);
@@ -176,7 +176,7 @@ public class MidoNetPublicNetworkGuru extends PublicNetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         s_logger.debug("implement called with network: " + network);
         long dcId = destination.getDataCenter().getId();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
index 4866d40..2845e9b 100644
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/guru/NiciraNvpGuestNetworkGuru.java
@@ -39,7 +39,7 @@ import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.host.dao.HostDetailsDao;
@@ -143,7 +143,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public Network implement(final Network network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == State.Implementing) : "Why are we implementing " + network;
 
         long dcId = dest.getDataCenter().getId();
@@ -211,7 +211,7 @@ public class NiciraNvpGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public void reserve(final NicProfile nic, final Network network, final VirtualMachineProfile vm, final DeployDestination dest, final ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         // TODO Auto-generated method stub
         super.reserve(nic, network, vm, dest, context);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java b/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
index fb103e8..881c39f 100644
--- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
+++ b/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
@@ -50,7 +50,7 @@ import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.domain.Domain;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.network.Network;
@@ -240,7 +240,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     }
 
     @Test
-    public void testImplement() throws InsufficientVirtualNetworkCapcityException {
+    public void testImplement() throws InsufficientVirtualNetworkCapacityException {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
@@ -295,7 +295,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     }
 
     @Test
-    public void testImplementWithCidr() throws InsufficientVirtualNetworkCapcityException {
+    public void testImplementWithCidr() throws InsufficientVirtualNetworkCapacityException {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
@@ -354,7 +354,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     }
 
     @Test
-    public void testImplementURIException() throws InsufficientVirtualNetworkCapcityException {
+    public void testImplementURIException() throws InsufficientVirtualNetworkCapacityException {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
@@ -409,7 +409,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     }
 
     @Test
-    public void testShutdown() throws InsufficientVirtualNetworkCapcityException, URISyntaxException {
+    public void testShutdown() throws InsufficientVirtualNetworkCapacityException, URISyntaxException {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java b/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
index a608955..5dc0f44 100644
--- a/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
+++ b/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightGuestNetworkGuru.java
@@ -45,7 +45,7 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Network.Provider;
@@ -129,7 +129,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
     }
 
     @Override
-    public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapcityException {
+    public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == State.Implementing) : "Why are we implementing " + network;
 
         long dcId = dest.getDataCenter().getId();
@@ -183,7 +183,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-            throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+            throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         super.reserve(nic, network, vm, dest, context);
 
         //get physical network id
@@ -192,7 +192,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         List<OpenDaylightControllerVO> devices = openDaylightControllerMappingDao.listByPhysicalNetwork(physicalNetworkId);
         if (devices.isEmpty()) {
             s_logger.error("No Controller on physical network " + physicalNetworkId);
-            throw new InsufficientVirtualNetworkCapcityException("No OpenDaylight Controller configured for this network", dest.getPod().getId());
+            throw new InsufficientVirtualNetworkCapacityException("No OpenDaylight Controller configured for this network", dest.getPod().getId());
         }
         OpenDaylightControllerVO controller = devices.get(0);
 
@@ -200,7 +200,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
         AddHypervisorAnswer addAnswer = (AddHypervisorAnswer)agentManager.easySend(controller.getHostId(), addCmd);
         if (addAnswer == null || !addAnswer.getResult()) {
             s_logger.error("Failed to add " + dest.getHost().getName() + " as a node to the controller");
-            throw new InsufficientVirtualNetworkCapcityException("Failed to add destination hypervisor to the OpenDaylight Controller", dest.getPod().getId());
+            throw new InsufficientVirtualNetworkCapacityException("Failed to add destination hypervisor to the OpenDaylight Controller", dest.getPod().getId());
         }
 
         ConfigurePortCommand cmd = new ConfigurePortCommand(UUID.fromString(nic.getUuid()), UUID.fromString(BroadcastDomainType.getValue(network.getBroadcastUri())), context
@@ -209,7 +209,7 @@ public class OpendaylightGuestNetworkGuru extends GuestNetworkGuru {
 
         if (answer == null || !answer.getResult()) {
             s_logger.error("ConfigureNetworkCommand failed");
-            throw new InsufficientVirtualNetworkCapcityException("Failed to configure the port on the OpenDaylight Controller", dest.getPod().getId());
+            throw new InsufficientVirtualNetworkCapacityException("Failed to configure the port on the OpenDaylight Controller", dest.getPod().getId());
         }
 
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
index 3ca25f7..be49757 100644
--- a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
+++ b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
@@ -34,7 +34,7 @@ import com.cloud.event.ActionEventUtils;
 import com.cloud.event.EventTypes;
 import com.cloud.event.EventVO;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Network.Service;
@@ -117,7 +117,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
     @Override
     public Network implement(Network network, NetworkOffering offering,
         DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == State.Implementing) : "Why are we implementing "
             + network;
 
@@ -165,7 +165,7 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
     public void reserve(NicProfile nic, Network network,
         VirtualMachineProfile vm,
         DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException,
+        throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
         // TODO Auto-generated method stub
         super.reserve(nic, network, vm, dest, context);
@@ -205,13 +205,13 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
     @Override
     protected void allocateVnet(Network network, NetworkVO implemented,
         long dcId, long physicalNetworkId, String reservationId)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         if (network.getBroadcastUri() == null) {
             String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId,
                 network.getAccountId(), reservationId,
                 UseSystemGuestVlans.valueIn(network.getAccountId()));
             if (vnet == null) {
-                throw new InsufficientVirtualNetworkCapcityException(
+                throw new InsufficientVirtualNetworkCapacityException(
                     "Unable to allocate vnet as a part of network "
                         + network + " implement ", DataCenter.class,
                     dcId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/guru/SspGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/guru/SspGuestNetworkGuru.java b/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/guru/SspGuestNetworkGuru.java
index 995c35f..7226873 100644
--- a/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/guru/SspGuestNetworkGuru.java
+++ b/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/guru/SspGuestNetworkGuru.java
@@ -27,7 +27,7 @@ import org.apache.cloudstack.network.element.SspManager;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkMigrationResponder;
 import com.cloud.network.NetworkProfile;
@@ -100,7 +100,7 @@ public class SspGuestNetworkGuru extends GuestNetworkGuru implements NetworkMigr
      */
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         s_logger.trace("implement " + network.toString());
         super.implement(network, offering, dest, context);
         _sspMgr.createNetwork(network, offering, dest, context);
@@ -116,7 +116,7 @@ public class SspGuestNetworkGuru extends GuestNetworkGuru implements NetworkMigr
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         super.reserve(nic, network, vm, dest, context);
         _sspMgr.createNicEnv(network, nic, dest, context);
     }
@@ -137,7 +137,7 @@ public class SspGuestNetworkGuru extends GuestNetworkGuru implements NetworkMigr
     public boolean prepareMigration(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) {
         try {
             reserve(nic, network, vm, dest, context);
-        } catch (InsufficientVirtualNetworkCapcityException e) {
+        } catch (InsufficientVirtualNetworkCapacityException e) {
             s_logger.error("prepareForMigration failed", e);
             return false;
         } catch (InsufficientAddressCapacityException e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java b/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java
index e0450ef..0700ef8 100644
--- a/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java
+++ b/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java
@@ -31,7 +31,7 @@ import com.cloud.event.ActionEventUtils;
 import com.cloud.event.EventTypes;
 import com.cloud.event.EventVO;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Network.State;
@@ -83,11 +83,11 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     protected void allocateVnet(Network network, NetworkVO implemented, long dcId, long physicalNetworkId, String reservationId)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         if (network.getBroadcastUri() == null) {
             String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId, network.getAccountId(), reservationId, UseSystemGuestVlans.valueIn(network.getAccountId()));
             if (vnet == null) {
-                throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet as a " + "part of network " + network + " implement ", DataCenter.class,
+                throw new InsufficientVirtualNetworkCapacityException("Unable to allocate vnet as a " + "part of network " + network + " implement ", DataCenter.class,
                     dcId);
             }
             implemented.setBroadcastUri(BroadcastDomainType.Vxlan.toUri(vnet));
@@ -106,7 +106,7 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == State.Implementing) : "Why are we implementing " + network;
 
         long dcId = dest.getDataCenter().getId();
@@ -138,7 +138,7 @@ public class VxlanGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         super.reserve(nic, network, vm, dest, context);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/plugins/network-elements/vxlan/test/com/cloud/network/guru/VxlanGuestNetworkGuruTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/vxlan/test/com/cloud/network/guru/VxlanGuestNetworkGuruTest.java b/plugins/network-elements/vxlan/test/com/cloud/network/guru/VxlanGuestNetworkGuruTest.java
index 3cfb33f..4754aa5 100644
--- a/plugins/network-elements/vxlan/test/com/cloud/network/guru/VxlanGuestNetworkGuruTest.java
+++ b/plugins/network-elements/vxlan/test/com/cloud/network/guru/VxlanGuestNetworkGuruTest.java
@@ -45,7 +45,7 @@ import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.domain.Domain;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Network.State;
@@ -144,7 +144,7 @@ public class VxlanGuestNetworkGuruTest {
     }
 
     @Test
-    public void testImplement() throws InsufficientVirtualNetworkCapcityException {
+    public void testImplement() throws InsufficientVirtualNetworkCapacityException {
         PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById(anyLong())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VXLAN"}));
@@ -186,7 +186,7 @@ public class VxlanGuestNetworkGuruTest {
     }
 
     @Test
-    public void testImplementWithCidr() throws InsufficientVirtualNetworkCapcityException {
+    public void testImplementWithCidr() throws InsufficientVirtualNetworkCapacityException {
         PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById(anyLong())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VXLAN"}));
@@ -233,7 +233,7 @@ public class VxlanGuestNetworkGuruTest {
     }
 
     @Test
-    public void testShutdown() throws InsufficientVirtualNetworkCapcityException, URISyntaxException {
+    public void testShutdown() throws InsufficientVirtualNetworkCapacityException, URISyntaxException {
         PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById(anyLong())).thenReturn(physnet);
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VXLAN"}));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/IpAddressManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java
index 4ecb354..9906e06 100644
--- a/server/src/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/com/cloud/network/IpAddressManagerImpl.java
@@ -71,7 +71,7 @@ import com.cloud.exception.AccountLimitException;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.PermissionDeniedException;
 import com.cloud.exception.ResourceAllocationException;
@@ -1828,7 +1828,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
     @Override
     @DB
     public void allocateDirectIp(final NicProfile nic, final DataCenter dc, final VirtualMachineProfile vm, final Network network, final String requestedIpv4,
-            final String requestedIpv6) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+            final String requestedIpv6) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         Transaction.execute(new TransactionCallbackWithExceptionNoReturn<InsufficientAddressCapacityException>() {
             @Override
             public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientAddressCapacityException {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/ControlNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ControlNetworkGuru.java b/server/src/com/cloud/network/guru/ControlNetworkGuru.java
index 13ff385..dd7c92d 100755
--- a/server/src/com/cloud/network/guru/ControlNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ControlNetworkGuru.java
@@ -34,7 +34,7 @@ import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkModel;
@@ -112,7 +112,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
     }
 
     @Override
-    public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
 
         if (vm.getHypervisorType() == HypervisorType.VMware && !isRouterVm(vm)) {
@@ -135,7 +135,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
 
     @Override
     public void reserve(NicProfile nic, Network config, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         assert nic.getTrafficType() == TrafficType.Control;
 
         // we have to get management/private ip for the control nic for vmware/hyperv due ssh issues.
@@ -208,7 +208,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
 
     @Override
     public Network implement(Network config, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert config.getTrafficType() == TrafficType.Control : "Why are you sending this configuration to me " + config;
         return config;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/DirectNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index d558a57..95afc5f 100755
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -35,7 +35,7 @@ import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Ipv6AddressManager;
@@ -201,7 +201,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
 
         DataCenter dc = _dcDao.findById(network.getDataCenterId());
@@ -229,7 +229,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         if (nic.getIp4Address() == null && nic.getIp6Address() == null) {
             allocateDirectIp(nic, network, vm, dest.getDataCenter(), null, null);
             nic.setStrategy(ReservationStrategy.Create);
@@ -238,12 +238,12 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @DB
     protected void allocateDirectIp(final NicProfile nic, final Network network, final VirtualMachineProfile vm, final DataCenter dc, final String requestedIp4Addr,
-        final String requestedIp6Addr) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        final String requestedIp6Addr) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
 
         try {
             Transaction.execute(new TransactionCallbackWithExceptionNoReturn<InsufficientCapacityException>() {
                 @Override
-                public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientVirtualNetworkCapcityException,
+                public void doInTransactionWithoutResult(TransactionStatus status) throws InsufficientVirtualNetworkCapacityException,
                     InsufficientAddressCapacityException {
                     _ipAddrMgr.allocateDirectIp(nic, dc, vm, network, requestedIp4Addr, requestedIp6Addr);
                     //save the placeholder nic if the vm is the Virtual router
@@ -258,7 +258,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
                 }
             });
         } catch (InsufficientCapacityException e) {
-            ExceptionUtil.rethrow(e, InsufficientVirtualNetworkCapcityException.class);
+            ExceptionUtil.rethrow(e, InsufficientVirtualNetworkCapacityException.class);
             ExceptionUtil.rethrow(e, InsufficientAddressCapacityException.class);
             throw new IllegalStateException(e);
         }
@@ -271,7 +271,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         return network;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
index 0b5d6f7..f2843c6 100755
--- a/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectPodBasedNetworkGuru.java
@@ -39,7 +39,7 @@ import com.cloud.dc.dao.VlanDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Network;
 import com.cloud.network.Networks.AddressFormat;
@@ -94,7 +94,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
 
         DataCenterVO dc = _dcDao.findById(network.getDataCenterId());
@@ -127,7 +127,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
     @Override
     @DB
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
 
         String oldIp = nic.getIp4Address();
         boolean getNewIp = false;
@@ -166,7 +166,7 @@ public class DirectPodBasedNetworkGuru extends DirectNetworkGuru {
     }
 
     @DB
-    protected void getIp(final NicProfile nic, final Pod pod, final VirtualMachineProfile vm, final Network network) throws InsufficientVirtualNetworkCapcityException,
+    protected void getIp(final NicProfile nic, final Pod pod, final VirtualMachineProfile vm, final Network network) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
         final DataCenter dc = _dcDao.findById(pod.getDataCenterId());
         if (nic.getIp4Address() == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
index ddf1f9c..3524b77 100644
--- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
@@ -35,7 +35,7 @@ import com.cloud.event.ActionEventUtils;
 import com.cloud.event.EventTypes;
 import com.cloud.event.EventVO;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Network;
 import com.cloud.network.Network.GuestType;
@@ -124,7 +124,7 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public Network implement(Network config, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (config.getState() == State.Implementing) : "Why are we implementing " + config;
 
         if (_networkModel.areServicesSupportedInNetwork(config.getId(), Network.Service.Connectivity)) {
@@ -247,7 +247,7 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
     }
 
     @Override
-    public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
 
         if (_networkModel.networkIsConfiguredForExternalNetworking(config.getDataCenterId(), config.getId()) && nic != null && nic.getRequestedIpv4() != null) {
@@ -283,7 +283,7 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network config, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         assert (nic.getReservationStrategy() == ReservationStrategy.Start) : "What can I do for nics that are not allocated at start? ";
 
         DataCenter dc = _dcDao.findById(config.getDataCenterId());
@@ -301,7 +301,7 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
             if (nic.getIp4Address() == null) {
                 String guestIp = _ipAddrMgr.acquireGuestIpAddress(config, null);
                 if (guestIp == null) {
-                    throw new InsufficientVirtualNetworkCapcityException("Unable to acquire guest IP address for network " + config, DataCenter.class, dc.getId());
+                    throw new InsufficientVirtualNetworkCapacityException("Unable to acquire guest IP address for network " + config, DataCenter.class, dc.getId());
                 }
 
                 nic.setIp4Address(guestIp);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/GuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
index b7b2627..28df46b 100755
--- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java
@@ -42,7 +42,7 @@ import com.cloud.event.ActionEventUtils;
 import com.cloud.event.EventTypes;
 import com.cloud.event.EventVO;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Network;
@@ -277,11 +277,11 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
     }
 
     protected void allocateVnet(Network network, NetworkVO implemented, long dcId, long physicalNetworkId, String reservationId)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         if (network.getBroadcastUri() == null) {
             String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId, network.getAccountId(), reservationId, UseSystemGuestVlans.valueIn(network.getAccountId()));
             if (vnet == null) {
-                throw new InsufficientVirtualNetworkCapcityException("Unable to allocate vnet as a " + "part of network " + network + " implement ", DataCenter.class,
+                throw new InsufficientVirtualNetworkCapacityException("Unable to allocate vnet as a " + "part of network " + network + " implement ", DataCenter.class,
                     dcId);
             }
             implemented.setBroadcastUri(BroadcastDomainType.Vlan.toUri(vnet));
@@ -294,7 +294,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         assert (network.getState() == State.Implementing) : "Why are we implementing " + network;
 
         long dcId = dest.getDataCenter().getId();
@@ -324,7 +324,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
 
         assert (network.getTrafficType() == TrafficType.Guest) : "Look at my name!  Why are you calling" + " me when the traffic type is : " + network.getTrafficType();
@@ -363,7 +363,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
                 } else {
                     guestIp = _ipAddrMgr.acquireGuestIpAddress(network, nic.getRequestedIpv4());
                     if (guestIp == null) {
-                        throw new InsufficientVirtualNetworkCapcityException("Unable to acquire Guest IP" + " address for network " + network, DataCenter.class,
+                        throw new InsufficientVirtualNetworkCapacityException("Unable to acquire Guest IP" + " address for network " + network, DataCenter.class,
                             dc.getId());
                     }
                 }
@@ -400,7 +400,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         assert (nic.getReservationStrategy() == ReservationStrategy.Start) : "What can I do for nics that are not allocated at start? ";
 
         nic.setBroadcastUri(network.getBroadcastUri());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
index 84c79d0..b99fc76 100755
--- a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java
@@ -28,7 +28,7 @@ import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkProfile;
 import com.cloud.network.Networks.AddressFormat;
@@ -96,7 +96,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
     }
 
     @Override
-    public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network config, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
         TrafficType trafficType = config.getTrafficType();
         assert trafficType == TrafficType.Management || trafficType == TrafficType.Storage : "Well, I can't take care of this config now can I? " + config;
@@ -115,7 +115,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network config, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         Pod pod = dest.getPod();
 
         Pair<String, Long> ip = _dcDao.allocatePrivateIpAddress(dest.getDataCenter().getId(), dest.getPod().getId(), nic.getId(), context.getReservationId());
@@ -159,7 +159,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public Network implement(Network config, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         return config;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
index 35b7b5c..aefd000 100644
--- a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java
@@ -27,7 +27,7 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.network.Network;
 import com.cloud.network.Network.GuestType;
@@ -152,13 +152,13 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
 
         return network;
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException {
         DataCenter dc = _entityMgr.findById(DataCenter.class, network.getDataCenterId());
         NetworkOffering offering = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
@@ -181,7 +181,7 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
         return nic;
     }
 
-    protected void getIp(NicProfile nic, DataCenter dc, Network network) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+    protected void getIp(NicProfile nic, DataCenter dc, Network network) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         if (nic.getIp4Address() == null) {
             PrivateIpVO ipVO = _privateIpDao.allocateIpAddress(network.getDataCenterId(), network.getId(), null);
             String vlanTag = BroadcastDomainType.getValue(network.getBroadcastUri());
@@ -215,7 +215,7 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException {
         if (nic.getIp4Address() == null) {
             getIp(nic, _entityMgr.findById(DataCenter.class, network.getDataCenterId()), network);
             nic.setStrategy(ReservationStrategy.Create);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd0ef093/server/src/com/cloud/network/guru/PublicNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/PublicNetworkGuru.java b/server/src/com/cloud/network/guru/PublicNetworkGuru.java
index 95d7790..19c2ce2 100755
--- a/server/src/com/cloud/network/guru/PublicNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/PublicNetworkGuru.java
@@ -31,7 +31,7 @@ import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
+import com.cloud.exception.InsufficientVirtualNetworkCapacityException;
 import com.cloud.network.IpAddressManager;
 import com.cloud.network.Network;
 import com.cloud.network.Network.State;
@@ -115,7 +115,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
         super();
     }
 
-    protected void getIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network) throws InsufficientVirtualNetworkCapcityException,
+    protected void getIp(NicProfile nic, DataCenter dc, VirtualMachineProfile vm, Network network) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
         if (nic.getIp4Address() == null) {
             PublicIp ip = _ipAddrMgr.assignPublicIpAddress(dc.getId(), null, vm.getOwner(), VlanType.VirtualNetwork, null, null, false);
@@ -150,7 +150,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
     }
 
     @Override
-    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException,
+    public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException,
         InsufficientAddressCapacityException, ConcurrentOperationException {
 
         DataCenter dc = _dcDao.findById(network.getDataCenterId());
@@ -178,7 +178,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
+        throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         if (nic.getIp4Address() == null) {
             getIp(nic, dest.getDataCenter(), vm, network);
         }
@@ -191,7 +191,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
 
     @Override
     public Network implement(Network network, NetworkOffering offering, DeployDestination destination, ReservationContext context)
-        throws InsufficientVirtualNetworkCapcityException {
+        throws InsufficientVirtualNetworkCapacityException {
         return network;
     }
 


[6/8] git commit: updated refs/heads/master to ab0dca0

Posted by hu...@apache.org.
Set the default provisioning_type to something that doesn't cause NPEs when used.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0ef61f79
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0ef61f79
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0ef61f79

Branch: refs/heads/master
Commit: 0ef61f79677e1147649bfaab3f903276c7118d20
Parents: 49b0936
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Wed Jun 25 10:00:11 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Jun 25 15:51:28 2014 +0200

----------------------------------------------------------------------
 setup/db/db/schema-440to450.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0ef61f79/setup/db/db/schema-440to450.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-440to450.sql b/setup/db/db/schema-440to450.sql
index ee419a2..77445a9 100644
--- a/setup/db/db/schema-440to450.sql
+++ b/setup/db/db/schema-440to450.sql
@@ -22,8 +22,8 @@
 -- Disable foreign key checking
 -- SET foreign_key_checks = 0;
 
-ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'Off' COMMENT 'pre allocation setting of the volume';
-ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'Off' COMMENT 'pre allocation setting of the volume';
+ALTER TABLE `cloud`.`volumes` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
+ALTER TABLE `cloud`.`disk_offering` ADD COLUMN `provisioning_type` VARCHAR(32) NOT NULL DEFAULT 'thin' COMMENT 'pre allocation setting of the volume';
 
 DROP VIEW IF EXISTS `cloud`.`disk_offering_view`;
 CREATE VIEW `cloud`.`disk_offering_view` AS
@@ -225,4 +225,4 @@ CREATE VIEW `cloud`.`volume_view` AS
             and async_job.job_status = 0;
 
 /* As part of the separation of Xen and XenServer, update the column for the network labels */
-ALTER TABLE `cloud`.`physical_network_traffic_types` CHANGE `xen_network_label` `xenserver_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenServer host'
\ No newline at end of file
+ALTER TABLE `cloud`.`physical_network_traffic_types` CHANGE `xen_network_label` `xenserver_network_label` varchar(255) COMMENT 'The network name label of the physical device dedicated to this traffic on a XenServer host'


[3/8] git commit: updated refs/heads/master to ab0dca0

Posted by hu...@apache.org.
Fix several potential issues reported by coverity.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/49b0936a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/49b0936a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/49b0936a

Branch: refs/heads/master
Commit: 49b0936a725d66755f54b84ff4f1e3b92b455174
Parents: 17850c7
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Tue Jun 24 10:14:43 2014 +0200
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Wed Jun 25 15:51:28 2014 +0200

----------------------------------------------------------------------
 .../VirtualNetworkApplianceManagerImpl.java     |  57 +++----
 .../VpcVirtualNetworkApplianceManagerImpl.java  | 165 +++++++++----------
 2 files changed, 106 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49b0936a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 7991d7e..271602d 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -294,7 +294,7 @@ import com.cloud.vm.dao.VMInstanceDao;
  */
 @Local(value = { VirtualNetworkApplianceManager.class, VirtualNetworkApplianceService.class })
 public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements VirtualNetworkApplianceManager, VirtualNetworkApplianceService,
-        VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine> {
+VirtualMachineGuru, Listener, Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine> {
     private static final Logger s_logger = Logger.getLogger(VirtualNetworkApplianceManagerImpl.class);
 
     @Inject
@@ -610,7 +610,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
         if (router.isStopPending()) {
             s_logger.info("Clear the stop pending flag of router " + router.getHostName() + " after stop router successfully");
             router.setStopPending(false);
-            router = _routerDao.persist(router);
+            _routerDao.persist(router);
             virtualRouter.setStopPending(false);
         }
         return virtualRouter;
@@ -2028,7 +2028,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
 
     private DomainRouterVO startVirtualRouter(DomainRouterVO router, User user, Account caller, Map<Param, Object> params)
             throws StorageUnavailableException, InsufficientCapacityException,
-    ConcurrentOperationException, ResourceUnavailableException {
+            ConcurrentOperationException, ResourceUnavailableException {
 
         if (router.getRole() != Role.VIRTUAL_ROUTER || !router.getIsRedundantRouter()) {
             return this.start(router, user, caller, params, null);
@@ -2118,11 +2118,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
 
     protected List<DomainRouterVO> startRouters(final Map<Param, Object> params, final List<DomainRouterVO> routers) throws StorageUnavailableException,
     InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException {
-        List<DomainRouterVO> runningRouters = null;
-
-        if (routers != null) {
-            runningRouters = new ArrayList<DomainRouterVO>();
-        }
+        List<DomainRouterVO> runningRouters = new ArrayList<DomainRouterVO>();
 
         for (DomainRouterVO router : routers) {
             boolean skip = false;
@@ -2547,6 +2543,9 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
         // at VR startup time, information in VirtualMachineProfile may not updated to DB yet,
         // getRouterControlIp() may give wrong IP under basic network mode in VMware environment
         final NicProfile controlNic = getControlNic(profile);
+        if (controlNic == null) {
+            throw new CloudRuntimeException("VirtualMachine " + profile.getInstanceName() + " doesn't have a control interface");
+        }
         final SetMonitorServiceCommand command = new SetMonitorServiceCommand(servicesTO);
         command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIp4Address());
         command.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(networkId, router.getId()));
@@ -2846,7 +2845,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
             GetDomRVersionAnswer versionAnswer = (GetDomRVersionAnswer)cmds.getAnswer("getDomRVersion");
             router.setTemplateVersion(versionAnswer.getTemplateVersion());
             router.setScriptsVersion(versionAnswer.getScriptsVersion());
-            router = _routerDao.persist(router, guestNetworks);
+            _routerDao.persist(router, guestNetworks);
         }
 
         return result;
@@ -3435,9 +3434,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
     }
 
     private void createApplyPortForwardingRulesCommands(final List<? extends PortForwardingRule> rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId) {
-        List<PortForwardingRuleTO> rulesTO = null;
+        List<PortForwardingRuleTO> rulesTO = new ArrayList<PortForwardingRuleTO>();
         if (rules != null) {
-            rulesTO = new ArrayList<PortForwardingRuleTO>();
             for (final PortForwardingRule rule : rules) {
                 final IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
                 final PortForwardingRuleTO ruleTO = new PortForwardingRuleTO(rule, null, sourceIp.getAddress().addr());
@@ -3463,9 +3461,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
     }
 
     private void createApplyStaticNatRulesCommands(final List<? extends StaticNatRule> rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId) {
-        List<StaticNatRuleTO> rulesTO = null;
+        List<StaticNatRuleTO> rulesTO = new ArrayList<StaticNatRuleTO>();
         if (rules != null) {
-            rulesTO = new ArrayList<StaticNatRuleTO>();
             for (final StaticNatRule rule : rules) {
                 final IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
                 final StaticNatRuleTO ruleTO = new StaticNatRuleTO(rule, null, sourceIp.getAddress().addr(), rule.getDestIpAddress());
@@ -3900,7 +3897,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
     }
 
     private void createFirewallRulesCommands(final List<? extends FirewallRule> rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId) {
-        List<FirewallRuleTO> rulesTO = null;
+        List<FirewallRuleTO> rulesTO = new ArrayList<FirewallRuleTO>();
         String systemRule = null;
         Boolean defaultEgressPolicy = false;
         if (rules != null) {
@@ -3909,7 +3906,6 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
                     systemRule = String.valueOf(FirewallRule.FirewallRuleType.System);
                 }
             }
-            rulesTO = new ArrayList<FirewallRuleTO>();
             for (final FirewallRule rule : rules) {
                 _rulesDao.loadSourceCidrs((FirewallRuleVO)rule);
                 final FirewallRule.TrafficType traffictype = rule.getTrafficType();
@@ -4061,9 +4057,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
     }
 
     private void createApplyStaticNatCommands(final List<? extends StaticNat> rules, final VirtualRouter router, final Commands cmds, final long guestNetworkId) {
-        List<StaticNatRuleTO> rulesTO = null;
+        List<StaticNatRuleTO> rulesTO = new ArrayList<StaticNatRuleTO>();
         if (rules != null) {
-            rulesTO = new ArrayList<StaticNatRuleTO>();
             for (final StaticNat rule : rules) {
                 final IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
                 final StaticNatRuleTO ruleTO =
@@ -4349,21 +4344,21 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
         List<Long> jobIds = new ArrayList<Long>();
         for(DomainRouterVO router: routers){
             if(!checkRouterVersion(router)){
-                    s_logger.debug("Upgrading template for router: "+router.getId());
-                    Map<String, String> params = new HashMap<String, String>();
-                    params.put("ctxUserId", "1");
-                    params.put("ctxAccountId", "" + router.getAccountId());
-
-                    RebootRouterCmd cmd = new RebootRouterCmd();
-                    ComponentContext.inject(cmd);
-                    params.put("id", ""+router.getId());
-                    params.put("ctxStartEventId", "1");
+                s_logger.debug("Upgrading template for router: "+router.getId());
+                Map<String, String> params = new HashMap<String, String>();
+                params.put("ctxUserId", "1");
+                params.put("ctxAccountId", "" + router.getAccountId());
+
+                RebootRouterCmd cmd = new RebootRouterCmd();
+                ComponentContext.inject(cmd);
+                params.put("id", ""+router.getId());
+                params.put("ctxStartEventId", "1");
                 AsyncJobVO job = new AsyncJobVO("", User.UID_SYSTEM, router.getAccountId(), RebootRouterCmd.class.getName(),
-                            ApiGsonHelper.getBuilder().create().toJson(params), router.getId(),
-                            cmd.getInstanceType() != null ? cmd.getInstanceType().toString() : null, null);
-                    job.setDispatcher(_asyncDispatcher.getName());
-                    long jobId = _asyncMgr.submitAsyncJob(job);
-                    jobIds.add(jobId);
+                        ApiGsonHelper.getBuilder().create().toJson(params), router.getId(),
+                        cmd.getInstanceType() != null ? cmd.getInstanceType().toString() : null, null);
+                job.setDispatcher(_asyncDispatcher.getName());
+                long jobId = _asyncMgr.submitAsyncJob(job);
+                jobIds.add(jobId);
             } else {
                 s_logger.debug("Router: " + router.getId() + " is already at the latest version. No upgrade required");
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49b0936a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
index 431806b..ef2ab3d 100644
--- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
@@ -17,6 +17,24 @@
 package com.cloud.network.router;
 
 
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeSet;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.Command;
 import com.cloud.agent.api.Command.OnError;
@@ -113,21 +131,6 @@ import com.cloud.vm.VirtualMachine.State;
 import com.cloud.vm.VirtualMachineProfile;
 import com.cloud.vm.VirtualMachineProfile.Param;
 import com.cloud.vm.dao.VMInstanceDao;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
 
 @Component
 @Local(value = {VpcVirtualNetworkApplianceManager.class, VpcVirtualNetworkApplianceService.class})
@@ -177,7 +180,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
 
     @Override
     public List<DomainRouterVO> deployVirtualRouterInVpc(Vpc vpc, DeployDestination dest, Account owner, Map<Param, Object> params) throws InsufficientCapacityException,
-        ConcurrentOperationException, ResourceUnavailableException {
+    ConcurrentOperationException, ResourceUnavailableException {
 
         List<DomainRouterVO> routers = findOrDeployVirtualRouterInVpc(vpc, dest, owner, params);
 
@@ -186,7 +189,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
 
     @DB
     protected List<DomainRouterVO> findOrDeployVirtualRouterInVpc(Vpc vpc, DeployDestination dest, Account owner, Map<Param, Object> params)
-        throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
+            throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
 
         s_logger.debug("Deploying Virtual Router in VPC " + vpc);
         Vpc vpcLock = _vpcDao.acquireInLockTable(vpc.getId());
@@ -295,7 +298,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
 
     @Override
     public boolean removeVpcRouterFromGuestNetwork(VirtualRouter router, Network network, boolean isRedundant) throws ConcurrentOperationException,
-        ResourceUnavailableException {
+    ResourceUnavailableException {
         if (network.getTrafficType() != TrafficType.Guest) {
             s_logger.warn("Network " + network + " is not of type " + TrafficType.Guest);
             return false;
@@ -326,18 +329,18 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
 
     protected DomainRouterVO deployVpcRouter(Account owner, DeployDestination dest, DeploymentPlan plan, Map<Param, Object> params, boolean isRedundant,
-        VirtualRouterProvider vrProvider, long svcOffId, Long vpcId, PublicIp sourceNatIp) throws ConcurrentOperationException, InsufficientAddressCapacityException,
-        InsufficientServerCapacityException, InsufficientCapacityException, StorageUnavailableException, ResourceUnavailableException {
+            VirtualRouterProvider vrProvider, long svcOffId, Long vpcId, PublicIp sourceNatIp) throws ConcurrentOperationException, InsufficientAddressCapacityException,
+            InsufficientServerCapacityException, InsufficientCapacityException, StorageUnavailableException, ResourceUnavailableException {
 
         LinkedHashMap<Network, List<? extends NicProfile>> networks = createVpcRouterNetworks(owner, isRedundant, plan, new Pair<Boolean, PublicIp>(true, sourceNatIp),vpcId);
         DomainRouterVO router =
-            super.deployRouter(owner, dest, plan, params, isRedundant, vrProvider, svcOffId, vpcId, networks, true, _vpcMgr.getSupportedVpcHypervisors());
+                super.deployRouter(owner, dest, plan, params, isRedundant, vrProvider, svcOffId, vpcId, networks, true, _vpcMgr.getSupportedVpcHypervisors());
 
         return router;
     }
 
     protected boolean setupVpcGuestNetwork(Network network, VirtualRouter router, boolean add, NicProfile guestNic) throws ConcurrentOperationException,
-        ResourceUnavailableException {
+    ResourceUnavailableException {
 
         boolean result = true;
         if (router.getState() == State.Running) {
@@ -360,7 +363,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         } else {
             s_logger.warn("Unable to setup guest network on virtual router " + router + " is not in the right state " + router.getState());
             throw new ResourceUnavailableException("Unable to setup guest network on the backend," + " virtual router " + router + " is not in the right state",
-                DataCenter.class, router.getDataCenterId());
+                    DataCenter.class, router.getDataCenterId());
         }
     }
 
@@ -387,7 +390,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         NicProfile nicProfile = _networkModel.getNicProfile(router, nic.getNetworkId(), null);
 
         SetupGuestNetworkCommand setupCmd =
-            new SetupGuestNetworkCommand(dhcpRange, networkDomain, false, null, defaultDns1, defaultDns2, add, _itMgr.toNicTO(nicProfile, router.getHypervisorType()));
+                new SetupGuestNetworkCommand(dhcpRange, networkDomain, false, null, defaultDns1, defaultDns2, add, _itMgr.toNicTO(nicProfile, router.getHypervisorType()));
 
         String brd = NetUtils.long2Ip(NetUtils.ip2Long(guestNic.getIp4Address()) | ~NetUtils.ip2Long(guestNic.getNetmask()));
         setupCmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
@@ -406,7 +409,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
 
     private void createVpcAssociatePublicIPCommands(final VirtualRouter router, final List<? extends PublicIpAddress> ips, Commands cmds,
-        Map<String, String> vlanMacAddress) {
+            Map<String, String> vlanMacAddress) {
 
         Pair<IpAddressTO, Long> sourceNatIpAdd = null;
         Boolean addSourceNat = null;
@@ -442,8 +445,8 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                 String macAddress = vlanMacAddress.get(BroadcastDomainType.getValue(BroadcastDomainType.fromString(ipAddr.getVlanTag())));
 
                 IpAddressTO ip =
-                    new IpAddressTO(ipAddr.getAccountId(), ipAddr.getAddress().addr(), add, false, ipAddr.isSourceNat(), ipAddr.getVlanTag(), ipAddr.getGateway(),
-                        ipAddr.getNetmask(), macAddress, networkRate, ipAddr.isOneToOneNat());
+                        new IpAddressTO(ipAddr.getAccountId(), ipAddr.getAddress().addr(), add, false, ipAddr.isSourceNat(), ipAddr.getVlanTag(), ipAddr.getGateway(),
+                                ipAddr.getNetmask(), macAddress, networkRate, ipAddr.isOneToOneNat());
 
                 ip.setTrafficType(network.getTrafficType());
                 ip.setNetworkName(_networkModel.getNetworkTag(router.getHypervisorType(), network));
@@ -483,7 +486,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
 
     @Override
     public boolean associatePublicIP(Network network, final List<? extends PublicIpAddress> ipAddress, List<? extends VirtualRouter> routers)
-        throws ResourceUnavailableException {
+            throws ResourceUnavailableException {
         if (ipAddress == null || ipAddress.isEmpty()) {
             s_logger.debug("No ip association rules to be applied for network " + network.getId());
             return true;
@@ -501,14 +504,14 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         Map<String, PublicIpAddress> nicsToUnplug = nicsToChange.second();
 
         //1) Unplug the nics
-        for (String vlanTag : nicsToUnplug.keySet()) {
+        for (Entry<String, PublicIpAddress> entry : nicsToUnplug.entrySet()) {
             Network publicNtwk = null;
             try {
-                publicNtwk = _networkModel.getNetwork(nicsToUnplug.get(vlanTag).getNetworkId());
-                URI broadcastUri = BroadcastDomainType.Vlan.toUri(vlanTag);
+                publicNtwk = _networkModel.getNetwork(entry.getValue().getNetworkId());
+                URI broadcastUri = BroadcastDomainType.Vlan.toUri(entry.getKey());
                 _itMgr.removeVmFromNetwork(router, publicNtwk, broadcastUri);
             } catch (ConcurrentOperationException e) {
-                s_logger.warn("Failed to remove router " + router + " from vlan " + vlanTag + " in public network " + publicNtwk + " due to ", e);
+                s_logger.warn("Failed to remove router " + router + " from vlan " + entry.getKey() + " in public network " + publicNtwk + " due to ", e);
                 return false;
             }
         }
@@ -549,15 +552,15 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             }
             //Create network usage commands. Send commands to router after IPAssoc
             NetworkUsageCommand netUsageCmd =
-                new NetworkUsageCommand(router.getPrivateIpAddress(), router.getInstanceName(), true, defaultNic.getIp4Address(), vpc.getCidr());
+                    new NetworkUsageCommand(router.getPrivateIpAddress(), router.getInstanceName(), true, defaultNic.getIp4Address(), vpc.getCidr());
             netUsagecmds.addCommand(netUsageCmd);
             UserStatisticsVO stats =
-                _userStatsDao.findBy(router.getAccountId(), router.getDataCenterId(), publicNtwk.getId(), publicNic.getIp4Address(), router.getId(), router.getType()
-                    .toString());
+                    _userStatsDao.findBy(router.getAccountId(), router.getDataCenterId(), publicNtwk.getId(), publicNic.getIp4Address(), router.getId(), router.getType()
+                            .toString());
             if (stats == null) {
                 stats =
-                    new UserStatisticsVO(router.getAccountId(), router.getDataCenterId(), publicNic.getIp4Address(), router.getId(), router.getType().toString(),
-                        publicNtwk.getId());
+                        new UserStatisticsVO(router.getAccountId(), router.getDataCenterId(), publicNic.getIp4Address(), router.getId(), router.getType().toString(),
+                                publicNtwk.getId());
                 _userStatsDao.persist(stats);
             }
         }
@@ -638,7 +641,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
 
     @Override
     public boolean applyNetworkACLs(Network network, final List<? extends NetworkACLItem> rules, List<? extends VirtualRouter> routers, final boolean isPrivateGateway)
-        throws ResourceUnavailableException {
+            throws ResourceUnavailableException {
         if (rules == null || rules.isEmpty()) {
             s_logger.debug("No network ACLs to be applied for network " + network.getId());
             return true;
@@ -652,14 +655,14 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
 
     protected boolean sendNetworkACLs(VirtualRouter router, List<? extends NetworkACLItem> rules, long guestNetworkId, boolean isPrivateGateway)
-        throws ResourceUnavailableException {
+            throws ResourceUnavailableException {
         Commands cmds = new Commands(Command.OnError.Continue);
         createNetworkACLsCommands(rules, router, cmds, guestNetworkId, isPrivateGateway);
         return sendCommandsToRouter(router, cmds);
     }
 
     private void createNetworkACLsCommands(List<? extends NetworkACLItem> rules, VirtualRouter router, Commands cmds, long guestNetworkId, boolean privateGateway) {
-        List<NetworkACLTO> rulesTO = null;
+        List<NetworkACLTO> rulesTO = new ArrayList<NetworkACLTO>();
         String guestVlan = null;
         Network guestNtwk = _networkDao.findById(guestNetworkId);
         URI uri = guestNtwk.getBroadcastUri();
@@ -668,12 +671,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         }
 
         if (rules != null) {
-            rulesTO = new ArrayList<NetworkACLTO>();
-
             for (NetworkACLItem rule : rules) {
-//                if (rule.getSourceCidrList() == null && (rule.getPurpose() == Purpose.Firewall || rule.getPurpose() == Purpose.NetworkACL)) {
-//                    _firewallDao.loadSourceCidrs((FirewallRuleVO)rule);
-//                }
                 NetworkACLTO ruleTO = new NetworkACLTO(rule, guestVlan, rule.getTrafficType());
                 rulesTO.add(ruleTO);
             }
@@ -754,19 +752,19 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                     }
                 }
                 PlugNicCommand plugNicCmd =
-                    new PlugNicCommand(getNicTO(router, publicNic.getNetworkId(), publicNic.getBroadcastUri().toString()), router.getInstanceName(), router.getType());
+                        new PlugNicCommand(getNicTO(router, publicNic.getNetworkId(), publicNic.getBroadcastUri().toString()), router.getInstanceName(), router.getType());
                 cmds.addCommand(plugNicCmd);
                 VpcVO vpc = _vpcDao.findById(router.getVpcId());
                 NetworkUsageCommand netUsageCmd =
-                    new NetworkUsageCommand(router.getPrivateIpAddress(), router.getInstanceName(), true, publicNic.getIp4Address(), vpc.getCidr());
+                        new NetworkUsageCommand(router.getPrivateIpAddress(), router.getInstanceName(), true, publicNic.getIp4Address(), vpc.getCidr());
                 usageCmds.add(netUsageCmd);
                 UserStatisticsVO stats =
-                    _userStatsDao.findBy(router.getAccountId(), router.getDataCenterId(), publicNtwk.getId(), publicNic.getIp4Address(), router.getId(), router.getType()
-                        .toString());
+                        _userStatsDao.findBy(router.getAccountId(), router.getDataCenterId(), publicNtwk.getId(), publicNic.getIp4Address(), router.getId(), router.getType()
+                                .toString());
                 if (stats == null) {
                     stats =
-                        new UserStatisticsVO(router.getAccountId(), router.getDataCenterId(), publicNic.getIp4Address(), router.getId(), router.getType().toString(),
-                            publicNtwk.getId());
+                            new UserStatisticsVO(router.getAccountId(), router.getDataCenterId(), publicNic.getIp4Address(), router.getId(), router.getType().toString(),
+                                    publicNtwk.getId());
                     _userStatsDao.persist(stats);
                 }
             }
@@ -793,8 +791,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                     //set private network
                     PrivateIpVO ipVO = _privateIpDao.findByIpAndSourceNetworkId(guestNic.getNetworkId(), guestNic.getIp4Address());
                     Network network = _networkDao.findById(guestNic.getNetworkId());
-                    // should this be a vlan id or a broadcast uri???
-                    String vlanTag = BroadcastDomainType.getValue(network.getBroadcastUri());
+                    BroadcastDomainType.getValue(network.getBroadcastUri());
                     String netmask = NetUtils.getCidrNetmask(network.getCidr());
                     PrivateIpAddress ip = new PrivateIpAddress(ipVO, network.getBroadcastUri().toString(), network.getGateway(), netmask, guestNic.getMacAddress());
 
@@ -808,7 +805,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                         //set network acl on private gateway
                         List<NetworkACLItemVO> networkACLs = _networkACLItemDao.listByACL(privateGwAclId);
                         s_logger.debug("Found " + networkACLs.size() + " network ACLs to apply as a part of VPC VR " + router + " start for private gateway ip = " +
-                            ipVO.getIpAddress());
+                                ipVO.getIpAddress());
 
                         createNetworkACLsCommands(networkACLs, router, cmds, ipVO.getNetworkId(), true);
                     }
@@ -890,7 +887,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                 List<NetworkACLItemVO> networkACLs = _networkACLMgr.listNetworkACLItems(guestNetworkId);
                 if ((networkACLs != null) && !networkACLs.isEmpty()) {
                     s_logger.debug("Found " + networkACLs.size() + " network ACLs to apply as a part of VPC VR " + router + " start for guest network id=" +
-                        guestNetworkId);
+                            guestNetworkId);
                     createNetworkACLsCommands(networkACLs, router, cmds, guestNetworkId, false);
                 }
             }
@@ -964,9 +961,6 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getState() == State.Running) {
             PrivateIpVO ipVO = _privateIpDao.findByIpAndSourceNetworkId(privateNic.getNetworkId(), privateNic.getIp4Address());
             Network network = _networkDao.findById(privateNic.getNetworkId());
-            // TODO should this be a lan tag or a broadcast uri???
-            // or maybe conditional; in case of vlan ... in case of lswitch
-            String vlanTag = BroadcastDomainType.getValue(network.getBroadcastUri());
             String netmask = NetUtils.getCidrNetmask(network.getCidr());
             PrivateIpAddress ip = new PrivateIpAddress(ipVO, network.getBroadcastUri().toString(), network.getGateway(), netmask, privateNic.getMacAddress());
 
@@ -993,7 +987,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             s_logger.warn("Unable to setup private gateway, virtual router " + router + " is not in the right state " + router.getState());
 
             throw new ResourceUnavailableException("Unable to setup Private gateway on the backend," + " virtual router " + router + " is not in the right state",
-                DataCenter.class, router.getDataCenterId());
+                    DataCenter.class, router.getDataCenterId());
         }
         return true;
     }
@@ -1061,7 +1055,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                 s_logger.warn("Unable to apply StaticRoute, virtual router is not in the right state " + router.getState());
 
                 throw new ResourceUnavailableException("Unable to apply StaticRoute on the backend," + " virtual router is not in the right state", DataCenter.class,
-                    router.getDataCenterId());
+                        router.getDataCenterId());
             }
         }
         return result;
@@ -1092,7 +1086,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getState() != State.Running) {
             s_logger.warn("Unable to apply site-to-site VPN configuration, virtual router is not in the right state " + router.getState());
             throw new ResourceUnavailableException("Unable to apply site 2 site VPN configuration," + " virtual router is not in the right state", DataCenter.class,
-                router.getDataCenterId());
+                    router.getDataCenterId());
         }
 
         return applySite2SiteVpn(true, router, conn);
@@ -1103,7 +1097,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getState() != State.Running) {
             s_logger.warn("Unable to apply site-to-site VPN configuration, virtual router is not in the right state " + router.getState());
             throw new ResourceUnavailableException("Unable to apply site 2 site VPN configuration," + " virtual router is not in the right state", DataCenter.class,
-                router.getDataCenterId());
+                    router.getDataCenterId());
         }
 
         return applySite2SiteVpn(false, router, conn);
@@ -1133,8 +1127,8 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         Boolean dpd = gw.getDpd();
 
         Site2SiteVpnCfgCommand cmd =
-            new Site2SiteVpnCfgCommand(isCreate, localPublicIp, localPublicGateway, localGuestCidr, peerGatewayIp, peerGuestCidrList, ikePolicy, espPolicy, ipsecPsk,
-                ikeLifetime, espLifetime, dpd, conn.isPassive());
+                new Site2SiteVpnCfgCommand(isCreate, localPublicIp, localPublicGateway, localGuestCidr, peerGatewayIp, peerGuestCidrList, ikePolicy, espPolicy, ipsecPsk,
+                        ikeLifetime, espLifetime, dpd, conn.isPassive());
         cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
         cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, getRouterControlIp(router.getId()));
         cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
@@ -1166,8 +1160,8 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             for (final PrivateIpAddress ipAddr : ipAddrList) {
                 Network network = _networkModel.getNetwork(ipAddr.getNetworkId());
                 IpAddressTO ip =
-                    new IpAddressTO(Account.ACCOUNT_ID_SYSTEM, ipAddr.getIpAddress(), add, false, ipAddr.getSourceNat(), ipAddr.getBroadcastUri(), ipAddr.getGateway(),
-                        ipAddr.getNetmask(), ipAddr.getMacAddress(), null, false);
+                        new IpAddressTO(Account.ACCOUNT_ID_SYSTEM, ipAddr.getIpAddress(), add, false, ipAddr.getSourceNat(), ipAddr.getBroadcastUri(), ipAddr.getGateway(),
+                                ipAddr.getNetmask(), ipAddr.getMacAddress(), null, false);
 
                 ip.setTrafficType(network.getTrafficType());
                 ip.setNetworkName(_networkModel.getNetworkTag(router.getHypervisorType(), network));
@@ -1186,15 +1180,13 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
 
     protected LinkedHashMap<Network, List<? extends NicProfile>> createVpcRouterNetworks(Account owner, boolean isRedundant, DeploymentPlan plan, Pair<Boolean, PublicIp> sourceNatIp,
-        long vpcId) throws ConcurrentOperationException, InsufficientAddressCapacityException {
-
-        LinkedHashMap<Network, List<? extends NicProfile>> networks = new LinkedHashMap<Network, List<? extends NicProfile>>(4);
+            long vpcId) throws ConcurrentOperationException, InsufficientAddressCapacityException {
 
         TreeSet<String> publicVlans = new TreeSet<String>();
         publicVlans.add(sourceNatIp.second().getVlanTag());
 
         //1) allocate nic for control and source nat public ip
-        networks = super.createRouterNetworks(owner, isRedundant, plan, null, sourceNatIp);
+        LinkedHashMap<Network, List<? extends NicProfile>> networks = super.createRouterNetworks(owner, isRedundant, plan, null, sourceNatIp);
 
         //2) allocate nic for private gateways if needed
         List<PrivateGateway> privateGateways = _vpcMgr.getVpcPrivateGateways(vpcId);
@@ -1225,7 +1217,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         for (IPAddressVO ip : ips) {
             PublicIp publicIp = PublicIp.createFromAddrAndVlan(ip, _vlanDao.findById(ip.getVlanId()));
             if ((ip.getState() == IpAddress.State.Allocated || ip.getState() == IpAddress.State.Allocating) && _vpcMgr.isIpAllocatedToVpc(ip) &&
-                !publicVlans.contains(publicIp.getVlanTag())) {
+                    !publicVlans.contains(publicIp.getVlanTag())) {
                 s_logger.debug("Allocating nic for router in vlan " + publicIp.getVlanTag());
                 NicProfile publicNic = new NicProfile();
                 publicNic.setDefaultNic(false);
@@ -1262,6 +1254,9 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     protected NicProfile createPrivateNicProfileForGateway(VpcGateway privateGateway) {
         Network privateNetwork = _networkModel.getNetwork(privateGateway.getNetworkId());
         PrivateIpVO ipVO = _privateIpDao.allocateIpAddress(privateNetwork.getDataCenterId(), privateNetwork.getId(), privateGateway.getIp4Address());
+        if (ipVO == null) {
+            throw new CloudRuntimeException("Unable to assign a private IP for private gateway " + privateGateway.getUuid());
+        }
         Nic privateNic = _nicDao.findByIp4AddressAndNetworkId(ipVO.getIpAddress(), privateNetwork.getId());
 
         NicProfile privateNicProfile = new NicProfile();
@@ -1269,14 +1264,14 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (privateNic != null) {
             VirtualMachine vm = _vmDao.findById(privateNic.getInstanceId());
             privateNicProfile =
-                new NicProfile(privateNic, privateNetwork, privateNic.getBroadcastUri(), privateNic.getIsolationUri(), _networkModel.getNetworkRate(
-                    privateNetwork.getId(), vm.getId()), _networkModel.isSecurityGroupSupportedInNetwork(privateNetwork), _networkModel.getNetworkTag(
-                    vm.getHypervisorType(), privateNetwork));
+                    new NicProfile(privateNic, privateNetwork, privateNic.getBroadcastUri(), privateNic.getIsolationUri(), _networkModel.getNetworkRate(
+                            privateNetwork.getId(), vm.getId()), _networkModel.isSecurityGroupSupportedInNetwork(privateNetwork), _networkModel.getNetworkTag(
+                                    vm.getHypervisorType(), privateNetwork));
         } else {
             String netmask = NetUtils.getCidrNetmask(privateNetwork.getCidr());
             PrivateIpAddress ip =
-                new PrivateIpAddress(ipVO, privateNetwork.getBroadcastUri().toString(), privateNetwork.getGateway(), netmask,
-                    NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ipVO.getMacAddress())));
+                    new PrivateIpAddress(ipVO, privateNetwork.getBroadcastUri().toString(), privateNetwork.getGateway(), netmask,
+                            NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ipVO.getMacAddress())));
 
             URI netUri = BroadcastDomainType.fromString(ip.getBroadcastUri());
             privateNicProfile.setIp4Address(ip.getIpAddress());
@@ -1309,7 +1304,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
 
     protected Pair<Map<String, PublicIpAddress>, Map<String, PublicIpAddress>> getNicsToChangeOnRouter(final List<? extends PublicIpAddress> publicIps,
-        VirtualRouter router) {
+            VirtualRouter router) {
         //1) check which nics need to be plugged/unplugged and plug/unplug them
 
         Map<String, PublicIpAddress> nicsToPlug = new HashMap<String, PublicIpAddress>();
@@ -1364,7 +1359,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         }
 
         Pair<Map<String, PublicIpAddress>, Map<String, PublicIpAddress>> nicsToChange =
-            new Pair<Map<String, PublicIpAddress>, Map<String, PublicIpAddress>>(nicsToPlug, nicsToUnplug);
+                new Pair<Map<String, PublicIpAddress>, Map<String, PublicIpAddress>>(nicsToPlug, nicsToUnplug);
         return nicsToChange;
     }
 
@@ -1401,7 +1396,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getState() != State.Running) {
             s_logger.warn("Failed to add/remove Remote Access VPN users: router not in running state");
             throw new ResourceUnavailableException("Failed to add/remove Remote Access VPN users: router not in running state: " + router.getState(), DataCenter.class,
-                vpc.getZoneId());
+                    vpc.getZoneId());
         }
 
         Commands cmds = new Commands(Command.OnError.Continue);
@@ -1438,7 +1433,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getState() != State.Running) {
             s_logger.warn("Unable to apply remote access VPN configuration, virtual router is not in the right state " + router.getState());
             throw new ResourceUnavailableException("Unable to apply remote access VPN configuration," + " virtual router is not in the right state", DataCenter.class,
-                router.getDataCenterId());
+                    router.getDataCenterId());
         }
 
         Commands cmds = new Commands(Command.OnError.Stop);
@@ -1453,16 +1448,16 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         Answer answer = cmds.getAnswer("users");
         if (!answer.getResult()) {
             s_logger.error("Unable to start vpn: unable add users to vpn in zone " + router.getDataCenterId() + " for account " + vpn.getAccountId() + " on domR: " +
-                router.getInstanceName() + " due to " + answer.getDetails());
+                    router.getInstanceName() + " due to " + answer.getDetails());
             throw new ResourceUnavailableException("Unable to start vpn: Unable to add users to vpn in zone " + router.getDataCenterId() + " for account " +
-                vpn.getAccountId() + " on domR: " + router.getInstanceName() + " due to " + answer.getDetails(), DataCenter.class, router.getDataCenterId());
+                    vpn.getAccountId() + " on domR: " + router.getInstanceName() + " due to " + answer.getDetails(), DataCenter.class, router.getDataCenterId());
         }
         answer = cmds.getAnswer("startVpn");
         if (!answer.getResult()) {
             s_logger.error("Unable to start vpn in zone " + router.getDataCenterId() + " for account " + vpn.getAccountId() + " on domR: " + router.getInstanceName() +
-                " due to " + answer.getDetails());
+                    " due to " + answer.getDetails());
             throw new ResourceUnavailableException("Unable to start vpn in zone " + router.getDataCenterId() + " for account " + vpn.getAccountId() + " on domR: " +
-                router.getInstanceName() + " due to " + answer.getDetails(), DataCenter.class, router.getDataCenterId());
+                    router.getInstanceName() + " due to " + answer.getDetails(), DataCenter.class, router.getDataCenterId());
         }
 
         return true;
@@ -1481,7 +1476,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         } else {
             s_logger.warn("Failed to delete remote access VPN: domR " + router + " is not in right state " + router.getState());
             throw new ResourceUnavailableException("Failed to delete remote access VPN: domR is not in right state " + router.getState(), DataCenter.class,
-                router.getDataCenterId());
+                    router.getDataCenterId());
         }
 
         return true;