获取资源被引用的内存快照组

GET/zstack/v1/memory-snapshots/group/reference

Headers

Authorization: OAuth the-session-uuid

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/memory-snapshots/group/reference?resourceUuid=293e9dd057c831608cf59cd377ba0d03&resourceType=L3NetworkVO

参数列表

名字类型位置描述可选值起始版本
resourceUuidStringquery资源UUID 4.4.24
resourceTypeStringquery资源类型 4.4.24
systemTags (可选)Listquery系统标签 4.4.24
userTags (可选)Listquery用户标签 4.4.24

API返回

{
  "inventories": [
    {
      "uuid": "22f6a9534922339f95c15db177ac2c75",
      "snapshotCount": 1.0,
      "name": "group",
      "vmInstanceUuid": "e5c0251850be3ffe85db33e7ecf12b75",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM",
      "volumeSnapshotRefs": [
        {
          "volumeSnapshotUuid": "bfb9af2450753ac292c46c3afcadd7a6",
          "volumeSnapshotGroupUuid": "22f6a9534922339f95c15db177ac2c75",
          "deviceId": 0.0,
          "snapshotDeleted": false,
          "volumeUuid": "976ab88982753cc8951efd915b76573f",
          "volumeName": "ROOT-volume",
          "volumeType": "Root",
          "volumeSnapshotInstallPath": "/zstack_ps/to/path/snap.qcow2",
          "volumeSnapshotName": "group-ROOT-volume",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        }
      ]
    }
  ],
  "resourceUuid": "c8a0949c175c380db27cc5c78e8d01f7"
}
名字类型描述起始版本
resourceUuidString资源UUID4.4.24
successboolean 4.4.24
inventoriesList详情参考inventories4.4.24
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error4.4.24

inventories

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源4.4.24
snapshotCountInteger组内快照数量4.4.24
nameString资源名称4.4.24
descriptionString资源的详细描述4.4.24
vmInstanceUuidString虚拟机UUID4.4.24
createDateTimestamp创建时间4.4.24
lastOpDateTimestamp最后一次修改时间4.4.24
volumeSnapshotRefsList详情参考volumeSnapshotRefs4.4.24

volumeSnapshotRefs

名字类型描述起始版本
volumeSnapshotUuidString硬盘快照UUID4.4.24
volumeSnapshotGroupUuidString快照组UUID4.4.24
deviceIdint打快照时硬盘的加载序号4.4.24
snapshotDeletedboolean快照是否已经被删除4.4.24
volumeUuidString硬盘UUID4.4.24
volumeNameString硬盘的名字4.4.24
volumeTypeString硬盘的类型4.4.24
volumeSnapshotInstallPathString快照的安装路径4.4.24
volumeSnapshotNameString快照的名字4.4.24
createDateTimestamp创建时间4.4.24
lastOpDateTimestamp最后一次修改时间4.4.24

error

名字类型描述起始版本
codeString错误码号,错误的全局唯一标识,例如SYS.1000, HOST.10014.4.24
descriptionString错误的概要描述4.4.24
detailsString错误的详细信息4.4.24
elaborationString保留字段,默认为null4.4.24
opaqueLinkedHashMap保留字段,默认为null4.4.24
causeErrorCode根错误,引发当前错误的源错误,若无原错误,该字段为null4.4.24

SDK示例

Java SDK

GetMemorySnapshotGroupReferenceAction action = new GetMemorySnapshotGroupReferenceAction();
action.resourceUuid = "293e9dd057c831608cf59cd377ba0d03";
action.resourceType = "L3NetworkVO";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetMemorySnapshotGroupReferenceAction.Result res = action.call();

Python SDK

GetMemorySnapshotGroupReferenceAction action = GetMemorySnapshotGroupReferenceAction()
action.resourceUuid = "293e9dd057c831608cf59cd377ba0d03"
action.resourceType = "L3NetworkVO"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetMemorySnapshotGroupReferenceAction.Result res = action.call()