cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject [15/53] [abbrv] git commit: updated refs/heads/resize-root to f52c743
Date Fri, 14 Mar 2014 05:34:07 GMT
CLOUDSTACK-6047: Enable VR aggregation commands for VPC


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

Branch: refs/heads/resize-root
Commit: 467986321a602f79e63205168c58a2410caeeddc
Parents: e7ad33c
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Tue Mar 11 15:55:45 2014 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Tue Mar 11 16:14:33 2014 -0700

----------------------------------------------------------------------
 .../VpcVirtualNetworkApplianceManagerImpl.java  | 40 +++++++++++---------
 1 file changed, 23 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46798632/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 f7fdd08..8296460 100644
--- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
@@ -17,29 +17,14 @@
 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.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;
 import com.cloud.agent.api.NetworkUsageCommand;
 import com.cloud.agent.api.PlugNicCommand;
 import com.cloud.agent.api.SetupGuestNetworkCommand;
+import com.cloud.agent.api.routing.AggregationControlCommand;
+import com.cloud.agent.api.routing.AggregationControlCommand.Action;
 import com.cloud.agent.api.routing.IpAssocVpcCommand;
 import com.cloud.agent.api.routing.NetworkElementCommand;
 import com.cloud.agent.api.routing.SetNetworkACLCommand;
@@ -128,6 +113,21 @@ 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})
@@ -861,12 +861,18 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
 
         for (Pair<Nic, Network> nicNtwk : guestNics) {
             Nic guestNic = nicNtwk.first();
+            AggregationControlCommand startCmd = new AggregationControlCommand(Action.Start,
router.getInstanceName(), controlNic.getIp4Address(),
+                    getRouterIpInNetwork(guestNic.getNetworkId(), router.getId()));
+            cmds.addCommand(startCmd);
             if (reprogramGuestNtwks) {
                 finalizeIpAssocForNetwork(cmds, router, provider, guestNic.getNetworkId(),
vlanMacAddress);
                 finalizeNetworkRulesForNetwork(cmds, router, provider, guestNic.getNetworkId());
             }
 
             finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNic.getNetworkId());
+            AggregationControlCommand finishCmd = new AggregationControlCommand(Action.Finish,
router.getInstanceName(), controlNic.getIp4Address(),
+                    getRouterIpInNetwork(guestNic.getNetworkId(), router.getId()));
+            cmds.addCommand(finishCmd);
         }
 
         //Add network usage commands


Mime
View raw message