跳转到主要内容
计算管理/主机相关接口/Kernel适配器相关接口
POSTKernel Adapter Related Interfaces起始版本 4.10.20同步需要认证

批量创建Kernel适配器

批量创建Kernel适配器

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

路径参数

请求参数

路径参数

  • l3NetworkUuidString必填

    分布式端口组UUID

请求体字段

  • paramsObject必填

    请求体参数结构

    • structsList必填

      Kernel适配器结构体列表

    • trafficTypesList

      流量类型

  • systemTagsList

    系统标签

  • userTagsList

    用户标签

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • successboolean必填

    操作是否成功。

  • resultsList必填

    详情参考results

    • errorErrorCode必填

      详情参考error

      • codeString必填

        错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

      • descriptionString必填

        错误的概要描述

      • detailsString必填

        错误的详细信息

      • elaborationString必填

        保留字段,默认为null

      • opaqueLinkedHashMap必填

        保留字段,默认为null

      • causeErrorCode必填

        根错误,引发当前错误的源错误,若无原错误,该字段为null

    • inventoryHostKernelInterfaceInventory必填

      详情参考inventory

      • uuidString必填

        资源的UUID,唯一标示该资源

      • nameString必填

        资源名称

      • descriptionString必填

        资源的详细描述

      • hostUuidString必填

        主机UUID

      • l2NetworkUuidString必填

        分布式交换机UUID

      • l3NetworkUuidString必填

        分布式端口组UUID

      • trafficTypesList必填

        流量类型

      • createDateTimestamp必填

        创建时间

      • lastOpDateTimestamp必填

        最后一次修改时间

      • usedIpsList必填

        详情参考usedIps

        • hostKernelInterfaceUuidString必填

          Kernel适配器的UUID

        • uuidString必填

          资源的UUID,唯一标示该资源

        • ipRangeUuidString必填

          IP段UUID

        • l3NetworkUuidString必填

          分布式端口组UUID

        • ipVersionInteger必填

          IP协议号

        • ipString必填

          IP地址

        • netmaskString必填

          子网掩码

        • gatewayString必填

          网关地址

        • usedForString必填

          分配原因

        • ipInLongLong必填

          Long存储的IP地址,仅ipv4有效

        • vmNicUuidString必填

          虚拟机网卡UUID

        • createDateTimestamp必填

          创建时间

        • lastOpDateTimestamp必填

          最后一次修改时间

  • errorErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • codeString必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

请求地址

POST/zstack/v1/l3-networks/{l3NetworkUuid}/kernel-interfaces

/zstack/v1/l3-networks/{l3NetworkUuid}/kernel-interfaces

操作 ID

BatchCreateHostKernelInterface

永久链接

请求示例

curl -X POST 'http://{host}/zstack/v1/l3-networks/{l3NetworkUuid}/kernel-interfaces' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"structs":["<structs>"],"trafficTypes":["<trafficTypes>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

响应示例

200
{ "results": [ { "inventory": { "uuid": "ff054502e59933a8a494cea5dc88d700", "name": "host-kernel-interface", "description": "example", "hostUuid": "ff0192fa70113da886101145c084bd00", "l2NetworkUuid": "ff0915ef0d3e32708d3150708a72c400", "l3NetworkUuid": "ff07d561c51c3ef996d682825dcff700", "usedIps": [ { "hostKernelInterfaceUuid": "ff054502e59933a8a494cea5dc88d700", "uuid": "ff0d1627c13c3337a92767d011d03a00", "l3NetworkUuid": "ff07d561c51c3ef996d682825dcff700", "ipVersion": 4, "ip": "192.168.0.2", "netmask": "255.255.255.0", "ipInLong": 3232235522, "ipInBinary": [ -64, -88, 0, 2 ], "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM" } ], "trafficTypes": [ "Management" ], "createDate": "Nov 14, 2017 2:20:57 PM", "lastOpDate": "Nov 14, 2017 2:20:57 PM" } } ] }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史