华为云用户手册

  • 响应参数 返回状态码为200:接口调用成功,响应体参考RadioList。 表4 RadioList对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 totalRecords integer [0-1000] - 总数量 - radioList ARRAY_REFERENCE 详细请参见表5。 查询到的射频结果列表。 - errcode string 0~64个字符。 - 错误码。 "0" message string 0~255个字符。 - 错误信息。 "error" 表5 Radio对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 interferenceRatio integer [0-100] - 干扰率 - frequencyBand int32 [0-2147483647] - 关联频段,1-2.4G、2-5G。 2 state int32 [0-100] - 状态。 - deviceName string 0~256个字符。 - AP名称 "ap4" deviceStatus int32 [0-4] 0 设备状态,0:正常、1:告警、3:离线、4:未注册。 - channelRatio int32 [0-100] - 信道利用率。 - deviceId string 0~64个字符。 - 设备Id - channel int32 [1-256] - 无线信道。 1 bandWidth integer [0-2] - 信道频宽,0表示20M、1表示40M、2表示80M。 1 userNum int32 [0-100000000] - 用户数。 1 power int32 - - 工作功率,单位:dBm。 30 upwardSpeed int64 [0-65535] - 上行速率。 - downwardSpeed int64 [0-65535] - 下行速率。 - noiseIntensity int32 [0-255] - 噪声强度。 - packetLossRatio int32 [0-100] - 丢包率。 - retransmissionRatio int32 [0-100] - 重传率。 - wrongPackageRate int32 [0-100] - 错包率。 - radioId int32 [0-1] - 射频Id,射频口编号。射频口绑定的频段:0代表2.4G,1代表5G。 1 返回状态码为400:参数非法,查询失败。 详细信息请参见实际响应消息体。
  • 请求参数 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 radioRequest 是 REFERENCE 详细请参见表3。 传入的GET参数组成的字符串。 - 表3 RadioRequest对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 否 int32 [0-1000] - 页码。 1 pageSize 否 int32 [0-1000] - 每页个数。 20 sort 否 string 0~256个字符。 - 排序字段。 - id 否 string 0~64个字符。 - 设备组或设备id - deviceType 否 int32 [0-10] - 设备类型:1-AP,2-AR,3-FW,4-LSW。 1 frequencyBand 否 string 0~10个字符。 - 关联频段,1-2.4G、2-5G。 "2" apName 否 string 0~256个字符。 - deviceName "ap4" timestamp 否 int64 [0-9223372036854775807] - 时间戳 - sortMode 否 string 0~256个字符。 - sortMode - sortColumn 否 string 0~256个字符。 - sortColumn -
  • 请求示例 HTTP的示例 POST /controller/campus/v1/lanwan/mirror/observeport/action/batch-delete HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "observePorts" : [ { "portId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "siteId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e" } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 deleteObservePort 是 REFERENCE 详细请参见表2。 删除端口镜像观察口。 - 表2 DeleteObservePortsRequest对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 observePorts 是 ARRAY_REFERENCE 1-10个列表项,详细请参见表3。 观察端口。 - 表3 DeleteObservePort对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 portId 是 string 36个字符。 - 观察口标识。uuid格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e" siteId 是 string 36个字符。 - 站点标识。uuid格式。 "fbb684c8-0d37-496f-bafa-4b06d5151e2e"
  • 响应示例 返回状态码为200:删除成功,返回体参考ConfigPortResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : [ { "portId" : "fbb684c8-0d37-496f-bafa-4b06d5151e2e", "portName" : "GE0/0/1" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 PUT /restconf/data/huawei-nce-aoc-config-template-application:template-application/{template-application-id}/template/{template-id}/variable/{variable-name} Host: 192.168.1.125:26335 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AUTH-TOKEN: x-yyyyyy { "variable":[ { "variable-name": "v2c", "variable-value":"valuex" } ] }
  • 响应示例 返回状态码为204:Successful operation HTTP/1.1 204 No Content 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
  • URI /restconf/data/huawei-nce-aoc-config-template-application:template-application/{template-application-id}/template/{template-id}/variable/{variable-name} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 template-application-id 是 string 0~128个字节。 - the identifier of the template application. "a945675d-ccff-4ea3-afb4-8d04ac3100c2" template-id 是 string 1~128个字节。 - the identifier of the template. "a926f75d-ccff-4ea3-afb4-8d04ac3100c2" variable-name 是 string 1~512个字节。 - name of the variable. "aoc-variable-name"
  • 请求参数 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteTemplateHttpDto 是 REFERENCE 详细请参见表4。 站点模板HTTP配置信息 - 表4 SiteTemplateHttpDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 enableHttp 是 boolean true false true HTTP使能开关。默认值为true。 true
  • 请求示例 HTTP的示例 PUT /controller/campus/v3/networkconfig/site-templates/fbde1c5d-5b94-49e3-a912-48641015e45c/enablehttp?isForceOverride=true HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "enableHttp" : true }
  • 响应示例 返回状态码为200:站点模板HTTP配置结果。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "enableHttp" : true } } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部服务错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • URI /controller/campus/v3/networkconfig/site-templates/{siteTemplateId}/enablehttp 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteTemplateId 是 string 36个字符。 - 站点模板标识,UUID格式。 "fbde1c5d-5b94-49e3-a912-48641015e45c" 表2 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 isForceOverride 否 boolean true false - 是否强制覆盖 true
  • 响应示例 返回状态码为200:接口调用成功,响应体参考CommunityFilterResponse。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : [ { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "mode" : "basic", "name" : "communityTest", "nodes" : [ { "index" : 1, "matchMode" : "permit", "communityMembers" : ["10"], "regular" : "^65537$" } ] } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "mode" : "basic", "name" : "communityTest", "nodes" : [ { "index" : 1, "matchMode" : "permit", "communityMembers" : ["10"], "regular" : "^65537$" } ] } } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/routing-protocol/community-filter/action/batch-delete HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "communityFilters" : [ { "id" : "a99f794e-b510-438c-a75d-de59f02347eb", "siteId" : "a99f794e-b510-438c-a75d-de59f02347eb", "deviceId" : "a99f794e-b510-438c-a75d-de59f02347eb", "mode" : "basic", "name" : "communityTest", "nodes" : [ { "index" : 1, "matchMode" : "permit", "communityMembers" : ["10"], "regular" : "^65537$" } ] } ] }
  • 响应示例 返回状态码为201:接口调用成功,响应体参考OspfRouteResponse。 HTTP/1.1 201 Created Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "routerId" : "192.168.1.1", "processId" : 501, "defaultRouteAdvertisement" : false, "defaultRouteCost" : 1, "defaultRouteType" : 1, "internalPreference" : 10, "asePreference" : 150, "routeRedistribute" : [ { "type" : "BGP", "processId" : 501, "cost" : 1, "externalRouteType" : 1 } ], "asbrSummarys" : [ { "ipAddress" : "10.1.0.0/16", "cost" : 0, "tag" : 1, "distributeDelay" : 1, "advertise" : true, "generateNull0Route" : false } ], "exportRoutePolicy" : { "nodes" : [ { "mode" : "permit", "matchCondition" : { "ipPrefix" : { "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ] }, "tag" : 100 }, "applyAction" : { "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100, "applyTag" : 100 } } ] }, "importRoutePolicy" : { "nodes" : [ { "mode" : "permit", "matchCondition" : { "ipPrefix" : { "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ] }, "tag" : 100 }, "applyAction" : { "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100, "applyTag" : 100 } } ] }, "ipSubnets" : [ { "interfaceType" : "tunnel", "interfaceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "areaId" : "0", "areaType" : "normal", "authMode" : "none", "cryptographicSuit" : "hmac-sha256", "key" : 1, "cryptographicPwd" : "1", "helloTimer" : 1, "timerPoll" : 1, "timerRetransmit" : 1, "timerDead" : 1, "mtuEnable" : false, "networkType" : "broadcast", "cost" : 1, "drPriority" : 1 } ], "transportNetworkPorts" : [ { "interfaceType" : "tunnel", "interfaceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "areaId" : "0", "areaType" : "normal", "authMode" : "none", "cryptographicSuit" : "hmac-sha256", "key" : 1, "cryptographicPwd" : "1", "helloTimer" : 1, "timerPoll" : 1, "timerRetransmit" : 1, "timerDead" : 1, "mtuEnable" : false, "networkType" : "broadcast", "cost" : 1, "drPriority" : 1 } ], "configSource" : "Wan" } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "routerId" : "192.168.1.1", "processId" : 501, "defaultRouteAdvertisement" : false, "defaultRouteCost" : 1, "defaultRouteType" : 1, "internalPreference" : 10, "asePreference" : 150, "routeRedistribute" : [ { "type" : "BGP", "processId" : 501, "cost" : 1, "externalRouteType" : 1 } ], "asbrSummarys" : [ { "ipAddress" : "10.1.0.0/16", "cost" : 0, "tag" : 1, "distributeDelay" : 1, "advertise" : true, "generateNull0Route" : false } ], "exportRoutePolicy" : { "nodes" : [ { "mode" : "permit", "matchCondition" : { "ipPrefix" : { "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ] }, "tag" : 100 }, "applyAction" : { "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100, "applyTag" : 100 } } ] }, "importRoutePolicy" : { "nodes" : [ { "mode" : "permit", "matchCondition" : { "ipPrefix" : { "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ] }, "tag" : 100 }, "applyAction" : { "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100, "applyTag" : 100 } } ] }, "ipSubnets" : [ { "interfaceType" : "tunnel", "interfaceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "areaId" : "0", "areaType" : "normal", "authMode" : "none", "cryptographicSuit" : "hmac-sha256", "key" : 1, "cryptographicPwd" : "1", "helloTimer" : 1, "timerPoll" : 1, "timerRetransmit" : 1, "timerDead" : 1, "mtuEnable" : false, "networkType" : "broadcast", "cost" : 1, "drPriority" : 1 } ], "transportNetworkPorts" : [ { "interfaceType" : "tunnel", "interfaceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "areaId" : "0", "areaType" : "normal", "authMode" : "none", "cryptographicSuit" : "hmac-sha256", "key" : 1, "cryptographicPwd" : "1", "helloTimer" : 1, "timerPoll" : 1, "timerRetransmit" : 1, "timerDead" : 1, "mtuEnable" : false, "networkType" : "broadcast", "cost" : 1, "drPriority" : 1 } ], "configSource" : "Wan" } } ] } 返回状态码为204:执行成功,没有数据。 HTTP/1.1 204 No Content Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为201:接口调用成功,响应体参考OspfRouteResponse。 表14 OspfRouteResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-8个列表项,详细请参见表15。 创建或者更新成功的OSPF路由信息。 - fail ARRAY_REFERENCE 0-8个列表项,详细请参见表26。 创建或者更新失败的OSPF路由信息。 - 表15 OspfRouteInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 siteId uuid - - 对应站点ID。格式是uuid,创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" deviceId uuid - - 设备ID。格式是uuid,创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" vpnId uuid - - 所在VPN ID。格式是uuid,创建overlay ospf路由时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" tnpId uuid - - 所在TNP ID。格式是uuid,创建underlay ospf路由时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" routerId string - - 用于用户自定义配置RouterId,创建时选填,不可修改,不能配置127.0网段。 "192.168.1.1" processId int32 [1-65535] - 进程号。创建时必填。EVPN隧道模式下,Underlay场景,取值范围20001-30000;Overlay场景,取值范围:1-20000。 501 defaultRouteAdvertisement boolean true false false 是否开启通告默认路由。创建时必填。 false defaultRouteCost int32 [0-16777214] 1 默认路由开销。开启通告默认路由时必填。 1 defaultRouteType int32 - 2 OSPF通告默认路由时的外部路由类型,开启通告默认路由时必填,取值范围1-2,Type1外部路由表示此类路由的可信度高,Type2外部路由表示此类路由的可信度低。 1 internalPreference int32 [1-255] 10 内部优先级。创建时必填。 10 asePreference int32 [1-255] 150 ASE优先级。创建时必填。 150 routeRedistribute ARRAY_REFERENCE 0-64个列表项,详细请参见表16。 路由引入。 - asbrSummarys ARRAY_REFERENCE 0-64个列表项,详细请参见表17。 边界路由聚合列表。 - exportRoutePolicy REFERENCE 详细请参见表18。 发布路由策略 - importRoutePolicy REFERENCE 详细请参见表18。 接收路由策略 - ipSubnets ARRAY_REFERENCE 0-64个列表项,详细请参见表25。 三层接口参数。仅创建overlay ospf时填入三层接口参数。 - transportNetworkPorts ARRAY_REFERENCE 0-64个列表项,详细请参见表25。 TNP接口参数。仅创建underlay ospf时填入TNP接口参数。 - configSource string 0~32个字符。 - 配置源信息,用于区分是WAN业务还是LanWan互联业务,仅查询接口使用,不能修改,取值范围:Wan、LanWan。 "Wan" 表16 RouteRedistributeInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 type string 0~16个字符。 - 取值范围:BGP、OSPF、DIRECT、STATIC、OPR(V600系列设备支持)、UNR(V300系列设备支持)。对于lan侧ospf,会默认引入BGP,且无法删除。 "BGP" processId int32 [1-65535] - 引用的OSPF进程号,引入路由类型为ospf时必填。EVPN隧道模式下,Underlay场景,取值范围20001-30000;Overlay场景,取值范围:1-20000。 501 cost int32 [0-16777214] 1 开销。 1 externalRouteType int32 - 2 设置引入外部路由的路由类型。取值范围1-2,Type1外部路由表示此类路由的可信度高,Type2外部路由表示此类路由的可信度低。 1 表17 AsbrSummary对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ipAddress string - - 指定聚合路由的IP地址,ipv4地址加掩码。必填。 "10.1.0.0/16" cost int32 [0-16777214] - 聚合路由的开销。 0 tag int64 [0-4294967295] - 指定聚合路由的标记。 1 distributeDelay int32 [1-65535] - 指定延迟发布聚合路由的时间。 1 advertise boolean true false true 设置是否发布聚合路由。如果不指定该参数则将通告聚合路由。 true generateNull0Route boolean true false false 生成黑洞路由,用来防止路由环路。该字段只有在advertise字段为true时才生效。 false 表18 OspfRoutePolicy对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 nodes ARRAY_REFERENCE 0-100个列表项,详细请参见表19。 export方向permit节点支持多个,import方向最多只有一个。更新ospf时,如果node长度为0,则代表删除对应的路由策略。 - 表19 OspfPolicyNode对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 mode string 0~16个字符。 - 节点匹配模式,取值为permit或deny。 "permit" matchCondition REFERENCE 详细请参见表20。 路由策略匹配条件,至少填写一个匹配条件。 - applyAction REFERENCE 详细请参见表23。 路由策略应用的行为。 - 表20 OspfPolicyNodeMatchCondition对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ipPrefix REFERENCE 详细请参见表21。 IP前缀。 - tag int64 [0-4294967295] - 指定路由信息标记值。 100 表21 OspfIpPrefixList对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 prefixFilters ARRAY_REFERENCE 0-100个列表项,详细请参见表22。 前缀过滤器。 - 表22 OspfPrefixFilter对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 ipv4Address string - - IP地址。必填。 "10.1.0.0" maskLength int8 [0-32] - 掩码。必填。 24 greaterEqual int8 [0-32] - 掩码范围下限。 24 lessEqual int8 [0-32] - 掩码范围上限。 24 表23 OspfPolicyNodeApplyAction对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 applyMetric REFERENCE 详细请参见表24。 路由策略应用Metric值。 - localPreference int64 [0-4294967295] - 本地优先级。 100 preferredValue int64 [0-65535] - 首选值。 100 applyTag int64 [0-4294967295] - 指定路由信息标记值。 100 表24 OspfApplyMetric对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 cost string - - 路由开销值,取值范围0-4294967295。只在underlay ospf发布策略的白名单生效。 "24" sign string - - add表示增加开销值,sub表示减小开销值。该字段暂未实现。 "add" 表25 InterfaceParameterInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 interfaceType string 0~64个字符。 - 接口类型,非必填,默认为IPSUBNET口,可选值:tunnel。 "tunnel" interfaceId uuid - - IP Subnet ID或TNP ID。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" areaId string - - 区域ID,取值范围0-4294967295。 "0" areaType string 0~10个字符。 - 区域类型。取值:normal(缺省情况下,OSPF区域被定义为普通区域)、stub(不允许发布自治系统外部路由,只允许发布区域内路由和区域间的路由)、nssa(NSSA区域能够将自治域外部路由引入并传播到整个OSPF自治域中)。 "normal" authMode string 0~16个字符。 none 认证方式。取值:none、simple、cryptographic。 "none" cryptographicSuit string 0~16个字符。 hmac-sha256 加密算法。取值:hmac-sha256、hmac-md5、md5。认证方式为cryptographic时必填。 "hmac-sha256" key int32 [1-255] 1 key。认证方式为cryptographic时必填。 1 cryptographicPwd string 1~255个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 密码必须包含如下规则:密码长度必须在1~255位。密码只支持特殊字符("`!@#$%^&()_+=-[]{},.;)、英文大写字母(A~Z)、英文小写字母(a~z)和数字(0~9)。为提高安全性,建议密码至少包含小写字母、大写字母、数字、特殊字符这四种形式中的两种,同时密码长度不小于6个字符。 "1" helloTimer int32 [1-65535] 10 Hello报文时间间隔。建议Hello报文时间间隔取值不小于5,否则可能会造成邻接关系的中断。缺省情况下,P2P、Broadcast类型接口发送Hello报文的时间间隔的值为10秒;P2MP、NBMA类型接口发送Hello报文的时间间隔的值为30秒。 1 timerPoll int16 [1-3600] - 指定发送轮询Hello报文的时间间隔。 1 timerRetransmit int16 [1-3600] - 接口重传LSA的时间间隔。 1 timerDead int32 [1-235926000] - OSPF的邻居失效时间,必须大于Hello报文的时间间隔。 1 mtuEnable boolean true false - 接口在发送DD报文时填充MTU值,同时还会检查邻居DD报文所携带的MTU是否超过本端的MTU值。默认值为false。 false networkType string 0~16个字符。 - 网络类型。取值:broadcast(将接口的网络类型更改为广播)、nbma(将接口的网络类型更改为NBMA)、p2mp(将接口的网络类型更改为点到多点)、p2p(将接口的网络类型更改为点到点)。 "broadcast" cost int32 [1-65535] - 开销。 1 drPriority int32 [0-255] 1 DR优先级。 1 表26 FailOspfRouteInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表15。 OSPF路由信息。 - 返回状态码为204:执行成功,没有数据。 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/routing-protocol/ospf HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "routes" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "routerId" : "192.168.1.1", "processId" : 501, "defaultRouteAdvertisement" : false, "defaultRouteCost" : 1, "defaultRouteType" : 1, "internalPreference" : 10, "asePreference" : 150, "routeRedistribute" : [ { "type" : "BGP", "processId" : 501, "cost" : 1, "externalRouteType" : 1 } ], "asbrSummarys" : [ { "ipAddress" : "10.1.0.0/16", "cost" : 0, "tag" : 1, "distributeDelay" : 1, "advertise" : true, "generateNull0Route" : false } ], "exportRoutePolicy" : { "nodes" : [ { "mode" : "permit", "matchCondition" : { "ipPrefix" : { "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ] }, "tag" : 100 }, "applyAction" : { "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100, "applyTag" : 100 } } ] }, "importRoutePolicy" : { "nodes" : [ { "mode" : "permit", "matchCondition" : { "ipPrefix" : { "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 24, "lessEqual" : 24 } ] }, "tag" : 100 }, "applyAction" : { "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100, "applyTag" : 100 } } ] }, "ipSubnets" : [ { "interfaceType" : "tunnel", "interfaceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "areaId" : "0", "areaType" : "normal", "authMode" : "none", "cryptographicSuit" : "hmac-sha256", "key" : 1, "cryptographicPwd" : "1", "helloTimer" : 1, "timerPoll" : 1, "timerRetransmit" : 1, "timerDead" : 1, "mtuEnable" : false, "networkType" : "broadcast", "cost" : 1, "drPriority" : 1 } ], "transportNetworkPorts" : [ { "interfaceType" : "tunnel", "interfaceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "areaId" : "0", "areaType" : "normal", "authMode" : "none", "cryptographicSuit" : "hmac-sha256", "key" : 1, "cryptographicPwd" : "1", "helloTimer" : 1, "timerPoll" : 1, "timerRetransmit" : 1, "timerDead" : 1, "mtuEnable" : false, "networkType" : "broadcast", "cost" : 1, "drPriority" : 1 } ], "configSource" : "Wan" } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ospfRouteInfos 是 REFERENCE 详细请参见表2。 OSPF路由信息。 - 表2 OspfRouteInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 routes 否 ARRAY_REFERENCE 1-8个列表项,详细请参见表3。 OSPF路由信息。 - 表3 OspfRouteInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 uuid - - 对应站点ID。格式是uuid,创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" deviceId 是 uuid - - 设备ID。格式是uuid,创建时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" vpnId 否 uuid - - 所在VPN ID。格式是uuid,创建overlay ospf路由时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" tnpId 否 uuid - - 所在TNP ID。格式是uuid,创建underlay ospf路由时必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" routerId 否 string - - 用于用户自定义配置RouterId,创建时选填,不可修改,不能配置127.0网段。 "192.168.1.1" processId 是 int32 [1-65535] - 进程号。创建时必填。EVPN隧道模式下,Underlay场景,取值范围20001-30000;Overlay场景,取值范围:1-20000。 501 defaultRouteAdvertisement 否 boolean true false false 是否开启通告默认路由。创建时必填。 false defaultRouteCost 否 int32 [0-16777214] 1 默认路由开销。开启通告默认路由时必填。 1 defaultRouteType 否 int32 - 2 OSPF通告默认路由时的外部路由类型,开启通告默认路由时必填,取值范围1-2,Type1外部路由表示此类路由的可信度高,Type2外部路由表示此类路由的可信度低。 1 internalPreference 否 int32 [1-255] 10 内部优先级。创建时必填。 10 asePreference 否 int32 [1-255] 150 ASE优先级。创建时必填。 150 routeRedistribute 否 ARRAY_REFERENCE 0-64个列表项,详细请参见表4。 路由引入。 - asbrSummarys 否 ARRAY_REFERENCE 0-64个列表项,详细请参见表5。 边界路由聚合列表。 - exportRoutePolicy 否 REFERENCE 详细请参见表6。 发布路由策略 - importRoutePolicy 否 REFERENCE 详细请参见表6。 接收路由策略 - ipSubnets 否 ARRAY_REFERENCE 0-64个列表项,详细请参见表13。 三层接口参数。仅创建overlay ospf时填入三层接口参数。 - transportNetworkPorts 否 ARRAY_REFERENCE 0-64个列表项,详细请参见表13。 TNP接口参数。仅创建underlay ospf时填入TNP接口参数。 - configSource 否 string 0~32个字符。 - 配置源信息,用于区分是WAN业务还是LanWan互联业务,仅查询接口使用,不能修改,取值范围:Wan、LanWan。 "Wan" 表4 RouteRedistributeInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 type 是 string 0~16个字符。 - 取值范围:BGP、OSPF、DIRECT、STATIC、OPR(V600系列设备支持)、UNR(V300系列设备支持)。对于lan侧ospf,会默认引入BGP,且无法删除。 "BGP" processId 否 int32 [1-65535] - 引用的OSPF进程号,引入路由类型为ospf时必填。EVPN隧道模式下,Underlay场景,取值范围20001-30000;Overlay场景,取值范围:1-20000。 501 cost 否 int32 [0-16777214] 1 开销。 1 externalRouteType 否 int32 - 2 设置引入外部路由的路由类型。取值范围1-2,Type1外部路由表示此类路由的可信度高,Type2外部路由表示此类路由的可信度低。 1 表5 AsbrSummary对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipAddress 否 string - - 指定聚合路由的IP地址,ipv4地址加掩码。必填。 "10.1.0.0/16" cost 否 int32 [0-16777214] - 聚合路由的开销。 0 tag 否 int64 [0-4294967295] - 指定聚合路由的标记。 1 distributeDelay 否 int32 [1-65535] - 指定延迟发布聚合路由的时间。 1 advertise 否 boolean true false true 设置是否发布聚合路由。如果不指定该参数则将通告聚合路由。 true generateNull0Route 否 boolean true false false 生成黑洞路由,用来防止路由环路。该字段只有在advertise字段为true时才生效。 false 表6 OspfRoutePolicy对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 nodes 否 ARRAY_REFERENCE 0-100个列表项,详细请参见表7。 export方向permit节点支持多个,import方向最多只有一个。更新ospf时,如果node长度为0,则代表删除对应的路由策略。 - 表7 OspfPolicyNode对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 mode 是 string 0~16个字符。 - 节点匹配模式,取值为permit或deny。 "permit" matchCondition 否 REFERENCE 详细请参见表8。 路由策略匹配条件,至少填写一个匹配条件。 - applyAction 否 REFERENCE 详细请参见表11。 路由策略应用的行为。 - 表8 OspfPolicyNodeMatchCondition对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipPrefix 否 REFERENCE 详细请参见表9。 IP前缀。 - tag 否 int64 [0-4294967295] - 指定路由信息标记值。 100 表9 OspfIpPrefixList对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 prefixFilters 是 ARRAY_REFERENCE 0-100个列表项,详细请参见表10。 前缀过滤器。 - 表10 OspfPrefixFilter对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 ipv4Address 是 string - - IP地址。必填。 "10.1.0.0" maskLength 是 int8 [0-32] - 掩码。必填。 24 greaterEqual 否 int8 [0-32] - 掩码范围下限。 24 lessEqual 否 int8 [0-32] - 掩码范围上限。 24 表11 OspfPolicyNodeApplyAction对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 applyMetric 否 REFERENCE 详细请参见表12。 路由策略应用Metric值。 - localPreference 否 int64 [0-4294967295] - 本地优先级。 100 preferredValue 否 int64 [0-65535] - 首选值。 100 applyTag 否 int64 [0-4294967295] - 指定路由信息标记值。 100 表12 OspfApplyMetric对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 cost 否 string - - 路由开销值,取值范围0-4294967295。只在underlay ospf发布策略的白名单生效。 "24" sign 否 string - - add表示增加开销值,sub表示减小开销值。该字段暂未实现。 "add" 表13 InterfaceParameterInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 interfaceType 否 string 0~64个字符。 - 接口类型,非必填,默认为IPSUBNET口,可选值:tunnel。 "tunnel" interfaceId 是 uuid - - IP Subnet ID或TNP ID。格式是uuid。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" areaId 是 string - - 区域ID,取值范围0-4294967295。 "0" areaType 否 string 0~10个字符。 - 区域类型。取值:normal(缺省情况下,OSPF区域被定义为普通区域)、stub(不允许发布自治系统外部路由,只允许发布区域内路由和区域间的路由)、nssa(NSSA区域能够将自治域外部路由引入并传播到整个OSPF自治域中)。 "normal" authMode 是 string 0~16个字符。 none 认证方式。取值:none、simple、cryptographic。 "none" cryptographicSuit 否 string 0~16个字符。 hmac-sha256 加密算法。取值:hmac-sha256、hmac-md5、md5。认证方式为cryptographic时必填。 "hmac-sha256" key 否 int32 [1-255] 1 key。认证方式为cryptographic时必填。 1 cryptographicPwd 否 string 1~255个字符。 - 该字段可能包含敏感信息和个人数据,请妥善做好保护。 密码必须包含如下规则:密码长度必须在1~255位。密码只支持特殊字符("`!@#$%^&()_+=-[]{},.;)、英文大写字母(A~Z)、英文小写字母(a~z)和数字(0~9)。为提高安全性,建议密码至少包含小写字母、大写字母、数字、特殊字符这四种形式中的两种,同时密码长度不小于6个字符。 "1" helloTimer 是 int32 [1-65535] 10 Hello报文时间间隔。建议Hello报文时间间隔取值不小于5,否则可能会造成邻接关系的中断。缺省情况下,P2P、Broadcast类型接口发送Hello报文的时间间隔的值为10秒;P2MP、NBMA类型接口发送Hello报文的时间间隔的值为30秒。 1 timerPoll 否 int16 [1-3600] - 指定发送轮询Hello报文的时间间隔。 1 timerRetransmit 否 int16 [1-3600] - 接口重传LSA的时间间隔。 1 timerDead 否 int32 [1-235926000] - OSPF的邻居失效时间,必须大于Hello报文的时间间隔。 1 mtuEnable 否 boolean true false - 接口在发送DD报文时填充MTU值,同时还会检查邻居DD报文所携带的MTU是否超过本端的MTU值。默认值为false。 false networkType 否 string 0~16个字符。 - 网络类型。取值:broadcast(将接口的网络类型更改为广播)、nbma(将接口的网络类型更改为NBMA)、p2mp(将接口的网络类型更改为点到多点)、p2p(将接口的网络类型更改为点到点)。 "broadcast" cost 否 int32 [1-65535] - 开销。 1 drPriority 是 int32 [0-255] 1 DR优先级。 1
  • 响应示例 返回状态码为200:操作成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为400:请求参数错误。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 PATCH /restconf/v2/data/huawei-ac-nes-device:nes/ne/00000000-0000-0000-0000-000000000000/huawei-nce-e-vpn:vpn HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy restconf-transaction-id: "00000000-0000-0000-0000-000000000000" { "huawei-nce-e-vpn:vpn" : { "instance-name" : "vpn1", "af" : [ { "type" : "ipv4-unicast", "route-distinguisher" : "1:1", "vpn-target" : [ { "value" : "1:1", "vpn-target-type" : "export-extcommunity" } ], "import-policy" : "policy1", "export-policy" : "policy2" } ] } }
  • 请求参数 表2 header参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 restconf-transaction-id 否 string - - 事务ID。 "00000000-0000-0000-0000-000000000000" 表3 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-vpn:vpn 是 REFERENCE 详细请参见表4。 VPN配置参数。 - 表4 nes-ne-vpn-exclude-patch-false-augment对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 huawei-nce-e-vpn:vpn 否 REFERENCE 详细请参见表5。 VPN配置参数。 - 表5 vpn-patch-false对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 instance-name 否 string 1~31个字符。 - VPN实例名,单一主键字段。 "vpn1" af 否 ARRAY_REFERENCE 0-2个列表项,详细请参见表6。 地址族。 - 表6 nes-ne-vpn-af-patch-false对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 type 否 string ipv4-unicast ipv6-unicast - 地址族类型,AR6700V仅支持ipv4-unicast,单一主键字段。 "ipv4-unicast" route-distinguisher 否 string 3~21个字符。 - Route Distinguisher。当云网元为管理网元时,不支持配置。 "1:1" vpn-target 否 ARRAY_REFERENCE 详细请参见表7。 VPN Target。 - import-policy 否 string 1~200个字符。 - 接收路由策略。_public_ VPN不支持配置、Route Distinguisher未填写时,不支持配置。AR6700V主设备不支持。 "policy1" export-policy 否 string 1~200个字符。 - 发布路由策略。_public_ VPN不支持配置、Route Distinguisher未填写时,不支持配置。AR6700V主设备不支持。 "policy2" 表7 nes-ne-vpn-af-vpn-target-patch-false对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 value 否 string 3~21个字符。 - VPN Target值,联合主键字段。 "1:1" vpn-target-type 否 string import-extcommunity export-extcommunity - VPN Target类型。当云网元为管理网元时,不支持配置,联合主键字段。 "export-extcommunity"
  • URI /restconf/v2/data/huawei-ac-nes-device:nes/ne/{id}/huawei-nce-e-vpn:vpn 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 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}。 - 设备ID。 "00000000-0000-0000-0000-000000000000"
  • 响应示例 返回状态码为201:接口调用成功,响应体参考BgpRoutePeerResponse。 HTTP/1.1 201 Created Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "peers" : [ { "peerIp" : "10.0.0.1", "localIp" : "10.0.0.1", "peerAs" : "10", "localAs" : "10", "allowAsLoop" : 1, "ebgpMaxHop" : 1, "peerIgnore" : false, "keepAliveTime" : 0, "holdTime" : 0, "md5Encrypt" : false, "md5Key" : "", "keyChainEnable" : false, "keyChainName" : "keyChainName", "bfdEnable" : false, "bfdInfo" : { "minTxInterval" : 1000, "minRxInterval" : 1000, "detectMultiplier" : 3 }, "vpnv4Enable" : true, "addressFamilys" : [ { "familyType" : "ipv4-unicast", "advertiseCommunity" : false, "exportRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 25, "lessEqual" : 28 } ], "ipv6PrefixFilters" : [ { "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] }, "importRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 25, "lessEqual" : 28 } ], "ipv6PrefixFilters" : [ { "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] } } ], "vpnv6Enable" : true, "configSource" : "Wan", "nextHopInvariable" : true } ] } ], "fail" : [ { "errcode" : "0", "errmsg" : "", "data" : { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "peers" : [ { "peerIp" : "10.0.0.1", "localIp" : "10.0.0.1", "peerAs" : "10", "localAs" : "10", "allowAsLoop" : 1, "ebgpMaxHop" : 1, "peerIgnore" : false, "keepAliveTime" : 0, "holdTime" : 0, "md5Encrypt" : false, "md5Key" : "", "keyChainEnable" : false, "keyChainName" : "keyChainName", "bfdEnable" : false, "bfdInfo" : { "minTxInterval" : 1000, "minRxInterval" : 1000, "detectMultiplier" : 3 }, "vpnv4Enable" : true, "addressFamilys" : [ { "familyType" : "ipv4-unicast", "advertiseCommunity" : false, "exportRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 25, "lessEqual" : 28 } ], "ipv6PrefixFilters" : [ { "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] }, "importRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 25, "lessEqual" : 28 } ], "ipv6PrefixFilters" : [ { "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] } } ], "vpnv6Enable" : true, "configSource" : "Wan", "nextHopInvariable" : true } ] } } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为201:接口调用成功,响应体参考BgpRoutePeerResponse。 表4 BgpRoutePeerResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码:0 表示接口执行成功,非0 表示接口执行失败。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-2个列表项,详细请参见表5。 BGP路由配置成功的信息。 - fail ARRAY_REFERENCE 0-2个列表项,详细请参见表6。 BGP路由配置失败的信息。 - 表5 BgpPeerInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 siteId uuid - - 站点ID,UUID格式,创建、更新、删除必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" deviceId uuid - - 设备ID,UUID格式,创建、更新、删除必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" tnpId uuid - - tnpID,UUID格式,tnpId和vpnId不可同时为空或同时赋值。tnpId对应物理口类型不可是LoopBack。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" vpnId uuid - - vpnID,UUID格式,tnpId和vpnId不可同时为空或同时赋值。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" peers ARRAY_REFERENCE 0-100个列表项,详细请参见表28。 peer信息。 - 表6 FailBgpPeerInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码:0 表示接口执行成功,非0 表示接口执行失败。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表5。 BGP路由peer信息列表。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v1/sdwan/routing-protocol/bgp-peer-info HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "peerInfos" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "peers" : [ { "peerIp" : "10.0.0.1", "localIp" : "10.0.0.1", "peerAs" : "10", "localAs" : "10", "allowAsLoop" : 1, "ebgpMaxHop" : 1, "peerIgnore" : false, "keepAliveTime" : 0, "holdTime" : 0, "md5Encrypt" : false, "md5Key" : "", "keyChainEnable" : false, "keyChainName" : "keyChainName", "bfdEnable" : false, "bfdInfo" : { "minTxInterval" : 1000, "minRxInterval" : 1000, "detectMultiplier" : 3 }, "vpnv4Enable" : true, "addressFamilys" : [ { "familyType" : "ipv4-unicast", "advertiseCommunity" : false, "exportRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 25, "lessEqual" : 28 } ], "ipv6PrefixFilters" : [ { "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] }, "importRoutePolicy" : { "nodes" : [ { "nodeIndex" : 20060, "mode" : "permit", "matchCondition" : { "ipPrefix" : { "name" : "", "prefixFilters" : [ { "ipv4Address" : "10.1.0.0", "maskLength" : 24, "greaterEqual" : 25, "lessEqual" : 28 } ], "ipv6PrefixFilters" : [ { "ipv6Address" : "fc00::", "maskLength" : 96, "greaterEqual" : 96, "lessEqual" : 96 } ] }, "communityFilters" : [ { "name" : "bgpCommunityFilterTest", "communityNodes" : [ { "matchMode" : "permit", "communityMembers" : [ "65520:4555" ] } ], "wholeMatch" : "" } ] }, "applyAction" : { "applyCommunity" : { "communityNumbers" : [ "1000" ], "additive" : "", "none" : "" }, "applyExtCommunity" : { "rtFilters" : [ "65520:4552" ], "additive" : true }, "applyCommunityDelete" : { "communityFilterName" : "communityTest" }, "applyAsPath" : { "asNumbers" : [ "1000" ], "additive" : "", "overwrite" : "", "none" : "" }, "applyMetric" : { "cost" : "24", "sign" : "add" }, "localPreference" : 100, "preferredValue" : 100 }, "nextNode" : { "nextNodeIndex" : 20080 } } ] } } ], "vpnv6Enable" : true, "configSource" : "Wan", "nextHopInvariable" : true } ] } ] }
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 bgpRouteInfos 是 REFERENCE 详细请参见表2。 至多支持同一站点两个设备同时创建。 - 表2 BgpPeerInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 peerInfos 否 ARRAY_REFERENCE 0-11个列表项,详细请参见表3。 BGP路由peer信息。 - 表3 BgpPeerInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 siteId 是 uuid - - 站点ID,UUID格式,创建、更新、删除必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" deviceId 否 uuid - - 设备ID,UUID格式,创建、更新、删除必填。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" tnpId 否 uuid - - tnpID,UUID格式,tnpId和vpnId不可同时为空或同时赋值。tnpId对应物理口类型不可是LoopBack。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" vpnId 否 uuid - - vpnID,UUID格式,tnpId和vpnId不可同时为空或同时赋值。 "fbb684c8-0d37-496f-bafa-4b06d515j7l6" peers 否 ARRAY_REFERENCE 0-100个列表项,详细请参见表5。 peer信息。 -
  • 请求示例 HTTP的示例 POST /v1/devicemgr/devices/dfs-groups/action/batch-create HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "params" : [ { "name" : "dfs-group-name-1", "deviceIds" : ["as25fdbf-8dee-4823-bac2-5bfe8e3359cb","as25fdbf-8dee-4823-bac2-5bfe8e3359cd"], "siteId" : "9a79a511-94d0-4288-84ed-ab9710d2396c" } ] }
  • 响应示例 返回状态码为200:创建全部成功,批量创建DfsGroup结果 { "successList" : [ { "id" : "d25de9be-1d9a-4d06-a519-09ff92fee050", "deviceIds" : ["as25fdbf-8dee-4823-bac2-5bfe8e3359cb","as25fdbf-8dee-4823-bac2-5bfe8e3359cd"] } ], "failedList" : [] } 返回状态码为207:创建部分成功,批量创建DfsGroup结果 { "successList" : [ { "id" : "d25de9be-1d9a-4d06-a519-09ff92fee050", "deviceIds" : ["as25fdbf-8dee-4823-bac2-5bfe8e3359cb","as25fdbf-8dee-4823-bac2-5bfe8e3359cd"] } ], "failedList" : [ { "errorCode" : "errorCode", "errorMsg" : "errorMsg", "name" : "dfs-group-name-1", "deviceIds" : ["as25fdbf-8dee-4823-bac2-5bfe8e3359cb","as25fdbf-8dee-4823-bac2-5bfe8e3359cd"] } ] } 返回状态码为400:参数错误或者全部失败 { "successList" : [], "failedList" : [ { "errorCode" : "errorCode", "errorMsg" : "errorMsg", "name" : "dfs-group-name-1", "deviceIds" : ["as25fdbf-8dee-4823-bac2-5bfe8e3359cb","as25fdbf-8dee-4823-bac2-5bfe8e3359cd"] } ] } 返回状态码为500:服务内部错误 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为200:子卡资源查询成功。 HTTP/1.1 200 OK Date: Tue,30 Oct 2018 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "code" : 0, "data" : [ { "nedn" : "a4059c31-7ad3-11e9-b906-000c29b01448", "neName" : "AR1220-56", "framedn" : "a4059c31-7ad3-11e9-b906-000c29b01448,FR=0", "slotdn" : "a4059c31-7ad3-11e9-b906-000c29b01448,FR=0,S=0", "slotname" : "SRU Board 0", "subslotdn" : "a4059c31-7ad3-11e9-b906-000c29b01448,FR=0,S=0,SS=0", "frameno" : 0, "slotno" : 0, "subslotindex" : 16397, "subslotno" : 0, "descr" : "FAN Card", "subslotname" : "FAN Card 0/1", "vendortype" : ".1.3.6.1.4.1.2011.20021210.13.0", "physicalclass" : 9, "hardversion" : "VER.0", "firmversion" : "Hex:31 30 39", "softversion" : "0", "adminstatus" : 4, "operstatus" : 3, "modelname" : "--", "serialnum" : "030KSB10B3000060", "mfgname" : "Huawei" } ], "description" : "查询成功。" } 返回状态码为400:参数错误。 HTTP/1.1 400 Bad Request Date: Tue,30 Oct 2018 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为404:rest接口没找到。 HTTP/1.1 404 Not Found Date: Tue,30 Oct 2018 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:默认ServiceException异常码,应用内部错误。 HTTP/1.1 500 Internal Server Error Date: Tue,30 Oct 2018 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应参数 返回状态码为200:子卡资源查询成功。 表2 SubSlotResResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 code int32 - 0 操作返回码。可以是如下值之一: 0:成功 非0:失败 0 data ARRAY_REFERENCE 详细请参见表3。 - - description string - - 描述信息。 "查询成功。" 表3 SubSlotResData对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 nedn string - - 设备dn。 "a4059c31-7ad3-11e9-b906-000c29b01448" neName string - - 设备名称。 "AR1220-56" framedn string - - 机框dn。 "a4059c31-7ad3-11e9-b906-000c29b01448,FR=0" slotdn string - - 单板dn。 "a4059c31-7ad3-11e9-b906-000c29b01448,FR=0,S=0" slotname string - - 单板名称。 "SRU Board 0" subslotdn string - - 子卡dn。 "a4059c31-7ad3-11e9-b906-000c29b01448,FR=0,S=0,SS=0" frameno integer - - 机框序号。 0 slotno integer - - 单板序号。 0 subslotindex integer - - 子卡索引。 16397 subslotno integer - - 子卡序号。 0 descr string - - 子卡描述。 "FAN Card" subslotname string - - 子卡名称。 "FAN Card 0/1" vendortype string - - 厂商类型。 ".1.3.6.1.4.1.2011.20021210.13.0" physicalclass integer - - 设备上实体大类型: 3:框 4:背板 5:子槽 6:电源 7:风扇 9:板 10:端口 9 hardversion string - - 硬件版本。 "VER.0" firmversion string - - firm版本。 "Hex:31 30 39" softversion string - - 软件版本。 "0" adminstatus integer - - 管理状态: 4、11:正常 2、3、12:错误 13:LoopBack 4 operstatus integer - - 操作状态: 3、11、13、15、16:正常 2、12、17:错误 4:离线 其他:未知 3 modelname string - - 模块名称。 "--" serialnum string - - 序列号。 "030KSB10B3000060" mfgname string - - 组件名称,物理固件的制造厂商。 "Huawei" 返回状态码为400:参数错误。 详细信息请参见实际响应消息体。 返回状态码为404:rest接口没找到。 详细信息请参见实际响应消息体。 返回状态码为500:默认ServiceException异常码,应用内部错误。 详细信息请参见实际响应消息体。
共99303条