private void addUpgradeCommands(VDS host, boolean isOnlyClose) { if (!isOnlyClose) { UICommand command = UICommand.createDefaultOkUiCommand(ON_UPGRADE, this); getCommands().add(0, command); } getUserName().setEntity(host.getSshUsername()); getCancelCommand().setTitle(isOnlyClose ? constants.close() : constants.cancel()); }
private void addInstallCommands(InstallModel model, VDS host, boolean isOnlyClose) { if (!isOnlyClose) { UICommand command = UICommand.createDefaultOkUiCommand("OnInstall", this); //$NON-NLS-1$ model.getCommands().add(command); } model.getUserName().setEntity(host.getSshUsername()); UICommand command = new UICommand("Cancel", this); //$NON-NLS-1$ command.setTitle(isOnlyClose ? ConstantsManager.getInstance().getConstants().close() : ConstantsManager.getInstance().getConstants().cancel()); command.setIsCancel(true); model.getCommands().add(command); }
private static Object cloneVDS(VDS instance) { VDS obj = new VDS(); obj.setHostName(instance.getHostName()); obj.setSshKeyFingerprint(instance.getSshKeyFingerprint()); obj.setSshPort(instance.getSshPort()); obj.setSshUsername(instance.getSshUsername()); obj.setFenceAgents(cloneAgents(instance.getFenceAgents())); obj.setDisablePowerManagementPolicy(instance.isDisablePowerManagementPolicy()); obj.setPmKdumpDetection(instance.isPmKdumpDetection()); obj.setPort(instance.getPort()); obj.setServerSslEnabled(instance.isServerSslEnabled()); obj.setClusterId(instance.getClusterId()); obj.setId(instance.getId()); obj.setVdsName(instance.getName()); obj.setVdsStrength(instance.getVdsStrength()); obj.setVdsType(instance.getVdsType()); obj.setUniqueId(instance.getUniqueId()); obj.setVdsSpmPriority(instance.getVdsSpmPriority()); obj.setCurrentKernelCmdline(instance.getCurrentKernelCmdline()); obj.setKernelCmdlineParsable(instance.isKernelCmdlineParsable()); obj.setLastStoredKernelCmdline(instance.getLastStoredKernelCmdline()); obj.setKernelCmdlineBlacklistNouveau(instance.isKernelCmdlineBlacklistNouveau()); obj.setKernelCmdlineIommu(instance.isKernelCmdlineIommu()); obj.setKernelCmdlineKvmNested(instance.isKernelCmdlineKvmNested()); obj.setKernelCmdlinePciRealloc(instance.isKernelCmdlinePciRealloc()); obj.setKernelCmdlineFips(instance.isKernelCmdlineFips()); obj.setKernelCmdlineUnsafeInterrupts(instance.isKernelCmdlineUnsafeInterrupts()); return obj; }
getHost().setEntity(vds.getHostName()); getFetchSshFingerprint().setEntity(vds.getSshKeyFingerprint()); getUserName().setEntity(vds.getSshUsername()); getAuthSshPort().setEntity(vds.getSshPort()); if (StringHelper.isNotNullOrEmpty(vds.getKernelArgs())) {
vds.setPort(getPort()); vds.setSshPort(getSshPort()); vds.setSshUsername(getSshUsername()); vds.setStatus(getStatus()); vds.setExternalStatus(getExternalStatus());