文档目录

获取VM Emulator Pin在那些物理机的cpu上(GetVmEmulatorPinning)

API请求

URLs
GET zstack/v1/vm-instances/{uuid}/emulator-pinning
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/vm-instances/1dd7af3a42403a1d9b3734f5ed573103/emulator-pinning
参数列表
名字 类型 位置 描述 可选值 起始版本
uuid String url 资源的UUID,唯一标示该资源 4.3.12
systemTags (可选) List body 4.3.12
userTags (可选) List body 4.3.12

API返回

该API成功时返回一个空的JSON结构{},出错时返回的JSON结构包含一个error字段,例如:
{"emulatorPinning":"12,13"}
名字 类型 描述 起始版
emulatorPinning String vm Emulator Pinning的物理机cpu编号 4.3.12
error ErrorCode 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error 4.3.12
#error
名字 类型 描述 起始版本
code String 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 4.3.12
description String 错误的概要描述 4.3.12
details String 错误的详细信息 4.3.12
elaboration String 保留字段,默认为null 4.3.12
opaque LinkedHashMap 保留字段,默认为null 4.3.12
cause ErrorCode 根错误,引发当前错误的源错误,若无原错误,该字段为null 4.3.12

SDK示例

Java SDK
GetVmEmulatorPinningAction action = new GetVmEmulatorPinningAction();
action.uuid = "1dd7af3a42403a1d9b3734f5ed573103";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetVmEmulatorPinningAction.Result res = action.call();
Python SDK
GetVmEmulatorPinningAction action = GetVmEmulatorPinningAction()
action.uuid = "1dd7af3a42403a1d9b3734f5ed573103"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetVmEmulatorPinningAction.Result res = action.call()
开发手册 | 4.8.38 | ZStack Cloud · ZCF | ZStack 资源中心