|
pyrax
Python Bindings for the Rackspace Cloud
|
This is the primary class for interacting with Cloud Databases. More...
Public Member Functions | |
| def | list_databases |
| Returns all databases for the specified instance. | |
| def | create_database |
| Creates a database with the specified name on the given instance. | |
| def | get_database |
| Finds the database in the given instance with the specified name, and returns a CloudDatabaseDatabase object. | |
| def | delete_database |
| Deletes the database by name on the given instance. | |
| def | list_users |
| Returns all users for the specified instance. | |
| def | create_user |
| Creates a user with the specified name and password, and gives that user access to the specified database(s). | |
| def | get_user |
| Finds the user in the given instance with the specified name, and returns a CloudDatabaseUser object. | |
| def | delete_user |
| Deletes the user by name on the given instance. | |
| def | change_user_password |
| Changes the password for the user of the specified instance to the supplied value. | |
| def | list_user_access |
| Returns a list of all database names for which the specified user has access rights on the specified instance. | |
| def | grant_user_access |
| Gives access to the databases listed in `db_names` to the user on the specified instance. | |
| def | revoke_user_access |
| Revokes access to the databases listed in `db_names` for the user on the specified instance. | |
| def | enable_root_user |
| This enables login from any host for the root user and provides the user with a generated root password. | |
| def | root_user_status |
| Returns True if the given instance is root-enabled. | |
| def | restart |
| Restarts the instance. | |
| def | resize |
| Sets the size of the instance to a different flavor. | |
| def | list_flavors |
| Returns a list of all available Flavors. | |
| def | get_flavor |
| Returns a specific Flavor object by ID. | |
Static Public Attributes | |
| string | name = "Cloud Databases" |
This is the primary class for interacting with Cloud Databases.
| def change_user_password | ( | self, | |
| instance, | |||
| user, | |||
| new_pass | |||
| ) |
Changes the password for the user of the specified instance to the supplied value.
Returns None upon success; raises PasswordChangeFailed if the call does not complete successfully.
| def create_database | ( | self, | |
| instance, | |||
| name, | |||
character_set = None, |
|||
collate = None |
|||
| ) |
Creates a database with the specified name on the given instance.
| def create_user | ( | self, | |
| instance, | |||
| name, | |||
| password, | |||
| database_names | |||
| ) |
Creates a user with the specified name and password, and gives that user access to the specified database(s).
| def delete_database | ( | self, | |
| instance, | |||
| name | |||
| ) |
Deletes the database by name on the given instance.
| def delete_user | ( | self, | |
| instance, | |||
| name | |||
| ) |
Deletes the user by name on the given instance.
| def enable_root_user | ( | self, | |
| instance | |||
| ) |
This enables login from any host for the root user and provides the user with a generated root password.
| def get_database | ( | self, | |
| instance, | |||
| name | |||
| ) |
Finds the database in the given instance with the specified name, and returns a CloudDatabaseDatabase object.
If no match is found, a NoSuchDatabase exception is raised.
| def get_flavor | ( | self, | |
| flavor_id | |||
| ) |
Returns a specific Flavor object by ID.
| def get_user | ( | self, | |
| instance, | |||
| name | |||
| ) |
Finds the user in the given instance with the specified name, and returns a CloudDatabaseUser object.
If no match is found, a NoSuchUser exception is raised.
| def grant_user_access | ( | self, | |
| instance, | |||
| user, | |||
| db_names, | |||
strict = True |
|||
| ) |
Gives access to the databases listed in `db_names` to the user on the specified instance.
| def list_databases | ( | self, | |
| instance | |||
| ) |
Returns all databases for the specified instance.
| def list_flavors | ( | self | ) |
Returns a list of all available Flavors.
| def list_user_access | ( | self, | |
| instance, | |||
| user | |||
| ) |
Returns a list of all database names for which the specified user has access rights on the specified instance.
| def list_users | ( | self, | |
| instance | |||
| ) |
Returns all users for the specified instance.
| def resize | ( | self, | |
| instance, | |||
| flavor | |||
| ) |
Sets the size of the instance to a different flavor.
| def restart | ( | self, | |
| instance | |||
| ) |
Restarts the instance.
| def revoke_user_access | ( | self, | |
| instance, | |||
| user, | |||
| db_names, | |||
strict = True |
|||
| ) |
Revokes access to the databases listed in `db_names` for the user on the specified instance.
| def root_user_status | ( | self, | |
| instance | |||
| ) |
Returns True if the given instance is root-enabled.
string name = "Cloud Databases" [static] |
Reimplemented from BaseClient.
1.7.6.1