cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbatt...@apache.org
Subject [2/2] git commit: updated refs/heads/master to f9cf2c2
Date Mon, 05 May 2014 07:23:06 GMT
CLOUDSTACK-6528 SetupGuestNetwork command is not deleting the guest network configured on the
eth device


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

Branch: refs/heads/master
Commit: 6cbb9a5b722bbb5a0ab74024cf00a99fbc8ef2ec
Parents: 14f1b96
Author: Rajesh Battala <rajesh.battala@citrix.com>
Authored: Mon Apr 28 16:27:15 2014 +0530
Committer: Rajesh Battala <rajesh.battala@citrix.com>
Committed: Mon May 5 12:56:42 2014 +0530

----------------------------------------------------------------------
 .../resource/virtualnetwork/VirtualRoutingResource.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6cbb9a5b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
index 0a7aa26..a8986a3 100755
--- a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
+++ b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
@@ -780,8 +780,14 @@ public class VirtualRoutingResource {
 
         String dev = "eth" + nic.getDeviceId();
         String netmask = NetUtils.getSubNet(routerGIP, nic.getNetmask());
-
-        String args = " -C";
+        String args = "";
+        if(cmd.isAdd() == false) {
+            //pass the argument to script to delete the network
+            args +=" -D ";
+        } else {
+            // pass create option argument if the ip needs to be added to eth device
+            args +=" -C ";
+        }
         args += " -M " + nic.getMac();
         args += " -d " + dev;
         args += " -i " + routerGIP;


Mime
View raw message