Skip to content

Commit

Permalink
Merge branch 'main' into TUN13
Browse files Browse the repository at this point in the history
  • Loading branch information
charantejag504 authored Oct 11, 2024
2 parents f3915ac + 29594e3 commit 1a0fbf9
Show file tree
Hide file tree
Showing 439 changed files with 18,370 additions and 10,772 deletions.
32 changes: 26 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Each line is a file pattern followed by one or more owners.
# Order is important; the last matching pattern takes the most
# precedence.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @openconfig/featureprofiles-maintainers will be requested for
# review when someone opens a pull request.
* @openconfig/featureprofiles-maintainers @openconfig/featureprofiles-quattro-tl
* @openconfig/featureprofiles-maintainers

# Tests which are ported from ate_tests to otg_tests may be reviewed by this team.
**/otg_tests/** @openconfig/featureprofiles-maintainers-otg @openconfig/featureprofiles-maintainers @openconfig/featureprofiles-quattro-tl
/internal/otgutils/ @openconfig/featureprofiles-maintainers-otg @openconfig/featureprofiles-maintainers @openconfig/featureprofiles-quattro-tl
# /feature folders each have owners who are auto requested for review and may merge PR's
/feature/acl/ @alokmtri-g
/feature/aft/ @sudhinj
/feature/bgp/ @dplore
/feature/dhcp/ @alokmtri-g
/feature/ethernet/ @ram-mac
/feature/interface/ @ram-mac
/feature/isis/ @rohit-rp
/feature/lldp/ @alokmtri-g
/feature/mpls/ @swetha-haridasula
/feature/mtu/ @swetha-haridasula
/feature/networkinstance/ @swetha-haridasula
/feature/platform/ @amrindrr
/feature/qos @sezhang2
/feature/routing_policy/ @swetha-haridasula
/feature/sampling/ @sudhinj
/feature/security @mihirpitale-googler
/feature/staticroute/ @swetha-haridasula
/feature/stp/ @alokmtri-g
/feature/system @self-maurya
/feature/vrrp @amrindrr

# Order is important; the last matching pattern takes the most
# precedence.
# Common OTG utilities
/internal/otgutils/ @openconfig/featureprofiles-maintainers-otg
15 changes: 8 additions & 7 deletions .github/workflows/nosimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,22 @@ jobs:
- name: Generate Examples and Check No Diff
run: |
cd tools/nosimage
go run example/generate_example.go -file-path example/example_nosimageprofile.textproto
go run example/generate_example.go -file-path example/example_nosimageprofile_invalid.textproto -invalid
go generate ./example
git diff --exit-code --ignore-all-space --ignore-blank-lines
- name: Validate Good Example
run: |
cd tools/nosimage
go run validate/validate.go -file example/example_nosimageprofile.textproto; rm -rf tmp
go run validate/validate.go -file example/valid_example_nosimageprofile.textproto; rm -rf tmp
- name: Validate Bad Example
run: |
cd tools/nosimage
if go run validate/validate.go -file example/example_nosimageprofile_invalid.textproto; then
echo "Validation passed, but failure expected"
exit 1
fi
for file in example/invalid-*.textproto; do
if go run validate/validate.go -file "$file"; then
echo "Validation passed for $file, but failure expected"
exit 1
fi
done
rm -rf tmp
4 changes: 2 additions & 2 deletions .github/workflows/readme_oc_path_and_rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
go install ./tools/validate_readme_spec
exemption_flags=(
--non-test-readme security/gnsi/certz/test_data/README.md
--non-test-readme experimental/p4rt/README.md
--non-test-readme feature/security/gnsi/certz/test_data/README.md
--non-test-readme feature/p4rt/README.md
--non-test-readme feature/security/gnsi/acctz/README.md
)
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*~
topologies/kne/testbed.kne.yml
.vscode/
.idea/
# used by `make validate_paths`
openconfig_public/
# used by `make proto/...`
Expand Down
21 changes: 8 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ The directory tree is organized as follows:
* `cloudbuild/` contains google cloud build scripts for running virtual
routers in containers on [KNE](https://github.com/openconfig/kne)
* `feature/` contains definition and tests of feature profiles.
* `feature/experimental` contains new features and tests which are not yet
categorized or not confirmed to pass on any hardware platform or software
release. When the test is deemed more mature, it is moved to the `feature/`
directory.
* `internal/` contains packages used by feature profile tests.
* `proto/` contains protobuf files for feature profiles.
* `tools/` contains code used for CI checks.
Expand Down Expand Up @@ -96,7 +92,7 @@ allowed file types, please file an issue for discussion.
## Test Suite Organization

Test suites should be placed in subdirectories formatted like
`feature/<featurename>/[<sub-feature>/]<tests|ate_tests|otg_tests|kne_tests>/<test_name>/<test_name>.go`.
`feature/<featurename>/[<sub-feature>/]<tests|otg_tests|kne_tests>/<test_name>/<test_name>.go`.
For example:

* `feature/interface/` is the collection of interface feature profiles.
Expand All @@ -107,7 +103,8 @@ For example:
* `feature/interface/singleton/feature.textproto` - defines the singleton
interface feature profile in machine readable format.
* `feature/interface/singleton/ate_tests/` contains the singleton interfaces
test suite using ATE traffic generation API.
test suite using ATE traffic generation API. Note, use of the ATE API is
deprecated and should not be used for any new test development.
* `feature/interface/singleton/otg_tests/` contains the singleton interfaces
test suite using OTG traffic generation API.
* `feature/interface/singleton/kne_tests/` contains the singleton interfaces
Expand Down Expand Up @@ -177,7 +174,7 @@ were discovered when implementing the code.
## Test Structure

Generally, a Feature Profiles ONDATRA test has the following stages: configure
DUT, configure ATE, generate and verify traffic, verify telemetry. The
DUT, configure OTG, generate and verify traffic, verify telemetry. The
configuration stages should be factored out to their own functions, and any
subtests should be run under `t.Run` so the test output clearly reflects which
parts of the test passed and which parts failed.
Expand All @@ -189,13 +186,13 @@ occurred.
```
func TestFoo(t *testing.T) {
configureDUT(t) // calls t.Fatal() on error.
configureATE(t) // calls t.Fatal() on error.
configureOTG(t) // calls t.Fatal() on error.
t.Run("Traffic", func(t *testing.T) { ... })
t.Run("Telemetry", func(t *testing.T) { ... })
}
```

In the above example, `configureDUT` and `configureATE` should not be subtests,
In the above example, `configureDUT` and `configureOTG` should not be subtests,
otherwise they could be skipped when someone specifies a test filter. The
"Traffic" and "Telemetry" subtests will both run even if there is a fatal
condition during `t.Run()`.
Expand All @@ -219,7 +216,7 @@ func TestTableDriven(t *testing.T) {
t.Run(c.name, func(t *testing.T) {
t.Log("Description: ", c.desc)
configureDUT(t, /* parameterized by c */)
configureATE(t, /* parameterized by c */)
configureOTG(t, /* parameterized by c */)
t.Run("Traffic", func(t *testing.T) { ... })
t.Run("Telemetry", func(t *testing.T) { ... })
})
Expand Down Expand Up @@ -432,8 +429,6 @@ To contribute a pull request:
[GitHub Quickstart](https://docs.github.com/en/get-started/quickstart)
guide.

* New contributions should be in the feature/experimental directory.

1. When opening a pull request, use a descriptive title and detail. See
[Pull Request Title](#pull-request-title) below.

Expand Down Expand Up @@ -480,7 +475,7 @@ preferred format is:
```
* (M) internal/fptest/*
- Add a helper for referencing a keychain from other modules.
* (M) feature/experimental/isis/ate_tests/base_adjacencies_test
* (M) feature/isis/otg_tests/base_adjacencies_test
- Fix testing of hello-authentication to reference a specific
keychain.
- Fix authentication of *SNP packets, referencing a keychain
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ proto/nosimage_go_proto/nosimage.pb.go: proto/nosimage.proto protoimports
protoc -I='protobuf-import' --proto_path=proto --go_out=./proto/nosimage_go_proto --go_opt=paths=source_relative --go_opt=Mnosimage.proto=proto/nosimage_go_proto --go_opt=Mgithub.com/openconfig/featureprofiles/proto/ocpaths.proto=github.com/openconfig/featureprofiles/proto/ocpaths_go_proto --go_opt=Mgithub.com/openconfig/featureprofiles/proto/ocrpcs.proto=github.com/openconfig/featureprofiles/proto/ocrpcs_go_proto nosimage.proto
goimports -w proto/nosimage_go_proto/nosimage.pb.go

proto/testregistry_go_proto/testregistry.pb.go: proto/testregistry.proto protoimports
mkdir -p proto/testregistry_go_proto
protoc -I='protobuf-import' --proto_path=proto --go_out=./proto/testregistry_go_proto --go_opt=paths=source_relative --go_opt=Mtestregistry.proto=proto/testregistry_go_proto testregistry.proto
goimports -w proto/testregistry_go_proto/testregistry.pb.go

topologies/proto/binding/binding.pb.go: topologies/proto/binding.proto protoimports
mkdir -p topologies/proto/binding
protoc -I='protobuf-import' --proto_path=topologies/proto --go_out=. --go_opt=Mbinding.proto=topologies/proto/binding binding.proto
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild/virtual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
gcloud secrets versions access latest --secret=featureprofiles-ci-ssh > builder-key
gcloud secrets versions access latest --secret=featureprofiles-ci-ssh-pub > builder-key.pub
- id: fp-presubmit
name: gcr.io/${PROJECT_ID}/remote-builder
name: us-west1-docker.pkg.dev/${PROJECT_ID}/featureprofiles-ci/remote-builder
waitFor: ["-"]
env:
- USERNAME=user
Expand Down
118 changes: 80 additions & 38 deletions feature/bgp/addpath/otg_tests/route_propagation_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,91 @@

BGP Route Propagation

## Testbed type

* [`featureprofiles/topologies/atedut_2.testbed`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_2.testbed)

## Procedure

Establish eBGP sessions between:

* ATE port-1 and DUT port-1
* ATE port-2 and DUT port-2
* Configure Route-policy under BGP peer-group address-family

For IPv4 and IPv6:

* Advertise prefixes from ATE port-1, observe received prefixes at ATE port-2.
* TODO: Specify default accept for received prefixes on DUT.
* TODO: Specify table based neighbor configuration to cover - validating the
supported capabilities from the DUT.
* TODO: MRAI (minimum route advertisement interval), ensuring routes are
advertised within specified time.
* IPv4 routes with an IPv6 next-hop when negotiating RFC5549 - validating
that routes are accepted and advertised with the specified values.
* TODO: With ADD-PATH enabled, ensure that multiple routes are accepted
from a neighbor when advertised with individual path IDs, and that these
routes are advertised to ATE port-2.

## Config Parameter Coverage

For prefix:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor

Parameters:

* afi-safis/afi-safi/add-paths/config/receive
* afi-safis/afi-safi/add-paths/config/send
* afi-safis/afi-safi/add-paths/config/send-max

## Telemetry Parameter Coverage

/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/supported-capabilities

## Protocol/RPC Parameter Coverage

BGP

* OPEN
* Capabilities (Extended nexthop encoding capability (5), ADD-PATH (69))
* UPDATE
* Extended NLRI Encodings (RFC7911)
* Nexthop AFI (RFC5549)
### RT-1.3.1: MRAI: [TODO: https://github.com/openconfig/featureprofiles/issues/3035]
* DUT: Configure the Minimum Route Advertisement Interval (MRAI) for desired behavior.
* ATE Port 2: Verify received routes adhere to the MRAI timing.

### RT-1.3.2: RFC5549
* DUT: Enable RFC5549 support:
* Update the BGP peer group configuration to enable extended next hop encoding using `/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/config/extended-next-hop-encoding`
* ATE Port 1: Advertise IPv4 routes with IPv6 next-hops.
* ATE Port 2: Validate correct acceptance and propagation of routes with IPv6 next-hops.

### RT-1.3.3: Add-Path (Initial State): [TODO: https://github.com/openconfig/featureprofiles/issues/3037]
* ATE Port 1: Advertise multiple routes with distinct path IDs for the same prefix.
* ATE Port 2: Confirm that all advertised routes are accepted and propagated by the DUT due to the initially enabled Add-Path.
* Verification (Telemetry): Verify that the DUT's telemetry output reflects the enabled Add-Path capabilities.

### RT-1.3.4: Disabling Add-Path Send: [TODO: https://github.com/openconfig/featureprofiles/issues/3037]
* DUT: Disable Add-Path send for the neighbor connected to ATE Port 2 for both IPv4 and IPv6.
* Verification (Telemetry): Confirm that the DUT's telemetry reflects the disabled Add-Path send status.
* ATE Port 1: Readvertise multiple paths.
* ATE Port 2: Verify that only a single best path is received by ATE Port 2 due to disabled Add-Path send on the DUT.

### RT-1.3.5: Disabling Add-Path Receive: [TODO: https://github.com/openconfig/featureprofiles/issues/3037]
* DUT: Disable Add-Path receive for the neighbor connected to ATE Port 1 for both IPv4 and IPv6.
* Verification (Telemetry): Confirm the disabled Add-Path receive status in telemetry.
* ATE Port 1: Advertise BGP routes to the DUT via Port 1.
* ATE Port 2: Verify that the DUT has received and propagated only one single path.

## OpenConfig Path and RPC Coverage

The below yaml defines the OC paths intended to be covered by this test.

```yaml
paths:
## Config paths
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/config/receive:
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/config/send:
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/config/send-max:
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/config/extended-next-hop-encoding:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/config/receive:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/config/send:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/config/send-max:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/timers/config/minimum-advertisement-interval:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/config/extended-next-hop-encoding:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/config/receive:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/config/send:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/config/send-max:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/config/minimum-advertisement-interval:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/config/extended-next-hop-encoding:

## State paths
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/state/receive:
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/state/send:
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/add-paths/state/send-max:
/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast/state/extended-next-hop-encoding:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/state/receive:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/state/send:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/add-paths/state/send-max:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/timers/state/minimum-advertisement-interval:
/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/state/extended-next-hop-encoding:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/state/receive:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/state/send:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/add-paths/state/send-max:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/timers/state/minimum-advertisement-interval:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/state/extended-next-hop-encoding:
/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/supported-capabilities:

rpcs:
gnmi:
gNMI.Set:
gNMI.Subscribe:
```
## Minimum DUT platform requirement
* MFF - A modular form factor device containing LINECARDs, FABRIC and redundant CONTROLLER_CARD components
* FFF - fixed form factor
Loading

0 comments on commit 1a0fbf9

Please sign in to comment.