Loads StarCluster configuration settings defined in config_file which
defaults to ~/.starclustercfg
cfg = StarClusterConfig() or cfg =
StarClusterConfig('/path/to/my/config.cfg') cfg.load() aws_info = cfg.aws
cluster_cfg = cfg.clusters['mycluster'] key_cfg = cfg.keys['gsg-keypair']
print cluster_cfg
|
__init__(self,
config_file=None,
cache=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__load_config(self)
Populates self._config with a new ConfigParser instance |
source code
|
|
|
reload(self)
Reloads the configuration file |
source code
|
|
|
_load_settings(self,
section_name,
settings,
store,
filter_settings=True)
Load section settings into a dictionary |
source code
|
|
|
|
|
_load_defaults(self,
settings,
store)
Sets the default for each setting in settings regardless of whether
the setting was specified in the config or not. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_load_section(self,
section_name,
section_settings,
filter_settings=True)
Returns a dictionary containing all section_settings for a given
section_name by first loading the settings in the config, loading the
defaults for all settings not specified, and then checking that all
required options have been specified |
source code
|
|
|
|
|
|
|
_load_sections(self,
section_prefix,
section_settings,
filter_settings=True)
Loads all sections starting with section_prefix and returns a
dictionary containing the name and dictionary of settings for each
section. |
source code
|
|
|
|
|
load(self)
Populate this config object from the StarCluster config |
source code
|
|
|
get_aws_from_environ(self)
Returns AWS credentials defined in the user's shell environment. |
source code
|
|
|
|
|
|
|
get_cluster_template(self,
template_name,
tag_name=None,
ec2_conn=None)
Returns Cluster instance configured with the settings in the config
file. |
source code
|
|
|
|
|
|
|
|
|
|
|
get_easy_s3(self)
Factory for EasyEC2 class that attempts to load AWS credentials from
the StarCluster config file. |
source code
|
|
|
get_easy_ec2(self)
Factory for EasyEC2 class that attempts to load AWS credentials from
the StarCluster config file. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
global_settings = { ' default_template ' : ( <type 'str'>, False, N...
|
|
aws_settings = { ' aws_access_key_id ' : ( <type 'str'>, True, None...
|
|
key_settings = { ' key_location ' : ( <type 'str'>, True, None, Non...
|
|
volume_settings = { ' device ' : ( <type 'str'>, False, None, None, ...
|
|
plugin_settings = { ' setup_class ' : ( <type 'str'>, True, None, N...
|
|
cluster_settings = { ' availability_zone ' : ( <type 'str'>, False, ...
|
|
permission_settings = { ' cidr_ip ' : ( <type 'str'>, False, ' 0.0.0 ...
|
|
instance_types = { ' c1.medium ' : [ ' i386 ' ] , ' c1.xlarge ' : [ ' x86_64 ...
|