华为乾坤-更新内联链路:响应示例

时间:2025-02-17 11:36:19

响应示例

返回状态码为200:更新内联链路成功,响应体参考InterLinkResponse。

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",
			"interLink" : {
				"type" : "l3-interface",
				"enableGre" : false,
				"vlanMin" : 4000,
				"vlanMax" : 4008,
				"extendVlans" : ["1:9"],
				"portPairs" : [
					{
						"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
						"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
						"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
						"device1PortType" : "GE",
						"device1PortNum" : "0/0/1",
						"device1PortAddress" : "192.168.101.1",
						"device1PortMask" : 24,
						"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
						"device2PortType" : "GE",
						"device2PortNum" : "0/0/1",
						"device2PortAddress" : "192.168.101.1",
						"device2PortMask" : 24
					}
				],
				"mtu" : 1500,
				"mss" : 1200
			}
		}
	],
	"fail" : [
		{
			"errcode" : "0",
			"errmsg" : "",
			"data" : {
				"id" : "a99f794e-b510-438c-a75d-de59f02347eb",
				"interLink" : {
					"type" : "l3-interface",
					"enableGre" : false,
					"vlanMin" : 4000,
					"vlanMax" : 4008,
					"extendVlans" : ["1:9"],
					"portPairs" : [
						{
							"device1PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
							"device2PortId" : "a99f794e-b510-438c-a75d-de59f02347eb",
							"device1Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
							"device1PortType" : "GE",
							"device1PortNum" : "0/0/1",
							"device1PortAddress" : "192.168.101.1",
							"device1PortMask" : 24,
							"device2Id" : "a99f794e-b510-438c-a75d-de59f02347eb",
							"device2PortType" : "GE",
							"device2PortNum" : "0/0/1",
							"device2PortAddress" : "192.168.101.1",
							"device2PortMask" : 24
						}
					],
					"mtu" : 1500,
					"mss" : 1200
				}
			}
		}
	]
}

返回状态码为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
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001852226544.html