use of com.cloud.agent.api.to.overviews.VMOverviewTO in project cosmic by MissionCriticalCloud.
the class BasicNetworkVisitor method visit.
@Override
public boolean visit(final UserdataToRouterRules userdata) throws ResourceUnavailableException {
final VirtualRouter router = userdata.getRouter();
final Commands commands = new Commands(Command.OnError.Stop);
final VMOverviewTO vmOverview = _commandSetupHelper.createVmOverviewFromRouter(router);
final UpdateVmOverviewCommand updateVmOverviewCommand = _commandSetupHelper.createUpdateVmOverviewCommand(router, vmOverview);
commands.addCommand(updateVmOverviewCommand);
return _networkGeneralHelper.sendCommandsToRouter(router, commands);
}
use of com.cloud.agent.api.to.overviews.VMOverviewTO in project cosmic by MissionCriticalCloud.
the class BasicNetworkVisitor method visit.
@Override
public boolean visit(final SshKeyToRouterRules sshkey) throws ResourceUnavailableException {
final VirtualRouter router = sshkey.getRouter();
final VirtualMachineProfile profile = sshkey.getProfile();
final Commands commands = new Commands(Command.OnError.Stop);
final NicVO nicVO = sshkey.getNicVo();
final VMTemplateVO template = sshkey.getTemplate();
if (template != null && template.getEnablePassword()) {
_commandSetupHelper.createPasswordCommand(router, profile, nicVO, commands);
}
final VMOverviewTO vmOverview = _commandSetupHelper.createVmOverviewFromRouter(router);
final UpdateVmOverviewCommand updateVmOverviewCommand = _commandSetupHelper.createUpdateVmOverviewCommand(router, vmOverview);
commands.addCommand(updateVmOverviewCommand);
return _networkGeneralHelper.sendCommandsToRouter(router, commands);
}
Aggregations