@Override public boolean visit(final SshKeyToRouterRules sshkey) throws ResourceUnavailableException { final VirtualRouter router = sshkey.getRouter(); final VirtualMachineProfile profile = sshkey.getProfile(); final String sshKeystr = sshkey.getSshPublicKey(); final UserVmVO userVM = sshkey.getUserVM(); final Commands commands = new Commands(Command.OnError.Stop); final NicVO nicVo = sshkey.getNicVo(); final VMTemplateVO template = sshkey.getTemplate(); if (template != null && template.isEnablePassword()) { _commandSetupHelper.createPasswordCommand(router, profile, nicVo, commands); } _commandSetupHelper.createVmDataCommand(router, userVM, nicVo, sshKeystr, commands); return _networkGeneralHelper.sendCommandsToRouter(router, commands); }