Codota Logo
ContainerAccount
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
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

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • String (java.lang)
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now