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
diskSize The disk size. Unit: byte. For more information, see Disk Size. 0.6
state The state. For more information, see State.
  • Enabled
  • Disabled
0.6
type The reserved field.
  • zstack
0.6
allocatorStrategy The allocator strategy. For more information, see Allocator Strategy.
  • DefaultHostAllocatorStrategy
  • LastHostPreferredAllocatorStrategy
  • LeastVmPreferredHostAllocatorStrategy
  • MinimumCPUUsageHostAllocatorStrategy
  • MinimumMemoryUsageHostAllocatorStrategy
  • MaxInstancePerHostHostAllocatorStrategy
0.6
sortKey 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

Sample

{
    "inventories": [
        {
            "allocatorStrategy": "DefaultPrimaryStorageAllocationStrategy",
            "createDate": "Oct 30, 2017 3:09:45 PM",
            "description": "",
            "diskSize": 10737418240,
            "lastOpDate": "Oct 30, 2017 3:09:45 PM",
            "name": "10G",
            "sortKey": 0,
            "state": "Enabled",
            "type": "DefaultDiskOfferingType",
            "uuid": "6c2385bb60f84c269504ca6ea71fe2d1"
        }
    ],
    "success": true
}

Disk Size

DiskSize defines the virtual size of a volume. Virtual size is the size that a volume claims for. In other word, the virtual size is the maximum size that a volume can occupy in storage system after it is fully filled.

State

A disk offering has the following two states:
  • Enabled:

    Indicates that volumes can be created from this disk offering.

  • Disabled:

    Indicates that volumes cannot be created from this disk offering.

Allocator Strategy

Allocator strategy defines how ZStack Cloud selects a primary storage when creating a new volume. Currently, the only supported strategy is DefaultPrimaryStorageAllocationStrategy, which finds a primary storage according to the following conditions:
1. The state is Enabled.
2. The status is Connected.
3. The available capacity (availableCapacity) is greater than the disk size (diskSize) of the disk offering.
4. The primary storage is attached to the cluster that runs the VM instance to which the volume will be attached.