You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/05/05 09:23:06 UTC
[2/2] git commit: updated refs/heads/master to f9cf2c2
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 <ra...@citrix.com>
Authored: Mon Apr 28 16:27:15 2014 +0530
Committer: Rajesh Battala <ra...@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;