troveclient.v1.instances module

troveclient.v1.instances module

class troveclient.v1.instances.DatastoreLog(manager, info, loaded=False)

Bases: troveclient.base.Resource

A DatastoreLog is a log on the database guest instance.

class troveclient.v1.instances.Instance(manager, info, loaded=False)

Bases: troveclient.base.Resource

An Instance is an opaque instance used to store Database instances.

delete()

Delete the instance.

detach_replica()

Stops the replica database from being replicated to.

force_delete()

Force delete the instance

list_databases()
restart()

Restart the database instance.

class troveclient.v1.instances.InstanceStatus

Bases: object

ACTIVE = 'ACTIVE'
BLOCKED = 'BLOCKED'
BUILD = 'BUILD'
EJECTING = 'EJECTING'
FAILED = 'FAILED'
LOGGING = 'LOGGING'
PROMOTING = 'PROMOTING'
REBOOT = 'REBOOT'
RESIZE = 'RESIZE'
RESTART_REQUIRED = 'RESTART_REQUIRED'
SHUTDOWN = 'SHUTDOWN'
class troveclient.v1.instances.Instances(api)

Bases: troveclient.base.ManagerWithFind

Manage Instance resources.

backups(instance, limit=None, marker=None)

Get the list of backups for a specific instance.

Parameters:
  • instance – instance for which to list backups
  • limit – max items to return
  • marker – marker start point
Return type:

list of Backups.

configuration(instance)

Get a configuration on instances.

Return type:Instance
create(name, flavor_id, volume=None, databases=None, users=None, restorePoint=None, availability_zone=None, datastore=None, datastore_version=None, nics=None, configuration=None, replica_of=None, replica_count=None, modules=None, locality=None, region_name=None)

Create (boot) a new instance.

delete(instance)

Delete the specified instance.

Parameters:instance – A reference to the instance to delete
edit(instance, configuration=None, name=None, detach_replica_source=False, remove_configuration=False)
eject_replica_source(instance)

Eject a replica source from its set

Parameters:instance – The Instance (or its ID) of the database instance to eject.
force_delete(instance)

Force delete the specified instance.

Parameters:instance – A reference to the instance to force delete
get(instance)

Get a specific instances.

Return type:Instance
list(limit=None, marker=None, include_clustered=False)

Get a list of all instances.

Return type:list of Instance.
log_disable(instance, log_name, discard=None)
log_discard(instance, log_name)
log_enable(instance, log_name)
log_generator(instance, log_name, publish=None, lines=50, swift=None)

Return generator to yield the last <lines> lines of guest log.

Parameters:
  • instance – The Instance (or its ID) of the database instance to get the log for.
  • log_name – The name of <log> to publish
  • publish – Publish updates before displaying log
  • lines – Display last <lines> lines of log (0 for all lines)
  • swift – Connection to swift
Return type:

generator function to yield log as chunks.

log_list(instance)

Get a list of all guest logs.

Parameters:instance – The Instance (or its ID) of the database instance to get the log for.
Return type:list of DatastoreLog.
log_publish(instance, log_name, disable=None, discard=None)
log_save(instance, log_name, publish=None, filename=None)

Saves a guest log to a file.

Parameters:
  • instance – The Instance (or its ID) of the database instance to get the log for.
  • log_name – The name of <log> to publish
  • publish – Publish updates before displaying log
Return type:

Filename to which log was saved

log_show(instance, log_name)
modify(instance, configuration=None)
module_apply(instance, modules)

Apply modules to an instance.

module_query(instance)

Query an instance about installed modules.

module_remove(instance, module)

Remove a module from an instance.

module_retrieve(instance, directory=None, prefix=None)

Retrieve the module data file from an instance. This includes the contents of the module data file.

modules(instance)

Get the list of modules for a specific instance.

promote_to_replica_source(instance)

Promote a replica to be the new replica_source of its set

Parameters:instance – The Instance (or its ID) of the database instance to promote.
reset_status(instance)

Reset the status of an instance.

Parameters:instance – A reference to the instance
resize_instance(instance, flavor_id)

Resizes an instance with a new flavor.

resize_volume(instance, volume_size)

Resize the volume on an existing instances.

resource_class

alias of Instance

restart(instance)

Restart the database instance.

Parameters:instance – The Instance (or its ID) of the database instance to restart.
upgrade(instance, datastore_version)

Upgrades an instance with a new datastore version.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.