bug 12628: add default route in dhcpentrycommand

status 12628: resolved fixed
This commit is contained in:
Edison Su 2011-12-19 15:24:31 -08:00
parent aac9c540af
commit d33a23cca6
1 changed files with 11 additions and 0 deletions

View File

@ -462,6 +462,17 @@ public class VirtualRoutingResource implements Manager {
command.add("-v", cmd.getVmIpAddress());
command.add("-m", cmd.getVmMac());
command.add("-n", cmd.getVmName());
if (cmd.getDefaultRouter() != null) {
command.add(" -d " + cmd.getDefaultRouter());
}
if (cmd.getStaticRoutes() != null) {
command.add(" -s " + cmd.getStaticRoutes());
}
if (cmd.getDefaultDns() != null) {
command.add(" -N " + cmd.getDefaultDns());
}
final String result = command.execute();
return new Answer(cmd, result==null, result);