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

This is the primary class for interacting with AutoScale. More...

Inheritance diagram for AutoScaleClient:
BaseClient

List of all members.

Public Member Functions

def get_state
 Returns the current state of the specified scaling group.
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 update
 Updates an existing ScalingGroup.
def update_metadata
 Adds the given metadata dict to the existing metadata for the scaling group.
def get_configuration
 Returns the scaling group's configuration in a dictionary.
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 the 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 defined 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 policy.

Static Public Attributes

string name = "Autoscale"

Detailed Description

This is the primary class for interacting with AutoScale.


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 policy.

def execute_policy (   self,
  scaling_group,
  policy 
)

Executes the specified policy for the 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.

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 defined 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.


Member Data Documentation

string name = "Autoscale" [static]

Reimplemented from BaseClient.


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