pyrax
Python Bindings for the Rackspace Cloud
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions
ScalingGroupManager Class Reference
Inheritance diagram for ScalingGroupManager:
BaseManager

List of all members.

Public Member Functions

def __init__
def get_state
 Returns the current state of the specified scaling group as a dictionary.
def pause
 Pauses all execution of the policies for the specified scaling group.
def resume
 Resumes execution of the policies for the specified scaling group.
def get_configuration
 Returns the scaling group's configuration in a dictionary.
def update
 Updates an existing ScalingGroup.
def update_metadata
 Adds the given metadata dict to the existing metadata for the scaling group.
def get_launch_config
 Returns the launch configuration for the specified scaling group.
def update_launch_config
 Updates the server launch configuration for an existing scaling group.
def update_launch_metadata
 Adds the given metadata dict to the existing metadata for the scaling group's launch configuration.
def add_policy
 Adds a policy with the given values to the specified scaling group.
def list_policies
 Returns a list of all policies defined for the specified scaling group.
def get_policy
 Gets the detail for the specified policy.
def update_policy
 Updates the specified policy.
def execute_policy
 Executes the specified policy for this scaling group.
def delete_policy
 Deletes the specified policy from the scaling group.
def add_webhook
 Adds a webhook to the specified policy.
def list_webhooks
 Returns a list of all webhooks for the specified policy.
def get_webhook
 Gets the detail for the specified webhook.
def update_webhook
 Updates the specified webhook.
def update_webhook_metadata
 Adds the given metadata dict to the existing metadata for the specified webhook.
def delete_webhook
 Deletes the specified webhook from the specified policy.

Constructor & Destructor Documentation

def __init__ (   self,
  api,
  resource_class = None,
  response_key = None,
  plural_response_key = None,
  uri_base = None 
)

Reimplemented from BaseManager.


Member Function Documentation

def add_policy (   self,
  scaling_group,
  name,
  policy_type,
  cooldown,
  change,
  is_percent = False 
)

Adds a policy with the given values to the specified scaling group.

The 'change' parameter is treated as an absolute amount, unless 'is_percent' is True, in which case it is treated as a percentage.

def add_webhook (   self,
  scaling_group,
  policy,
  name,
  metadata = None 
)

Adds a webhook to the specified policy.

def delete_policy (   self,
  scaling_group,
  policy 
)

Deletes the specified policy from the scaling group.

def delete_webhook (   self,
  scaling_group,
  policy,
  webhook 
)

Deletes the specified webhook from the specified policy.

def execute_policy (   self,
  scaling_group,
  policy 
)

Executes the specified policy for this scaling group.

def get_configuration (   self,
  scaling_group 
)

Returns the scaling group's configuration in a dictionary.

def get_launch_config (   self,
  scaling_group 
)

Returns the launch configuration for the specified scaling group.

def get_policy (   self,
  scaling_group,
  policy 
)

Gets the detail for the specified policy.

def get_state (   self,
  scaling_group 
)

Returns the current state of the specified scaling group as a dictionary.

def get_webhook (   self,
  scaling_group,
  policy,
  webhook 
)

Gets the detail for the specified webhook.

def list_policies (   self,
  scaling_group 
)

Returns a list of all policies defined for the specified scaling group.

def list_webhooks (   self,
  scaling_group,
  policy 
)

Returns a list of all webhooks for the specified policy.

def pause (   self,
  scaling_group 
)

Pauses all execution of the policies for the specified scaling group.

def resume (   self,
  scaling_group 
)

Resumes execution of the policies for the specified scaling group.

def update (   self,
  scaling_group,
  name = None,
  cooldown = None,
  min_entities = None,
  max_entities = None,
  metadata = None 
)

Updates an existing ScalingGroup.

One or more of the attributes can be specified.

NOTE: if you specify metadata, it will *replace* any existing metadata. If you want to add to it, you either need to pass the complete dict of metadata, or call the update_metadata() method.

def update_launch_config (   self,
  scaling_group,
  server_name = None,
  image = None,
  flavor = None,
  disk_config = None,
  metadata = None,
  personality = None,
  networks = None,
  load_balancers = None 
)

Updates the server launch configuration for an existing scaling group.

One or more of the available attributes can be specified.

NOTE: if you specify metadata, it will *replace* any existing metadata. If you want to add to it, you either need to pass the complete dict of metadata, or call the update_launch_metadata() method.

def update_launch_metadata (   self,
  scaling_group,
  metadata 
)

Adds the given metadata dict to the existing metadata for the scaling group's launch configuration.

def update_metadata (   self,
  scaling_group,
  metadata 
)

Adds the given metadata dict to the existing metadata for the scaling group.

def update_policy (   self,
  scaling_group,
  policy,
  name = None,
  policy_type = None,
  cooldown = None,
  change = None,
  is_percent = False 
)

Updates the specified policy.

One or more of the parameters may be specified.

def update_webhook (   self,
  scaling_group,
  policy,
  webhook,
  name = None,
  metadata = None 
)

Updates the specified webhook.

One or more of the parameters may be specified.

def update_webhook_metadata (   self,
  scaling_group,
  policy,
  webhook,
  metadata 
)

Adds the given metadata dict to the existing metadata for the specified webhook.


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