@Override public String getLoginPrivateKey() { return delegate.getLoginPrivateKey(); }
@Override public String getLoginPrivateKey() { return delegate.getLoginPrivateKey(); }
@Override public String getLoginPrivateKey() { return delegate.getLoginPrivateKey(); }
@Override public String getLoginPrivateKey() { return delegate.getLoginPrivateKey(); }
public static LoginCredentials overrideDefaultCredentialsWithOptionsIfPresent( @Nullable LoginCredentials defaultCreds, RunScriptOptions options) { Builder builder = LoginCredentials.builder(defaultCreds); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.getLoginPassword() != null) builder.password(options.getLoginPassword()); if (options.getLoginPrivateKey() != null) builder.privateKey(options.getLoginPrivateKey()); if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return builder.build(); }
public static LoginCredentials overrideDefaultCredentialsWithOptionsIfPresent( @Nullable LoginCredentials defaultCreds, RunScriptOptions options) { Builder builder = LoginCredentials.builder(defaultCreds); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.getLoginPassword() != null) builder.password(options.getLoginPassword()); if (options.getLoginPrivateKey() != null) builder.privateKey(options.getLoginPrivateKey()); if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return builder.build(); }
public static LoginCredentials overrideDefaultCredentialsWithOptionsIfPresent( @Nullable LoginCredentials defaultCreds, RunScriptOptions options) { Builder builder = LoginCredentials.builder(defaultCreds); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.getLoginPassword() != null) builder.password(options.getLoginPassword()); if (options.getLoginPrivateKey() != null) builder.privateKey(options.getLoginPrivateKey()); if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return builder.build(); }
public static LoginCredentials overrideDefaultCredentialsWithOptionsIfPresent( @Nullable LoginCredentials defaultCreds, RunScriptOptions options) { Builder builder = LoginCredentials.builder(defaultCreds); if (options.getLoginUser() != null) builder.user(options.getLoginUser()); if (options.getLoginPassword() != null) builder.password(options.getLoginPassword()); if (options.getLoginPrivateKey() != null) builder.privateKey(options.getLoginPrivateKey()); if (options.shouldAuthenticateSudo() != null) builder.authenticateSudo(true); return builder.build(); }
public LoginCredentials apply(Template template, LoginCredentials fromNode) { RunScriptOptions options = checkNotNull(template.getOptions(), "template options are required"); LoginCredentials.Builder builder = LoginCredentials.builder(fromNode); if (options.getLoginUser() != null) builder.user(template.getOptions().getLoginUser()); if (options.getLoginPassword() != null) builder.password(options.getLoginPassword()); if (options.getLoginPrivateKey() != null) builder.privateKey(options.getLoginPrivateKey()); if (options.shouldAuthenticateSudo() != null && options.shouldAuthenticateSudo()) builder.authenticateSudo(true); return builder.build(); } }
public LoginCredentials apply(Template template, LoginCredentials fromNode) { RunScriptOptions options = checkNotNull(template.getOptions(), "template options are required"); LoginCredentials.Builder builder = LoginCredentials.builder(fromNode); if (options.getLoginUser() != null) builder.user(template.getOptions().getLoginUser()); if (options.getLoginPassword() != null) builder.password(options.getLoginPassword()); if (options.getLoginPrivateKey() != null) builder.privateKey(options.getLoginPrivateKey()); if (options.shouldAuthenticateSudo() != null && options.shouldAuthenticateSudo()) builder.authenticateSudo(true); return builder.build(); } }
public LoginCredentials apply(final Template template, final LoginCredentials fromNode) { final RunScriptOptions options = checkNotNull(template.getOptions(), "template options are required"); final LoginCredentials.Builder builder = LoginCredentials.builder(fromNode); if (options.getLoginUser() != null) { builder.user(template.getOptions().getLoginUser()); } if (options.getLoginPassword() != null) { builder.password(options.getLoginPassword()); } if (options.getLoginPrivateKey() != null) { builder.privateKey(options.getLoginPrivateKey()); } if (options.shouldAuthenticateSudo() != null && options.shouldAuthenticateSudo()) { builder.authenticateSudo(true); } return builder.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(); }
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(); }