novaclient.v2.hypervisors module

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).
resource_class

alias of Hypervisor

search(hypervisor_match, servers=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.
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.

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.