novaclient.v2.hypervisors module

Hypervisors interface

class novaclient.v2.hypervisors.Hypervisor(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

NAME_ATTR = 'hypervisor_hostname'
class novaclient.v2.hypervisors.HypervisorManager(api)

Bases: novaclient.base.ManagerWithFind

get(hypervisor)

Get a specific hypervisor.

Parameters

hypervisor – Either a Hypervisor object or an ID. Starting with microversion 2.53 the ID must be a UUID value.

is_alphanum_id_allowed = True
list(detailed=True, marker=None, limit=None)

Get a list of hypervisors.

Parameters
  • detailed – Include a detailed response.

  • marker – Begin returning hypervisors that appear later in the hypervisors list than that represented by this hypervisor ID. Starting with microversion 2.53 the marker must be a UUID hypervisor ID. (optional).

  • limit – maximum number of hypervisors to return (optional). Note the API server has a configurable default limit. If no limit is specified here or limit is larger than default, the default limit will be used.

resource_class

alias of Hypervisor

search(hypervisor_match, servers=False, detailed=False)

Get a list of matching hypervisors.

Parameters
  • hypervisor_match – The hypervisor host name or a portion of it. The hypervisor hosts are selected with the host name matching this pattern.

  • servers – If True, server information is also retrieved.

  • detailed – If True, detailed hypervisor information is returned. This requires API version 2.53 or greater.

statistics()

Get hypervisor statistics over all compute nodes.

Kept for backwards compatibility, new code should call hypervisor_stats.statistics() instead of hypervisors.statistics()

uptime(hypervisor)

Get the uptime for a specific hypervisor.

Parameters

hypervisor – Either a Hypervisor object or an ID. Starting with microversion 2.53 the ID must be a UUID value.

class novaclient.v2.hypervisors.HypervisorStats(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.hypervisors.HypervisorStatsManager(api)

Bases: novaclient.base.Manager

resource_class

alias of HypervisorStats

statistics()

Get hypervisor statistics over all compute nodes.