Tabnine Logo
ContainerAccount
Code IndexAdd Tabnine to your IDE (free)

How to use
ContainerAccount
in
com.netflix.spinnaker.halyard.config.model.v1.providers.containers

Best Java code snippets using com.netflix.spinnaker.halyard.config.model.v1.providers.containers.ContainerAccount (Showing top 8 results out of 315)

origin: com.netflix.spinnaker.halyard/halyard-deploy

 @SuppressWarnings("unchecked")
 DockerRegistryAccountReverseIndex(Providers providers) {
  super();
  NodeIterator providerNodes = providers.getChildren();
  Provider provider;
  while ((provider = (Provider) providerNodes.getNext()) != null) {
   for (Account a : (List<? extends Account>) provider.getAccounts()) {
    if (a instanceof ContainerAccount) {
     ContainerAccount account = (ContainerAccount) a;
     List<DockerRegistryReference> registries = account.getDockerRegistries();
     registries.forEach(reg -> this.computeIfAbsent(reg.getAccountName(), ignored -> new HashSet<>()).add(account));
    }
   }
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-config

@Override
public void makeBootstrappingAccount(ArtifactSourcesConfig artifactSourcesConfig) {
 super.makeBootstrappingAccount(artifactSourcesConfig);
 DeploymentConfiguration deploymentConfiguration = parentOfType(DeploymentConfiguration.class);
 String location = StringUtils.isEmpty(deploymentConfiguration.getDeploymentEnvironment().getLocation()) ? "spinnaker" : deploymentConfiguration.getDeploymentEnvironment().getLocation();
 // These changes are only surfaced in the account used by the bootstrapping clouddriver,
 // the user's clouddriver will be unchanged.
 if (!namespaces.isEmpty() && !namespaces.contains(location)) {
  namespaces.add(location);
 }
 if (!omitNamespaces.isEmpty() && omitNamespaces.contains(location)) {
  omitNamespaces.remove(location);
 }
}
origin: spinnaker/halyard

 @SuppressWarnings("unchecked")
 DockerRegistryAccountReverseIndex(Providers providers) {
  super();
  NodeIterator providerNodes = providers.getChildren();
  Provider provider;
  while ((provider = (Provider) providerNodes.getNext()) != null) {
   for (Account a : (List<? extends Account>) provider.getAccounts()) {
    if (a instanceof ContainerAccount) {
     ContainerAccount account = (ContainerAccount) a;
     List<DockerRegistryReference> registries = account.getDockerRegistries();
     registries.forEach(reg -> this.computeIfAbsent(reg.getAccountName(), ignored -> new HashSet<>()).add(account));
    }
   }
  }
 }
}
origin: spinnaker/halyard

@Override
public void makeBootstrappingAccount(ArtifactSourcesConfig artifactSourcesConfig) {
 super.makeBootstrappingAccount(artifactSourcesConfig);
 DeploymentConfiguration deploymentConfiguration = parentOfType(DeploymentConfiguration.class);
 String location = StringUtils.isEmpty(deploymentConfiguration.getDeploymentEnvironment().getLocation()) ? "spinnaker" : deploymentConfiguration.getDeploymentEnvironment().getLocation();
 // These changes are only surfaced in the account used by the bootstrapping clouddriver,
 // the user's clouddriver will be unchanged.
 if (!namespaces.isEmpty() && !namespaces.contains(location)) {
  namespaces.add(location);
 }
 if (!omitNamespaces.isEmpty() && omitNamespaces.contains(location)) {
  omitNamespaces.remove(location);
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

@SuppressWarnings("unchecked")
private void removeBootstrapOnlyAccount(Providers providers, String deploymentName, String bootstrapAccountName) {
 Account bootstrapAccount = accountService.getAnyProviderAccount(deploymentName, bootstrapAccountName);
 Provider bootstrapProvider = ((Provider) bootstrapAccount.getParent());
 bootstrapProvider.getAccounts().remove(bootstrapAccount);
 if (bootstrapProvider.getAccounts().isEmpty()) {
  bootstrapProvider.setEnabled(false);
  if (bootstrapAccount instanceof ContainerAccount) {
   ContainerAccount containerAccount = (ContainerAccount) bootstrapAccount;
   DockerRegistryAccountReverseIndex revIndex = new DockerRegistryAccountReverseIndex(providers);
   containerAccount.getDockerRegistries().forEach(reg -> {
    Set<Account> dependentAccounts = revIndex.get(reg.getAccountName());
    if (dependentAccounts == null || dependentAccounts.isEmpty()) {
     DockerRegistryAccount regAcct = (DockerRegistryAccount) accountService.getAnyProviderAccount(deploymentName, reg.getAccountName());
     ((DockerRegistryProvider) regAcct.getParent()).getAccounts().remove(regAcct);
    }
   });
   if (providers.getDockerRegistry().getAccounts().isEmpty()) {
    providers.getDockerRegistry().setEnabled(false);
   }
  }
 }
}
origin: spinnaker/halyard

@SuppressWarnings("unchecked")
private void removeBootstrapOnlyAccount(Providers providers, String deploymentName, String bootstrapAccountName) {
 Account bootstrapAccount = accountService.getAnyProviderAccount(deploymentName, bootstrapAccountName);
 Provider bootstrapProvider = ((Provider) bootstrapAccount.getParent());
 bootstrapProvider.getAccounts().remove(bootstrapAccount);
 if (bootstrapProvider.getAccounts().isEmpty()) {
  bootstrapProvider.setEnabled(false);
  if (bootstrapAccount instanceof ContainerAccount) {
   ContainerAccount containerAccount = (ContainerAccount) bootstrapAccount;
   DockerRegistryAccountReverseIndex revIndex = new DockerRegistryAccountReverseIndex(providers);
   containerAccount.getDockerRegistries().forEach(reg -> {
    Set<Account> dependentAccounts = revIndex.get(reg.getAccountName());
    if (dependentAccounts == null || dependentAccounts.isEmpty()) {
     DockerRegistryAccount regAcct = (DockerRegistryAccount) accountService.getAnyProviderAccount(deploymentName, reg.getAccountName());
     ((DockerRegistryProvider) regAcct.getParent()).getAccounts().remove(regAcct);
    }
   });
   if (providers.getDockerRegistry().getAccounts().isEmpty()) {
    providers.getDockerRegistry().setEnabled(false);
   }
  }
 }
}
origin: com.netflix.spinnaker.halyard/halyard-deploy

ContainerAccount containerAccount = (ContainerAccount) bootstrapAccount;
List<DockerRegistryAccount> bootstrapRegistries = containerAccount.getDockerRegistries()
  .stream()
  .map(ref -> (DockerRegistryAccount) accountService.getProviderAccount(deploymentName, DOCKER_REGISTRY, ref.getAccountName()))
origin: spinnaker/halyard

ContainerAccount containerAccount = (ContainerAccount) bootstrapAccount;
List<DockerRegistryAccount> bootstrapRegistries = containerAccount.getDockerRegistries()
  .stream()
  .map(ref -> (DockerRegistryAccount) accountService.getProviderAccount(deploymentName, DOCKER_REGISTRY, ref.getAccountName()))
com.netflix.spinnaker.halyard.config.model.v1.providers.containersContainerAccount

Most used methods

  • getDockerRegistries
  • makeBootstrappingAccount

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now