Skip to content

Commit

Permalink
Merge branch 'main' into ntp_src_ip
Browse files Browse the repository at this point in the history
  • Loading branch information
sachendras authored Oct 16, 2023
2 parents 4736fb0 + b73e617 commit e64214c
Show file tree
Hide file tree
Showing 393 changed files with 11,929 additions and 36,667 deletions.
48 changes: 6 additions & 42 deletions .github/ISSUE_TEMPLATE/new_test_requirement.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,15 @@
---
name: New featureprofiles test requirement
about: Use this template to document the requirements for a new test to be implemented.
about: Use this template to create an issue to assign and track implemenation of the code for a test.
title: ''
labels: enhancement
assignees: ''

---

# TestID-x.y: Short name of test here

## Summary

Write a few sentences or paragraphs describing the purpose and scope of the test.

## Procedure

* Test #1 - Name of test
* Step 1
* Step 2
* Step 3

* Test #2 - New of test
* Step 1
* Step 2
* Step 3


## Config Parameter Coverage

Add list of OpenConfig 'config' paths used in this test, if any.

## Telemetry Parameter Coverage

Add list of OpenConfig 'state' paths used in this test, if any.

## Protocol/RPC Parameter Coverage
# Request for New Test Code Implementation Instructions

Add list of OpenConfig RPC's (gNMI, gNOI, gNSI, gRIBI) used in the list
* The label 'enhancement' is automatically set by this template.
* Add a label for the test priority according to the test requirements. (p0, p1, p2)
* Add a link in this issue description to the README.md for the test requirements. For example:

For example:
* gNMI
* Set
* Subscribe
* gNOI
* System
* KillProcess
* Healthz
* Get
* Check
* Artifact
Implement code for [Test name here](https://github.com/openconfig/featureprofiles/blob/main/feature/example/tests/topology_test/README.md)
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ See [addrundata](/tools/addrundata/README.md) for more info.

For example:

* `feature/interface/singleton/ate_tests/singleton_test/README.md` - documents
* `feature/interface/singleton/otg_tests/singleton_test/README.md` - documents
the test plan for the issue
[RT-5.1 Singleton Interface](https://github.com/openconfig/featureprofiles/issues/111).
* `feature/interface/singleton/ate_tests/singleton_test/singleton_test.go`
* `feature/interface/singleton/otg_tests/singleton_test/singleton_test.go`
implements the issue.
* `feature/interface/singleton/ate_tests/singleton_test/rundata_test.go`
* `feature/interface/singleton/otg_tests/singleton_test/rundata_test.go`
contains the rundata.

## Code Should Follow The Test Plan
Expand Down
53 changes: 43 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ protocols such as BGP, IS-IS.

Feature profiles also includes a suite of
[Ondatra](https://github.com/openconfig/ondatra) tests for validating the
network device behavior for each defined feature.
network device behavior for each defined feature. If you are new to Ondatra,
please start by reading the Ondata
[README](https://github.com/openconfig/ondatra#readme) and taking the [Ondatra
tour](https://docs.google.com/viewer?url=https://raw.githubusercontent.com/openconfig/ondatra/main/internal/tour/tour.pdf).

# Contributing

Expand All @@ -31,7 +34,9 @@ First, follow the
Then follow the per-vendor instructions below for creating a KNE topology and
running a test on it.

## Arista cEOS
## Arista

### cEOS

[Arista cEOS](https://www.arista.com/en/products/software-controlled-container-networking)
images can be obtained by contacting Arista.
Expand All @@ -54,7 +59,9 @@ go test ./feature/system/tests/... -kne-topo $PWD/topologies/kne/arista/ceos/top
kne delete topologies/kne/arista/ceos/topology.textproto
```

## Cisco 8000e
## Cisco

### 8000e

> NOTE: `8000e` images require the host supports nested virtualization.
Expand All @@ -78,7 +85,7 @@ go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/cisco/8000e/to
kne delete topologies/kne/cisco/8000e/topology.textproto
```

## Cisco XRD
### XRD

Cisco `XRD` images can be obtained by contacting Cisco.

Expand All @@ -100,11 +107,13 @@ go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/cisco/xrd/topo
kne delete topologies/kne/cisco/xrd/topology.textproto
```

## Juniper CPTX
## Juniper

### cPTX

> NOTE: `CPTX` images require the host supports nested virtualization.
> NOTE: `cPTX` images require the host supports nested virtualization.
Juniper `CPTX` images can be obtained by contacting Juniper.
Juniper `cPTX` images can be obtained by contacting Juniper.

1. Create the topology:

Expand All @@ -124,7 +133,31 @@ go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/juniper/cptx/t
kne delete topologies/kne/juniper/cptx/topology.textproto
```

## Nokia SR Linux
### ncPTX

Juniper `ncPTX` images can be obtained by contacting Juniper.

1. Create the topology:

```
kne create topologies/kne/juniper/ncptx/topology.textproto
```

2. Run a sample test:

```
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/juniper/ncptx/topology.textproto -vendor_creds JUNIPER/root/Google123
```

3. Cleanup:

```
kne delete topologies/kne/juniper/ncptx/topology.textproto
```

## Nokia

### SR Linux

SR Linux images can be found
[here](https://github.com/nokia/srlinux-container-image/pkgs/container/srlinux).
Expand All @@ -147,7 +180,7 @@ go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/nokia/srlinux/
kne delete topologies/kne/nokia/srlinux/topology.textproto
```

## Running Tests on Real Hardware
# Running Tests on Real Hardware

Tests may be run on real hardware devices using the static binding.

Expand All @@ -161,7 +194,7 @@ devices, as well as the desired protocol dial options. Then test it by running:
go test ./feature/example/tests/topology_test -binding $PWD/topologies/otgdut_4.binding
```

## Path validation
# Path validation

The `make validate_paths` target will clone the public OpenConfig definitions
and report Feature Profiles that have invalid OpenConfig paths.
5 changes: 5 additions & 0 deletions cloudbuild/virtual.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ case ${platform} in
juniper_cptx)
vendor_creds=JUNIPER/root/Google123
;;
juniper_ncptx)
vendor_creds=JUNIPER/root/Google123
;;
cisco_8000e)
vendor_creds=CISCO/cisco/cisco123
;;
Expand Down Expand Up @@ -82,6 +85,7 @@ function metadata_kne_topology() {
kne_topology_file["TESTBED_DUT_ATE_2LINKS"]="${topo_prefix}/dutate.textproto"
kne_topology_file["TESTBED_DUT_ATE_4LINKS"]="${topo_prefix}/dutate.textproto"
kne_topology_file["TESTBED_DUT_ATE_9LINKS_LAG"]="${topo_prefix}/dutate_lag.textproto"
kne_topology_file["TESTBED_DUT_DUT_ATE_2LINKS"]="${topo_prefix}/dutdutate.textproto"
for p in "${!kne_topology_file[@]}"; do
if grep -q "testbed.*${p}$" "${metadata_test_path}"/metadata.textproto; then
echo "${kne_topology_file[${p}]}"
Expand Down Expand Up @@ -110,6 +114,7 @@ for dut_test in ${dut_tests}; do
kne_topology=$(metadata_kne_topology "${test_path}")
sed -i "s/ceos:latest/us-west1-docker.pkg.dev\/gep-kne\/arista\/ceos:ga/g" /tmp/kne/"${kne_topology}"
sed -i "s/cptx:latest/us-west1-docker.pkg.dev\/gep-kne\/juniper\/cptx:ga/g" /tmp/kne/"${kne_topology}"
sed -i "s/ncptx:latest/us-west1-docker.pkg.dev\/gep-kne\/juniper\/ncptx:ga/g" /tmp/kne/"${kne_topology}"
sed -i "s/8000e:latest/us-west1-docker.pkg.dev\/gep-kne\/cisco\/8000e:ga/g" /tmp/kne/"${kne_topology}"
sed -i "s/xrd:latest/us-west1-docker.pkg.dev\/gep-kne\/cisco\/xrd:ga/g" /tmp/kne/"${kne_topology}"
sed -i "s/srlinux:latest/us-west1-docker.pkg.dev\/gep-kne\/nokia\/srlinux:ga/g" /tmp/kne/"${kne_topology}"
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild/virtual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ timeout: 28800s
substitutions:
_DUT_PLATFORM: unknown
_DUT_TESTS: ""
_MACHINE_TYPE: e2-standard-8
_MACHINE_TYPE: e2-standard-16
_MACHINE_ARGS: ""
options:
pool:
Expand Down
71 changes: 71 additions & 0 deletions doc/test-requirements-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: New featureprofiles test requirement
about: Use this template to document the requirements for a new test to be implemented.
title: ''
labels: enhancement
assignees: ''

---

# Instructions for this template

Below is the required template for writing test requirements. Good examples of test
requirements include:

* [TE-3.7: Base Hierarchical NHG Update](/feature/gribi/otg_tests/base_hierarchical_nhg_update/README.md)
* [gNMI-1.13: Telemetry: Optics Power and Bias Current](https://github.com/openconfig/featureprofiles/blob/main/feature/platform/tests/optics_power_and_bias_current_test/README.md)
* [RT-5.1: Singleton Interface](https://github.com/openconfig/featureprofiles/blob/main/feature/interface/singleton/otg_tests/singleton_test/README.md)

# TestID-x.y: Short name of test here

## Summary

Write a few sentences or paragraphs describing the purpose and scope of the test.

## Testbed type

* Specify the .testbed topology file from the [topologies](https://github.com/openconfig/featureprofiles/tree/main/topologies) folder to be used with this test

## Procedure

* TestID-x.y.z - Name of subtest
* Step 1
* Step 2
* Validation and pass fail criteria

* TestID-x.y.z - Name of subtest
* Step 1
* Step 2
* Validation and pass fail criteria

## Config Parameter Coverage

Add list of OpenConfig 'config' paths used in this test, if any.

## Telemetry Parameter Coverage

Add list of OpenConfig 'state' paths used in this test, if any.

## Protocol/RPC Parameter Coverage

Add list of OpenConfig RPC's (gNMI, gNOI, gNSI, gRIBI) used in the list, if any.

For example:

* gNMI
* Set
* Subscribe
* gNOI
* System
* KillProcess
* Healthz
* Get
* Check
* Artifact

## Required DUT platform

* Specify the minimum DUT-type:
* MFF - A modular form factor device containing LINECARDs, FABRIC and redundant CONTROLLER_CARD components
* FFF - fixed form factor
* vRX - virtual router device
83 changes: 83 additions & 0 deletions feature/acl/otg_tests/acl_update_test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# ACL-1.2: ACL Update (Make-before-break)

## Summary

Configure an IP ACL, then test changing the ACL configuration to ensure a make-before-break behavior is performed. Make before break for ACL is defined as

## ACL-1 Layer 3 terms

* IP src
* IP dst
* TCP src port
* TCP src port range
* TCP dst port
* TCP dst port range
* UDP src port
* UDP src port range
* ICMP proto
* ICMP type

* IPv4 initial fragment
* IPv4 non-initial fragment
* IPv6 fragmentation (1st next-header)
* MatchAll

## Procedure

### Sub Test 1

* Configure DUT with input and output interfaces and static routing.
* Configure IPv4 and IPv6 ACLs with terms specified in the table.
* All terms should have Deny action.
* “Match all” term should have Accept and Count actions.
* Apply these ACLs in ingress direction on the DUT input interface.
* Start IP traffic flows matching these terms.
* Verify received packets and ACL term counters on DUT.

### Sub Test 2

* Inverse filtering logic: permit traffic on all terms, deny traffic on MatchAll terms.
* Perform ACL update by adding a single matching condition to all terms (additional address or port).
* Verify that the device is running an updated ACL version.
* No config error
* No difference between committed ACL and intended config ACL
* Verify traffic drops for sent flows on ATE ingress interface (no more than 50ms of traffic should be dropped).

### Sub test 3

* Repeat the same test by moving ACLs to the DUT egress interface.

## Config Parameter coverage

```
acl/acl-sets/acl-set/acl-entries/acl-entry/ipv4/config/destination-address
acl/acl-sets/acl-set/acl-entries/acl-entry/ipv4/config/protocol
acl/acl-sets/acl-set/acl-entries/acl-entry/ipv4/config/source-address
acl/acl-sets/acl-set/acl-entries/acl-entry/ipv6/config/destination-address
acl/acl-sets/acl-set/acl-entries/acl-entry/ipv6/config/protocol
acl/acl-sets/acl-set/acl-entries/acl-entry/ipv6/config/source-address
acl/interfaces/interface/ingress-acl-sets/ingress-acl-set
acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/acl-entries
acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/acl-entries/acl-entry
acl/interfaces/interface/egress-acl-sets/egress-acl-set
acl/interfaces/interface/egress-acl-sets/egress-acl-set/acl-entries
acl/interfaces/interface/egress-acl-sets/egress-acl-set/acl-entries/acl-entry
```

## Telemetry Parameter coverage

```
acl/interfaces/interface/ingress-acl-sets/ingress-acl-set/acl-entries/acl-entry/state/matched-packets
acl/interfaces/interface/egress-acl-sets/egress-acl-set/acl-entries/acl-entry/state/matched-packets
```

## Protocol/RPC Parameter coverage

None

## Minimum DUT platform requirement

MFF
Loading

0 comments on commit e64214c

Please sign in to comment.