@Override protected Account buildAccount(String accountName) { DCOSAccount account = (DCOSAccount) new DCOSAccount().setName(accountName); dockerRegistries.forEach(registryName -> account.getDockerRegistries().add(new DockerRegistryReference().setAccountName(registryName))); if (!isNull(serviceKeyFile) && !isNull(password)) { throw new IllegalArgumentException("Only one of --service-key-file or --password may be set"); } account.setClusters(Lists.newArrayList(new ClusterCredential(cluster, uid, password, serviceKeyFile))); return account; }
@Override protected Account buildAccount(String accountName) { DCOSAccount account = (DCOSAccount) new DCOSAccount().setName(accountName); dockerRegistries.forEach(registryName -> account.getDockerRegistries().add(new DockerRegistryReference().setAccountName(registryName))); if (!isNull(serviceKeyFile) && !isNull(password)) { throw new IllegalArgumentException("Only one of --service-key-file or --password may be set"); } account.setClusters(Lists.newArrayList(new ClusterCredential(cluster, uid, password, serviceKeyFile))); return account; }
final String password = updateUserCredential.get(2); account.removeCredential(clusterName, uid); final DCOSAccount.ClusterCredential credential = new DCOSAccount.ClusterCredential(clusterName, uid, password, null); account.getClusters().add(credential); final DCOSAccount.ClusterCredential credential = new DCOSAccount.ClusterCredential(clusterName, uid, null, serviceKeyFile); account.getClusters().add(credential);
final String password = updateUserCredential.get(2); account.removeCredential(clusterName, uid); final DCOSAccount.ClusterCredential credential = new DCOSAccount.ClusterCredential(clusterName, uid, password, null); account.getClusters().add(credential); final DCOSAccount.ClusterCredential credential = new DCOSAccount.ClusterCredential(clusterName, uid, null, serviceKeyFile); account.getClusters().add(credential);