/** * @return true if the login password is set */ public boolean hasLoginPassword() { return hasLoginPasswordOption() && loginPassword.isPresent(); }
/** * @return true if the login password is set */ public boolean hasLoginPassword() { return hasLoginPasswordOption() && loginPassword.isPresent(); }
/** * @return true if the login password is set */ public boolean hasLoginPassword() { return hasLoginPasswordOption() && loginPassword.isPresent(); }
/** * @return true if the login password is set */ public boolean hasLoginPassword() { return hasLoginPasswordOption() && loginPassword.isPresent(); }
protected NodeMetadata updateNodeWithCredentialsIfPresent(NodeMetadata node, RunScriptOptions options) { checkNotNull(node, "node"); Builder builder = LoginCredentials.builder(node.getCredentials()); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.hasLoginPasswordOption()) { if (options.hasLoginPassword()) { builder.password(options.getLoginPassword()); } else { builder.noPassword(); } } if (options.hasLoginPrivateKeyOption()) { if (options.hasLoginPrivateKey()) { builder.privateKey(options.getLoginPrivateKey()); } else { builder.noPrivateKey(); } } if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return NodeMetadataBuilder.fromNodeMetadata(node).credentials(builder.build()).build(); }
protected NodeMetadata updateNodeWithCredentialsIfPresent(NodeMetadata node, RunScriptOptions options) { checkNotNull(node, "node"); Builder builder = LoginCredentials.builder(node.getCredentials()); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.hasLoginPasswordOption()) { if (options.hasLoginPassword()) { builder.password(options.getLoginPassword()); } else { builder.noPassword(); } } if (options.hasLoginPrivateKeyOption()) { if (options.hasLoginPrivateKey()) { builder.privateKey(options.getLoginPrivateKey()); } else { builder.noPrivateKey(); } } if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return NodeMetadataBuilder.fromNodeMetadata(node).credentials(builder.build()).build(); }
protected NodeMetadata updateNodeWithCredentialsIfPresent(NodeMetadata node, RunScriptOptions options) { checkNotNull(node, "node"); Builder builder = LoginCredentials.builder(node.getCredentials()); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.hasLoginPasswordOption()) { if (options.hasLoginPassword()) { builder.password(options.getLoginPassword()); } else { builder.noPassword(); } } if (options.hasLoginPrivateKeyOption()) { if (options.hasLoginPrivateKey()) { builder.privateKey(options.getLoginPrivateKey()); } else { builder.noPrivateKey(); } } if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return NodeMetadataBuilder.fromNodeMetadata(node).credentials(builder.build()).build(); }
protected NodeMetadata updateNodeWithCredentialsIfPresent(NodeMetadata node, RunScriptOptions options) { checkNotNull(node, "node"); Builder builder = LoginCredentials.builder(node.getCredentials()); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.hasLoginPasswordOption()) { if (options.hasLoginPassword()) { builder.password(options.getLoginPassword()); } else { builder.noPassword(); } } if (options.hasLoginPrivateKeyOption()) { if (options.hasLoginPrivateKey()) { builder.privateKey(options.getLoginPrivateKey()); } else { builder.noPrivateKey(); } } if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return NodeMetadataBuilder.fromNodeMetadata(node).credentials(builder.build()).build(); }
public void copyTo(RunScriptOptions to) { if (this.getPort() != -1) to.blockOnPort(this.getPort(), this.getSeconds()); if (this.getTaskName() != null) to.nameTask(this.getTaskName()); to.runAsRoot(this.shouldRunAsRoot()); to.blockOnComplete(this.shouldBlockOnComplete()); to.wrapInInitScript(this.shouldWrapInInitScript()); if (this.hasLoginPasswordOption()) to.overrideLoginPassword(this.loginPassword); if (this.hasLoginPrivateKeyOption()) to.overrideLoginPrivateKey(this.loginPrivateKey); if (this.getLoginUser() != null) to.overrideLoginUser(this.getLoginUser()); if (this.shouldAuthenticateSudo() != null) { to.overrideAuthenticateSudo(this.shouldAuthenticateSudo()); } }
public void copyTo(RunScriptOptions to) { if (this.getPort() != -1) to.blockOnPort(this.getPort(), this.getSeconds()); if (this.getTaskName() != null) to.nameTask(this.getTaskName()); to.runAsRoot(this.shouldRunAsRoot()); to.blockOnComplete(this.shouldBlockOnComplete()); to.wrapInInitScript(this.shouldWrapInInitScript()); if (this.hasLoginPasswordOption()) to.overrideLoginPassword(this.loginPassword); if (this.hasLoginPrivateKeyOption()) to.overrideLoginPrivateKey(this.loginPrivateKey); if (this.getLoginUser() != null) to.overrideLoginUser(this.getLoginUser()); if (this.shouldAuthenticateSudo() != null) { to.overrideAuthenticateSudo(this.shouldAuthenticateSudo()); } }