CLOUDSTACK-6528 SetupGuestNetwork command is not deleting the guest network configured on the eth device

This commit is contained in:
Rajesh Battala 2014-04-28 16:27:15 +05:30
parent 14f1b96b51
commit 6cbb9a5b72
1 changed files with 8 additions and 2 deletions

View File

@ -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;