README
¶
Feature Profiles
Feature profiles defines groups of OpenConfig paths that can be invoked on network devices. A feature profile may contain configuration, telemetry, operational or any other paths that a device exposes. Example management plane device APIs are gNMI, and gNOI. Example control plane APIs are gRIBI, and protocols such as BGP, IS-IS.
Feature profiles also includes a suite of Ondatra tests for validating the network device behavior for each defined feature. If you are new to Ondatra, please start by reading the Ondata README and taking the Ondatra tour.
Contributing
For information about how to contribute to OpenConfig Feature Profiles, please see Contributing to OpenConfig Feature Profiles.
Feedback and suggestions to improve OpenConfig Feature Profiles is welcomed on the public mailing list, or by opening a GitHub issue.
Running Tests on Virtual Devices
Warning: Though we are trying to use RFC defined non-globally routable space in tests, there might be tests (e.g. scaling tests) that are still using public routable ranges. Users who run the tests own the responsibility of not leaking test traffic to internet.
Tests may be run on virtual devices using the Kubernetes Network Emulation binding.
First, follow the steps for deploying a KNE cluster. Then follow the per-vendor instructions below for creating a KNE topology and running a test on it.
Arista
cEOS
Arista cEOS images can be obtained by contacting Arista.
- Create the topology:
kne create topologies/kne/arista/ceos/topology.textproto
- Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/arista/ceos/topology.textproto -vendor_creds ARISTA/admin/admin
- Cleanup:
kne delete topologies/kne/arista/ceos/topology.textproto
Cisco
8000e
NOTE:
8000e
images require the host supports nested virtualization.
Cisco 8000e
images can be obtained by contacting Cisco.
- Create the topology:
kne create topologies/kne/cisco/8000e/topology.textproto
- Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/cisco/8000e/topology.textproto -vendor_creds CISCO/cisco/cisco123
- Cleanup:
kne delete topologies/kne/cisco/8000e/topology.textproto
XRD
Cisco XRD
images can be obtained by contacting Cisco.
- Create the topology:
kne create topologies/kne/cisco/xrd/topology.textproto
- Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/cisco/xrd/topology.textproto -vendor_creds CISCO/cisco/cisco123
- Cleanup:
kne delete topologies/kne/cisco/xrd/topology.textproto
Juniper
ncPTX
Juniper ncPTX
images can be obtained by contacting Juniper.
- Create the topology:
kne create topologies/kne/juniper/ncptx/topology.textproto
- Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/juniper/ncptx/topology.textproto -vendor_creds JUNIPER/root/Google123
- Cleanup:
kne delete topologies/kne/juniper/ncptx/topology.textproto
Nokia
SR Linux
SR Linux images can be found here.
- Create the topology:
kne create topologies/kne/nokia/srlinux/topology.textproto
- Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/nokia/srlinux/topology.textproto -vendor_creds NOKIA/admin/admin
- Cleanup:
kne delete topologies/kne/nokia/srlinux/topology.textproto
Running Tests on Real Hardware
Tests may be run on real hardware devices using the static binding.
The static binding supports the testbeds in the topologies/*.testbed
files.
The mapping between the IDs in the testbed file and the physical devices are
provided by the corresponding topologies/*.binding
files. To try it out, edit
otgdut_4.binding
to specify the mapping from testbed IDs to actual hardware
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
The make validate_paths
target will clone the public OpenConfig definitions
and report Feature Profiles that have invalid OpenConfig paths.
Directories
¶
Path | Synopsis |
---|---|
feature
|
|
gribi/mplsutil
Package mplsutil implements a set of helper utility to run common gRIBI MPLS test scenarios against an ATE and DUT.
|
Package mplsutil implements a set of helper utility to run common gRIBI MPLS test scenarios against an ATE and DUT. |
internal
|
|
proto
|
|
validate_paths inspects paths in the Feature Profiles and fails if any are not standard OpenConfig paths.
|
validate_paths inspects paths in the Feature Profiles and fails if any are not standard OpenConfig paths. |
addrundata
Command addrundata adds or updates rundata reporting to all tests in the source code, based on each of their README.md.
|
Command addrundata adds or updates rundata reporting to all tests in the source code, based on each of their README.md. |
ci-trigger
ci-trigger is a Google Cloud Run container that manages FeatureProfiles CI events.
|
ci-trigger is a Google Cloud Run container that manages FeatureProfiles CI events. |
ci-trigger/hwgcebind
Package hwgcebind is a placeholder to include additional dependencies into go.mod.
|
Package hwgcebind is a placeholder to include additional dependencies into go.mod. |
fpcli
fpcli is a helper CLI for FP-related tooling
|
fpcli is a helper CLI for FP-related tooling |
fpcli/cmd
Package cmd implements fpcli
|
Package cmd implements fpcli |
lint2annotation
The lint2annotation command converts Go analysis Diagnostic messages into GitHub annotations.
|
The lint2annotation command converts Go analysis Diagnostic messages into GitHub annotations. |
nosimage/example
Package main generates example textprotos of the format specified by nosimage.proto.
|
Package main generates example textprotos of the format specified by nosimage.proto. |
nosimage/validate
Package main validates textprotos of the format specified by nosimage.proto.
|
Package main validates textprotos of the format specified by nosimage.proto. |
sort_testregistry
Binary sort_registry sorts the test registry lexically such that it is easier for humans to add to the file and find the next available ID.
|
Binary sort_registry sorts the test registry lexically such that it is easier for humans to add to the file and find the next available ID. |
validate_readme_spec
Command validate_readme_spec validates Paths and RPCs listed by MarkDown (READMEs) against the most recent repository states in github.com/openconfig.
|
Command validate_readme_spec validates Paths and RPCs listed by MarkDown (READMEs) against the most recent repository states in github.com/openconfig. |
wikidoc
wikidoc inspects all feature profiles for test plans and compiles into a single location
|
wikidoc inspects all feature profiles for test plans and compiles into a single location |
topologies
|
|
binding
Package binding implements a simple binding that can work with a specific hardware configuration without a reservation system.
|
Package binding implements a simple binding that can work with a specific hardware configuration without a reservation system. |