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

The base class for all pyrax clients. More...

Inheritance diagram for BaseClient:
AutoScaleClient CloudBlockStorageClient CloudDatabaseClient CloudDNSClient CloudLoadBalancerClient CloudMonitorClient CloudNetworkClient FakeNovaVolumeClient ImageClient QueueClient

List of all members.

Public Member Functions

def __init__
def list
 Returns a list of resource objects.
def get
 Gets a specific resource.
def create
 Creates a new resource.
def delete
 Deletes a specific resource.
def find
 Finds a single item with attributes matching ``**kwargs``.
def findall
 Finds all items with attributes matching ``**kwargs``.
def unauthenticate
 Clears all of our authentication information.
def get_timings
 Returns a list of all execution timings.
def reset_timings
 Clears the timing history.
def get_limits
 Returns a dict with the resource and rate limits for the account.
def request
 Formats the request into a dict representing the headers and body that will be used to make the API call.
def method_head
 Method used to make HEAD requests.
def method_get
 Method used to make GET requests.
def method_post
 Method used to make POST requests.
def method_put
 Method used to make PUT requests.
def method_delete
 Method used to make DELETE requests.
def method_patch
 Method used to make PATCH requests.
def authenticate
 Handles all aspects of authentication against the cloud provider.
def projectid
 The older parts of this code used 'projectid'; this wraps that reference.

Public Attributes

 version
 identity
 region_name
 endpoint_type
 service_name
 management_url
 timings
 verify_ssl
 http_log_debug
 timeout
 times

Static Public Attributes

 user_agent = None
string name = "base"

Detailed Description

The base class for all pyrax clients.


Constructor & Destructor Documentation

def __init__ (   self,
  identity,
  region_name = None,
  endpoint_type = None,
  management_url = None,
  service_name = None,
  timings = False,
  verify_ssl = True,
  http_log_debug = False,
  timeout = None 
)

Member Function Documentation

def authenticate (   self)

Handles all aspects of authentication against the cloud provider.

Currently this has only been tested with Rackspace auth; if you wish to use this library with a different OpenStack provider, you may have to modify this method. Please post your findings on GitHub so that others can benefit.

def create (   self,
  args,
  kwargs 
)

Creates a new resource.

Reimplemented in CloudMonitorClient.

def delete (   self,
  item 
)

Deletes a specific resource.

Reimplemented in CloudMonitorClient, and CloudNetworkClient.

def find (   self,
  kwargs 
)

Finds a single item with attributes matching ``**kwargs``.

This isn't very efficient: it loads the entire list then filters on the Python side.

Reimplemented in CloudMonitorClient.

def findall (   self,
  kwargs 
)

Finds all items with attributes matching ``**kwargs``.

This isn't very efficient: it loads the entire list then filters on the Python side.

Reimplemented in CloudMonitorClient.

def get (   self,
  item 
)

Gets a specific resource.

Reimplemented in CloudMonitorClient.

def get_limits (   self)

Returns a dict with the resource and rate limits for the account.

Reimplemented in CloudDatabaseClient.

def get_timings (   self)

Returns a list of all execution timings.

def list (   self,
  limit = None,
  marker = None 
)

Returns a list of resource objects.

Pagination is supported through the optional 'marker' and 'limit' parameters.

Reimplemented in CloudMonitorClient, and CloudDNSClient.

def method_delete (   self,
  uri,
  kwargs 
)

Method used to make DELETE requests.

def method_get (   self,
  uri,
  kwargs 
)

Method used to make GET requests.

Reimplemented in CloudDNSClient.

def method_head (   self,
  uri,
  kwargs 
)

Method used to make HEAD requests.

def method_patch (   self,
  uri,
  kwargs 
)

Method used to make PATCH requests.

def method_post (   self,
  uri,
  kwargs 
)

Method used to make POST requests.

def method_put (   self,
  uri,
  kwargs 
)

Method used to make PUT requests.

def projectid (   self)

The older parts of this code used 'projectid'; this wraps that reference.

def request (   self,
  uri,
  method,
  args,
  kwargs 
)

Formats the request into a dict representing the headers and body that will be used to make the API call.

def reset_timings (   self)

Clears the timing history.

def unauthenticate (   self)

Clears all of our authentication information.


Member Data Documentation

string name = "base" [static]
user_agent = None [static]

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