novaclient.v2.hypervisors 模块

Hypervisors 接口

class novaclient.v2.hypervisors.Hypervisor(manager, info, loaded=False, resp=None)

基类: Resource

填充并绑定到管理器。

参数:
  • manager – BaseManager 对象

  • info – 表示资源属性的字典

  • loaded – 如果设置为 True,则防止延迟加载

  • resp – 响应或响应对象列表

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

基类: ManagerWithFind

get(hypervisor)

获取特定的 hypervisor。

参数:

hypervisor – 要么是 Hypervisor 对象,要么是 ID。从 microversion 2.53 开始,ID 必须是 UUID 值。

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

获取 hypervisor 列表。

参数:
  • detailed – 包含详细响应。

  • marker – 从该 hypervisor ID 表示的 hypervisor 列表之后的位置开始返回 hypervisor。从 microversion 2.53 开始,marker 必须是 UUID hypervisor ID。(可选)。

  • limit – 要返回的最大 hypervisor 数量(可选)。请注意,API 服务器具有可配置的默认限制。如果此处未指定限制或限制大于默认值,则将使用默认限制。

resource_class

别名 Hypervisor

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

获取匹配的 hypervisor 列表。

参数:
  • hypervisor_match – hypervisor 主机名或其一部分。使用此模式匹配主机名来选择 hypervisor 主机。

  • servers – 如果为 True,则检索服务器信息。

  • detailed – 如果为 True,则返回详细的 hypervisor 信息。这需要 API 版本 2.53 或更高版本。

statistics()

获取所有计算节点上的 hypervisor 统计信息。

为了向后兼容,新代码应调用 hypervisor_stats.statistics() 而不是 hypervisors.statistics()

uptime(hypervisor)

获取特定 hypervisor 的运行时间。

参数:

hypervisor – 要么是 Hypervisor 对象,要么是 ID。从 microversion 2.53 开始,ID 必须是 UUID 值。

class novaclient.v2.hypervisors.HypervisorStats(manager, info, loaded=False, resp=None)

基类: Resource

填充并绑定到管理器。

参数:
  • manager – BaseManager 对象

  • info – 表示资源属性的字典

  • loaded – 如果设置为 True,则防止延迟加载

  • resp – 响应或响应对象列表

class novaclient.v2.hypervisors.HypervisorStatsManager(api)

基类: Manager

resource_class

别名 HypervisorStats

statistics()