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 CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

Author:
Adrian Cole

Field Summary
static com.google.common.base.Predicate<TemplateOptions> doesntNeedSshAfterImportingPublicKey
           
static com.google.common.base.Predicate<TemplateOptions> hasLoginCredential
           
static com.google.common.base.Predicate<TemplateOptions> hasPublicKeyMaterial
           
protected  Logger logger
           
 
Fields inherited from class org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions
credentialsMap, makeKeyPair, optionsProvider, securityGroupMap
 
Constructor Summary
CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions(com.google.common.base.Function<RegionAndName,KeyPair> makeKeyPair, ConcurrentMap<RegionAndName,KeyPair> credentialsMap, com.google.common.cache.Cache<RegionAndName,String> securityGroupMap, javax.inject.Provider<RunInstancesOptions> optionsProvider, com.google.common.cache.Cache<RegionAndName,String> placementGroupMap, CreatePlacementGroupIfNeeded createPlacementGroupIfNeeded, com.google.common.base.Function<RegionNameAndPublicKeyMaterial,KeyPair> importExistingKeyPair)
           
 
Method Summary
protected  void addSecurityGroups(String region, String group, Template template, RunInstancesOptions instanceOptions)
           
 String createNewKeyPairUnlessUserSpecifiedOtherwise(String region, String group, TemplateOptions options)
           
 AWSRunInstancesOptions execute(String region, String group, Template template)
           
protected  boolean userSpecifiedTheirOwnGroups(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 Logger logger

hasPublicKeyMaterial

public static final com.google.common.base.Predicate<TemplateOptions> hasPublicKeyMaterial

doesntNeedSshAfterImportingPublicKey

public static final com.google.common.base.Predicate<TemplateOptions> doesntNeedSshAfterImportingPublicKey

hasLoginCredential

public static final com.google.common.base.Predicate<TemplateOptions> hasLoginCredential
Constructor Detail

CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions

@Inject
public CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions(com.google.common.base.Function<RegionAndName,KeyPair> makeKeyPair,
                                                                                 ConcurrentMap<RegionAndName,KeyPair> credentialsMap,
                                                                                 @Named(value="SECURITY")
                                                                                 com.google.common.cache.Cache<RegionAndName,String> securityGroupMap,
                                                                                 javax.inject.Provider<RunInstancesOptions> optionsProvider,
                                                                                 @Named(value="PLACEMENT")
                                                                                 com.google.common.cache.Cache<RegionAndName,String> placementGroupMap,
                                                                                 CreatePlacementGroupIfNeeded createPlacementGroupIfNeeded,
                                                                                 com.google.common.base.Function<RegionNameAndPublicKeyMaterial,KeyPair> importExistingKeyPair)
Method Detail

execute

public AWSRunInstancesOptions execute(String region,
                                      String group,
                                      Template template)
Overrides:
execute in class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

createNewKeyPairUnlessUserSpecifiedOtherwise

public String createNewKeyPairUnlessUserSpecifiedOtherwise(String region,
                                                           String group,
                                                           TemplateOptions options)
Overrides:
createNewKeyPairUnlessUserSpecifiedOtherwise in class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

userSpecifiedTheirOwnGroups

protected boolean userSpecifiedTheirOwnGroups(TemplateOptions options)
Overrides:
userSpecifiedTheirOwnGroups in class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions

addSecurityGroups

protected void addSecurityGroups(String region,
                                 String group,
                                 Template template,
                                 RunInstancesOptions instanceOptions)
Overrides:
addSecurityGroups in class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions


Copyright © 2009-2011 jclouds. All Rights Reserved.