华为乾坤-批量查询VPN BGP:响应示例

时间:2025-02-17 11:37:44

响应示例

返回状态码为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
{
	"huawei-nce-e-bgp:vpn-bgp" : [
		{
			"config-status" : "configured-database-success",
			"last-committed-time" : "2022-01-01 00:00:00",
			"related-pkg-version" : "1.0.1",
			"edit-state" : "RUNNING",
			"vpn-instance" : "_public_",
			"router-id" : "10.1.0.0",
			"ipv4-unicast" : {
				"enable" : true,
				"default-route-import" : true,
				"route-select-delay" : 10,
				"reflector-cluster-id" : 10,
				"reflect-change-path" : true,
				"auto-frr" : true,
				"mode" : "be",
				"down-switch" : true,
				"route-relay-tunnel-v6-selector" : "policy1",
				"preference" : {
					"external" : 10,
					"internal" : 10,
					"local" : 10
				},
				"aggregate-route" : [
					{
						"address" : "192.168.1.1",
						"mask" : 24
					}
				],
				"network-route" : [
					{
						"address" : "192.168.1.2",
						"mask" : 24,
						"route-policy" : "policy1"
					}
				],
				"import-routing" : [
					{
						"protocol" : "static",
						"thead-id" : 10,
						"cost" : 10,
						"route-policy" : "policy1"
					}
				],
				"evpn" : {
					"srv6" : {
						"mode" : "be",
						"down-switch" : true
					},
					"locator" : [
						{
							"name" : "name"
						}
					]
				},
				"advertise-l2-evpn" : {
					"advertise-route-to-evpn" : [
						{
							"protocol" : "all",
							"advertise-route-mode" : "all"
						}
					]
				},
				"locator" : [
					{
						"name" : "name"
					}
				]
			},
			"ipv6-unicast" : {
				"enable" : true,
				"default-route-import" : true,
				"route-select-delay" : 10,
				"reflector-cluster-id" : 10,
				"reflect-change-path" : true,
				"auto-frr" : true,
				"mode" : "be",
				"down-switch" : true,
				"route-relay-tunnel-v6-selector" : "policy1",
				"preference" : {
					"external" : 10,
					"internal" : 10,
					"local" : 10
				},
				"aggregate-route" : [
					{
						"address" : "fc00::7",
						"mask" : 96
					}
				],
				"network-route" : [
					{
						"address" : "fc00::7",
						"mask" : 96
					}
				],
				"import-routing" : [
					{
						"protocol" : "static",
						"thead-id" : 10,
						"cost" : 10,
						"route-policy" : "policy1"
					}
				],
				"evpn" : {
					"srv6" : {
						"mode" : "be",
						"down-switch" : true
					},
					"locator" : [
						{
							"name" : "name"
						}
					]
				},
				"advertise-l2-evpn" : {
					"advertise-route-to-evpn" : [
						{
							"protocol" : "all",
							"advertise-route-mode" : "all"
						}
					]
				},
				"locator" : [
					{
						"name" : "name"
					}
				],
				"locator-routes" : [
					{
						"locator-name" : "name"
					}
				]
			},
			"ipv4-vpn" : {
				"enable" : true,
				"policy-vpntarget" : true
			},
			"l2vpn-evpn" : {
				"enable" : true,
				"policy-vpn-target" : true,
				"reflect-change-path" : true
			},
			"link-state-unicast" : {
				"enable" : "True",
				"domain-identifier" : "192.168.1.1",
				"reflector-cluster-id" : 10
			},
			"ipv6-srpolicy" : {
				"enable" : "True",
				"nexthop-select-depend-type" : "default",
				"router-id-filter" : true
			},
			"bgp-peer" : [
				{
					"peer-ip" : "192.168.1.1",
					"peer-as" : "1",
					"local-as-number" : "1",
					"local-if-name" : "GE0/0/0",
					"local-if-address" : "192.168.1.1",
					"ebgp-max-hop" : 10,
					"auth-type" : "password",
					"password-type" : "cipher",
					"password-text" : "Example@123",
					"key-chain-name" : "aa",
					"timer" : {
						"keep-alive-time" : 10,
						"host-time" : 10,
						"connect-retry-time" : 10
					},
					"ipv4-unicast" : {
						"enable" : true,
						"allow-as-loop" : 1,
						"advertise-community" : true,
						"advertise-ext-community" : true,
						"nexthop-config" : "local",
						"prefix-sid" : "default",
						"reflect-client" : true,
						"export-route-policy" : "policy1",
						"import-route-policy" : "policy1",
						"route-update-interval" : 10
					},
					"ipv6-unicast" : {
						"enable" : true,
						"allow-as-loop" : 1,
						"advertise-community" : true,
						"advertise-ext-community" : true,
						"nexthop-config" : "local",
						"prefix-sid" : "default",
						"reflect-client" : true,
						"export-route-policy" : "policy1",
						"import-route-policy" : "policy1"
					},
					"ipv4-vpn" : {
						"enable" : true,
						"export-route-policy" : "policy1",
						"import-route-policy" : "policy1"
					},
					"l2vpn-evpn" : {
						"enable" : true,
						"reflect-client" : true,
						"export-route-policy" : "policy1",
						"import-route-policy" : "policy1"
					},
					"link-state-unicast" : {
						"enable" : "True",
						"reflect-client" : true,
						"export-route-policy" : "policy1"
					},
					"ipv6-srpolicy" : {
						"enable" : "True",
						"reflect-client" : true,
						"advertise-ext-community" : true,
						"graceful-restart-static-timer" : 3600
					},
					"bfd" : {
						"enable" : true,
						"multiplier" : 3,
						"min-rx-interval" : 10,
						"min-tx-interval" : 10
					}
				}
			]
		}
	]
}

返回状态码为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_0000001899844969.html