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
get_database
(database, instance=None)¶Get a single database
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
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)get_flavor
(flavor)¶Get a single flavor
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
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
update_instance
(instance, **attrs)¶Update a instance
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
get_instance
(instance)¶Get a single instance
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
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
get_user
(user, instance=None)¶Get a single user
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
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.