云服务器内容精选

  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template-binding:query-template-bindings Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "input": { "offset": 1, "limit": 10, "query-field": "and(eq(templateid,0a80900d-1e8c-4191-969e-8619d0624edd),ilike(name,vlan), eq(bindingstatus, 1))" } }
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,03 Dec 2021 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template-binding:output": { "template-binding": [ { "template-binding-id": "6be5dfb6-d051-4f09-a3a4-5672e07e68ce", "template-binding-name": "test222", "template-binding-description": "no5 descrition", "create-time": "2024-01-19T08:52:47Z", "create-time-ui": "2024-01-19 08:52:47", "device-count": 1, "deploying-device-count": 0, "deployed-lastest-success-device-count": 1, "unbound-status": false, "template": [ { "template-id": "5da7950e-70dd-46a2-8653-f2f08afaa5b6", "template-name": "campus", "template-binding-status": "last-template-deployed", "template-variable-status": "last-variable-deployed", "deploy-last-version": true } ] } ], "total-count": 1 } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 query-template-bindings 是 REFERENCE 详细请参见表2。 query template bindings. - 表2 query-template-bindings-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:input REFERENCE 详细请参见表3。 - - 表3 query-template-bindings-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 offset 否 int32 [1-2147483647] 1 query page offset, from 1 1 limit 否 int32 [1-2000] 10 query page size 100 query-field 否 string 0~128个字节。 - the filter content, support: like(ne-name,route), ilike(ne-name, route), or like(ne-name,route) and like(deploy-status, failure). the content compliance with restful get api. when use as tempalate-binding, we support like(binding-name, custom) "and(eq(templateid,0a80900d-1e8c-4191-969e-8619d0624edd),ilike(name,vlan), eq(bindingstatus, 1))"
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,03 Dec 2021 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template-binding:preview": { "content": "{\"snmpUser\":{\"usm-user-cmplx-check\":true,\"password-min-length\":12,\"version\":\"v3\"}}{\"interface\":[{\"name\":\"test1\",\"type\":\"GigabitEthernet\",\"level\":\"L3\",\"description\":\"ddd\"}]}{\"te\":{\"global\":{\"teAttributeEnable\":false},\"config-status\":\"initial\",\"affinity-define\":{\"description\":\"dd\"}}}" } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:Successful operation 表2 group-device-preview-info对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:preview REFERENCE 详细请参见表3。 preview. - 表3 group-device-preview对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 content string 0~max个字节。 - preview content of the template. {"snmpUser":{"usm-user-cmplx-check":true,"password-min-length":12,"version":"v3"} 返回状态码为400:Bad Request 详细信息请参见实际响应消息体。
  • URI /restconf/data/huawei-nce-aoc-config-template-binding:template-binding/{template-binding-id}/device/{device-id}/preview 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-binding-id 是 string 36个字节。满足正则表达[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}。 - the identifier of the template binding. "e5f97d04-7c18-41b7-a25a-702db1c108d7" device-id 是 string 0~128个字节。 - the identifier of the device. "8d394835-cb84-38f3-a4d5-36a7f2074b49"
  • 请求示例 HTTP的示例 GET /restconf/data/huawei-nce-aoc-config-template-binding:template-binding/e5f97d04-7c18-41b7-a25a-702db1c108d7/device/8d394835-cb84-38f3-a4d5-36a7f2074b49/preview HTTP/1.1 Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy
  • 响应参数 返回状态码为200:Successful operation 表7 deploy-template-binding-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:output REFERENCE 详细请参见表8。 - - 表8 deploy-template-binding-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-task ARRAY_REFERENCE 详细请参见表9。 template task list. - 表9 template-task-group-template-task对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 task-id string 0~128个字节。 - task id get from taskmgr. "e5f97d04-7c18-41b7-a25a-702db1c108d7" device-id string 1~128个字节。 - the identifier of the device. "e5f97d04-7c18-41b7-a25a-702db1c108d7" 返回状态码为400:Bad Request 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,03 Dec 2021 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template-binding:output": { "template-task": [{ "task-id": "6d389c90-d92b-4913-b990-c0b16efcbb48", "device-id": "8d394835-cb84-38f3-a4d5-36a7f2074b78" }] } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template-binding:deploy-template-binding Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "input": { "full-deploy": { "no-check-service-overwrite": false }, "template-binding-id": "e5f97d04-7c18-41b7-a25a-702db1c108d7", "force-operate":true } }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deploy-template-binding 是 REFERENCE 详细请参见表2。 submit template application - 表2 deploy-template-binding-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:input REFERENCE 详细请参见表3。 - - 表3 deploy-template-binding-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 full-deploy 否 REFERENCE 详细请参见表4。 submit to aoc system. it will submit to device if the device is long feedback mode. it will not directly submit to device if the device is medium feedback mode - incremental-deploy 否 REFERENCE 详细请参见表5。 submit to aoc system. it will submit to device if the device is long feedback mode. it will not directly submit to device if the device is medium feedback mode - save-without-deploy 否 boolean - - it just save the template binding. - template-binding-id 否 string 1~128个字节。 - the identifier of the template application. "f3685151-6e70-46a8-934f-4004c532dcc4" force-operate 否 boolean - false 控制当变量未填写参数值时是否强制部署模板绑定; true表示强制部署, false表示不强制部署。 - devices 否 ARRAY_REFERENCE 详细请参见表6。 list devices - 表4 full-deploy对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 no-check-service-overwrite 否 boolean true false false does not check whether data source conflicts exist in the current configuration - 表5 incremental-deploy对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 no-check-service-overwrite 否 boolean true false false does not check whether data source conflicts exist in the current configuration - 表6 deploy-template-binding-input-body-devices对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 device-id 是 string 1~128个字节。 - the identifier of the device. "f3685151-6e70-46a8-934f-4004c532dcc4"
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template-binding:query-template-bindings-with-devices Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "input": { "template-binding-ids": ["bfa990a2-443b-4312-a94d-be4b584de5f9"], "device-ids": ["8d394835-cb84-38f3-a4d5-36a7f2074b77"] } }
  • 响应参数 返回状态码为200:Successful operation 表4 query-template-bindings-with-devices-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template-binding:output REFERENCE 详细请参见表5。 - - 表5 query-template-bindings-with-devices-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-binding ARRAY_REFERENCE 详细请参见表6。 list template binding. - 返回状态码为400:Bad Request 详细信息请参见实际响应消息体。
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,03 Dec 2021 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "huawei-nce-aoc-config-template-binding:output": { "template-binding": [ { "template-binding-id": "bfa990a2-443b-4312-a94d-be4b584de5f9", "template-binding-name": "1705300910474", "unbound-status": false, "template": [ { "template-id": "d9acd7df-d178-46b2-bac1-da56f034ba04", "template-name": "12" } ], "device": [ { "device-id": "c7f62b8a-b6a0-478b-ad88-933c7aab1bcf", "device-name": "apaas_test", "deploy-status": "un-deploy", "unbound-status": false, "deploy-last-version": true, "deploy-last-variable-version": false, "override-variable": false, "offline-mode": true } ] } ] } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为200:Successful operation HTTP/1.1 200 OK Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为400:Internal Error HTTP/1.1 400 Bad Request Date: Fri,30 Dec 2022 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive