云服务器内容精选
-
请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/routing-protocol/ospf/global 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 { "globalInfos" : [ { "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 } } ] }, "configSource" : "Wan" } ] }
-
响应示例 返回状态码为200:接口调用成功,响应体参考OspfRouteGlobalResponse,返回的OSPF路由信息中仅包含对应的ID。 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" : [ { "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 } } ] }, "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 } } ] }, "configSource" : "Wan" } } ] } 返回状态码为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
-
响应示例 返回状态码为200:接口调用成功,响应体参考OspfRouteInterfaceParamResponse,返回的OSPF路由信息中仅包含对应的ID。 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" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "processId" : 501, "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 } ] } ], "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", "processId" : 501, "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 } ] } } ] } 返回状态码为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/ospf/interface-param/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 { "interfaceParams" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "processId" : 501, "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 } ] } ] }
-
响应示例 返回状态码为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
-
请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/routing-protocol/ospf/interface-param?vpnId=a99f794e-b510-438c-a75d-de59f02347eb&tnpId=a99f794e-b510-438c-a75d-de59f02347eb&siteId=a99f794e-b510-438c-a75d-de59f02347eb 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
-
响应参数 返回状态码为200:接口调用成功,响应体参考QueryOspfRouteInterfaceInfoResponse。 表2 QueryOspfRouteInterfaceInfoResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data ARRAY_REFERENCE 0-8个列表项,详细请参见表5。 OSPF路由接口信息。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
-
响应示例 返回状态码为200:接口调用成功,响应体参考QueryOspfRouteInterfaceInfoResponse。 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" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "processId" : 501, "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 } ] } ] } 返回状态码为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/v1/sdwan/routing-protocol/ospf/interface-param 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 vpnId 否 uuid - - VPN ID。格式是uuid,vpnId与tnpId只能填一个,两者都不填表示查询站点下所有underlay数据。 "a99f794e-b510-438c-a75d-de59f02347eb" tnpId 否 uuid - - TNP ID。格式是uuid,vpnId与tnpId只能填一个,两者都不填表示查询站点下所有underlay数据。 "a99f794e-b510-438c-a75d-de59f02347eb" siteId 是 uuid - - 站点ID。格式是uuid。 "a99f794e-b510-438c-a75d-de59f02347eb"
-
响应示例 返回状态码为201:接口调用成功,响应体参考OspfRouteInterfaceParamResponse,返回的OSPF路由信息中仅包含对应的ID。 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", "processId" : 501, "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 } ] } ], "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", "processId" : 501, "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 } ] } } ] } 返回状态码为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/ospf/interface-param 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 { "interfaceParams" : [ { "siteId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "deviceId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "vpnId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "tnpId" : "fbb684c8-0d37-496f-bafa-4b06d515j7l6", "processId" : 501, "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 } ] } ] }
-
响应参数 返回状态码为201:接口调用成功,响应体参考OspfRouteInterfaceParamResponse,返回的OSPF路由信息中仅包含对应的ID。 表4 OspfRouteInterfaceParamResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-8个列表项,详细请参见表5。 创建或者更新成功的OSPF路由全局进程信息。 - fail ARRAY_REFERENCE 0-8个列表项,详细请参见表6。 创建或者更新失败的OSPF路由全局进程信息。 - 表5 OspfRouteInterfaceParamInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 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" processId int32 [1-65535] - 接口需要绑定的ospf进程id 501 ipSubnets ARRAY_REFERENCE 0-64个列表项,详细请参见表25。 三层接口参数。创建overlay ospf时必填。 - transportNetworkPorts ARRAY_REFERENCE 0-64个列表项,详细请参见表25。 TNP接口参数。创建underlay ospf时必填。 - 表6 FailOspfRouteInterfaceParamInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data REFERENCE 详细请参见表5。 OSPF路由接口信息 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
更多精彩内容
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格