Skip to content

Commit

Permalink
reformat to table driven
Browse files Browse the repository at this point in the history
  • Loading branch information
dplore authored Sep 22, 2023
1 parent 03920e7 commit 33fc05e
Showing 1 changed file with 42 additions and 25 deletions.
67 changes: 42 additions & 25 deletions feature/bgp/policybase/otg_tests/as_path_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,49 @@ BGP policy configuration for AS Paths and Community Sets
## Procedure

* Subtest 1
* Establish eBGP sessions between ATE port-1 and DUT port-1
* For IPv4 and IPv6 routes:
* Advertise IPv4 prefixes over IPv4 neighbor from ATE port-1, observe received prefixes at ATE port-2.
* Similarly advertise IPv6 prefixes over IPv6 neighbor from ATE port-1, observe received prefixes at ATE port-2.
* Validate that traffic can be forwarded to **all** installed routes
* Establish eBGP sessions between ATE port-1 and DUT port-1
* For IPv4 and IPv6 routes:
* Advertise IPv4 prefixes over IPv4 neighbor from ATE port-1, observe
received prefixes at ATE port-2.
* Advertise IPv6 prefixes over IPv6 neighbor from ATE port-1,
observe received prefixes at ATE port-2.
* Validate that traffic can be forwarded to **all** installed routes
between ATE port-1 and ATE port-2
* Subtest 2
* Create table based tests to cover policy configuration under peer-group AFI for each of the below policies
* as-path with match-set-options ANY
* `{ as-path-set-member = [ 100, 200, 300 ], match-set-options=ANY }`
* as-path using regex with match-set-options ANY
* `{ as-path-set-member = [ '10[0-9]' ], match-set-options=ANY }`
* as-path with match-set-options ALL
* `{ as-path-set-member = [ 100, 200, 300 ], match-set-options=ALL }`
* community-set with match-set-options ANY
* `{ community-member = [ 1000, 2000, 3000 ], match-set-options=ANY }`
* community-set using regex with match-set-options ANY
* `{ community-member = [ 100[0-9], 2000, 3000 ], match-set-options=ANY }`
* community-set with match-set-options ALL
* `{ community-member = [ 1000, 2000, 3000 ], match-set-options=ALL }`

* For each table based test, validate that traffic can be forwarded to **all** installed routes
between ATE port-1 and ATE port-2, validate that flows between all
denied routes cannot be forwarded.
* Validate that traffic is not forwarded to withdrawn routes between ATE
port-1 and ATE port-2.

* Subtest 2 for as-path-set
* Create table based tests for each of the following policies
* Create an as-path-set/name "my_3_aspaths" with members and match options as follows
* `{ as-path-set-member = [ "100", "200", "300" ], match-set-options=ANY }`
* Create an as-path-set/name "my_regex_aspaths" with one member as follows
* `{ as-path-set-member = [ "10[0-9]" ], match-set-options=ANY }`
* Create an as-path-set/name "all_3_aspaths" with members and match options as follows
* `{ as-path-set-member = [ "100", "200", "300" ], match-set-options=ALL }`
* For each table based test, validate that traffic can be forwarded to
all installed routes between ATE port-1 and ATE port-2, validate that
traffic flows between all denied routes cannot be forwarded.
* Advertise routes in with as path `[100, 200, 300]`
* Advertise routes in with as path `[100, 101, 200]`
* Advertise routes with as path `[110]`
* Advertise routes with as path `[400]`


* Subtest 3 for community-set
* Create table based tests for each of the following policies
* Create a named community-set with members and match options as follows
* `{ community-member = [ "1000", "2000", "3000" ], match-set-options=ANY }`
* Create a named community-set with members and match options as follows
* `{ community-member = [ "100[0-9]" ], match-set-options=ANY }`
* Create a named community-set with members and match options as follows
* `{ community-member = [ "1000", "2000", "3000" ], match-set-options=ALL }`
* For each table based test, validate that traffic can be forwarded to
all installed routes between ATE port-1 and ATE port-2, validate that
traffic flows between all denied routes cannot be forwarded.
* Advertise routes with communities `[1000,2000,3000]`
* Advertise routes with communities `[1000,1001,2000]`
* Advertise routes with communities `[1100]`
* Advertise routes with communities `[4000]`
* Verify traffic is forwarded for routes with matching policy
* Verify traffic is not forwarded for routes without matching policy

## Config Parameter Coverage

Expand Down

0 comments on commit 33fc05e

Please sign in to comment.