-
Notifications
You must be signed in to change notification settings - Fork 21
自动生成API文档样板
zhangxin edited this page Dec 27, 2016
·
3 revisions
在这里填写API描述
URLs
PUT /vm-instances/{uuid}/actions
Headers
OAuth: the-session-uuid
Body
{
"startVmInstance": {
"uuid": "e70a87021489444da7cb92a380282ba1"
},
"systemTags": [],
"userTags": []
}
上述示例中
systemTags
、userTags
字段可以省略。列出是为了表示body中可以包含这两个字段。
参数列表
名字 | 类型 | 描述 | 默认可选值 | 起始版本 |
---|---|---|---|---|
uuid | String | 0.6 | ||
clusterUuid (可选) | String | 0.6 | ||
hostUuid (可选) | String | 0.6 |
{
"inventory": {
"uuid": "5291d7c5b9754c1a8443bea04be04bf4",
"name": "Test-VM",
"description": "web server VM",
"zoneUuid": "a66dcbb6b1d14ddea39b8df364b531d7",
"clusterUuid": "f4e0cd648fc54e04abcf7f8d8da22a43",
"imageUuid": "648e250a0f9d43d999e9c28bd063dea8",
"hostUuid": "01459d81a03c44e38c70aeac1a731ef6",
"lastHostUuid": "fd98d64401184ddaaadb9f89b1d022b9",
"instanceOfferingUuid": "7ca600ce04374ba7830d460c75d4fde2",
"rootVolumeUuid": "75ad5d74e51a41678405eb5cf90396ae",
"platform": "Linux",
"defaultL3NetworkUuid": "75673f97cad346c2a2ad534849b9de56",
"type": "UserVm",
"hypervisorType": "KVM",
"memorySize": 8.589934592E9,
"cpuNum": 1.0,
"allocatorStrategy": "LastHostPreferredAllocatorStrategy",
"createDate": "Dec 27, 2016 2:24:57 PM",
"lastOpDate": "Dec 27, 2016 2:24:57 PM",
"state": "Running",
"vmNics": [
{
"uuid": "9c8246cfa1a0480ab59ccf04da8f225c",
"vmInstanceUuid": "5291d7c5b9754c1a8443bea04be04bf4",
"usedIpUuid": "c4c82cc3a6624175ab23747a70a0409e",
"l3NetworkUuid": "75673f97cad346c2a2ad534849b9de56",
"ip": "192.168.1.10",
"mac": "00:0c:29:bd:99:fc",
"netmask": "255.255.255.0",
"gateway": "192.168.1.1",
"deviceId": 0.0,
"createDate": "Dec 27, 2016 2:24:57 PM",
"lastOpDate": "Dec 27, 2016 2:24:57 PM"
}
],
"allVolumes": [
{
"uuid": "75ad5d74e51a41678405eb5cf90396ae",
"name": "Root-Volume-For-VM-5291d7c5b9754c1a8443bea04be04bf4",
"primaryStorageUuid": "4d140c5dba294b688d7c5b45e1429bdf",
"vmInstanceUuid": "5291d7c5b9754c1a8443bea04be04bf4",
"diskOfferingUuid": "5ea35d926dce4d2f9a876a6f16c101c9",
"rootImageUuid": "648e250a0f9d43d999e9c28bd063dea8",
"installPath": "/zstack_ps//rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-75ad5d74e51a41678405eb5cf90396ae/75ad5d74e51a41678405eb5cf90396ae.qcow2",
"type": "Root",
"format": "qcow2",
"size": 1.073741824E11,
"actualSize": 2.147483648E10,
"deviceId": 0.0,
"state": "Enabled",
"status": "Ready",
"createDate": "Dec 27, 2016 2:24:57 PM",
"lastOpDate": "Dec 27, 2016 2:24:57 PM"
}
]
},
"success": true
}
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 详情参考error | |
inventory | VmInstanceInventory | 详情参考inventory |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | ||
description | String | 资源的详细描述 | |
details | String | ||
elaboration | String | ||
opaque | LinkedHashMap | ||
cause | ErrorCode | 详情参考cause |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | |
name | String | 资源名称 | |
description | String | 资源的详细描述 | |
zoneUuid | String | 区域UUID | |
clusterUuid | String | 集群UUID | |
imageUuid | String | 镜像UUID | |
hostUuid | String | 物理机UUID | |
lastHostUuid | String | ||
instanceOfferingUuid | String | 计算规格UUID | |
rootVolumeUuid | String | ||
platform | String | ||
defaultL3NetworkUuid | String | ||
type | String | ||
hypervisorType | String | ||
memorySize | Long | ||
cpuNum | Integer | ||
cpuSpeed | Long | ||
allocatorStrategy | String | ||
createDate | Timestamp | 创建时间 | |
lastOpDate | Timestamp | 最后一次修改时间 | |
state | String | ||
vmNics | List | 详情参考vmNics | |
allVolumes | List | 详情参考allVolumes |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | |
vmInstanceUuid | String | 云主机UUID | |
l3NetworkUuid | String | 三层网络UUID | |
ip | String | ||
mac | String | ||
netmask | String | ||
gateway | String | ||
metaData | String | ||
deviceId | Integer | ||
createDate | Timestamp | 创建时间 | |
lastOpDate | Timestamp | 最后一次修改时间 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | |
name | String | 资源名称 | |
description | String | 资源的详细描述 | |
primaryStorageUuid | String | 主存储UUID | |
vmInstanceUuid | String | 云主机UUID | |
diskOfferingUuid | String | 云盘规格UUID | |
rootImageUuid | String | ||
installPath | String | ||
type | String | ||
format | String | ||
size | Long | ||
actualSize | Long | ||
deviceId | Integer | ||
state | String | ||
status | String | ||
createDate | Timestamp | 创建时间 | |
lastOpDate | Timestamp | 最后一次修改时间 |