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

This class represents a MySQL instance in the cloud. More...

Inheritance diagram for CloudDatabaseInstance:
BaseResource

List of all members.

Public Member Functions

def __init__
def get
 Need to override the default get() behavior by making the 'volume' attribute into a CloudDatabaseVolume object instead of the raw dict.
def list_databases
 Returns a list of the names of all databases for this instance.
def list_users
 Returns a list of the names of all users for this instance.
def get_user
 Finds the user in this instance with the specified name, and returns a CloudDatabaseUser object.
def get_database
 Finds the database in this instance with the specified name, and returns a CloudDatabaseDatabase object.
def create_database
 Creates a database with the specified name.
def create_user
 Creates a user with the specified name and password, and gives that user access to the specified database(s).
def delete_database
 Deletes the specified database.
def change_user_password
 Changes the password for the user to the supplied value.
def list_user_access
 Returns a list of all database names for which the specified user has access rights.
def grant_user_access
 Gives access to the databases listed in `db_names` to the user.
def revoke_user_access
 Revokes access to the databases listed in `db_names` for the user.
def delete_user
 Deletes the specified user.
def enable_root_user
 Enables login from any host for the root user and provides the user with a generated root password.
def root_user_status
 Returns True or False, depending on whether the root user for this instance has been enabled.
def restart
 Restarts this instance.
def resize
 Set the size of this instance to a different flavor.
def resize_volume
 Changes the size of the volume for this instance.

Public Attributes

 volume

Properties

 flavor = property(_get_flavor, _set_flavor)

Detailed Description

This class represents a MySQL instance in the cloud.


Constructor & Destructor Documentation

def __init__ (   self,
  args,
  kwargs 
)

Member Function Documentation

def change_user_password (   self,
  user,
  new_pass 
)

Changes the password for the user to the supplied value.

Returns None upon success; raises PasswordChangeFailed if the call does not complete successfully.

def create_database (   self,
  name,
  character_set = None,
  collate = None 
)

Creates a database with the specified name.

If a database with that name already exists, a BadRequest (400) exception will be raised.

def create_user (   self,
  name,
  password,
  database_names 
)

Creates a user with the specified name and password, and gives that user access to the specified database(s).

If a user with that name already exists, a BadRequest (400) exception will be raised.

def delete_database (   self,
  name_or_obj 
)

Deletes the specified database.

If no database by that name exists, no exception will be raised; instead, nothing at all is done.

def delete_user (   self,
  user 
)

Deletes the specified user.

If no user by that name exists, no exception will be raised; instead, nothing at all is done.

def enable_root_user (   self)

Enables login from any host for the root user and provides the user with a generated root password.

def get (   self)

Need to override the default get() behavior by making the 'volume' attribute into a CloudDatabaseVolume object instead of the raw dict.

Reimplemented from BaseResource.

def get_database (   self,
  name 
)

Finds the database in this instance with the specified name, and returns a CloudDatabaseDatabase object.

If no match is found, a NoSuchDatabase exception is raised.

def get_user (   self,
  name 
)

Finds the user in this instance with the specified name, and returns a CloudDatabaseUser object.

If no match is found, a NoSuchDatabaseUser exception is raised.

def grant_user_access (   self,
  user,
  db_names,
  strict = True 
)

Gives access to the databases listed in `db_names` to the user.

def list_databases (   self)

Returns a list of the names of all databases for this instance.

def list_user_access (   self,
  user 
)

Returns a list of all database names for which the specified user has access rights.

def list_users (   self)

Returns a list of the names of all users for this instance.

def resize (   self,
  flavor 
)

Set the size of this instance to a different flavor.

def resize_volume (   self,
  size 
)

Changes the size of the volume for this instance.

def restart (   self)

Restarts this instance.

def revoke_user_access (   self,
  user,
  db_names,
  strict = True 
)

Revokes access to the databases listed in `db_names` for the user.

def root_user_status (   self)

Returns True or False, depending on whether the root user for this instance has been enabled.


Member Data Documentation


Property Documentation

flavor = property(_get_flavor, _set_flavor) [static]

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