Bases: Cloud.Cloud
A class that handles actions to Cloud Databases via public methods listed.
Creates a mysql instance using the provided flavor id and size(1-50 GB) for allocating databases to.
Arguments: flavor – Instance flavor size(int) size – Instance storage size(int) name – Instance name(string) db – List of databses with optional keys(list)
name – Database name(string) character_set – Default utf8(string) collate – Rules default is utf8_general_ci(string)
Returns: result – JSON response converted to python Dict
Lists mysql instance details. Either all or one with the provided instance id
Arguments: iId – Instance id(str)
Returns: result – JSON response converted to python Dict
Deletes mysql instance using provided instance id
Arguments: iId – Instance id(str)
Returns: status code
Enable and get root credentials for mysql instance using provided instance id Or if check=True, return status of root enabled on the instance.
Arguments: iId – Instance id(str)
Returns: JSON results as a python dict
Perfom action on instance such as reboot mysql or resize flavor/volume.
Arguments: iId – Instance id(string) reboot – Boolean flavor – Flavor id(int) volume – Storage size in GB(int)
Returns: status code
Create new database within an instance id given the provided name
Arguments: iId – Instance id(str) name – Database name(str) charset – Default utf8(string)(optional) collate – Rules default is utf8_general_ci(string)(optional)
Returns: status code
Lists databases within an instance
Arguments: id – Instance id(str)
Returns: JSON results as python dict
Deletes specified database name within specified instance id
Arguments: id – Instance id(str) name – Instance name(str)
Returns: status code
Creates a user for the specified instance, optionally to specific databases with specified name and pass.
Arguments: id – name – Name of the user for the database. password – User password for database access. databases – Optional(list of database names)
Returns: status code
Lists users associated with a specific instance
Arguments: iId – Instance id(string)
Returns: JSON results as a python dict
Lists a specified user associated with a specified instance
Arguments: iId – Instance id(string) name – User name(string)
Returns: status code
Lists a specified user associated with a specified instance
Arguments: iId – Instance id(string) name – User name(string)
Returns: status code
Grants access for the specified user to one or more databases for the specified instance.
Arguments: iId – Instance id(string) username – User name (string) dbName – New user password for database access
Returns: status code
Revokes access for the specified user to one or more databases for the specified instance.
Arguments: iId – Instance id(string) username – User name (string) dbName – New user password for database access
Returns: status code
Deletes a specified user from a specified instance
Arguments: iId – Instance id(string) name – User name(string)
Returns: status code