Zone
Overview
A zone is a logical group of resources such as clusters, L2 networks, and primary storages. Zone is the largest resource scope defined in ZStack Cloud.
When you organize a zone, note that:
- Hosts in the same physical layer 2 broadcast domain must be in the same zone. These hosts can be grouped as one or more clusters.
- A physical layer 2 broadcast domain cannot span multiple zones. Instead, it must be mapped as an L2 network in a single zone.
- A primary storage cannot span multiple zones. Instead, it should be mapped as the primary storage in a single zone.
- A data center can have multiple zones.
- A zone can have one or more backup storages attached.
- Resources in a zone, such as a primary storage, can only access the backup storage that is attached to the zone.
- A backup storage can be detached from a zone. After the backup storage is detached, resources in the zone will not see the backup storage any more.
- If a backup storage is no longer accessible to resources of a zone due to network typology changes in a data center, you can detach the backup storage from this zone.
Inventory
Properties
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 0.6 | ||
| name | The name. For more information, see Resource Property. | 0.6 | ||
| description | The description. For more information, see Resource Property. | Yes | 0.6 | |
| state | The state. For more information, see Resource Property. |
|
0.6 | |
| createDate | The creation date. For more information, see Resource Property. | 0.6 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 0.6 | ||
| type | The reserved field. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ZoneVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ZoneVO. | Yes | 0.6 |
Sample
{
"createDate": "Oct 16, 2017 2:11:40 PM",
"description": "",
"lastOpDate": "Oct 24, 2017 10:52:31 AM",
"name": "SH",
"state": "Enabled",
"type": "zstack",
"uuid": "61092e77aedd41f0b8857b40652e5b1e"
}
State
- A zone has the following two states: Enabled and Disabled.
- When you change the state of a zone, the change operation will be cascaded to all clusters and hosts that belong to the zone.
- For example, disabling a zone will change the state of all clusters and hosts in this zone to Disabled. Because no VM instance can be created or started on a disabled host, you can put a zone into Disabled state to prevent any VM instances from being created or started in this zone. This will not affect the use and restart of existing VM instances.
Operations
CreateZone
Creates a zone. For
example,
CreateZone name='San Jose Zone' description='this is a zone in San Jose datacenter'Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The resource name. For more information, see Resource Property. | 0.6 | ||
| resourceUuid | The resource UUID. For more information, see Resource Property. | Yes | 0.6 | |
| description | The resource description. For more information, see Resource Property. | Yes | 0.6 | |
| type | The reserved field for internal use. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ZoneVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ZoneVO. | Yes | 0.6 | |
| timeout | Yes |
DeleteZone
Deletes a zone. For
example,
DeleteZone uuid=28e94936284b45f99842ababfc3f976dParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The zone UUID. | 0.6 | ||
| deleteMode | The delete mode. For more information, see DeleteResources. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ZoneVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ZoneVO. | Yes | 0.6 | |
| timeout | Yes |
QueryZone
Queries a zone. For
example,
QueryZone name=zone1QueryZone vmInstance.uuid=13238c8e0591444e9160df4d3636be82Primitive Fields of Query
See Zone Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vmInstance | VM Instance Inventory | The VM instance that belongs to this zone. | 0.6 |
| cluster | Cluster Inventory | The cluster that belongs to this zone. | 0.6 |
| host | Host Inventory | The host that belongs to this zone. | 0.6 |
| primaryStorage | Primary Storage Inventory | The primary storage that belongs to this zone. | 0.6 |
| l2Network | L2 Network Inventory | The L2 network that belongs to this zone. | 0.6 |
| l3Network | L3 Network Inventory | The L3 network that belongs to this zone. | 0.6 |
| backupStorage | Backup Storage Inventory | The backup storage that belongs to this zone. | 0.6 |
UpdateZone
Updates the name, description, and tags of a zone. For
example,
UpdateZone uuid=61092e77aedd41f0b8857b40652e5b1e name=updateParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The zone UUID. | 0.6 | ||
| name | The resource name. For more information, see Resource Property. | Yes | 0.6 | |
| description | The resource description. For more information, see Resource Property. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ZoneVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ZoneVO. | Yes | 0.6 | |
| timeout | Yes |
ChangeZoneState
Changes the state of a zone. For
example,
ChangeZoneState stateEvent=enable uuid=737896724f2645de9372f11b13a48223Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The zone UUID. | 0.6 | ||
| stateEvent |
The state event.
|
|
0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is ZoneVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is ZoneVO. | Yes | 0.6 | |
| timeout | Yes |
Tags
You can create a user tag on a zone by using resourceType=ZoneVO. For
example,
CreateUserTag resourceType=ZoneVO resourceUuid=0cd1ef8c9b9e0ba82e0cc9cc17226a26 tag=privateZoneSystem Tags
Reserved Capacity
| Tag | Description | Example | Starting Version |
|---|---|---|---|
| host::reservedMemory::{capacity} | See Host Capacity Reservation. | host::reservedMemory::1G | 0.6 |
