云服务器内容精选

  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:copy-template 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 { "huawei-nce-aoc-config-template:input" : { "template-name" : "test", "template-description" : "test", "source-template-id" : "26559bd3-a00e-4c6d-a573-e6b711a897b3" } }
  • 响应参数 返回状态码为200:Successful operation 表4 copy-template-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:output REFERENCE 详细请参见表5。 - - 表5 copy-template-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-id string 1~128个字节。 - 模板ID "26559bd3-a00e-4c6d-a573-e6b711a897b3" 返回状态码为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:output": { "template-id": "0a498390-b8c8-4141-9e94-f3de9553ebe2" } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Thu,05 Jan 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 copy-template 是 REFERENCE 详细请参见表2。 复制模板 - 表2 copy-template-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 - - 表3 copy-template-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-name 是 string 0~128个字节。 - 模板名称 "test" template-description 否 string 0~1024个字节。 - 模板描述 "test" source-template-id 否 string 1~128个字节。 - 源模板 "26559bd3-a00e-4c6d-a573-e6b711a897b3"
  • 响应示例 返回状态码为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:output": { "raw-content": "---\n'@stmt-extend': \"00000000-0000-0000-0000-000000000000:中国区\"\n" } } 查询生效模板内容的响应示例 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:output": { "effective-content": "---\nhuawei-nce-e-vlan:vlan:\n- vlan-id: 1\n name: \"name1\"\n description: \"desc1\"\n mac-learning: \"enable\"\n- vlan-id: 2\n name: \"name2\"\n description: \"desc2\"\n mac-learning: \"enable\"\n" } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Thu,05 Jan 2023 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:query-template-content Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "template-name": "江苏省", "content-type":"raw", "format-type":"yaml" } } 查询生效模板内容的HTTP示例 POST /restconf/operations/huawei-nce-aoc-config-template:query-template-content Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input": { "template-name": "江苏省", "content-type":"effective-without-tag", "format-type":"yaml" } }
  • 响应参数 返回状态码为200:Successful operation 表4 query-template-content-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:output REFERENCE 详细请参见表5。 - - 表5 query-template-content-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 raw-content string 0~1048576个字节。 - 原生内容,不包含来自父模板定义的模板内容 "null" effective-content string 0~2097152个字节。 - 生效内容,包含来自父模板定义的模板内容 "null" 返回状态码为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:output": { "template-infos": [ { "template-id": "f2ce253d-5ad3-44c7-a845-e6d70d57fbac", "template-name": "test", "package-type": "GND", "create-type": "customize", "template-format": "ui", "children-number": 0, "empty-template": false, "feature-view-mode": "full" }, { "template-id": "d6f23e9a-58d6-4195-82d3-20946c8cc673", "template-name": "hq", "package-type": "GND", "create-type": "customize", "template-format": "ui", "children-number": 1, "empty-template": false, "feature-view-mode": "full" } ], "total-num": 2 } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Thu,05 Jan 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:Successful operation 表4 query-templates-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:output REFERENCE 详细请参见表5。 - - 表5 query-templates-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-infos ARRAY_REFERENCE 详细请参见表6。 模板信息 - total-num int32 [-2147483648-2147483647] - 总数量 10 表6 template-info对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 template-id string 0~128个字节。 - 配置模板ID "d6f23e9a-58d6-4195-82d3-20946c8cc673" template-name string 0~128个字节。 - 配置模板名称 "test" package-type string SND GND SSP - 包模型 "GND" create-type string preset customize - 导入模板创建方式 "customize" template-format string ui text - 模板编辑格式 "ui" template-domain string 0~128个字节。 - 模板所属域 "null" template-description string 0~max个字节。 - 模板描述 "test" parent-template-id string 0~128个字节。 - 父模板ID "26559bd3-a00e-4c6d-a573-e6b711a897b2" children-number int32 [-2147483648-2147483647] - 子模板数量 2 empty-template boolean true false - 空模板 true feature-view-mode string full simplified - 特性查看模式 "full" 返回状态码为400:Bad Request 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:query-templates 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 { "huawei-nce-aoc-config-template:input":{ "create-type":"customize", "sort-field":"template-name", "sort-mode":"desc", "limit":10, "offset":1, "view-mode": "root" } }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 query-templates 是 REFERENCE 详细请参见表2。 查询模板 - 表2 query-templates-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 - - 表3 query-templates-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-name 否 string 0~128个字节。 - 模板名称 "test" package-type 否 string SND GND SSP - 包类型 "GND" create-type 否 string preset customize - 创建类型 "customize" template-format 否 string ui text - 格式类型 "ui" sort-field 否 string template-name update-time template-name 排序字段 "template-name" sort-mode 否 string asc desc asc 排序模式 "asc" offset 否 int32 [-2147483648-2147483647] - 偏移量 1 limit 否 int32 [1-100] 10 限制 10 view-mode 否 string full root root 查看模式 "root"
  • 响应示例 返回状态码为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:output": { "template-name": "test", "feature-infos": [ { "feature-path": "/huawei-ac-nes-device:nes/ne/traffic-engineering-uni-gnd:te", "feature-name": "TE", "ref-template": "", "override-status": "create" } ] } } 返回状态码为400:Bad Request HTTP/1.1 400 Bad Request Date: Thu,05 Jan 2023 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 query-features-by-template-id 是 REFERENCE 详细请参见表2。 查询模板特性 - 表2 query-features-by-template-id-input对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:input REFERENCE 详细请参见表3。 - - 表3 query-features-by-template-id-input-body对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-id 否 string 1~128个字节。 - 模板ID "26559bd3-a00e-4c6d-a573-e6b711a897b2" content-type 否 string raw effective raw 格式类型 "effective"
  • 请求示例 HTTP的示例 POST /restconf/operations/huawei-nce-aoc-config-template:query-features-by-template-id Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "huawei-nce-aoc-config-template:input":{ "template-id":"d6f23e9a-58d6-4195-82d3-20946c8cc673", "content-type":"raw" } }
  • 响应参数 返回状态码为200:Successful operation 表4 query-features-by-template-id-output对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-aoc-config-template:output REFERENCE 详细请参见表5。 - - 表5 query-features-by-template-id-output-body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 feature-infos ARRAY_REFERENCE 详细请参见表6。 特性信息 - template-name string 0~128个字节。 - 模板名称 "test" template-description string 0~1024个字节。 - 模板描述 "test" parent-template-name string 0~128个字节。 - 父模板名称 "test-parent" parent-template-id string 0~128个字节。 - 父模板ID "26559bd3-a00e-4c6d-a573-e6b711a897b3" 表6 feature-info对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 feature-path string 0~4096个字节。 - 特性路径 "/huawei-ac-nes-device:nes/ne/traffic-engineering-uni-gnd:te" feature-name string 0~256个字节。 - 特性名称 "te" ref-template string 0~128个字节。 - 特性继承 "test" override-status string create update delete inherit - 特性复写状态 "inherit" 返回状态码为400:Bad Request 详细信息请参见实际响应消息体。