openstack.database.v1.instance¶
The Instance Class¶
The Instance
class inherits from Resource
.
-
class
openstack.database.v1.instance.
Instance
(attrs=None, loaded=False)¶ Construct a Resource to interact with a service’s REST API.
The Resource class offers two class methods to construct resource objects, which are preferrable to entering through this initializer. See
Resource.new()
andResource.existing()
.Parameters: -
flavor
= None¶ The flavor of the instance
-
links
= None¶ Links associated with the instance
-
name
= None¶ The name of the instance
-
status
= None¶ The status of the instance
-
volume
= None¶ The size of the volume
-
enable_root_user
(session)¶ Enable login for the root user.
This operation enables login from any host for the root user and provides the user with a generated root password.
Parameters: session ( Session
) – The session to use for making this request.Returns: A dictionary with keys name
andpassword
specifying the login credentials.
-
is_root_enabled
(session)¶ Determine if root is enabled on an instance.
Determine if root is enabled on this particular instance.
Parameters: session ( Session
) – The session to use for making this request.Returns: True
if root user is enabled for a specified database instance orFalse
otherwise.
-
restart
(session)¶ Restart the database instance
Returns: None
-
resize
(session, flavor_reference)¶ Resize the database instance
Returns: None
-
resize_volume
(session, volume_size)¶ Resize the volume attached to the instance
Returns: None
-