pyrax
Python Bindings for the Rackspace Cloud
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions | Static Public Attributes | Properties
Settings Class Reference

Holds and manages the settings for pyrax. More...

List of all members.

Public Member Functions

def get
 Returns the config setting for the specified environment.
def set
 Changes the value for the setting specified by 'key' to the new value.
def environments
def read_config
 Parses the specified configuration file and stores the values.

Static Public Attributes

dictionary env_dct

Properties

 environment

Detailed Description

Holds and manages the settings for pyrax.


Member Function Documentation

def environments (   self)
def get (   self,
  key,
  env = None 
)

Returns the config setting for the specified environment.

If no environment is specified, the value for the current environment is returned. If an unknown key or environment is passed, None is returned.

def read_config (   self,
  config_file 
)

Parses the specified configuration file and stores the values.

Raises an InvalidConfigurationFile exception if the file is not well-formed.

def set (   self,
  key,
  val,
  env = None 
)

Changes the value for the setting specified by 'key' to the new value.

By default this will change the current environment, but you can change values in other environments by passing the name of that environment as the 'env' parameter.


Member Data Documentation

dictionary env_dct [static]
Initial value:
{
            "identity_type": "CLOUD_ID_TYPE",
            "auth_endpoint": "CLOUD_AUTH_ENDPOINT",
            "keyring_username": "CLOUD_KEYRING_USER",
            "region": "CLOUD_REGION",
            "tenant_id": "CLOUD_TENANT_ID",
            "tenant_name": "CLOUD_TENANT_NAME",
            "encoding": "CLOUD_ENCODING",
            "custom_user_agent": "CLOUD_USER_AGENT",
            "debug": "CLOUD_DEBUG",
            "verify_ssl": "CLOUD_VERIFY_SSL",
            }

Property Documentation

environment [static]
Initial value:
property(_getEnvironment, _setEnvironment, None,
            """Users can define several environments for use with pyrax. Thisholds the name of the current environment they are working in.Changing this value will discard any existing authenticationcredentials, and will set all the individual clients for cloudservices, such as `pyrax.cloudservers`, to None. You mustauthenticate against the new environment with the credentialsappropriate for that cloud provider.""")

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties