featureprofiles

module
v0.0.0-...-64388db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0

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.

  1. Create the topology:
kne create topologies/kne/arista/ceos/topology.textproto
  1. Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/arista/ceos/topology.textproto -vendor_creds ARISTA/admin/admin
  1. 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.

  1. Create the topology:
kne create topologies/kne/cisco/8000e/topology.textproto
  1. Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/cisco/8000e/topology.textproto -vendor_creds CISCO/cisco/cisco123
  1. Cleanup:
kne delete topologies/kne/cisco/8000e/topology.textproto
XRD

Cisco XRD images can be obtained by contacting Cisco.

  1. Create the topology:
kne create topologies/kne/cisco/xrd/topology.textproto
  1. Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/cisco/xrd/topology.textproto -vendor_creds CISCO/cisco/cisco123
  1. Cleanup:
kne delete topologies/kne/cisco/xrd/topology.textproto

Juniper

ncPTX

Juniper ncPTX images can be obtained by contacting Juniper.

  1. Create the topology:
kne create topologies/kne/juniper/ncptx/topology.textproto
  1. Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/juniper/ncptx/topology.textproto -vendor_creds JUNIPER/root/Google123
  1. Cleanup:
kne delete topologies/kne/juniper/ncptx/topology.textproto

Nokia

SR Linux

SR Linux images can be found here.

  1. Create the topology:
kne create topologies/kne/nokia/srlinux/topology.textproto
  1. Run a sample test:
go test ./feature/example/tests/... -kne-topo $PWD/topologies/kne/nokia/srlinux/topology.textproto -vendor_creds NOKIA/admin/admin
  1. 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
bgp/policybase/otg_tests/import_export_multi
Package import_export_test covers RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
Package import_export_test covers RT-7.11: BGP Policy - Import/Export Policy Action Using Multiple Criteria
experimental/isis/ate_tests/internal/session
Package session is deprecated and scoped only to be used with feature/experimental/isis/ate_tests/*.
Package session is deprecated and scoped only to be used with feature/experimental/isis/ate_tests/*.
experimental/system/gnmi/benchmarking/internal/setup
Package setup is scoped only to be used for scripts in path feature/experimental/system/gnmi/benchmarking/ate_tests/ Do not use elsewhere.
Package setup is scoped only to be used for scripts in path feature/experimental/system/gnmi/benchmarking/ate_tests/ Do not use elsewhere.
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
args
Package args define arguments for testing that depend on the available components and their naming on the device, if they cannot be enumerated easily from /components by type.
Package args define arguments for testing that depend on the available components and their naming on the device, if they cannot be enumerated easily from /components by type.
attrs
Package attrs bundles some common interface attributes and provides helpers to generate the appropriate OpenConfig and ATETopology.
Package attrs bundles some common interface attributes and provides helpers to generate the appropriate OpenConfig and ATETopology.
cfgplugins
Package cfgplugins is a collection of OpenConfig configuration libraries.
Package cfgplugins is a collection of OpenConfig configuration libraries.
check
Package check provides validation helpers for ygnmi queries.
Package check provides validation helpers for ygnmi queries.
cntrsrv
Binary cntrserver implements the Cntr (Container) service which can be used to test base functionalities of a container hosting device.
Binary cntrserver implements the Cntr (Container) service which can be used to test base functionalities of a container hosting device.
components
Package components provides functions to enumerate components from the device.
Package components provides functions to enumerate components from the device.
confirm
Package confirm provides experimental assertion helpers.
Package confirm provides experimental assertion helpers.
core
Package core provides a validator for being able to check for core files on DUT's before and after test modules runs.
Package core provides a validator for being able to check for core files on DUT's before and after test modules runs.
deviations
Package deviations defines the arguments to enable temporary workarounds for the featureprofiles test suite using command line flags.
Package deviations defines the arguments to enable temporary workarounds for the featureprofiles test suite using command line flags.
fptest
Package fptest provides helper functions for organizing tests and reporting results.
Package fptest provides helper functions for organizing tests and reporting results.
gribi
Package gribi provides helper APIs to simplify writing gribi test cases.
Package gribi provides helper APIs to simplify writing gribi test cases.
helpers
Package helpers provides helper APIs to simplify writing FP test cases.
Package helpers provides helper APIs to simplify writing FP test cases.
isissession
Package isissession is deprecated and scoped only to be used with feature/experimental/isis/ate_tests/*.
Package isissession is deprecated and scoped only to be used with feature/experimental/isis/ate_tests/*.
metadata
Package metadata makes the data in metadata.textproto available.
Package metadata makes the data in metadata.textproto available.
otgutils
Package otgutils provides helpers for OTG configuration and telemetry.
Package otgutils provides helpers for OTG configuration and telemetry.
p4rtutils
Package p4rtutils implements helper functions for acl_wbb_ingress_table in p4info file.
Package p4rtutils implements helper functions for acl_wbb_ingress_table in p4info file.
pathutil
Package pathutil provides utilities for finding test-relative paths at runtime.
Package pathutil provides utilities for finding test-relative paths at runtime.
qoscfg
Package qoscfg provides utilities for configure QoS across vendors.
Package qoscfg provides utilities for configure QoS across vendors.
rundata
Package rundata collects the runtime data from the test environment.
Package rundata collects the runtime data from the test environment.
samplestream
Package samplestream provides utilities for creating gNMI Subscriptions in SAMPLE mode.
Package samplestream provides utilities for creating gNMI Subscriptions in SAMPLE mode.
security/authz
Package authz provides helper APIs to simplify writing authz test cases.
Package authz provides helper APIs to simplify writing authz test cases.
security/gen
package main generate data structure and skeleton function for all rpc related to fp.
package main generate data structure and skeleton function for all rpc related to fp.
security/gnxi
Package gnxi populates a list of all RPCs related for featuresprofile tests.
Package gnxi populates a list of all RPCs related for featuresprofile tests.
security/svid
Package svid provides functions to generate and sign SVID.
Package svid provides functions to generate and sign SVID.
vrfpolicy
Package vrfpolicy contains functions to build specific vrf policies
Package vrfpolicy contains functions to build specific vrf policies
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.
internal/fpciutil
Package fpciutil contains filepath related utilities for featureprofiles CI.
Package fpciutil contains filepath related utilities for featureprofiles CI.
internal/mdocspec
Package mdocspec parses yaml OC requirements from functional test READMEs.
Package mdocspec parses yaml OC requirements from functional test READMEs.
internal/ocpaths
Package ocpaths contains utilities and types for validating a set of OCPaths specified by ocpaths.proto.
Package ocpaths contains utilities and types for validating a set of OCPaths specified by ocpaths.proto.
internal/ocrpcs
Package ocrpcs contains utilities related to ocrpcs.proto.
Package ocrpcs contains utilities related to ocrpcs.proto.
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.
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL