openstack-nova源码分析(六)availability_zone 可用区

Availability zones (os-availability-zone)
可用区 在openstack中并没有很明确的定义
注: Openstack 对于可用区的定义可能跟一些可用区定义不一样,只以openstack做分析
官方将解释为主机的聚合(Host Aggregates), 可用区在openstack中没有相应的表定义,创建更新接口则使用Host Aggregates功能,
主机组可以被认为是可用区的进一步划分,主机组只对管理员可见而可用区用户可见
然而,主机组与可用区并不是同一个概念
可用区是主机的metadata 的一组聚合
注:
1.一个主机可以属于多个主机组,但是只能属于一个可用区
2.主机默认属于default可用区,即使主机不属于任何主机组

Lists and gets detailed availability zone information.
An availability zone is created or updated by setting the availability_zone parameter 
in the create, update, or create or update methods of the Host Aggregates API. 
See Host Aggregates for more details.

官方解释为:

Host aggregates can be regarded as a mechanism to further partition an availability zone; 
while availability zones are visible to users, host aggregates are only visible to administrators

Availability Zones are the end-user visible logical abstraction for partitioning a cloud without knowing the physical infrastructure. 
That abstraction doesn’t come up in Nova with an actual database model since the availability zone is actually a specific metadata information 
attached to an aggregate. Adding that specific metadata to an aggregate makes the aggregate visible from an end-user perspective and consequently 
allows to schedule upon a specific set of hosts (the ones belonging to the aggregate).
That said, there are a few rules to know that diverge from an API perspective between aggregates and availability zones:
1.one host can be in multiple aggregates, but it can only be in one availability zone
2. by default a host is part of a default availability zone even if it doesn’t belong to an aggregate (the configuration option is named default_availability_zone)
一. url及命令行
  1. url
    url只有GET 获取列表的方法 :
/os-availability-zone
/os-availability-zone/detail
  1. 命令行
nova availability-zone-list
二. 源码
availability_zone = nova.api.openstack.compute.availability_zone:AvailabilityZone

AvailabilityZone

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值