For details on how to use database, see Using OpenStack Database
The database high-level interface is available through the database
member of a Connection object. The
database member will only be added if the service is detected.
openstack.database.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)create_database(instance, **attrs)Create a new database from attributes
delete_database(database, instance=None, ignore_missing=True)Delete a database
database – The value can be either the ID of a database or a
Database instance.
instance – This parameter needs to be specified when
an ID is given as database.
It can be either the ID of an instance
or a Instance
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the database does not exist.
When set to True, no exception will be set when
attempting to delete a nonexistent database.
None
find_database(name_or_id, instance, ignore_missing=True)Find a single database
name_or_id – The name or ID of a database.
instance – This can be either the ID of an instance
or a Instance
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the resource does not exist.
When set to True, None will be returned when
attempting to find a nonexistent resource.
One Database or None
databases(instance, **query)Return a generator of databases
get_database(database, instance=None)Get a single database
openstack.database.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)find_flavor(name_or_id, ignore_missing=True)Find a single flavor
name_or_id – The name or ID of a flavor.
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the resource does not exist.
When set to True, None will be returned when
attempting to find a nonexistent resource.
One Flavor or None
get_flavor(flavor)Get a single flavor
flavors(**query)Return a generator of flavors
query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
A generator of flavor objects
openstack.database.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)create_instance(**attrs)Create a new instance from attributes
delete_instance(instance, ignore_missing=True)Delete an instance
instance – The value can be either the ID of an instance or a
Instance instance.
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the instance does not exist.
When set to True, no exception will be set when
attempting to delete a nonexistent instance.
None
find_instance(name_or_id, ignore_missing=True)Find a single instance
name_or_id – The name or ID of a instance.
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the resource does not exist.
When set to True, None will be returned when
attempting to find a nonexistent resource.
One Instance or None
get_instance(instance)Get a single instance
instances(**query)Return a generator of instances
query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
A generator of instance objects
openstack.database.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)create_user(instance, **attrs)Create a new user from attributes
delete_user(user, instance=None, ignore_missing=True)Delete a user
user – The value can be either the ID of a user or a
User instance.
instance – This parameter needs to be specified when
an ID is given as user.
It can be either the ID of an instance
or a Instance
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the user does not exist.
When set to True, no exception will be set when
attempting to delete a nonexistent user.
None
find_user(name_or_id, instance, ignore_missing=True)Find a single user
name_or_id – The name or ID of a user.
instance – This can be either the ID of an instance
or a Instance
ignore_missing (bool) – When set to False
ResourceNotFound will be
raised when the resource does not exist.
When set to True, None will be returned when
attempting to find a nonexistent resource.
One User or None
users(instance, **query)Return a generator of users
get_user(user, instance=None)Get a single user
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.