华为乾坤-创建Overlay WAN侧BGP路由策略模板:请求示例

时间:2025-02-17 11:38:04

请求示例

HTTP的示例
POST /controller/campus/v1/sdwan/routing-protocol/overlay-wan-bgp-policy/template 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
{
	"templateName" : "Template1",
	"templateDesc" : "template desc",
	"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
				}
			}
		]
	},
	"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
				}
			}
		]
	}
}
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001988273918.html