Skip to content

Commit c561f3f

Browse files
authored
Add remove-private-as attributes to bgp vrf neighbor address family (#274)
1 parent 330a15f commit c561f3f

9 files changed

+426
-55
lines changed

docs/data-sources/router_bgp_vrf_neighbor_address_family.md

+7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ data "iosxr_router_bgp_vrf_neighbor_address_family" "example" {
4242
- `id` (String) The path of the retrieved object.
4343
- `next_hop_self` (Boolean) Disable the next hop calculation for this neighbor
4444
- `next_hop_self_inheritance_disable` (Boolean) Prevent next-hop-self from being inherited from the parent
45+
- `remove_private_as` (Boolean) Remove private AS number from outbound updates
46+
- `remove_private_as_entire_aspath` (Boolean) remove only if all ASes in the path are private
47+
- `remove_private_as_inbound` (Boolean) Remove private AS number from inbound updates
48+
- `remove_private_as_inbound_entire_aspath` (Boolean) remove only if all ASes in the path are private
49+
- `remove_private_as_inbound_inheritance_disable` (Boolean) Prevent remove-private-AS from being inherited from the parent
4550
- `remove_private_as_inheritance_disable` (Boolean) Prevent remove-private-AS from being inherited from the parent
51+
- `remove_private_as_internal` (Boolean) remove only if all ASes in the path are private
52+
- `remove_private_as_internal_inheritance_disable` (Boolean) Prevent remove-private-AS from being inherited from the parent
4653
- `route_policy_in` (String) Apply route policy to inbound routes
4754
- `route_policy_out` (String) Apply route policy to outbound routes
4855
- `send_community_ebgp_inheritance_disable` (Boolean) Prevent send-community-ebgp from being inherited from the parent

docs/resources/router_bgp_vrf_neighbor_address_family.md

+26-12
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,25 @@ This resource can manage the Router BGP VRF Neighbor Address Family configuratio
1414

1515
```terraform
1616
resource "iosxr_router_bgp_vrf_neighbor_address_family" "example" {
17-
as_number = "65001"
18-
vrf_name = "VRF1"
19-
neighbor_address = "10.1.1.2"
20-
af_name = "ipv4-unicast"
21-
route_policy_in = "ROUTE_POLICY_1"
22-
route_policy_out = "ROUTE_POLICY_1"
23-
default_originate_route_policy = "ROUTE_POLICY_1"
24-
next_hop_self = true
25-
next_hop_self_inheritance_disable = true
26-
soft_reconfiguration_inbound_always = true
27-
send_community_ebgp_inheritance_disable = true
28-
remove_private_as_inheritance_disable = true
17+
as_number = "65001"
18+
vrf_name = "VRF1"
19+
neighbor_address = "10.1.1.2"
20+
af_name = "ipv4-unicast"
21+
route_policy_in = "ROUTE_POLICY_1"
22+
route_policy_out = "ROUTE_POLICY_1"
23+
default_originate_route_policy = "ROUTE_POLICY_1"
24+
next_hop_self = true
25+
next_hop_self_inheritance_disable = true
26+
soft_reconfiguration_inbound_always = true
27+
send_community_ebgp_inheritance_disable = true
28+
remove_private_as = true
29+
remove_private_as_inheritance_disable = true
30+
remove_private_as_entire_aspath = true
31+
remove_private_as_internal = true
32+
remove_private_as_internal_inheritance_disable = true
33+
remove_private_as_inbound = true
34+
remove_private_as_inbound_entire_aspath = true
35+
remove_private_as_inbound_inheritance_disable = true
2936
}
3037
```
3138

@@ -49,7 +56,14 @@ resource "iosxr_router_bgp_vrf_neighbor_address_family" "example" {
4956
- `device` (String) A device name from the provider configuration.
5057
- `next_hop_self` (Boolean) Disable the next hop calculation for this neighbor
5158
- `next_hop_self_inheritance_disable` (Boolean) Prevent next-hop-self from being inherited from the parent
59+
- `remove_private_as` (Boolean) Remove private AS number from outbound updates
60+
- `remove_private_as_entire_aspath` (Boolean) remove only if all ASes in the path are private
61+
- `remove_private_as_inbound` (Boolean) Remove private AS number from inbound updates
62+
- `remove_private_as_inbound_entire_aspath` (Boolean) remove only if all ASes in the path are private
63+
- `remove_private_as_inbound_inheritance_disable` (Boolean) Prevent remove-private-AS from being inherited from the parent
5264
- `remove_private_as_inheritance_disable` (Boolean) Prevent remove-private-AS from being inherited from the parent
65+
- `remove_private_as_internal` (Boolean) remove only if all ASes in the path are private
66+
- `remove_private_as_internal_inheritance_disable` (Boolean) Prevent remove-private-AS from being inherited from the parent
5367
- `route_policy_in` (String) Apply route policy to inbound routes
5468
- `route_policy_out` (String) Apply route policy to outbound routes
5569
- `send_community_ebgp_inheritance_disable` (Boolean) Prevent send-community-ebgp from being inherited from the parent
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
resource "iosxr_router_bgp_vrf_neighbor_address_family" "example" {
2-
as_number = "65001"
3-
vrf_name = "VRF1"
4-
neighbor_address = "10.1.1.2"
5-
af_name = "ipv4-unicast"
6-
route_policy_in = "ROUTE_POLICY_1"
7-
route_policy_out = "ROUTE_POLICY_1"
8-
default_originate_route_policy = "ROUTE_POLICY_1"
9-
next_hop_self = true
10-
next_hop_self_inheritance_disable = true
11-
soft_reconfiguration_inbound_always = true
12-
send_community_ebgp_inheritance_disable = true
13-
remove_private_as_inheritance_disable = true
2+
as_number = "65001"
3+
vrf_name = "VRF1"
4+
neighbor_address = "10.1.1.2"
5+
af_name = "ipv4-unicast"
6+
route_policy_in = "ROUTE_POLICY_1"
7+
route_policy_out = "ROUTE_POLICY_1"
8+
default_originate_route_policy = "ROUTE_POLICY_1"
9+
next_hop_self = true
10+
next_hop_self_inheritance_disable = true
11+
soft_reconfiguration_inbound_always = true
12+
send_community_ebgp_inheritance_disable = true
13+
remove_private_as = true
14+
remove_private_as_inheritance_disable = true
15+
remove_private_as_entire_aspath = true
16+
remove_private_as_internal = true
17+
remove_private_as_internal_inheritance_disable = true
18+
remove_private_as_inbound = true
19+
remove_private_as_inbound_entire_aspath = true
20+
remove_private_as_inbound_inheritance_disable = true
1421
}

gen/definitions/router_bgp_vrf_neighbor_address_family.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,22 @@ attributes:
2828
example: true
2929
- yang_name: send-community-ebgp/inheritance-disable
3030
example: true
31+
- yang_name: remove-private-as
32+
example: true
3133
- yang_name: remove-private-as/inheritance-disable
3234
example: true
35+
- yang_name: remove-private-as/entire-aspath
36+
example: true
37+
- yang_name: remove-private-as/internal
38+
example: true
39+
- yang_name: remove-private-as/internal/inheritance-disable
40+
example: true
41+
- yang_name: remove-private-as-inbound
42+
example: true
43+
- yang_name: remove-private-as-inbound/entire-aspath
44+
example: true
45+
- yang_name: remove-private-as-inbound/inheritance-disable
46+
example: true
3347

3448
test_prerequisites:
3549
- path: Cisco-IOS-XR-um-vrf-cfg:/vrfs/vrf[vrf-name=VRF1]/Cisco-IOS-XR-um-router-bgp-cfg:rd/Cisco-IOS-XR-um-router-bgp-cfg:two-byte-as

internal/provider/data_source_iosxr_router_bgp_vrf_neighbor_address_family.go

+28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/data_source_iosxr_router_bgp_vrf_neighbor_address_family_test.go

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)