incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [6/6] git commit: VPC: CS-15486 - prepare public nic as a part of VR deployment
Date Tue, 10 Jul 2012 01:28:49 GMT
VPC: CS-15486 - prepare public nic as a part of VR deployment


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

Branch: refs/heads/vpc
Commit: 10dcc117c31233672c9447dff00185bf618f50f3
Parents: 8404dba
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Fri Jul 6 18:14:37 2012 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Mon Jul 9 18:12:54 2012 -0700

----------------------------------------------------------------------
 .../router/VirtualNetworkApplianceManagerImpl.java |    4 +-
 .../VpcVirtualNetworkApplianceManagerImpl.java     |   16 ++------------
 .../com/cloud/network/MockNetworkManagerImpl.java  |    2 +-
 3 files changed, 6 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/10dcc117/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 347d7fb..b003342 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -1282,7 +1282,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
             int count = routerCount - routers.size();
             for (int i = 0; i < count; i++) {
                 DomainRouterVO router = deployRouter(owner, dest, plan, params, isRedundant,
vrProvider, offeringId,
-                        null, sourceNatIp, publicNetwork, guestNetwork, new Pair<Boolean,
PublicIp>(publicNetwork, sourceNatIp));
+                        null, publicNetwork, guestNetwork, new Pair<Boolean, PublicIp>(publicNetwork,
sourceNatIp));
                 //add router to router network map
                 if (!_routerDao.isRouterPartOfGuestNetwork(router.getId(), network.getId()))
{
                     DomainRouterVO routerVO = _routerDao.findById(router.getId());
@@ -1300,7 +1300,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
 
     protected DomainRouterVO deployRouter(Account owner, DeployDestination dest, DeploymentPlan
plan, Map<Param, Object> params,
             boolean isRedundant, VirtualRouterProvider vrProvider, long svcOffId,
-            Long vpcId, PublicIp sourceNatIp, boolean setupPublicNetwork, Network guestNetwork,
Pair<Boolean, PublicIp> publicNetwork) throws ConcurrentOperationException, 
+            Long vpcId, boolean setupPublicNetwork, Network guestNetwork, Pair<Boolean,
PublicIp> publicNetwork) throws ConcurrentOperationException, 
             InsufficientAddressCapacityException, InsufficientServerCapacityException, InsufficientCapacityException,

             StorageUnavailableException, ResourceUnavailableException {
         

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/10dcc117/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 975f6f6..6f6f0d9 100644
--- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
@@ -391,20 +391,10 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             InsufficientAddressCapacityException, InsufficientServerCapacityException, InsufficientCapacityException,

             StorageUnavailableException, ResourceUnavailableException {
         
+
         DomainRouterVO router = 
-                super.deployRouter(owner, dest, plan, params, isRedundant, vrProvider, svcOffId,
vpcId, sourceNatIp, 
-                        false, null, null);
-        
-        //Plug public nic
-        if (router != null && sourceNatIp != null) {
-            Network publicNetwork = _networkDao.listByZoneAndTrafficType(dest.getDataCenter().getId(),
TrafficType.Public).get(0);
-            if (!addPublicIpToVpc(router, publicNetwork, sourceNatIp)) {
-                s_logger.warn("Failed to add router " + router + " to public network in zone
" + dest.getDataCenter() + " cleaninig up");
-                destroyRouter(router.getId());
-                return null;
-            }
-            
-        }
+                super.deployRouter(owner, dest, plan, params, isRedundant, vrProvider, svcOffId,
vpcId, false, 
+                        null, new Pair<Boolean, PublicIp>(true, sourceNatIp));
         
         return router;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/10dcc117/server/test/com/cloud/network/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/MockNetworkManagerImpl.java b/server/test/com/cloud/network/MockNetworkManagerImpl.java
index 836d330..0819a31 100755
--- a/server/test/com/cloud/network/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/network/MockNetworkManagerImpl.java
@@ -1094,7 +1094,7 @@ public class MockNetworkManagerImpl implements NetworkManager, Manager,
NetworkS
      * @see com.cloud.network.NetworkManager#isPrivateGateway(com.cloud.vm.Nic)
      */
     @Override
-    public boolean isPrivateGateway(Nic guestNic) {
+    public boolean isPrivateGateway(long nicId) {
         // TODO Auto-generated method stub
         return false;
     }


Mime
View raw message