将网关节点从弹性裸金属集群卸载(DetachBareMetal2GatewayFromCluster)
API请求
URLs
DELETE zstack/v1/baremetal2/clusters/{clusterUuid}/gateways/{gatewayUuid}Headers
Authorization: OAuth the-session-uuidCurl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/baremetal2/clusters/d2b8680d85ec3ffe9e25764059f74ef3/gateways/2576cacdeef53f13963547db023b6679参数列表
| 名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
|---|---|---|---|---|---|
| clusterUuid | String | url | 集群UUID | 4.0.0 | |
| gatewayUuid | String | url | 裸金属网关节点UUID | 4.0.0 | |
| systemTags (可选) | List | body | 系统标签 | 4.0.0 | |
| userTags (可选) | List | body | 用户标签 | 4.0.0 |
API返回
返回示例
{
"inventory": {
"username": "username",
"password": "password",
"sshPort": 22.0,
"zoneUuid": "43aca62381ee4237a4cb59d164420ce6",
"name": "BM_GATEWAY",
"uuid": "3d93240bb6db464db7a8354b817b4ef8",
"description": "This is a bare metal gateway.",
"managementIp": "192.168.0.10",
"state": "Enabled",
"status": "Connected",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 4.0.0 |
| inventory | BareMetal2GatewayInventory | 详情参考inventory | 4.0.0 |
#error
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 4.0.0 |
| description | String | 错误的概要描述 | 4.0.0 |
| details | String | 错误的详细信息 | 4.0.0 |
| elaboration | String | 保留字段,默认为null | 4.0.0 |
| opaque | LinkedHashMap | 保留字段,默认为null | 4.0.0 |
| cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 4.0.0 |
#inventory
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| attachedClusterUuids | List | 挂载集群的UUID列表 | 4.0.0 |
| username | String | 用户名 | 4.0.0 |
| sshPort | Integer | SSH端口 | 4.0.0 |
| zoneUuid | String | 区域UUID | 4.0.0 |
| name | String | 资源名称 | 4.0.0 |
| uuid | String | 资源的UUID,唯一标示该资源 | 4.0.0 |
| clusterUuid | String | 集群UUID | 4.0.0 |
| description | String | 资源的详细描述 | 4.0.0 |
| managementIp | String | 管理网络IP地址 | 4.0.0 |
| hypervisorType | String | 虚拟化类型 | 4.0.0 |
| state | String | 启用状态 | 4.0.0 |
| status | String | 连接状态 | 4.0.0 |
| totalCpuCapacity | Long | CPU总量 | 4.0.0 |
| availableCpuCapacity | Long | CPU可用量 | 4.0.0 |
| cpuSockets | Integer | 4.0.0 | |
| totalMemoryCapacity | Long | 内存总量 | 4.0.0 |
| availableMemoryCapacity | Long | 内存可用量 | 4.0.0 |
| cpuNum | Integer | CPU核数 | 4.0.0 |
| createDate | Timestamp | 创建时间 | 4.0.0 |
| lastOpDate | Timestamp | 最后一次修改时间 | 4.0.0 |
| provisionNic | BareMetal2GatewayProvisionNicInventory | 详情参考provisionNic | 4.0.0 |
#provisionNic
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 4.0.0 |
| networkUuid | String | 裸金属部署网络UUID | 4.0.0 |
| interfaceName | String | 网卡名称 | 4.0.0 |
| ip | String | IP地址 | 4.0.0 |
| netmask | String | 子网掩码 | 4.0.0 |
| gateway | String | 网关地址 | 4.0.0 |
| metadata | String | 4.0.0 | |
| createDate | Timestamp | 创建时间 | 4.0.0 |
| lastOpDate | Timestamp | 最后一次修改时间 | 4.0.0 |
SDK示例
Java
SDK
DetachBareMetal2GatewayFromClusterAction action = new DetachBareMetal2GatewayFromClusterAction();
action.clusterUuid = "d2b8680d85ec3ffe9e25764059f74ef3";
action.gatewayUuid = "2576cacdeef53f13963547db023b6679";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DetachBareMetal2GatewayFromClusterAction.Result res = action.call();Python
SDK
DetachBareMetal2GatewayFromClusterAction action = DetachBareMetal2GatewayFromClusterAction()
action.clusterUuid = "d2b8680d85ec3ffe9e25764059f74ef3"
action.gatewayUuid = "2576cacdeef53f13963547db023b6679"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
DetachBareMetal2GatewayFromClusterAction.Result res = action.call()