CS-16375: do desetup network after last VM in guest network is gone

This commit is contained in:
Anthony Xu 2012-09-26 10:13:55 -07:00
parent 946295b114
commit ba8b418542
2 changed files with 5 additions and 1 deletions

View File

@ -45,6 +45,10 @@ public class SetupGuestNetworkCommand extends NetworkElementCommand{
return networkDomain;
}
boolean isAdd() {
return add;
}
@Override
public boolean executeInSequence() {
return true;

View File

@ -7359,7 +7359,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
return new SetupGuestNetworkAnswer(cmd, false, "Can not find vif with mac " + mac + " for VM " + domrName);
}
String args = "vpc_guestnw.sh " + domrIP + " -C";
String args = "vpc_guestnw.sh " + domrIP + (cmd.isAdd()?" -C":" -D");
String dev = "eth" + domrVif.getDevice(conn);
args += " -d " + dev;
args += " -i " + domrGIP;