org.jclouds.aws.ec2.compute.strategy
Class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions

java.lang.Object
  extended by org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions
      extended by org.jclouds.aws.ec2.compute.strategy.CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions

@Singleton
public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions
extends org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions


Field Summary
static com.google.common.base.Predicate<org.jclouds.compute.options.TemplateOptions> doesntNeedSshAfterImportingPublicKey
           
static com.google.common.base.Predicate<org.jclouds.compute.options.TemplateOptions> hasLoginCredential
           
static com.google.common.base.Predicate<org.jclouds.compute.options.TemplateOptions> hasPublicKeyMaterial
           
protected  org.jclouds.logging.Logger logger
           
 
Fields inherited from class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions
credentialsMap, makeKeyPair, optionsProvider, securityGroupMap
 
Constructor Summary
CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions(com.google.common.base.Function<org.jclouds.ec2.compute.domain.RegionAndName,org.jclouds.ec2.domain.KeyPair> makeKeyPair, ConcurrentMap<org.jclouds.ec2.compute.domain.RegionAndName,org.jclouds.ec2.domain.KeyPair> credentialsMap, com.google.common.cache.LoadingCache<org.jclouds.ec2.compute.domain.RegionAndName,String> securityGroupMap, javax.inject.Provider<org.jclouds.ec2.options.RunInstancesOptions> optionsProvider, com.google.common.cache.LoadingCache<org.jclouds.ec2.compute.domain.RegionAndName,String> placementGroupMap, CreatePlacementGroupIfNeeded createPlacementGroupIfNeeded, com.google.common.base.Function<RegionNameAndPublicKeyMaterial,org.jclouds.ec2.domain.KeyPair> importExistingKeyPair, org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention)
           
 
Method Summary
protected  void addSecurityGroups(String region, String group, org.jclouds.compute.domain.Template template, org.jclouds.ec2.options.RunInstancesOptions instanceOptions)
           
 String createNewKeyPairUnlessUserSpecifiedOtherwise(String region, String group, org.jclouds.compute.options.TemplateOptions options)
           
 AWSRunInstancesOptions execute(String region, String group, org.jclouds.compute.domain.Template template)
           
protected  boolean userSpecifiedTheirOwnGroups(org.jclouds.compute.options.TemplateOptions options)
           
 
Methods inherited from class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions
createOrImportKeyPair, getOptionsProvider, getSecurityGroupsForTagAndOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.compute")
protected org.jclouds.logging.Logger logger

hasPublicKeyMaterial

public static final com.google.common.base.Predicate<org.jclouds.compute.options.TemplateOptions> hasPublicKeyMaterial

doesntNeedSshAfterImportingPublicKey

public static final com.google.common.base.Predicate<org.jclouds.compute.options.TemplateOptions> doesntNeedSshAfterImportingPublicKey

hasLoginCredential

public static final com.google.common.base.Predicate<org.jclouds.compute.options.TemplateOptions> hasLoginCredential
Constructor Detail

CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions

@Inject
public CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions(com.google.common.base.Function<org.jclouds.ec2.compute.domain.RegionAndName,org.jclouds.ec2.domain.KeyPair> makeKeyPair,
                                                                                 ConcurrentMap<org.jclouds.ec2.compute.domain.RegionAndName,org.jclouds.ec2.domain.KeyPair> credentialsMap,
                                                                                 @Named(value="SECURITY")
                                                                                 com.google.common.cache.LoadingCache<org.jclouds.ec2.compute.domain.RegionAndName,String> securityGroupMap,
                                                                                 javax.inject.Provider<org.jclouds.ec2.options.RunInstancesOptions> optionsProvider,
                                                                                 @Named(value="PLACEMENT")
                                                                                 com.google.common.cache.LoadingCache<org.jclouds.ec2.compute.domain.RegionAndName,String> placementGroupMap,
                                                                                 CreatePlacementGroupIfNeeded createPlacementGroupIfNeeded,
                                                                                 com.google.common.base.Function<RegionNameAndPublicKeyMaterial,org.jclouds.ec2.domain.KeyPair> importExistingKeyPair,
                                                                                 org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention)
Method Detail

execute

public AWSRunInstancesOptions execute(String region,
                                      String group,
                                      org.jclouds.compute.domain.Template template)
Overrides:
execute in class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

createNewKeyPairUnlessUserSpecifiedOtherwise

public String createNewKeyPairUnlessUserSpecifiedOtherwise(String region,
                                                           String group,
                                                           org.jclouds.compute.options.TemplateOptions options)
Overrides:
createNewKeyPairUnlessUserSpecifiedOtherwise in class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

userSpecifiedTheirOwnGroups

protected boolean userSpecifiedTheirOwnGroups(org.jclouds.compute.options.TemplateOptions options)
Overrides:
userSpecifiedTheirOwnGroups in class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

addSecurityGroups

protected void addSecurityGroups(String region,
                                 String group,
                                 org.jclouds.compute.domain.Template template,
                                 org.jclouds.ec2.options.RunInstancesOptions instanceOptions)
Overrides:
addSecurityGroups in class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.