Skip to content

Commit 746eac6

Browse files
authored
Merge branch 'main' into sudhir-gnmi-1.24
2 parents d6e7423 + e30a202 commit 746eac6

File tree

44 files changed

+2671
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2671
-235
lines changed
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# RT-1.71: BGP Disable Peer AS Filter (`disable-peer-as-filter`)
2+
3+
## Summary
4+
5+
Verifies BGP disable-peer-as-filter functionality for both IPv4 and IPv6 Unicast sessions. This feature ensures that a router can accept routes from an eBGP peer even if the receiving router's own AS is present in the AS-PATH.
6+
7+
## Testbed type
8+
9+
* [TESTBED_DUT_ATE_2LINKS](https://github.com/openconfig/featureprofiles/blob/main/topologies/ate_tests/base_2link_topology.testbed)
10+
11+
## Topology
12+
13+
```mermaid
14+
flowchart LR
15+
subgraph ATE ["Automated Test Equipment"]
16+
ATE1(["Port 1 AS 64496"])
17+
ATE2(["Port 2 AS 64497"])
18+
end
19+
20+
subgraph DUT_Domain ["Device Under Test"]
21+
DUT(["DUT AS 64498"])
22+
end
23+
24+
ATE1 <-->|eBGP| DUT
25+
DUT <-->|eBGP| ATE2
26+
```
27+
28+
* **ATE Port 1** (AS 64496) connects to the **DUT** (AS 64498) via eBGP.
29+
* **DUT** (AS 64498) connects to **ATE Port 2** (AS 64497) via eBGP.
30+
31+
## Test environment setup
32+
33+
1. Configure eBGP sessions (IPv4 and IPv6) between ATE Port 1, DUT, and ATE Port 2.
34+
2. Use the following RFC-compliant addresses:
35+
* **Link 1 (ATE1 - DUT):** `192.0.2.0/30`, `2001:db8::1/126`
36+
* **Link 2 (ATE2 - DUT):** `198.51.100.0/30`, `2001:db8::5/126`
37+
38+
39+
## Procedure
40+
41+
### RT-1.71.1: Baseline Test (Default Filtering)
42+
43+
1. Establish eBGP sessions (IPv4 and IPv6) between ATE Port 1, DUT, and ATE Port 2.
44+
2. Advertise a prefix (e.g., `192.0.2.100/32` and `2001:db8:64:64::1/64`) from ATE Port 1 with an AS-PATH containing the target peer's AS (`64497`) in the middle (e.g., AS-PATH: `64496 64497 64499`).
45+
3. Verify that the DUT **does not advertise** the route to ATE Port 2.
46+
4. Verify that ATE Port 2 **does not receive** the route.
47+
48+
### RT-1.71.2: Test `disable-peer-as-filter = TRUE` (Transit AS)
49+
50+
1. Enable `disable-peer-as-filter` on the DUT's neighbor/peer-group configuration towards ATE Port 2 (AS 64497).
51+
2. Re-advertise the prefixes from ATE Port 1 with the same AS-PATH (`64496 64497 64499`).
52+
3. Verify that the DUT **advertises** the route to ATE Port 2.
53+
4. Verify that ATE Port 2 **receives** the route.
54+
5. Validate for both IPv4 and IPv6 families.
55+
56+
### RT-1.71.3: Test "Originating Peer AS"
57+
58+
1. Ensure `disable-peer-as-filter` is enabled on the DUT's neighbor configuration towards ATE Port 2.
59+
2. Advertise a prefix from ATE Port 1 with an AS-PATH where the target peer's AS (`64497`) is the **originating AS** (e.g., AS-PATH: `64496 64499 64497`).
60+
3. Verify that the DUT **advertises** the route to ATE Port 2.
61+
4. Verify that ATE Port 2 **receives** the route.
62+
5. Validate session state and capabilities received on DUT using telemetry.
63+
64+
65+
### RT-1.71.4: Private AS Number Scenario
66+
67+
```mermaid
68+
graph LR
69+
subgraph ATE ["ATE"]
70+
direction TB
71+
ATE1["Port 1<br/>(AS 64496)"]
72+
ATE2["Port 2<br/>(AS 64512)"]
73+
end
74+
75+
subgraph DUT_Domain ["DUT"]
76+
DUT["DUT<br/>(AS 64498)"]
77+
end
78+
79+
%% Advertisement Flow for RT-1.71.4
80+
ATE1 -- "Advertise Prefix<br/>(AS-PATH: 64496 64499 64512)" --> DUT
81+
DUT -- "Propagate to Peer with<br/>AS 64512 in PATH" --> ATE2
82+
```
83+
84+
1. Configure **ATE Port 2** with a private AS number (e.g., `64512`).
85+
2. Configure the **DUT** (AS `64498`) with `disable-peer-as-filter = TRUE` on the neighbor configuration towards ATE Port 2.
86+
3. Advertise a prefix from **ATE Port 1** with an AS-PATH that includes ATE Port 2's AS (e.g., AS-PATH: `64496 64499 64512`).
87+
4. Verify that the DUT **advertises** the route to ATE Port 2 (AS 64512).
88+
5. Verify that ATE Port 2 **receives** the route.
89+
90+
### RT-1.71.5: Test "Peer-group and Neighbor level"
91+
92+
Ensure the tests are performed for BGP configuration at the Peer-group as well as at the Neighbor levels
93+
94+
## Canonical OC
95+
96+
```json
97+
{
98+
"network-instances": {
99+
"network-instance": [
100+
{
101+
"name": "DEFAULT",
102+
"config": {
103+
"name": "DEFAULT"
104+
},
105+
"protocols": {
106+
"protocol": [
107+
{
108+
"identifier": "BGP",
109+
"name": "BGP",
110+
"config": {
111+
"identifier": "BGP",
112+
"name": "BGP"
113+
},
114+
"bgp": {
115+
"peer-groups": {
116+
"peer-group": [
117+
{
118+
"peer-group-name": "BGP-PEER-GROUP1",
119+
"config": {
120+
"peer-group-name": "BGP-PEER-GROUP1"
121+
},
122+
"as-path-options": {
123+
"config": {
124+
"disable-peer-as-filter": true
125+
}
126+
}
127+
}
128+
]
129+
}
130+
}
131+
}
132+
]
133+
}
134+
}
135+
]
136+
}
137+
}
138+
```
139+
140+
## OpenConfig Path and RPC Coverage
141+
142+
```yaml
143+
paths:
144+
## Config paths
145+
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/as-path-options/config/disable-peer-as-filter:
146+
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/as-path-options/config/disable-peer-as-filter:
147+
148+
## State paths
149+
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/as-path-options/state/disable-peer-as-filter:
150+
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/as-path-options/state/disable-peer-as-filter:
151+
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state:
152+
153+
rpcs:
154+
gnmi:
155+
gNMI.Set:
156+
union_replace: true
157+
gNMI.Subscribe:
158+
on_change: true
159+
```
160+
161+
## Required DUT platform
162+
163+
* vRX - virtual router device
164+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto
2+
# proto-message: Metadata
3+
4+
uuid: "0a9bd744-53e0-4152-bb30-ef23d5c3fe78"
5+
plan_id: "RT-1.71"
6+
description: "BGP Disable Peer AS Filter (`disable-peer-as-filter`)"
7+
testbed: TESTBED_DUT_ATE_2LINKS

feature/bgp/policybase/otg_tests/link_bandwidth_test/link_bandwidth_test.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -382,21 +382,15 @@ func validateImportPolicyDut(t *testing.T, dut *ondatra.DUTDevice, td testData,
382382
t.Fatalf("invalid import policy")
383383
}
384384
// Validating if OTG has learnt 3 prefixes with subnet 203.0.0.0/16 on which policy applied
385-
receivedPrefixes := map[string]bool{}
386-
var bgpPrefixes []*otgtelemetry.BgpPeer_UnicastIpv4Prefix
387385
_, pok := gnmi.WatchAll(t, td.ate.OTG(), gnmi.OTG().BgpPeer(td.otgP2.Name()+".BGP4.peer").UnicastIpv4PrefixAny().State(), 2*time.Minute, func(v *ygnmi.Value[*otgtelemetry.BgpPeer_UnicastIpv4Prefix]) bool {
388-
prefix, present := v.Val()
389-
if !present {
390-
return false
391-
}
392-
receivedPrefixes[prefix.GetAddress()] = true
393-
bgpPrefixes = append(bgpPrefixes, prefix)
394-
return len(receivedPrefixes) == 3
386+
_, present := v.Val()
387+
return present
395388
}).Await(t)
396389
if !pok {
397-
t.Fatalf("Prefixes not installed on OTG port 2, got: %v", receivedPrefixes)
390+
t.Fatalf("Prefixes not installed on OTG port 2")
398391
}
399392
found := 0
393+
bgpPrefixes := gnmi.GetAll(t, td.ate.OTG(), gnmi.OTG().BgpPeer(td.otgP2.Name()+".BGP4.peer").UnicastIpv4PrefixAny().State())
400394
for _, bgpPrefix := range bgpPrefixes {
401395
_, ok := gnmi.Watch(t, td.ate.OTG(), gnmi.OTG().BgpPeer(td.otgP2.Name()+".BGP4.peer").UnicastIpv4Prefix(bgpPrefix.GetAddress(), bgpPrefix.GetPrefixLength(), bgpPrefix.GetOrigin(), bgpPrefix.GetPathId()).State(), 10*time.Second, func(v *ygnmi.Value[*otgtelemetry.BgpPeer_UnicastIpv4Prefix]) bool {
402396
if !v.IsPresent() {
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# CNTR-3: Container Supervisor Failover
2+
3+
## Summary
4+
5+
Verify that containers and volumes persist across a control processor switchover (failover).
6+
7+
## Procedure
8+
9+
* Build the test container as described below.
10+
* Pass the tarball of the container to the test as an argument.
11+
12+
### Build Test Container
13+
14+
The test container is available in the feature profile repository under
15+
`internal/cntrsrv`.
16+
17+
Start by entering in that directory and running the following commands:
18+
19+
```shell
20+
$ cd internal/cntrsrv
21+
$ go mod vendor
22+
$ CGO_ENABLED=0 go build .
23+
$ docker build -f build/Dockerfile.local -t cntrsrv_image:latest .
24+
```
25+
26+
At this point you will have a container image build for the test container.
27+
28+
```shell
29+
$ docker images
30+
REPOSITORY TAG IMAGE ID CREATED SIZE
31+
cntrsrv_image latest 8d786a6eebc8 3 minutes ago 21.4MB
32+
```
33+
34+
Now export the container to a tarball.
35+
36+
```shell
37+
$ docker save -o /tmp/cntrsrv.tar cntrsrv_image:latest
38+
```
39+
40+
This is the tarball that will be used during tests.
41+
42+
## CNTR-3.1: Image Persistence
43+
44+
1. **Load Image**: Using `gnoi.Containerz.Deploy`, load a container image onto the device.
45+
2. **Verify Load**: Verify the image exists on the device using `gnoi.Containerz.List`.
46+
3. **Trigger Failover**: Identify the standby control processor using gNMI and trigger a switchover using `gnoi.System.SwitchControlProcessor`.
47+
4. **Verify Persistence**: After the switchover, verify the loaded image is still available on the new primary control processor.
48+
49+
## CNTR-3.2, CNTR-3.3, CNTR-3.4: Container and Volume Persistence
50+
51+
1. **Setup**:
52+
* Using `gnoi.Containerz.CreateVolume`, create a volume.
53+
* Using `gnoi.Containerz.Deploy`, load a container image.
54+
* Using `gnoi.Containerz.Start`, start a container that mounts the created volume.
55+
2. **Verify Setup**: Verify the container is in a `RUNNING` state and the volume exists.
56+
3. **Trigger Failover**: Identify the standby control processor using gNMI. Trigger a switchover using `gnoi.System.SwitchControlProcessor`.
57+
4. **Verify Recovery**: After the switchover, verify that the container is still `RUNNING` and the volume still exists using `gnoi.Containerz`.
58+
59+
## CNTR-3.5: Image Removal Persistence
60+
61+
1. **Load and Remove Image**: Load a container image, then remove it using `gnoi.Containerz.Deploy` with the `image_delete` option.
62+
2. **Verify Removal**: Verify the image no longer exists on the device.
63+
3. **Trigger Failover**: Trigger a control processor switchover.
64+
4. **Verify Persistence of Removal**: After the switchover, verify the image does not exist on the new primary control processor.
65+
66+
## CNTR-3.6: Container Removal Persistence
67+
68+
1. **Start and Remove Container**: Start a container, then remove it using `gnoi.Containerz.Remove`.
69+
2. **Verify Removal**: Verify the container no longer exists.
70+
3. **Trigger Failover**: Trigger a control processor switchover.
71+
4. **Verify Persistence of Removal**: After the switchover, verify the container does not exist on the new primary control processor.
72+
73+
## CNTR-3.7: Double Failover Image Persistence
74+
75+
1. **Load Image**: Load a container image onto the device.
76+
2. **First Failover**: Trigger a control processor switchover to the standby.
77+
3. **Verify Persistence**: After the first switchover, verify the image is still available on the new primary.
78+
4. **Second Failover**: Trigger another control processor switchover, returning to the original primary.
79+
5. **Verify Final Persistence**: After the second switchover, verify the image is still available.
80+
81+
## CNTR-3.8: Container Persistence On Cold Reboot
82+
83+
1. **Setup**:
84+
* Using `gnoi.Containerz.CreateVolume`, create a volume.
85+
* Using `gnoi.Containerz.Deploy`, load a container image.
86+
* Using `gnoi.Containerz.Start`, start a container that mounts the created volume.
87+
2. **Verify Setup**: Verify the container is in a `RUNNING` state and the volume exists.
88+
2. **Cold Reboot**: Trigger a cold reboot using `gnoi.System.Reboot`.
89+
3. **Verify Recovery**: After the cold reboot, verify that the container is still `RUNNING` and the volume still exists using `gnoi.Containerz`.
90+
91+
92+
## Canonical OC
93+
94+
<!-- This test does not require any specific OpenConfig configuration, so this section is empty to satisfy the validator. -->
95+
```json
96+
{}
97+
```
98+
99+
## OpenConfig Path and RPC Coverage
100+
101+
The below yaml defines the RPCs intended to be covered by this test.
102+
103+
```yaml
104+
rpcs:
105+
gnoi:
106+
containerz.Containerz.Deploy:
107+
containerz.Containerz.StartContainer:
108+
containerz.Containerz.ListContainer:
109+
containerz.Containerz.CreateVolume:
110+
containerz.Containerz.ListVolume:
111+
system.System.SwitchControlProcessor:
112+
system.System.Reboot:
113+
gnmi:
114+
gNMI.Get:
115+
gNMI.Subscribe:
116+
```

0 commit comments

Comments
 (0)