use of com.cloud.network.router.VirtualRouter in project cloudstack by apache.
the class BasicNetworkVisitor method visit.
@Override
public boolean visit(final IpAssociationRules ipRules) throws ResourceUnavailableException {
final Network network = ipRules.getNetwork();
final VirtualRouter router = ipRules.getRouter();
final Commands commands = new Commands(Command.OnError.Continue);
final List<? extends PublicIpAddress> ips = ipRules.getIpAddresses();
_commandSetupHelper.createAssociateIPCommands(router, ips, commands, network.getId());
return _networkGeneralHelper.sendCommandsToRouter(router, commands);
}
use of com.cloud.network.router.VirtualRouter in project cloudstack by apache.
the class BasicNetworkVisitor method visit.
@Override
public boolean visit(final UserdataToRouterRules userdata) throws ResourceUnavailableException {
final VirtualRouter router = userdata.getRouter();
final UserVmVO userVM = userdata.getUserVM();
final NicVO nicVo = userdata.getNicVo();
final Commands commands = new Commands(Command.OnError.Stop);
_commandSetupHelper.createVmDataCommand(router, userVM, nicVo, null, commands);
return _networkGeneralHelper.sendCommandsToRouter(router, commands);
}
use of com.cloud.network.router.VirtualRouter in project cloudstack by apache.
the class AdvancedNetworkVisitor method visit.
@Override
public boolean visit(final UserdataPwdRules userdata) throws ResourceUnavailableException {
final VirtualRouter router = userdata.getRouter();
final Commands commands = new Commands(Command.OnError.Stop);
final VirtualMachineProfile profile = userdata.getProfile();
final NicVO nicVo = userdata.getNicVo();
final UserVmVO userVM = userdata.getUserVM();
_commandSetupHelper.createPasswordCommand(router, profile, nicVo, commands);
_commandSetupHelper.createVmDataCommand(router, userVM, nicVo, userVM.getDetail("SSH.PublicKey"), commands);
return _networkGeneralHelper.sendCommandsToRouter(router, commands);
}
use of com.cloud.network.router.VirtualRouter in project cloudstack by apache.
the class AdvancedNetworkVisitor method visit.
@Override
public boolean visit(final NetworkAclsRules acls) throws ResourceUnavailableException {
final VirtualRouter router = acls.getRouter();
final Network network = acls.getNetwork();
final Commands commands = new Commands(Command.OnError.Continue);
final List<? extends NetworkACLItem> rules = acls.getRules();
_commandSetupHelper.createNetworkACLsCommands(rules, router, commands, network.getId(), acls.isPrivateGateway());
return _networkGeneralHelper.sendCommandsToRouter(router, commands);
}
use of com.cloud.network.router.VirtualRouter in project cloudstack by apache.
the class AdvancedNetworkVisitor method visit.
@Override
public boolean visit(final StaticRoutesRules staticRoutesRules) throws ResourceUnavailableException {
final VirtualRouter router = staticRoutesRules.getRouter();
final List<StaticRouteProfile> staticRoutes = staticRoutesRules.getStaticRoutes();
final Commands cmds = new Commands(Command.OnError.Continue);
_commandSetupHelper.createStaticRouteCommands(staticRoutes, router, cmds);
return _networkGeneralHelper.sendCommandsToRouter(router, cmds);
}
Aggregations