novaclient.v2.services module

Service interface.

class novaclient.v2.services.Service(manager, info, loaded=False, resp=None)

Bases: novaclient.base.Resource

Populate and bind to a manager.

Parameters
  • manager – BaseManager object

  • info – dictionary representing resource attributes

  • loaded – prevent lazy-loading if set to True

  • resp – Response or list of Response objects

class novaclient.v2.services.ServiceManager(api)

Bases: novaclient.base.ManagerWithFind

delete(service_id)

Delete a service.

Parameters

service_id – Before microversion 2.53, this must be an integer id and may not uniquely the service in a multi-cell deployment. Starting with microversion 2.53 this must be a UUID.

disable(service_uuid)

Disable the service specified by the service UUID ID.

Parameters

service_uuid – The UUID ID of the service to disable.

disable_log_reason(service_uuid, reason)

Disable the service with a reason.

Parameters
  • service_uuid – The UUID ID of the service to disable.

  • reason – The reason for disabling a service. The minimum length is 1 and the maximum length is 255.

enable(service_uuid)

Enable the service specified by the service UUID ID.

Parameters

service_uuid – The UUID ID of the service to enable.

force_down(service_uuid, force_down)

Update the service’s forced_down field specified by the service UUID ID.

Parameters
  • service_uuid – The UUID ID of the service.

  • force_down – Whether or not this service was forced down manually by an administrator. This value is useful to know that some 3rd party has verified the service should be marked down.

list(host=None, binary=None)

Get a list of services.

Parameters

host – destination host name.

resource_class

alias of Service