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

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

Best Java code snippets using com.netflix.spinnaker.halyard.config.model.v1.providers.containers.ContainerAccount.getDockerRegistries (Showing top 6 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: 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: 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.containersContainerAccountgetDockerRegistries

Popular methods of ContainerAccount

  • makeBootstrappingAccount

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • IsNull (org.hamcrest.core)
    Is the value null?
  • From CI to AI: The AI layer in your organization
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