diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..c04ec440b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,14 @@ +# Definition of code OWNERS for the openconfig/public repository. +# +# default approvers: +* @aashaikh @robshakir @dplore + +# the release/models directory (all YANG content) +# and doc directory is maintained by the public-writers +# OpenConfig team. +/doc @openconfig/public-writers +/release/models/ @openconfig/public-writers + +# subfolders may have additional codeowners who +# may merge content +/release/models/wifi @mike-albano diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..acbb7b9ca --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,23 @@ +[Note: Please fill out the following template for your pull request. lines +tagged with "Note" can be removed from the template.] + +[Note: Before this PR can be reviewed please agree to the CLA covering this +repo. Please also review the contribution guide - +https://github.com/openconfig/public/blob/master/doc/external-contributions-guide.md] + +### Change Scope + +* [Please briefly describe the change that is being made to the models.] +* [Please indicate whether this change is backwards compatible.] +### Platform Implementations + + * Implementation A: [link to documentation](http://foo.com) and/or + implementation output. + * Implementation B: [link to documentation](http://foo.com) and/or + implementation output. + +[Note: Please provide at least two references to implementations which are relevant to the model changes proposed. Each implementation should be from separate organizations.]. + +[Note: If the feature being proposed is new - and something that is being +proposed as an enhancement to device functionality, it is sufficient to have +reviewers from the producers of two different implementations]. diff --git a/.github/workflows/diff.yaml b/.github/workflows/diff.yaml new file mode 100644 index 000000000..1775e77ff --- /dev/null +++ b/.github/workflows/diff.yaml @@ -0,0 +1,42 @@ +name: Breaking Changes + +on: + pull_request: + branches: [ master ] + +jobs: + build: + name: major version update check + runs-on: ubuntu-latest + + steps: + - name: Install go + uses: actions/setup-go@v4 + with: + go-version: '1.x' + + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install openconfig-ci CLI + run: | + go install github.com/openconfig/models-ci/openconfig-ci@05dd074 + + - name: Make sure all backward-incompatible changes are covered by version changes. + id: check + run: | + readonly HEAD=${{ github.event.pull_request.head.sha }} + readonly BASE="$(git merge-base origin/master "${HEAD}")" + + BASEREPODIR=public_base + mkdir -p "${BASEREPODIR}/release" + git checkout "${BASE}" + cp -r release/models "${BASEREPODIR}/release" + cp -r third_party "${BASEREPODIR}" + git checkout "${HEAD}" + oldroot="${BASEREPODIR}" + newroot=. + + openconfig-ci diff --disallowed-incompats --oldp "${oldroot}/third_party" --oldroot "${oldroot}/release/models" --newp "${newroot}/third_party" --newroot "${newroot}/release/models" diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 000000000..3fdc49dda --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,14 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '42 2 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.' + days-before-stale: 180 + days-before-close: 14 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..e371839a0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,4 @@ +# Contributing to OpenConfig + +Please see the [contributions +guide](https://github.com/openconfig/public/blob/master/doc/contributions-guide.md). diff --git a/README.md b/README.md index 0ae755767..83ae80d5c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![OpenConfig Linter](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:oc-pyang.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:oc-pyang.html) [![pyangbind](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:pyangbind.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:pyangbind.html) [![goyang/ygot](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:goyang-ygot.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:goyang-ygot.html) +[![ygnmi](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:ygnmi.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:ygnmi.html) [![yanglint](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:yanglint.svg)](https://storage.googleapis.com/openconfig/compatibility-badges/openconfig-public:yanglint.html) # OpenConfig @@ -19,7 +20,7 @@ This repository is primarily for publishing the models, documents, and other material developed by the OpenConfig operators group. For information about how to contribute to OpenConfig models, please -see [External Submissions to OpenConfig](doc/external-contributions-guide.md). +see [External Submissions to OpenConfig](doc/contributions-guide.md). Feedback and suggestions to improve OpenConfig models is welcomed on the [public mailing list](https://groups.google.com/forum/?hl=en#!forum/netopenconfig), diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 014708beb..1c72a5313 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -1,3 +1,6 @@ +substitutions: + _OC_PYANG_VERSION: master + steps: ############### GET CI REPO ############### # Decrypt the file containing the key @@ -15,6 +18,7 @@ steps: - name: 'ssh' path: /root/.ssh # Set up git with key and domain +# See https://cloud.google.com/build/docs/access-github-from-build#add_the_public_ssh_key_to_known_hosts - name: 'gcr.io/cloud-builders/git' entrypoint: 'bash' args: @@ -32,7 +36,7 @@ steps: ############### COMMON PREP ############### # Create GOPATH -- name: 'gcr.io/cloud-builders/go:debian' +- name: 'golang' entrypoint: 'bash' args: ['-c', 'mkdir -p /go/src/github.com/openconfig'] volumes: @@ -40,7 +44,7 @@ steps: path: /go id: 'go path creation' # Clone CI repository -- name: 'gcr.io/cloud-builders/go:debian' +- name: 'golang' entrypoint: 'bash' args: - '-c' @@ -48,7 +52,7 @@ steps: git clone git@github.com:openconfig/models-ci.git /go/src/github.com/openconfig/models-ci cd /go/src/github.com/openconfig/models-ci # Modify the major version to update models-ci version. - branch=$(git tag -l 'v6*' | sort -V | tail -1) + branch=$(git tag -l 'v13.*' | sort -V | tail -1) git checkout $branch volumes: - name: 'ssh' @@ -57,11 +61,11 @@ steps: path: /go id: 'models-ci clone' # Get CI script dependencies -- name: 'gcr.io/cloud-builders/go:debian' - args: - - 'get' - - './cmd_gen' - - './post_results' +- name: 'golang' + entrypoint: 'go' + args: + - 'install' + - './...' volumes: - name: 'ssh' path: /root/.ssh @@ -72,7 +76,7 @@ steps: dir: '/go/src/github.com/openconfig/models-ci' id: 'models-ci dep' # Generate validator scripts -- name: 'gcr.io/cloud-builders/go:debian' +- name: 'golang' entrypoint: 'bash' args: - -c @@ -83,9 +87,8 @@ steps: -pr-head-repo-url=$_HEAD_REPO_URL -commit-sha=$COMMIT_SHA -pr-number=$_PR_NUMBER - -skipped-validators=confd + -skipped-validators=confd,yanglint -extra-pyang-versions=2.2.1 - -compat-report=yanglint -branch=$BRANCH_NAME secretEnv: ['GITHUB_ACCESS_TOKEN'] env: @@ -97,7 +100,7 @@ steps: ############### REGEXP TESTS ############### # Clone CI repository -- name: 'gcr.io/cloud-builders/go:debian' +- name: 'golang' entrypoint: 'bash' args: - '-c' @@ -115,8 +118,9 @@ steps: waitFor: ['validator prep'] id: 'regexp clone' # Get regexp dependencies -- name: 'gcr.io/cloud-builders/go:debian' - args: ['get', './...'] +- name: 'golang' + entrypoint: 'go' + args: ['install', './...'] volumes: - name: 'gopath' path: /go @@ -125,7 +129,7 @@ steps: dir: '/go/src/github.com/openconfig/pattern-regex-tests' waitFor: ['regexp clone'] id: 'regexp dep' -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/regexp/test.sh"] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -151,7 +155,7 @@ steps: args: ['cp', 'gs://openconfig/yanglint.deb', '/workspace/yanglint.deb'] waitFor: ['validator prep'] id: 'yanglint prep2' -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/yanglint/test.sh"] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -169,7 +173,7 @@ steps: id: 'yanglint' ############### MISC-CHECKS ############### -- name: 'gcr.io/cloud-builders/go:debian' +- name: 'golang' entrypoint: 'bash' args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/misc-checks/test.sh"] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -189,7 +193,7 @@ steps: id: 'misc-checks' ############### OC-PYANG ############### -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/oc-pyang/test.sh'] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -200,6 +204,7 @@ steps: - 'COMMIT_SHA=$COMMIT_SHA' - '_REPO_SLUG=$_REPO_SLUG' - 'BRANCH_NAME=$BRANCH_NAME' + - '_OC_PYANG_VERSION=$_OC_PYANG_VERSION' volumes: - name: 'gopath' path: /go @@ -207,17 +212,7 @@ steps: id: 'oc-pyang' ############### GOYANG/YGOT ############### -- name: 'gcr.io/cloud-builders/go:debian' - args: ['get', 'github.com/openconfig/ygot/generator'] - volumes: - - name: 'gopath' - path: /go - env: - - 'GOPATH=/go' - - 'GO111MODULE=on' - waitFor: ['go path creation'] - id: 'goyang-ygot prep' -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/goyang-ygot/test.sh"] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -231,11 +226,11 @@ steps: - 'COMMIT_SHA=$COMMIT_SHA' - '_REPO_SLUG=$_REPO_SLUG' - 'BRANCH_NAME=$BRANCH_NAME' - waitFor: ['validator prep', 'goyang-ygot prep', 'oc-pyang'] + waitFor: ['validator prep', 'go path creation', 'oc-pyang'] id: 'goyang-ygot' ############### PYANG ############### -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/pyang/test.sh'] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -253,7 +248,7 @@ steps: id: 'pyang' ############### PYANGBIND ############### -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/pyangbind/test.sh'] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -270,8 +265,26 @@ steps: waitFor: ['validator prep', 'oc-pyang'] id: 'pyangbind' +############### YGNMI ############### +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' + entrypoint: 'bash' + args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/ygnmi/test.sh"] + secretEnv: ['GITHUB_ACCESS_TOKEN'] + volumes: + - name: 'gopath' + path: /go + env: + - 'GOPATH=/go' + - '_PR_NUMBER=$_PR_NUMBER' + - '_MODEL_ROOT=$_MODEL_ROOT' + - 'COMMIT_SHA=$COMMIT_SHA' + - '_REPO_SLUG=$_REPO_SLUG' + - 'BRANCH_NAME=$BRANCH_NAME' + waitFor: ['validator prep', 'go path creation', 'oc-pyang', 'pyangbind'] # wait for pyangbind to avoid possible OOM. + id: 'ygnmi' + ############### COMPATIBILITY REPORT ############### -- name: 'gcr.io/$PROJECT_ID/models-ci-image' +- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image' entrypoint: 'bash' args: ['-c', '/go/src/github.com/openconfig/models-ci/validators/compat_report.sh'] secretEnv: ['GITHUB_ACCESS_TOKEN'] @@ -290,6 +303,7 @@ steps: timeout: 600s options: machineType: 'E2_HIGHCPU_32' + logging: CLOUD_LOGGING_ONLY availableSecrets: inline: diff --git a/doc/Integrated-Circuit_pipeline_aggregated_counters_guide.md b/doc/Integrated-Circuit_pipeline_aggregated_counters_guide.md new file mode 100644 index 000000000..ad7c64d37 --- /dev/null +++ b/doc/Integrated-Circuit_pipeline_aggregated_counters_guide.md @@ -0,0 +1,72 @@ +# Integrated Circuit aggregated pipeline counters guide +## Introduction +This guide discusses semantics of different counters provided under the +`openconfig-platform/components/component/integrated-circuit/pipeline-counters` container. +The `INTEGRATED_CIRCUIT` or I-C, in this document refers to the OpenConfig [INTEGRATED_CIRCUIT](https://github.com/openconfig/public/blob/5d38d8531ef9c5b998262207eb6dbdae8968f9fe/release/models/platform/openconfig-platform-types.yang#L346) component type which is typically an ASIC or NPU (or combination of both) that provides packet processing capabilities. + +## Per-block packets/octets counters +[TODO] more detailed description +## Drop packets/octets counters +The `/components/component/integrated-circuit/pipeline-counters/drop` container collects counters related to packets dropped by the `INTEGRATED_CIRCUIT`. +### Aggregated drop counters +These 4 counters should cover all packets dropped by the IC which are not already covered by the /interfaces tree. For example, a packet which is dropped due to QoS policy for WRED should be counted only by the appropriate /interfaces path [dropped-pkts](https://github.com/openconfig/public/blob/5d38d8531ef9c5b998262207eb6dbdae8968f9fe/release/models/qos/openconfig-qos-interfaces.yang#L375). + +Aggregated drop counters are modeled as below: +``` +module: openconfig-platform + +--rw components + +--rw component* [name] + +--rw integrated-circuit + +--ro oc-ppc:pipeline-counters + +--ro oc-ppc:drop + +--ro oc-ppc:state + +--ro oc-ppc:adverse-aggregate? oc-yang:counter64 + +--ro oc-ppc:congestion-aggregate? oc-yang:counter64 + +--ro oc-ppc:packet-processing-aggregate? oc-yang:counter64 + +--ro oc-ppc:urpf-aggregate? oc-yang:counter64 +``` +#### urpf-aggregate + +##### Usability +The increments of this counter are typically signal of some form of attack with spoofed source address. Typically dDOS class. + +#### packet-processing-aggregate + +##### Usability +The increments of this counter are expected during convergence events as well as during stable operation. However rapid increase in drop rate **may** be a signal of network being unhealthy and typically requires further investigation. +The further break down of this counter, if available as vendor extension under `/openconfig-platform:components/component/integrated-circuit/openconfig-platform-pipeline-counters:pipeline-counters/drop/vendor` container could help to further narrow-down cause of drops. + +If prolonged packet drops are found to be caused by lack of FIB entry for incoming packets, this suggest inconsistency between Network Control plane protocols (BGP, IGP, RSVP, gRIBI), FIB calculated by Controller Card and FIB programmed into given Integrated Circuit. + +If an implementation supports `urpf-aggregate` counter, packets discarded due to uRPF should not be counted as `packet-processing-aggregate`. Else, uRPF discarded oacket should be counted against this counter. + +#### congestion-aggregate + + +##### Usability +The increments of this counter are signal of given Integrated Circuit being overhelmed by incoming traffic and complexity of packet processing that is required. + +#### adverse-aggregate +##### Usability +The increments of this counter are generally a signal of a hardware defect (e.g. memory errors or signal integrity issues) or (micro)code software defects. + +#### Queue tail and AQM drops exception discussion. +Drops associated with QoS queue tail or AQM are the result of egress interface congestion. This is NOT the same as I-C congestion, and should be counted using /interfaces counters as it is expected state from the platform (router) point of view. It may be not expected state from a network design point of view but from the INTEGRATED_CIRCUIT, it is behaving according to design. + +The OpenConfig definition for [congestion-aggregate](https://github.com/openconfig/public/blob/5d38d8531ef9c5b998262207eb6dbdae8968f9fe/release/models/platform/openconfig-platform-pipeline-counters.yang#L1096-L1099) excludes "queue drop counters". It desirable to not count QoS queue drops under this `congestion-aggregate` in order to maintain a clear signal of hitting I-C performance limitations, rather then blend it with basic, simple egress interface speed limitations. + +### Per-Block drop copunters +[TODO] more detailed description for standard OpenConfig drop counters defined for Interface-, Lookup-, Queueing-, Fabric- and Host-Interface- blocks. Also discuss relationship with Control plane traffic packets/octets counters. +### Vendor extensions +Please refer to [Vendor-Specific Augmentation for Pipeline Counter](vendor_counter_guide.md) +## Error counters +These leafs **do not** count **packets or bytes**. +They count error events. + +For example corruption of on chip, HBM or chip external memory buffers (soft-error) which also are not already counted as queue drops for interfaces. + +[TODO] more detailed description +## Control plane traffic packets/octets counters +[TODO] more detailed description. Also discuss relationship with Host-Interface block counters. +### Standard OpenConfig counters +### Vendor extensions diff --git a/doc/external-contributions-guide.md b/doc/contributions-guide.md similarity index 78% rename from doc/external-contributions-guide.md rename to doc/contributions-guide.md index b9a4b4ee9..0d4f7e216 100644 --- a/doc/external-contributions-guide.md +++ b/doc/contributions-guide.md @@ -1,7 +1,8 @@ -# External Submissions to OpenConfig +# Contributions to OpenConfig *Contributors*: robjs, aashaikh, chris_luke † @google.com, ⸸ @comcast.com -May 2018 +Created: May 2018 +Updated: August 2022 ## Rationale As the OpenConfig project matures and is adopted by implementors and network @@ -33,12 +34,12 @@ The process for making a contribution is outlined below. OpenConfig prefers code (i.e., YANG) contributions, rather than feature requests. If you wish to discuss the suitability or approach for a change, or addition to the models, this can be done with an issue in the [OpenConfig -public GitHub](https://github.com/openconfig/public/issues). +public GitHub](https://github.com/openconfig/public/issues). All contributions to OpenConfig MUST be Apache 2.0 licensed. A contributor license agreement (CLA), namely the [Google CLA](https://cla.developers.google.com/), MUST be signed for any contribution -to be accepted. +to be accepted. The CLA is used to ensure that the rights to use the contribution are well understood by the OpenConfig working group, and consumers of the OpenConfig @@ -54,9 +55,10 @@ ascribe any specific rights to a single OpenConfig member. To make a contribution to OpenConfig: 1. Open a pull request in the - [openconfig/public](https://github.com/openconfig/public) repo. A brief - description of the proposed addition along with references to any discussion - issues should be included. + [openconfig/public](https://github.com/openconfig/public) repo. The pull + request template for the repository details the information that is expected, + please fill it out, along with any additional information that is useful for + reviewers. In addition: * Pull requests should be kept small. An ideal change is less than 500 lines of YANG. Small changes allow detailed discussions of the additions that are being made to the model, whilst also ensuring that course-corrections can be @@ -66,10 +68,13 @@ To make a contribution to OpenConfig: likely an issue should have been created to discuss the addition prior to code review. * When the pull request adds a new feature that is supported across vendors, - best practice is to include links to public-facing documentation showing + the author must include links to public-facing documentation showing the implementation of the feature within the change description. This simplifies the process of reviewing differences and the chosen abstractions (if any are used). + * Pull requests should update the versions of the modified models with a new + semantic version, the rules followed for this versioning are described in + [this document](https://openconfig.net/docs/semver/). 1. The pull request should include both the suggested YANG additions, as well as any relevant changes to the `.spec.yml` files that are included within the @@ -90,28 +95,17 @@ To make a contribution to OpenConfig: available YANG toolchains, in order to detect regression issues that may occur due to OpenConfig model changes. -1. A member of the OpenConfig operator working group will be assigned as a - shepherd for the pull request. The shepherd will act as a liasion between the - author(s) of the PR and the OpenConfig group - particularly, they will perform - an initial review of the submission, provide feedback from the wider operator - group on the PR, or directly interact with the authors to iterate on the - proposal. The working group meets weekly and, in some cases, may ask the - authors to join this meeting for a discussion of the changes. +1. Discussion of the PR is carried out in the `openconfig/public` repository - + in order to ensure that different viewpoints can be considered from the + community. Real-time discussions (either scheduled or ad-hoc) can be arranged + where needed. -1. When the model changes are approved. The pull request will not be directly - merged in the public repository, but merged in a private development repo. - Members of the OpenConfig group have access to the private repo, and may make - subsequent changes to the accepted pull request. Merged changes will be - upstreamed from the private repo to - [openconfig/public](https://github.com/openconfig/public) periodically. This - helps keep the release history well defined within the public repository, and - to maintain consistency over changes that require major revision number - changes. +1. When the model changes are approved. The pull request will be + merged in the public repository. The aim of this process is not to restrict contributions to OpenConfig, but simply to maintain the model quality and approach that the working group has strived for since its inception in 2014. Questions prior to making submissions are welcome, please use the [netopenconfig Google group](mailto:netopenconfig@googlegroups.com), or the [public repository -issues](https://github.com/openconfig/public/issues). - +issues](https://github.com/openconfig/public/issues). diff --git a/doc/controller-card_poweroff.md b/doc/controller-card_poweroff.md new file mode 100644 index 000000000..db2ecf762 --- /dev/null +++ b/doc/controller-card_poweroff.md @@ -0,0 +1,165 @@ + + +## Controller Card Power Control + +This document describes operational use cases, rules and telemetry for power control of `CONTROLLER-CARD` components in network devices using OpenConfig. + + +## Operational use cases for CONTROLLER_CARD power control + +1. Operator suspects a network device issue is occurring due to faults on a CONTROLLER_CARD. The operator wants to quickly disable the CONTROLLER_CARD and later, troubleshoot the issue in a maintenance window. The operator also wants to ensure that the card stays disabled even if the device is rebooted. Some example scenarios below: + + a. It is possible that the faulty controller card is in a boot loop and the operator finds it best to disable the card to prevent undesired state. Expectations are also that the power remains disabled even after a system reboot. + + b. CPU overheating, memory errors or other hardware problems with the PRIMARY card may require the operator to proactively power-off the card and not let it be online during regular operation until replacement of the hardware is completed. + +2. Operator feels it important to keep the card shutdown to prevent unexpected outcomes post the physical swap of the faulty/alerting card so the operator can online the card in a controlled environment post replacement. + + +## CONTROLLER_CARD power and redundancy requirements + +Electrical power for a CONTROLLER_CARD can be configured off using the OC-Path [/components/component/controller-card/config/power-admin-state](https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-platform.html#components-component-controller-card-config-power-admin-state) and setting its value to POWER\_DISABLED. The following rules regarding CONTROLLER_CARD redundancy and changes to `power-admin-state` must be followed by the device: + + + +1. Only a CONTROLLER_CARD in `state/redundant-role` 'SECONDARY' will honor a change in `config/power-admin-state` to POWER_DISABLED. If the controller-card's `redundant-role` is 'PRIMARY', and its `config/power-admin-state` is set to 'POWER_DISABLED', the NOS must allow the configuration. However, the `state/power-admin-state` must remain as 'POWER_ENABLED'. A change in `state/power-admin-state` must take effect only on the next reboot or if the CONTROLLER_CARD is 'SECONDARY'. Examples of scenarios include: + +### Scenario 1 - Power off a secondary CONTROLLER_CARD + +Let's say controller-card0 is PRIMARY and controller-card1 is SECONDARY and controller-card1 receives an operator driven change of config/power-admin-state = POWER_DISABLED, then controller-card0 will power-off controller-card1 immediately. The leaf state/power-admin-state for controller-card1 must also be POWER_DISABLED. The 'state/last-poweroff-reason/trigger' should show as USER_INITIATED. The NOS may optionally update state/last-poweroff-reason/details. state/last-poweroff-time should record the time when the card was powered-off. For example: + +``` +/components/component[name=controller0]/state/redundant-role, PRIMARY +/components/component[name=controller0]/controller-card/config/power-admin-state, POWER_ENABLED +/components/component[name=controller0]/controller-card/state/power-admin-state, POWER_ENABLED +/components/component[name=controller1]/state/redundant-role, SECONDARY +/components/component[name=controller1]/controller-card/config/power-admin-state, POWER_DISABLED +/components/component[name=controller1]/controller-card/state/power-admin-state, POWER_DISABLED +/components/component[name=controller1]/state/last-poweroff-reason/trigger, USER_INITIATED +/components/component[name=controller1]/state/last-poweroff-reason/details, "User initiated Shutdown" +/components/component[name=controller1]/state/last-poweroff-time, 1706590714681765937 +``` + +### Scenario 2 - Power off primary CONTROLLER_CARD + +1. If controller-card0 is PRIMARY and controller-card1 is SECONDARY and if controller-card0 is set to config/power-admin-state = POWER_DISABLED by an operator, then controller-card0 will stay powered-on until the next reboot. `state/power-admin-state` must show as POWER_ENABLED. If a reboot of the PRIMARY CONTROLLER_CARD occurs, `state/last-poweroff-time` must record the time when the card powers-off, `state/last-poweroff-reason/trigger` must show as USER_INITIATED and `/state/last-poweroff-reason/details` may be updated. For example: + +When controller-card0 is PRIMARY: + +``` +/components/component[name=controller0]/state/redundant-role, PRIMARY +/components/component[name=controller0]/controller-card/config/power-admin-state, POWER_DISABLED +/components/component[name=controller0]/controller-card/state/power-admin-state, POWER_ENABLED +/components/component[name=controller1]/state/redundant-role, SECONDARY +/components/component[name=controller1]/controller-card/state/power-admin-state, POWER_ENABLED +``` + +After controller-card0 transitions to redundant-role SECONDARY: + +``` +/components/component[name=controller0]/state/redundant-role, SECONDARY +/components/component[name=controller0]/controller-card/config/power-admin-state, POWER_DISABLED +/components/component[name=controller0]/controller-card/state/power-admin-state, POWER_DISABLED +/components/component[name=controller0]/state/last-poweroff-reason/trigger, USER_INITIATED +/components/component[name=controller0]/state/last-poweroff-reason/details, "User initiated Shutdown" +/components/component[name=controller0]/state/last-poweroff-time, 1706590714681765937 +/components/component[name=controller1]/state/redundant-role, PRIMARY +/components/component[name=controller1]/controller-card/config/power-admin-state, POWER_ENABLED +/components/component[name=controller1]/controller-card/state/power-admin-state, POWER_ENABLED +``` + +2. A controller-card which is in state/redundant-role=SECONDARY and is config/power-admin-state=POWER_DISABLED must remain powered off, even after a reboot. It is possible that after a reboot, both the controller cards are powered-on. However as soon as the configuration is loaded, the system must power-off the subject controller-card. + +3. A CONTROLLER_CARD in redundant-role SECONDARY and state/power-admin-state = POWER_DISABLED cannot transition to redundant-role PRIMARY. If the PRIMARY CONTROLLER_CARD goes down, the device will be offline. + +4. When a controller card boots up and loads it’s configuration, power-admin-state may be set to POWER_DISABLED. The CONTROLLER_CARD must then power off and never enter into any controller card primary/secondary election process. This also means that an implementation shouldn't start a controller card election process until the configuration is loaded and consumed. + + **Note:-** If an implementation's architecture do not allow for controlling the order in which the configuration is loaded and the PRIMARY/SECONDARY election process, then this rule can be relaxed as long as the implementation has proper arrangements to power-off the controller-card with `config/power-admin-state=POWER_DISABLED` configuration during reboots (Warm/Cold). + + +5. On boot (cold or warm), if the chassis has a single controller card and it is configured for config/power-admin-state=POWER_DISABLED, it must continue with the boot process ignoring the configuration. As per Rule#1 above, the controller-card must have it's state/power-admin-state as POWER_ENABLED given that a single CONTROLLER_CARD will have it's state/redundant-role=PRIMARY. In this case too, the system must log a message using severity "Warning", to inform the Operator about the situation. + +6. In a Dual controller-card scenario, if a config is pushed for config/power-admin-state=POWER_DISABLED for either both controller-cards simultaneously or for one of the controller-cards while the other controller-card in the system is already configured for config/power-admin-state=POWER_DISABLED, then the implementation Must fail the configuration commit operation with an error similar to: "Not allowed to have both controller-cards configured for power-admin-state = POWER_DISABLED" + +## Flowchart on the Rules above: + +![Overview of the expected behavior](https://github.com/openconfig/public/tree/master/doc/img/controller_card.png?raw=true) + +## Concerns and possible failure scenarios + +1. If a PRIMARY card malfunctions and ends up in a bootloop, would this approach help? + + **Response:** + + + In this scenario the expectations are that the implementation takes steps to initiate a controller-card switchover operation. Therefore, the standby controller card takes over the PRIMARY role and the system stabilizes allowing for gRPC connections to be established. In this situation if the operator pushes a configuration to shutdown the SECONDARY card, the PRIMARY card must be able to power-off the SECONDARY controller-card. In this scenario, the implementation (depending on their architecture) may also initiate a shutdown of the faulty card from the new PRIMARY card. + +2. Since the operation relies on configuration, it is possible that the failure scenario may kick in before the configuration takes effect post a reboot. + + **Response:** + + + Response here is the same as "1" above. + + + +3. Both controller-cards are functional and the the secondary controller card is attempted to be powered off. + + **Response:** + + + The shutdown can be initiated by pushing the command [/components/component[controller-card#]/controller-card/config/power-admin-state = POWER\_DISABLED](https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-platform.html#components-component-controller-card-config-power-admin-state) to the box. As a result, the secondary controller card whose [/components/component/state/redundant-role](https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-platform.html#components-component-state-redundant-role) is SECONDARY will be shutdown and its [/components/component[name="my_secondary_controller-card"]/controller-card/state/power-admin-state](https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-platform.html#components-component-controller-card-state-power-admin-state) will change to "POWER\_DISABLED". If the configuration is saved and when the device reboots, the subject controller-card is expected to remain powered off. + +4. Both controller-cards are functional and the the primary controller card is attempted to be shutdown + + **Response:** + + + Follow Rule#1 above + +5. Only one controller-card is present and the card is attempted to be shutdown. + + **Response:** + + + Since the lone controller-card is PRIMARY, please follow Rule#1 above. After reboot, please follow Rule#5 + +6. Faulty card is shutdown and then replaced with a working card but device still has the config of `/components/component[controller-card#]/controller-card/config/power-admin-state = POWER_DISABLED` + + **Response:** + + + The new card must remain powered off. Power should only be enabled on the new card by a configuration change to set `/components/component[controller-card#]/controller-card/config/power-admin-state = POWER_ENABLED` + + +7. Both controller-cards present during the initial boot operation. However, the controller card that is configured as "POWER\_DISABLED" boots up sooner than the other card and takes over the ACTIVE role. + + **Response:** + + + Follow Rule#4 above. The only exception is when it is the only controller card in the chassis. In the latter case, Rule#5 above must be followed. + + +8. Say we have a situation whereby, A dual controller card device is functional, secondary is powered off by changing power-admin-state to POWER\_DISABLED. Later, the PRIMARY card is removed and the system goes offline. If the device is rebooted (for example via externally removing and reapplying power ), what should happen? + + **Response:** + + If during reboot the device continues to have a single controller-card, then Rule#5 above should be followed. + +9. According to Rule#5, a controller-card must ignore the configuration of `config/power-admin-state=POWER_DISABLED` and must continue with its boot process if it is the only controller-card in the chassis. This also means that, under split-brain situations when the communication between the controller-cards is broken, the option to use `config/power-admin-state=POWER_DISABLED` for one of the cards may not help post reboot? + + **Response** + + Lets walk through this situation to set the right context. We have a dual controller-card system which due to some reason (Hardware/Soaftware failure) got in to a split-brain scenaio. As per the question here, the operator decides to use `config/power-admin-state=POWER_DISABLED` command on one of the cards, somehow intiatiates a reboot process (Cold or Warm) and expects that the controller-card with `config/power-admin-state=POWER_DISABLED` stays disabled post reboot. There are several assumptions and nuances to this situation: + + a. One of the assumptions is that, the device is in a split-brain situation and would still allow connections for a configuration change. + + b. If somehow "9.a" above works, since both the controller-cards expect to be the master, none will power-down immediately as per Rule#1 above. Therefore the Chassis would need to be cold booted. + +Now after the system reboots following "9.b", if we consider that the original problem of broken communication between the controller-cards persists, the configration of `config/power-admin-state=POWER_DISABLED` on one of the controller-cards wouldn't help because of Rule#5 above. However, it is expected that the implementation has other hardware/software means to gracefully handle the split-brain situation. The proposal here to allow for power-disable of a controller-card using configuration has no impact whatsoever on the implementations ability to handle split-brain like conditions. + + ***Definition for Split-brain situation:*** + `In network routers/switches that use redundant controller-cards for high availability, a split-brain scenario occurs when the primary and secondary cards lose communication with each other, and both believe they should be the active controller. Probable causees for a Split-brain scenario can be configuration error or software bug preventing exchange of control messages between the cards breaking the communication` + + + diff --git a/doc/img/controller_card.png b/doc/img/controller_card.png new file mode 100644 index 000000000..4599258dd Binary files /dev/null and b/doc/img/controller_card.png differ diff --git a/doc/implementation-guidance/leafrefs-in-openconfig.md b/doc/implementation-guidance/leafrefs-in-openconfig.md new file mode 100644 index 000000000..06731b71c --- /dev/null +++ b/doc/implementation-guidance/leafrefs-in-openconfig.md @@ -0,0 +1,206 @@ +# Implementor Guidance: Leafrefs in OpenConfig/YANG + +**Authors**: Aaron Beitch, Justin Costa-Roberts, Rob Shakir + Arista Networks, Google +**Published:** September 2020 + +## Contents + + - [Summary](#summary) + - [Background](#background) + - [Why use a `leafref`?](#why-use-a-leafref) + - [Problems with Leafrefs](#problems-with-leafrefs) + - [Expense of Validation](#expense-of-validation) + - [Assumption of Complete and Consistent Data Tree](#assumption-of-complete-and-consistent-data-tree) + - [Inability to Wholly Describe Validity](#inability-to-wholly-describe-validity) + - [Relaxed Leafref Validation Requirements](#relaxed-leafref-validation-requirements) + +## Summary +The validation of leafrefs poses many problems for YANG clients and servers +alike - however, they continue to have value as a schema construct to provide +common type conformance, and foreign keys within the schema. This document +defines the expected validation behaviour of an OpenConfig-compliant +implementation - particularly, allowing an implementation to relax validation +rules such that referenced entities within the schema are not required to exist +at the time of validation (i.e., always act as though `require-instance false` +were set for a leafref node). + +## Background + +As defined in [section 9.9 of +RFC6020](https://tools.ietf.org/html/rfc6020#section-9.9), a leafref is a type +of YANG leaf. Each leafref has a path defined in a limited XPath syntax. This +path must evaluate to a leaf in the schema. The values for this leafref are +constrained by the type of the leaf referred to by the leafref. In addition, a +leafref’s value is constrained to be in the nodeset returned from executing its +path as an XPath expression. In YANG 1.1, but not in the original YANG +specification, this second constraint can be disabled by the module author with +a statement of “require-instance false;”. See [section 9.9.3 of RFC +7950](https://tools.ietf.org/html/rfc7950#section-9.9.3). The OpenConfig YANG +models do not currently support YANG 1.1. + +### Why use a `leafref`? + +We observe that there are multiple reasons that a YANG schema author may choose +to use a `leafref` within their module, particularly: + +1. To re-use a common type between two leaves. In this case, the author wishes + to define that the type of the `leaf` that they are defining has exactly the + same type as the type of the remote `leaf` that is selected by the `path` + specified. + * A common use case for such leafrefs within the OpenConfig schema is for + list keys, where there is an alias to the authoratitive source of a list + key (under a `config` or `state` container) directly under the `list` structure + itself, to comply with the YANG requirements. +2. To provide a foreign-key within one part of the schema to another schema + element. The common use case for such leaves is to allow the schema to be + normalized, and to allow programmatic means of traversing the schema (e.g., + automatically retrieving data that corresponds to such `leafref` references, + without needing to write schema-path specific handling code). + * For example, defining a `leafref` with the path + `/interfaces/interface/config/name` provides a client a means to know that + more definition of the referenced interface can be found at the corresponding + schema path - and for a helper-library for a client querying such a leafref to + automatically also retrieve the corresponding `/interfaces/interface` list + entry. +3. To ensure consistency within a schema. In this case, the `leafref` is used + to ensure that an entity that is referenced within a particular part of a + schema actually exists within the schema. + * For example, the list of interfaces with a particular protocol (say, + IS-IS) enabled on them must reference an interface that is actually + configured on the system. The leafref ensures that if IS-IS is enabled on + `Ethernet423` such an interface actually exists on the local system. + +Both 1 and 2 within the list are essentially schema-time definitions, they are +either convenying type information, or static information that relates to +characteristics (in this case, relationships between parts) of the schema tree. + +The third case is somewhat different - it conveys characteristics of the data +tree through the leafref. We observe that implementing validation of such cases +requires additional consideration. + +## Problems with Leafrefs + +### Expense of Validation +Unlike most constraints in YANG, leafref constraint validation depends on more +than just the value in the node containing the leafref: it also depends on the +value of the nodes indicated by the path of the leafref. This means that a +modification to any node may invalidate a leafref node in any other part of the +tree. Validating a data tree after any node modification therefore requires +either re-examining the entire data tree or implementing complex bookkeeping +linking nodes to the leafref nodes that are constrained by them. + +In our implementation experience, detecting populated `leafref` leaves, and +performing data tree lookups to prove their validity is the dominant +computational expense during YANG tree validation. This complexity also +affects the clients interacting with an OpenConfig implementation. Crafting a +valid Set operation requires knowledge of the leafrefs anywhere in the +OpenConfig models. + +### Assumption of Complete and Consistent Data Tree + +Leafrefs for validation assume a complete and consistent data tree is available +at the time of validation. In practice there are numerous deployments where +this constraint is not met: + + * During data tree synchronisation -- a natural way to synchronize two data + trees (for instance, from a target device to a management system, or from a + NOS’s native data into an OpenConfig tree) is to subscribe to updates from a + source tree and apply them to the destination tree. If the destination must + validate leafrefs, then either updates from the source tree must be composed + into valid updates to apply to the target, or the source must only issue + updates that satisfy the constraints imposed by leafrefs on any nodes contained + in the update. In general, without support from the source, the former is not + possible. If the source system does not provide such a capability, the + destination tree must bypass leafref validation or implement complex systems + for hiding the fact that some leafref leaves are temporarily invalid. In this + model, assuming the source tree is valid at all times, the destination tree + will also become valid, but may have periods where it is not. + * Within modular configuration-generation systems -- in some cases, the + configuration of a network element may not be generated by a single process. + Individual handlers (e.g., a BGP session generator) may generate a part of the + configuration, which has external references. At this point in time, the + partial configuration is not available to be validated, however, it is still of + interest whether the leaves that were defined are valid. In this case, the + toolchain must provide means to be able to skip validation, as described above. + * In mixed-schema configuration systems -- in today's network elements, there + are typically multiple schemas available for configuration - legacy CLI, a + vendor's native models, OpenConfig etc., with varying levels of support. We do + not expect that leafrefs exist across these schemas, such that any entity that + is handling a mixed-schema configuration must also provide means to bypass + validation of leafrefs. + * During pre-configuration within a NOS -- some network elements may wish to + allow preconfiguration of a particular entity. For example, a client may be + allowed to reference a particular target interface before it is configured. To + support such behaviour, target implementations must provide some means to be + able to disable leafref validation for a particular client operation if it is + enabled by default. + * In split RO vs. RW systems -- some system architectures split the collection + of state data ('telemetry') from the storage of configuration data. Some + systems may not therefore have visibility into both the 'intended' + configuration as well as the 'applied' and 'derived' states of the system. + In such systems, any leafref that is from a `config false` to a `config + true` path in the data-tree will not resolve, and hence leafrefs between + these views of the data tree cannot be validated. + +To this end, in our experience the choice of *when* the existence of a +leafref's target can be validated, and *which* leafrefs should be expected to +have valid targets is wholly dependent upon the context of the consuming system +-- rather than a generic property of a YANG schema. + +### Inability to Wholly Describe Validity +Whilst the constraint that a particular referenced entity must exist on the +system is a useful validity constraint, it is generally insufficient to +describe the actual validity of the configuration. For example, if an interface +is to be included within a VRF, it is very likely to need to be defined, but it +likely also needs to be specified in a mode that means that it is compatible +with L3 routing - among a host of other constraints. In practice, therefore, +the mere existence of the interface is insufficient to describe validity. + +To overcome this scenario `when` and `must` statements could be added to the +schema. However, there are multiple concerns with doing so: + + * It incurrs the same expense as is described in _Expense of Validation_ above + on the server to ensure validity. + * The choice of XPATH to describe these constraints means that toolchains must + now handle a complex additional query language, and authors must craft such + queries. + * Both `when` and `must` statements have the same expectation of consistency + that is described in _Assumption of a Complete and Consistent Data Tree_. + +Use of `when`, `must` and `leafref` to indicate an instance is required are +somewhat outside the general scope of a data modelling language. For example, +protobuf, JSON schema, and thrift do not provide means to describe such +constraints. Use of these constraints in YANG implies an additional level of +complexity for the supporting toolchain, over and above that which is required +for other languages. + +In our implementation experience, in order to simplify the overall developer +experience and system architecture surrounding YANG modelled data, it is +significantly simpler to keep such constraints (if enforced) outside of the +data model specification. + +## Relaxed Leafref Validation Requirements + +By default, a server supporting OpenConfig: + + * SHOULD validate types for leaves of type `leafref`, along with any + restrictions (e.g., `pattern` or `range` statemenets) described with those + types. + * SHOULD NOT validate the existence of the leaf that is pointed to by the + leafref `path` by default. This behaviour MUST be explicitly enabled if + required, and MAY be unsupported by a target. This guidance essentially treats + all leafrefs within the schema as `require-instance false`. + +Authors of OpenConfig models: + + * SHOULD continue to use `leafref` where references between parts of the + schema are required. + +System implementors: + + * MUST make their systems explicitly check references if they are required for + their application. + * MAY choose to implement mechanisms such as only validating the existence of + leafref targets within a subset of the schema tree to overcome some of the + issues described in this application note. diff --git a/doc/network_instance_redistribution.md b/doc/network_instance_redistribution.md index e531a66b4..d35b67fdd 100644 --- a/doc/network_instance_redistribution.md +++ b/doc/network_instance_redistribution.md @@ -22,7 +22,8 @@ In numerous use cases an operator wishes to take routes that exist in one protoc In those implementations that maintain a (virtual-) RIB per protocol, the operator must configure explicit connections between these tables, usually alongside a policy to allow such inter-protocol advertisement to occur. While no such configuration is required in those implementations that utilise a single RIB, it is notable that even in these implementations a protocol will not advertise another protocol's routes from the RIB by default (since such a setup would mean that for instance, the BGP DFZ would be re-advertised into the IGP at peering edge devices, which is clearly not desirable). Instead, an operator must create explicit configuration that matches routes installed into the RIB by a particular protocol, and then "import" these routes into the protocol that is expected to advertise them. -In this latter case, the use of an import policy within a particular protocol instance is equivalent to the former - with the only difference being the context in which the policy is defined. With a table per protocol, an explicit configuration of redistributing routes from protocol A to protocol B is specified. In the latter case, the target protocol (protocol B) is specified, and a policy is used to select the source protocols from which routes may be imported for advertisement. +In this latter case, the use of an import policy within a particular protocol instance is equivalent to the former - with the only difference being the context in which the policy is defined. With a table per protocol, an explicit configuration of redistributing routes from protocol A to protocol B is specified. In the latter case, the target protocol (protocol B) is specified, and a policy is used to select the source protocols from which routes may be imported for advertisement. +In both cases, the destination protocol (protocol B) only installs the redistributed routes from the source protocol (protocol A) in its "advertisement RIB view". The redistributed routes are not installed in the FIB (forwarding information base) and therefore are not used for forwarding. ## OpenConfig Approach to Protocol RIB Interconnection @@ -35,6 +36,8 @@ An OpenConfig `routing-policy` is specified along with the connection - allowing It is expected that protocol-specific attributes (e.g., BGP communities) are set by such an import policy, allowing routes that are redistributed to carry information relating to their source (e.g., an IGP route may be tagged with a specific community using policy to indicate its provenance). +In the absense of an import-policy for table-connections, default-import-policy should take effect. In the absence of both, no routes should be allowed to be redistributed. + ## Examples of OpenConfig Network instance ### Example: Aggregate Routes Redistributed to IS-IS Level 2 diff --git a/doc/releases.md b/doc/releases.md new file mode 100644 index 000000000..55c06f9b4 --- /dev/null +++ b/doc/releases.md @@ -0,0 +1,98 @@ +# OpenConfig Release Versioning + +## Background and Motivation + +While each individual OpenConfig model can be tagged with a semantic version +(see [semver.md](semver.md)), models are often interdependent, or need to be +used together, for example when managing a full device. It is therefore useful +to define OpenConfig "releases" that contain a set of models that are designed +to work together. This also enables tracking breaking changes at the repository +level, as well as allowing public users to view and download tagged collections +of self-consistent models (see also the description of +[GitHub releases](https://help.github.com/articles/creating-releases/)). + +In light of the above, this proposal introduces tagging +[semantic versions](https://semver.org/) to the set of all OpenConfig models as +a whole along with some OpenConfig-specific guidelines. Each release is +therefore the cumulative set of models committed to the master branch at a +certain point in time, and is tied to a specific commit in the OpenConfig +repository. YANG validators ensure that each release consists of collection of +published OpenConfig models that work together: that is, interdependencies +(e.g., imports, augments) and cross-references (e.g., leafrefs) are all +resolved. + +As a side note, these releases are compatible with the notion of +[YANG release bundles](https://github.com/openconfig/public/blob/master/release/models/catalog/openconfig-module-catalog.yang). + +## Policy + +### Basic Guidelines + +1. A regular release of https://github.com/openconfig/public containing a set + of compatible models (consisting of the entire set of models within the + `openconfig/public` repo) is created roughly every **quarter**. The tag is + named `vx.y.z` (e.g. `v1.2.0`) following + [semantic versioning rules](https://semver.org/). A major, minor, or patch + version increment is possible at each release, although non-backward + compatible releases SHOULD be released at a less-frequent cadence. + + At the current time, releases are only expected to occur at the HEAD branch + of the repository, meaning patch releases for non-HEAD model versions are + not expected to be made. + +2. Non-backward compatible model changes affecting a feature that has + reasonable functional test coverage (via + [OpenConfig featureprofiles](https://github.com/openconfig/featureprofiles/)) + or implemented on a device SHOULD be made infrequently. The OpenConfig + working group will create non-backward compatible releases periodically by + considering both velocity and maintenance cost implications. + + e.g. It is November 2022, and the current latest release of OpenConfig + models is `v2.3.1`. The OpenConfig community decides to change the default + value of the leaf path `/interfaces/interface/config/enabled`. This is a + breaking change since it would cause featureprofile tests that test for the + behaviour of the default value without explicitly setting this leaf to begin + to fail. As a result, the pull request for this change is not merged until + the end of the quarter in December. In January 2023, a new release is + created, versioned `v3.0.0` containing this update. + +3. Any non-backward compatible change for a pre-`v1.0.0` YANG module does NOT + by itself necessitate a major revision change for the overall models + repository. + +4. [Patch releases](https://semver.org/#spec-item-6) may be created at any time + for backward compatible bug fixes, or equivalently, where only patch number + increases occurred in models. + +5. [Pre-releases](https://semver.org/#spec-item-9) may be created at anytime to + quickly introduce new changes to the models. These are not intended to be + long-term, stable releases -- they should be replaced with the next regular + release that encompasses these changes as soon as it becomes available. + +6. Wherever possible, it is RECOMMENDED to make backward compatible API changes + (e.g. deprecating leaves via the + [status statement](https://www.rfc-editor.org/rfc/rfc7950#section-7.21.2)) + for at least one minor release prior to a non-backward compatible API change + in order to ease the transition to the new API. These leaves are then + expected to be removed or modified in the next major version release. NOTE: + This guideline may change once OpenConfig operators gain more experience + managing breaking changes. + +7. Release documentation should include the list of models and their version + numbers contained in the corresponding release. + +Each release `vx.y.z` (e.g. `v1.2.0`) MAY be given a name for easier human +identification, e.g. "September 2022". A client can thus assert they are +compatible with the "September 2022" release of OpenConfig. It's expected that +vendors will have some deviations and augments from the baseline; further, some +vendors may offer the ability to configure their NOS (network operating system) +to support different releases of https://github.com/openconfig/public. + +Note that release version numbers need not be a function of individual model +release numbers (e.g., the max version number of all of the models in the +release). + +### Corner-Case Guidelines + +For non-backward compatible changes involving changing the type of a leaf, the +new leaf SHOULD have a different name than the previous leaf. diff --git a/doc/semver.md b/doc/semver.md new file mode 100644 index 000000000..4f2d13052 --- /dev/null +++ b/doc/semver.md @@ -0,0 +1,113 @@ +# Versioning Individual OpenConfig models + +contributors: Anees Shaikh, Josh George, Rob Shakir, Kristian Larsson
+ +## Background and Motivation + +*For versioning the set of all OpenConfig models as a whole, see +[releases.md](releases.md).* + +This document proposes to adopt [Semantic Versioning](http://semver.org/) +(semver) for published OpenConfig YANG models in the same way that software +projects use similar versioning schemes to indicate the maturity and +compatibility of software as it evolves. Semver bases its versioning on an API +contract with developers and users. The basic format of a semver number is +XX.YY.ZZ-release where XX is the major version number, YY is the minor version +number, and ZZ is a patch level. Additional information can be optionally +provided with a suffix. Detailed specification on the semver versioning rules +are available at the [link](http://semver.org/) above. Any non +backward-compatible change to the API requires incrementing the major version +number, while feature changes that do not break clients are indicated by +incrementing the minor version number. Non-feature patches that are backward +compatible are indicated with an increment to the patch number. + +Semantic versioning is proposed as an addition to YANG revision statements for a +number of reasons: + +* YANG language rules state that the API never changes in a + backward-incompatible way. From RFC 6020: “... changes are not allowed if + they have any potential to cause interoperability problems between a client + using an original specification and a server using an updated + specification.” + +This is simply not practical (and is largely motivated by SNMP MIB notions). +YANG models are not mature (less than 5 models have been made IETF RFCs and +these are not implemented by any major device platform). Server and client +implementations are only now being developed and deployed and significantly more +operational experience is needed before APIs can be frozen. + +* YANG revision statements consist of a date and some informational text. As + such, they offer little information about what has changed from one revision + to the next. This is perhaps not surprising when considering the rigid rules + in YANG about guaranteed API compatibility. +* YANG revision statements are meant for human consumption -- they are not + very useful for any sort of programmatic dependency checking. + +Semantic versioning has its +[own issues](https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e) and it may +be that in OpenConfig we will have to adapt the specification somewhat based on +considerations for versioning YANG models. Also semver does not address the +problem of how to version groups of interdependent modules (e.g., a device model +composed of many constituent models). + +Note that we would continue to use revision statements, e.g., with a date set to +the day a new semantic version is published. This allows consumers to continue +to use current YANG constructs such as import by revision. + +## General guidelines for versioning OpenConfig YANG modules + +An immediate question that arises when considering how to version YANG modules +is what criteria should be used to judge that a module is mature enough that an +API contract should be established with a version number. + +According to the semver specification, software that is pre-release with major +version 0 may break clients as long as the major version number remains < 1. +That is, with major version 0, there should be no expectation of compatibility +from one release to another, even if only the minor version number is changing. + +Based on these considerations, the following basic guidelines are proposed for +versioning OpenConfig modules: + +* All modules should start out with a 0 major number. The major number should + remain 0 as long as the model is being reviewed and revised based on + feedback from the OpenConfig operators and from vendors implementing the + model. +* Semver guidelines should be followed while the model is at major number 0, + i.e., API or feature changes should increment the minor number, while minor + fixes should increment the patch number. +* Once a vendor implementation for a model is in progress, the major number + should be changed to 1 to acknowledge that the API is being used by + implementors with correspondingly more disruption likely when the model + changes in incompatible ways. Deciding that vendor implementations are + sufficiently in-progress to justify moving to major version 1 may be + somewhat subjective and should be based on detailed discussions with + implementors to understand what stage they are in their implementations. + +## API changes in YANG modules + +For the purposes of semver, the API presented by a YANG model consists of its +data nodes and corresponding paths. Other elements of the model may not, +strictly speaking, be considered part of the API, but still could have +significant impact on the use of the model by developers or clients. Such +elements include default values, configurability of a node, and behavior of a +given data node (as described by the description statement). + +Since the API of the YANG module is a combination of these explicit and implicit +elements, the criteria for determining when a revision requires a major number +increment is not always straightforward. Below we list some general rules for +determining the API has changed, and consequently would increment the major +version number. + +* Any leaf, leaf-list, list, or container modifications that result in + changing an existing data node name, or the path to a data node (location in + the model) +* Changing the target of a leafref +* Removal of a data node (leaf, leaf-list, list, container) +* Changing the type of a leaf or leaf-list +* Changing a type definition such that data based on the existing typedef + would be invalid (e.g., removing a value from an enumeration, changing the + base type in a typedef, etc.) +* Changing the key of a list (i.e., using a different data node as the list + key) +* Changing a conditional statement, such as when or must, to be more + restrictive, or to be based on a different condition altogether diff --git a/doc/terminal-device-properties-guide.md b/doc/terminal-device-properties-guide.md new file mode 100644 index 000000000..682f839d2 --- /dev/null +++ b/doc/terminal-device-properties-guide.md @@ -0,0 +1,129 @@ +# Openconfig Terminal Device Manifest files guidelines + +**Contributors:** Arturo Mayoral López de Lerma + +This page documents the purpose and usability guidelines for the openconfig-terminal-device-properties.yang and openconfig-terminal-device-property-types.yang models included in openconfig/devices-manifest folder. These models enter in the category of devices manifest files, which is a new category of openconfig models which are intended to expose the static properties of a devices, which are traditionally documented by the device's manufacturers in the product datasheets. These properties are typically required by network planning teams to plan the network deployments. + +# Motivation + +Current optical transport networks are evolving into new degrees of openness and flexibility, where the optical terminal units become more and more independent from the rest of the DWDM line system, management and control. This means for instance that an optical terminal device, i.e., a transponder/muxponder device can be deployed as a standalone unit and connected to the line system of a third-party provider. In order, to make this type of integrations efficient, the optical channel signal characteristics can be exposed through the management interface (i.e., through OpenConfig models in this case), to allow the remote controller entity to ingest the required data for successful optical planning and impairment validation of the end-to-end transmission across the Optical Line System (OLS). This intends to remove ambiguity on how suppliers expose data required for network planning and physical impairment validation of end-to-end Optical Channels (OCh/OTSi) and foster openness across the optical transport industry. + +Currently in OpenConfig, the optical channels characteristics are opaque to some extent and the model only offers an abstraction named 'operational-mode', which allows the manufactures to encode the different transmission modes supported by the device into a single integer value. While this may be sufficient in some cases (the manufacturer can offer the related mode details offline to its customers), and very practical for configuration purposes, it becomes cucumbersome for an network operator to encode this information into their network controller application, specially if the network contains many different vendor solutions which may expose their signal characteristics in different formats, adding or omitting some information in each case. Thus, this model intends to provide uniformity on the way operational-modes are characterized by including a set of static attributes associated to each mode. + +This proposal was submitted by the Telecom Infra Project (TIP) Mandatory Use Cases for SDN Transport (MUST) sub-group. This is an operator centric initiative which intends to achieve a wider consensus about the SDN standards to use on the network transport segment. + +# Model content +The model contains two main building blocks: +* **operational-mode-capabilities** this set of attributes contains all characteristic information of the signal (modulation format, FEC, bit rate...), relevant information for the physical impairment validation (OSNR Rx sensitivity, CD/PMD tolerance and penalties). +* **optical-channel-config-value-constrains** which contains the transmission configuration constrains/ranges of the optical-channel's attributes characterized by the operational-mode, i.e., the central frequency range, the frequency grid and the configurable transmitted power. + + +# Model logic + +1. **Terminal device manufacturing – Operational modes hardcoding** +Terminal device manufacturer encodes supported transmission modes characteristic information into the terminal-device's manifest file which is hardcoded into the device firmware. This process shall takes into account the transmission modes supported third-party transceiver pluggable modules compatible with the terminal device. + +2. **Terminal device w/o pluggable – Initial setup** +When the device is started, the operational modes list is complete and contains all the information about the compatible transceivers and their associated operational modes. The manifest file defined by the openconfig-terminal-device-properties.yang model is static and will remain available and invariant through the terminal device's management interface which exposes openconfig models. + +3. **Terminal device with equipped pluggable – Running State** +Once the line-card module is successfully equipped with the fixed or pluggable transceiver and the module is discovered by the Terminal Device, the operational data store is updated with the actual modes available (see openconfig-terminal-device.yang module). The list of modes present in the terminal-device/operational-modes list represents the actual modes which are available in runtime by the device and which can be configured as part of the optical-channel configuration. Please note, that this information can be dynamically updated if the pluggable unit changes. For each operational-mode/mode-id present in the operational data store, there should be an operational-modes/mode-descriptor item with the same mode-id, included in the manifest file. + +# Model implementation guidelines + +Manifest files are a special OpenConfig model category since they do not represent operational data. Thus, this category of models will be included within the "models/tree/master/yang/devices-manifest" folder. + +In order to keep separated them from the rest of operational models, the following openconfig extension is included in the model, to enrich the module metadata: +``` + oc-ext:origin "openconfig-properties"; +``` +# Extensions introduced in the v0.2.0 release of the model. + +### Motivation + +After the initial release of the [openconfig-terminal-device-properties.yang](https://github.com/openconfig/public/blob/master/release/models/devices-manifest/openconfig-terminal-device-properties.yang), there have been significant technical questions and discussions happening within the Telecom Infra Project (TIP) Open Optical & Packet Transport (OOPT) community between operators and vendors. + +This issue summarizes the motivation and issues detected in the first release of the model and it will serve as an introduction and motivation of a new pull request (#911) with a new proposed comprehensive update of the model which will be accompanied by the relevant explanations on how the new model proposal will try to overcome the detected issues. It is worth mentioning that the current analysis and the new proposal are the outcomes of an extensive technical discussion within the OOPT community between vendors and service providers and that it consolidates an already discussed proposal starting from the issues and motivations explained here. + +### Context + +The current proposed terminal-device-properties model was designed with the objective of allowing the terminal devices' system vendors to expose the intrinsic properties (Modulation Format, FEC, Baud-rate) and performance characteristics (Rx-OSNR, CD/PMD limits) of the device's supported transmission modes. + +The initial version of the model was designed as a flat list of mode properties, where each entry represents a mode supported by the terminal device and includes the list of characteristics of that mode. However, this initial version presents a significant list of limitations. + +### Initial release limitations +- **First issue**: The current model exposes a list of modes available in the device, however, the characteristics of a mode of transmission are affected by the HW transceiver supplying it. In other words, two different transceivers (supported by the same terminal device) might support the same mode, but their mode characteristics are different. + +image + +- **Second issue**: There is not an interoperability matrix within the Terminal Device's which exposes the compatibility between Terminal Device's chassis, linecards, transceivers and modes. Right now there is no compatibility information available in the model, to allow the supplier to properly describe which modes are supported by each transceiver module available in the terminal device. + +#### Operational challenges + +- It is not clear how mode IDs will be assigned and who will assign them. +- Clarification of the bookended solution target by the model. + +### New proposal scope and initial assumptions + +Clarify the target of the next extension targets + +1. Bookended solutions, and interoperability between terminal devices of the same system vendor. +2. Interoperability between different system vendors O-OTs through standard modes + +### Solution proposed + +This pull request covers a proposed solution to the issues described in #910. + +The changes to the existing model **are not backward compatible.** + +The summary of the changes proposed is the following: + +**1. Operational-mode list:** + - The list of the exposed operational modes properties by the Terminal Device is augmented with the set of **CHARacteristic properties** of the operational mode. + - The mode-ids are the same used within the operational datastore of the terminal device (exposed by the [openconfig-terminal-device.yang](https://github.com/openconfig/public/blob/master/release/models/optical-transport/openconfig-terminal-device.yang) model) and have network-wide scope assuming they guarantee interoperability in bookended scenarios (two Terminal Devices of the same system vendor supporting the same mode). + - The mode-ids are defined by the system vendor. + +**2. Mode-descriptors list:** + - The **design properties** of the modes, which are dependent on the transceiver component that implements the mode, are exposed as a nested list within the operational mode list. It is assumed that a single operational mode might be implemented by different transceivers which might have associated different design properties exposed by different mode descriptors. + - The **mode-descriptor-id** is a local index that does not have interoperability meaning outside the specific Terminal device which reports it. In other words, the same mode descriptors might be exported by different Terminal Devices with different IDs. + +**3. Interoperable mode list.** + - A given proprietary operational mode might be capable to comply with a certain number of standards or elsewhere publicly defined operational modes defined by other organizations e.g., ITU-T or OpenROADM. + - This compatibility characteristic shall be assured by the system vendor and imply that the design properties of the implementations of that specific operational mode are a superset of all listed supported standard modes. + - This model block will replace the previous "G.698.2" node tree with a more generic definition able to accommodate multiple standards or MSA-defined modes. + +**4. Transceiver-descriptors list.** + - The Terminal Device exposes the list of the transceiver components which are supported by the device. + - Each transceiver exposes the list of compatible modes and their associated mode descriptor. + - This new model block enhances the previous version by allowing to expose explicitly the compatibility matrix between the Terminal Device, the set of transceiver modules supported and the associated modes supported. + +**5. Linecard-descriptors list.** + - The Terminal Device exposes the list of linecard components which are supported by the device. + - Each linecard component exposes the list of transceivers that are supported. + - Each linecard constrains the list of modes that can be supported among the ones supported by the transceiver. + - Each linecard constrains the optical-channel configuration, e.g., target-output-power and frequency range. + - This new model block enhances the previous version by allowing to expose explicitly the compatibility matrix between the Terminal Device, the line cards, the set of transceiver module per line card and the associated modes supported. + +Following the model tree with the 5 blocks described above. In green the new leaves/containers are added in this proposal; in black the non-modified leaves, even if they have been reallocated within the tree under different containers/lists. + +image + +For more clarity on the above please check the following common definitions and assumptions defined during the design process of this proposal within the Telecom Infra Project (TIP) OOPT MUST project. + +#### Common definitions +- System-vendor = the O-OT host platform provider (e.g. muxponder shelf, router, switch) and system integrator including the network operating system of the O-OT +- Manufacturer = Transceiver manufacturer (pluggable) +- Bookended scenario definition. + - The System Vendor is the same in the two O-OTs. + - The O-OTs of the same system vendor might host different Transceiver manufacturers. + - Mode-ids are defined and maintained by the system vendor. + - Interoperability shall be guaranteed by the system vendor if the same mode-id is configured in the line interfaces /optical-channels of the two O-OTs. + +#### Assumptions +- The **openconfig-terminal-device-properties.yang** is a standalone model which represents static properties of a given terminal device, including: + - **Operational-modes’ characteristic properties** on the transceiver configuration which characterize the mode (modulation-format, baud-rate, bit-rate, fec-format, filter…) + - **Mode-descriptors** which describe the transmission design properties (Tx/Rx properties + CHARacteristic properties) of the implementation of the mode conditioned by the HW platform (transceiver + linecard) (Rx/Tx-OSNR, CD/PMD tolerances, penalties…) + - **optical-channel’s configuration constraints** introduced by the HW implementation (min/max-central-frequency, min/max-output-power…) +- The openconfig-terminal-device-properties.yang is a standalone model representing a given mode’s static properties. We shall avoid any reference btw the manifest files and the operational openconfig trees which change dynamically. In other words, the references between mode-descriptors and operational modes, shall be through absolute identifiers. + + diff --git a/doc/vendor_counter_guide.md b/doc/vendor_counter_guide.md new file mode 100644 index 000000000..1b121f0fa --- /dev/null +++ b/doc/vendor_counter_guide.md @@ -0,0 +1,191 @@ +# Vendor-Specific Augmentation for Pipeline Counter + +**Contributors**: roland@arista.com + +This document provides the guidelines for the vendor-specific portions of openconfig-platform. As implementations differ from vendor to vendor and platform to platform, a process of adding vendor-specific counters will be defined here. + +## Usage: Vendor-specific pipeline drop counter + +Each implementor should augment `/components/component/integrated-circuit/pipeline-counter/drop/vendor` with their own vendor and platform containers. The naming of the platform container may consist of the platform name, ASIC family, or a combination of both platform and ASIC family. Within the platform container, that container may use the utility grouping `oc-ppc:pipeline-vendor-drop-containers` that provides the adverse/congestion/packet-processing specific containers. For each set of adverse/congestion/packet-processing counters augmented into `oc-ppc:pipeline-vendor-drop-containers`, the sum of the counters should be included in the values of the aggregate leaves: + +- Counters within `.../pipeline-counter/drop/vendor///adverse/state` aggregate into `.../pipeline-counter/drop/state/adverse-aggregate` +- Counters within `.../pipeline-counter/drop/vendor///congestion/state` aggregate into `.../pipeline-counter/drop/state/congestion-aggregate` +- Counters within `.../pipeline-counter/drop/vendor///packet-processing/state` aggregate into `.../pipeline-counter/drop/state/packet-processing-aggregate` + +If these aggregate counters are implemented, the sum of the vendor-specific counters must match the aggregate counters. + +If an integrated-circuit has a vendor-specific packet drop counter which cannot differentiate between packet-processing, congestion and adverse drops, then that counter should still be exposed as a vendor-specific packet-processing counter with an appropriate description in the vendor's augmentation. The `packet-processing-aggregate` counter should be incremented in this scenario as expected above. Such a counter is undesirable as it means this hardware cannot meet the goal for identifying adverse packet drops in the ASIC, but it is better not to ruin the fidelity of the `adverse-aggregate` drop counter with noise of intended packet drops. + +## Example: Vendor-specific pipeline drop counter + +This following is a sample augmentation file. + +- Vendor: Acme +- Platform: AsicFamily + +### Example YANG Augmentation + +release/platform/acme-asicfamily-drop-augments.yang + +```yang +grouping acme-asicfamily-adverse-drop-counters { + leaf adverse-reason-counter-a { + type oc-yang:counter64; + } + + leaf adverse-reason-counter-b { + type oc-yang:counter64; + } + + leaf adverse-reason-counter-c { + type oc-yang:counter64; + } +} + +grouping acme-asicfamily-congestion-drop-counters { + leaf congestion-reason-counter-a { + type oc-yang:counter64; + } + + leaf congestion-reason-counter-b { + type oc-yang:counter64; + } + + leaf congestion-reason-counter-c { + type oc-yang:counter64; + } +} + +grouping acme-asicfamily-packet-processing-drop-counters { + leaf packet-processing-reason-counter-a { + type oc-yang:counter64; + } + + leaf packet-processing-reason-counter-b { + type oc-yang:counter64; + } + + leaf packet-processing-reason-counter-c { + type oc-yang:counter64; + } +} + +augment "/components/component/integrated-circuit/pipeline-counter/drop/vendor" { + container acme { + container asic-family { + uses oc-ppc:pipeline-vendor-drop-containers; + } + } +} + +augment "/components/component/integrated-circuit/pipeline-counter/drop/vendor/acme/asic-family/adverse/state" { + uses acme-asicfamily-adverse-drop-counters; +} + +augment "/components/component/integrated-circuit/pipeline-counter/drop/vendor/acme/asic-family/congestion/state" { + uses acme-asicfamily-congestion-drop-counters; +} + +augment "/components/component/integrated-circuit/pipeline-counter/drop/vendor/acme/asic-family/adverse/state" { + uses acme-asicfamily-packet-processing-drop-counters; +} +``` + +Note: Namespaces omitted from `augment ` for brevity + +### Example pyang tree + +```text +module: openconfig-platform + +--rw components + +--rw component* [name] + +--rw integrated-circuit + +--ro oc-ppc:pipeline-counters + +--ro oc-ppc:drop + +--ro oc-ppc:vendor + +--ro acme-ppc:acme + +--ro acme-ppc:asic-family + +--ro oc-ppc:adverse + +--ro oc-ppc:state + +--ro acme-ppc:adverse-reason-counter-a? oc-yang:counter64 + +--ro acme-ppc:adverse-reason-counter-b? oc-yang:counter64 + +--ro acme-ppc:adverse-reason-counter-c? oc-yang:counter64 + +--ro oc-ppc:congestion + +--ro oc-ppc:state + +--ro acme-ppc:congestion-reason-counter-a? oc-yang:counter64 + +--ro acme-ppc:congestion-reason-counter-b? oc-yang:counter64 + +--ro acme-ppc:congestion-reason-counter-c? oc-yang:counter64 + +--ro oc-ppc:packet-processing + +--ro oc-ppc:state + +--ro acme-ppc:packet-processing-reason-counter-a? oc-yang:counter64 + +--ro acme-ppc:packet-processing-reason-counter-b? oc-yang:counter64 + +--ro acme-ppc:packet-processing-reason-counter-c? oc-yang:counter64 +``` + +## Usage: Vendor-specific control-plane traffic counter + +Each implementor should augment `/components/component/integrated-circuit/control-plane-traffic/vendor` with their own `//state` containers. The naming of the platform container may consist of the platform name, ASIC family, or a combination of both platform and ASIC family. Within the state container, it should define vendor-specific counter containers. Each control-plane traffic counter may use the utility grouping `oc-ic:control-plane-traffic-vendor-counters` that provides the queued/dropped leaves. For each counters augmented into `//state`, the sum of the counters should be included in the values of the aggregate leaves: + +- Counters within `.../control-plane-traffic/vendor///state//queued` aggregate into `.../control-plane-traffic/state/queued-aggregate` +- Counters within `.../control-plane-traffic/vendor///state//queued-bytes` aggregate into `.../control-plane-traffic/state/queued-bytes-aggregate` +- Counters within `.../control-plane-traffic/vendor///state//dropped` aggregate into `.../control-plane-traffic/state/dropped-aggregate` +- Counters within `.../control-plane-traffic/vendor///state//dropped-bytes` aggregate into `.../control-plane-traffic/state/dropped-bytes-aggregate` + +If these aggregate counters are implemented, the sum of the vendor-specific counters must match the aggregate counters. + +## Example: Vendor-specific pipeline drop counter + +This following is a sample augmentation file. + +- Vendor: Acme +- Platform: AsicFamily + +### Example YANG Augmentation + +release/platform/acme-asicfamily-control-plane-traffic-augments.yang + +```yang +grouping acme-asicfamily-control-plane-traffic-counters { + container queue-counter-a { + uses oc-ppc:control-plane-traffic-vendor-counters; + } + + container queue-counter-b { + uses oc-ppc:control-plane-traffic-vendor-counters; + } + + container queue-counter-c { + uses oc-ppc:control-plane-traffic-vendor-counters; + } +} + +augment "/components/component/integrated-circuit/pipeline-counters/control-plane-traffic/vendor" { + container acme { + container asic-family { + container state { + uses acme-asicfamily-control-plane-traffic-counters; + } + } + } +} +``` + +Note: Namespaces omitted from `augment ` for brevity + +### Example pyang tree + +```text +module: openconfig-platform + +--rw components + +--rw component* [name] + +--rw integrated-circuit + +--ro oc-ppc:pipeline-counters + +--ro oc-ppc:control-plane-traffic + +--ro oc-ppc:vendor + +--ro acme-ppc:acme + +--ro acme-ppc:asic-family + +--ro acme-ppc:state + +--ro acme-ppc:queue-counter-a + +--ro acme-ppc:queue-counter-b + +--ro acme-ppc:queue-counter-c +``` diff --git a/known_hosts b/known_hosts index 1bae52b89..d88529723 100644 --- a/known_hosts +++ b/known_hosts @@ -1 +1 @@ -github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== +github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk= diff --git a/regexp-tests/openconfig-network-instance-types-test.yang b/regexp-tests/openconfig-network-instance-types-test.yang index 9a4edf22d..9047cd777 100644 --- a/regexp-tests/openconfig-network-instance-types-test.yang +++ b/regexp-tests/openconfig-network-instance-types-test.yang @@ -13,6 +13,7 @@ module openconfig-network-instance-types-test { pt:pattern-test-pass "99:4294967295"; pt:pattern-test-pass "999:999999999"; pt:pattern-test-pass "9999:99999999"; + pt:pattern-test-fail "09999:99999999"; // regression: not canonical pt:pattern-test-pass "65535:0"; pt:pattern-test-pass "59999:65536"; pt:pattern-test-pass "64999:4294967289"; @@ -24,6 +25,7 @@ module openconfig-network-instance-types-test { pt:pattern-test-pass "65535:4289999999"; pt:pattern-test-pass "65535:4199999999"; pt:pattern-test-pass "65535:3999999999"; + pt:pattern-test-pass "65535:2999999999"; // regression: [1-3][0-9]{9}, not just 3[0-9]{9} pt:pattern-test-fail "0:4294967296"; pt:pattern-test-fail "65536:777777"; pt:pattern-test-fail "65540:777777"; @@ -52,6 +54,7 @@ module openconfig-network-instance-types-test { pt:pattern-test-fail "1.1.1.1:65600"; pt:pattern-test-fail "1.1.1.1:66000"; pt:pattern-test-fail "1.1.1.1:70000"; + pt:pattern-test-fail "1.1.1.1:09999"; // regression pt:pattern-test-fail "256.255.255.255:99"; pt:pattern-test-fail "1.1.1.256:99"; pt:pattern-test-fail "256.1.1.1%eth0:99"; @@ -71,7 +74,9 @@ module openconfig-network-instance-types-test { pt:pattern-test-pass "4293999999:65535"; pt:pattern-test-pass "4289999999:65535"; pt:pattern-test-pass "4199999999:65535"; + pt:pattern-test-pass "1999999999:65535"; // regression pt:pattern-test-pass "3999999999:65535"; + pt:pattern-test-fail "3999999999:05535"; // regression pt:pattern-test-fail "4294967296:0"; pt:pattern-test-fail "777777:65536"; pt:pattern-test-fail "777777:65540"; diff --git a/regexp-tests/openconfig-openflow-types-test.yang b/regexp-tests/openconfig-openflow-types-test.yang new file mode 100644 index 000000000..fbb7c4ed2 --- /dev/null +++ b/regexp-tests/openconfig-openflow-types-test.yang @@ -0,0 +1,18 @@ +module openconfig-openflow-types-test { + prefix "openflow-types-t"; + namespace "urn:openconfig-openflow-types-test"; + + import pattern-test { prefix "pt"; } + import openconfig-openflow-types { prefix "openflow-types"; } + + leaf datapath-id { + type openflow-types:datapath-id; + // Upper 16-bits (UD), Lower 48-bits (MAC) + pt:pattern-test-pass "00:0a:00:9c:02:d8:18:00"; + pt:pattern-test-pass "00:ff:0a:3c:67:c8:12:01"; + pt:pattern-test-pass "00:FF:0A:3C:67:C8:12:01"; + pt:pattern-test-pass "11:11:11:11:11:11:11:11"; + pt:pattern-test-fail "0:a:0:9:0:d:1:0"; + pt:pattern-test-fail "0h:0a:00:9c:02:d8:18:00"; + } +} diff --git a/regexp-tests/openconfig-vlan-types-test.yang b/regexp-tests/openconfig-vlan-types-test.yang new file mode 100644 index 000000000..3247c4e2f --- /dev/null +++ b/regexp-tests/openconfig-vlan-types-test.yang @@ -0,0 +1,38 @@ +module openconfig-vlan-types-test { + prefix "oc-vlan-types-t"; + namespace "urn:openconfig-vlan-types-test"; + + import pattern-test { prefix "pt"; } + import openconfig-vlan-types { prefix "oc-vlan-types"; } + + leaf vlan-range { + type oc-vlan-types:vlan-range; + pt:pattern-test-pass "1..10"; + pt:pattern-test-pass "30..32"; + pt:pattern-test-pass "1024..2048"; + pt:pattern-test-fail "100..4097"; + pt:pattern-test-fail "14"; + pt:pattern-test-fail "A..40"; + } + + leaf qinq-id { + type oc-vlan-types:qinq-id; + pt:pattern-test-pass "10.10"; + pt:pattern-test-pass "23.2000"; + pt:pattern-test-pass "1000.*"; + pt:pattern-test-fail "525"; + pt:pattern-test-fail "100.4097"; + pt:pattern-test-fail "300.4A"; + } + + leaf qinq-id-range { + type oc-vlan-types:qinq-id-range; + pt:pattern-test-pass "1.10..100"; + pt:pattern-test-pass "100.400..1000"; + pt:pattern-test-pass "300..400.1000"; + pt:pattern-test-pass "1024..2048.1024"; + pt:pattern-test-fail "1024..2048..1024"; + pt:pattern-test-fail "10.20.30"; + pt:pattern-test-fail "1020..1030"; + } +} diff --git a/regexp-tests/openconfig-yang-types-test.yang b/regexp-tests/openconfig-yang-types-test.yang index 2f6ca1ba6..6539ba6b7 100644 --- a/regexp-tests/openconfig-yang-types-test.yang +++ b/regexp-tests/openconfig-yang-types-test.yang @@ -5,6 +5,19 @@ module openconfig-yang-types-test { import pattern-test { prefix "pt"; } import openconfig-yang-types { prefix "oc-yang"; } + leaf hex-string-prefixed { + type oc-yang:hex-string-prefixed; + pt:pattern-test-pass "0x0000"; + pt:pattern-test-pass "0xffff"; + pt:pattern-test-pass "0xFFFF"; + pt:pattern-test-pass "0x0123456789abcdefABCDEF"; + pt:pattern-test-pass "0xFEDCBAfedcba9876543210"; + pt:pattern-test-fail "0xg"; + pt:pattern-test-fail "0xG"; + pt:pattern-test-fail "0x0123456789abcdefABCDEFG"; + pt:pattern-test-fail "0xFED0xba9876543210"; + } + leaf hex-string { type oc-yang:hex-string; pt:pattern-test-pass "00000"; diff --git a/release/README.md b/release/README.md index 775726db1..0fb695792 100644 --- a/release/README.md +++ b/release/README.md @@ -4,21 +4,7 @@ The ```release/``` directory contains published OpenConfig models, documentation ## Models -Published versions of OpenConfig modules can be found in the ```release/models``` directory. The current released model set is: - - * `bgp` - covering configuration and state relating to Border Gateway Protocol (BGP), including multi-protocol extensions. The `openconfig-bgp-policy` module provides augmentations to the OpenConfig routing policy framework to allow policies to utilise BGP-specific routing attributes. - * `interfaces` - which provides configuration and state for physical and logical device interfaces and associated IP addressing. Extension modules provide configuration for aggregate interfaces (`openconfig-if-aggregate`) and Ethernet-specific interface parameters (`openconfig-if-ethernet`). - * `local-routing` - allowing interaction with the configuration and operational state relating to static and aggregate routes which are generated by a device locally. - * `mpls` - comprehensive data model for configuration and operational - state of MPLS/TE, including signaling protocols such as RSVP, LDP, and - segment routing. - * `optical-transport` - providing a configuration and state model for terminal optical devices within a DWDM system, including both client- and line-side parameters. - * `policy` - a framework for routing policies to be expressed allowing matching of particular routing elements or sets, and actions to be performed on them. Other models may augment this model to add protocol-specific types, and reference policies defined within it. - * `rib` - a data model representing the BGP-4 routing information base (RIB) contents. Extensions to the 'base' RIB model adding additional data elements of operational use are defined in `openconfig-rib-bgp-ext`. - * `telemetry` - describing state and configuration parameters relating to a device's ability to stream telemetry information to a network management system. - * `vlan` - a model allowing the configuration and state retrieval of parameters corresponding to 802.1Q VLANs on a device - including the creation of routed interfaces corresponding to those VLANs. - * `network-instance` - a model defining configuration and operational state parameters for a Layer 2 or Layer 3 forwarding instance on a network element. - * `rpc` - defines the set of operations that are expected between a network element and a device supporting OpenConfig models. +Published versions of OpenConfig modules can be found in the ```release/models``` directory. Generic type definitions which OpenConfig utilises can be found in the `openconfig-types` module. diff --git a/release/models/acl/openconfig-acl.yang b/release/models/acl/openconfig-acl.yang index 224724671..6b3977907 100644 --- a/release/models/acl/openconfig-acl.yang +++ b/release/models/acl/openconfig-acl.yang @@ -34,7 +34,39 @@ module openconfig-acl { packets should be handled. Entries have a type that indicates the type of match criteria, e.g., MAC layer, IPv4, IPv6, etc."; - oc-ext:openconfig-version "1.2.1"; + oc-ext:openconfig-version "1.3.3"; + + revision "2023-02-06" { + description + "Add clarifying comments on use of interface-ref."; + reference "1.3.3"; + } + + revision "2023-01-29" { + description + "Update sequence-id reference to allow model to be re-used + outside of ACL context."; + reference "1.3.2"; + } + + revision "2022-12-20" { + description + "Remove unused openconfig-inet-types import"; + reference "1.3.1"; + } + + revision "2022-06-01" { + description + "Add the management of prefix lists + that can be used in matches"; + reference "1.3.0"; + } + + revision "2022-01-14" { + description + "Fix when statements for MIXED mode ACLs"; + reference "1.2.2"; + } revision "2021-06-16" { description @@ -221,7 +253,10 @@ module openconfig-acl { container input-interface { description - "Input interface container"; + "Input interface container. The interface is resolved based + on the interface and subinterface leaves of the interface-ref + container, which are references to entries in the /interfaces + list."; container config { description @@ -416,42 +451,48 @@ module openconfig-acl { } uses oc-match:ethernet-header-top { - when "../../config/type='ACL_L2'" { + when "../../config/type='ACL_L2' or " + + "../../config/type='ACL_MIXED'" { description - "MAC-layer fields are valid when the ACL type is L2"; + "MAC-layer fields are valid when the ACL type is L2 or + MIXED"; } } uses oc-match:ipv4-protocol-fields-top { - when "../../config/type='ACL_IPV4'" { + when "../../config/type='ACL_IPV4' or " + + "../../config/type='ACL_MIXED'" { description "IPv4-layer fields are valid when the ACL type is - IPv4"; + IPv4 or MIXED"; } } uses oc-match:mpls-header-top { - when "../../config/type='ACL_MPLS'" { + when "../../config/type='ACL_MPLS' or " + + "../../config/type='ACL_MIXED'" { description "MPLS-layer fields are valid when the ACL type is - MPLS"; + MPLS or MIXED"; } } uses oc-match:ipv6-protocol-fields-top { - when "../../config/type='ACL_IPV6'" { + when "../../config/type='ACL_IPV6' or " + + "../../config/type='ACL_MIXED'" { description "IPv6-layer fields are valid when the ACL type is - IPv6"; + IPv6 or MIXED"; } } uses oc-match:transport-fields-top { when "../../config/type='ACL_IPV6' or " + - "../../config/type='ACL_IPV4'" { + "../../config/type='ACL_IPV4' or " + + "../../config/type='ACL_MIXED'" { description "Transport-layer fields are valid when specifying - L3 ACL types"; + L3 or MIXED ACL types"; } } @@ -553,10 +594,10 @@ module openconfig-acl { leaf sequence-id { type leafref { - path "/acl/acl-sets/" + - "acl-set[name=current()/../../../../set-name]" + - "[type=current()/../../../../type]/" + - "acl-entries/acl-entry/sequence-id"; + path "/oc-acl:acl/oc-acl:acl-sets/" + + "oc-acl:acl-set[oc-acl:name=current()/../../../../set-name]" + + "[oc-acl:type=current()/../../../../type]/" + + "oc-acl:acl-entries/oc-acl:acl-entry/oc-acl:sequence-id"; } description "Reference to an entry in the ACL set applied to an @@ -795,7 +836,11 @@ module openconfig-acl { list interface { key "id"; description - "List of interfaces on which ACLs are set"; + "List of interfaces on which ACLs are set. The interface is resolved + based on the interface and subinterface leaves of the interface-ref + container, which are references to entries in the /interfaces + list. The key of the list is an arbitrary value that the + implementation should not use to resolve an interface name."; leaf id { type leafref { @@ -830,6 +875,7 @@ module openconfig-acl { } } + grouping acl-config { description "Global configuration data for ACLs"; diff --git a/release/models/acl/openconfig-icmpv4-types.yang b/release/models/acl/openconfig-icmpv4-types.yang new file mode 100644 index 000000000..486f3e157 --- /dev/null +++ b/release/models/acl/openconfig-icmpv4-types.yang @@ -0,0 +1,540 @@ +module openconfig-icmpv4-types { + + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-icmpv4-types"; + + prefix "oc-icmpv4-types"; + + import openconfig-extensions { prefix oc-ext; } + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "OpenConfig module defining the types and coresponding codes for + ICMPv4."; + + oc-ext:openconfig-version "0.1.0"; + + revision "2023-01-26" { + description + "Initial revision of ICMPv4 types module."; + reference "0.1.0"; + } + + identity TYPE { + description + "Base identity for ICMPv4 codes"; + } + + identity CODE { + description + "Base identity for ICMPv4 codes."; + } + + identity ECHO_REPLY { + description + "ICMP echo reply, value 0."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE { + description + "ICMP destination unreachable, value 3."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity REDIRECT { + description + "ICMP redirect, value 5."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity ECHO { + description + "ICMP echo, value 8."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity ROUTER_ADVERTISEMENT { + description + "ICMP router advertisement, value 9."; + base TYPE; + reference "RFC1256: ICMP Router Discovery Messages"; + } + + identity ROUTER_SOLICITATION { + description + "ICMP Router Solicitation, value 10."; + base TYPE; + reference "RFC1256: ICMP Router Discovery Messages"; + } + + identity TIME_EXCEEDED { + description + "ICMP TTL exceede, value 11."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity PARAM_PROBLEM { + description + "ICMP parameter problem, value 12."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity TIMESTAMP { + description + "ICMP timestamp, value 13."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity TIMESTAMP_REPLY { + description + "ICMP timestamp reply, value 14."; + base TYPE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + identity TRACEROUTE{ + description + "Traceroute (deprecated), value 30."; + base TYPE; + reference "RFC1393: Traceroute Using an IP Option"; + } + identity PHOTURIS { + description + "ICMP Photuris, value 40."; + base TYPE; + reference "RFC2521: CMP Security Failures Messages"; + } + + identity EXT_ECHO_REQUEST { + description + "ICMP extended echo request, value 42."; + base TYPE; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY { + description + "ICMP extended echo reply, value 43."; + base TYPE; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity ECHO_REPLY_CODE { + description + "CODE for ICMPv4 Echo Reply."; + base CODE; + } + + identity ECHO_REPLY_NONE { + description + "No code, type 0 for Echo Reply."; + base ECHO_REPLY_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_CODE { + description + "Codes for ICMPv4 Destination Unreachable."; + base CODE; + } + + identity DST_UNREACHABLE_NET { + description + "ICMPv4 destination network unreachable, code 0."; + base DST_UNREACHABLE_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_HOST { + description + "ICMPv4 destination host unreachable, code 1"; + base DST_UNREACHABLE_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_PROTOCOL { + description + "ICMPv4 destination protocol unreachable, code 2."; + base DST_UNREACHABLE_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_PORT { + description + "ICMPv4 Port unreachable, code 3."; + base DST_UNREACHABLE_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_CANNOT_FRAGMENT { + description + "ICMPv4 destination unreachable due to inability to fragment. The df-bit + is set but the packet requires fragmentation, code 4."; + base DST_UNREACHABLE_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_SRC_ROUTE_FAILED { + description + "ICMPv4 destination is unreachable as source routing failed, code 5."; + base DST_UNREACHABLE_CODE; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity DST_UNREACHABLE_DST_NET_UNKNOWN { + description + "ICMPv4 destination is unreachable as the destination network is + unknown, code 6."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_DST_HOST_UNKNOWN { + description + "ICMPv4 destination is unreachable as the destination host is unknown, code 7."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_SRC_HOST_ISOLATED { + description + "ICMPv4 destination unreachable as the source host is isolated, code 8."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_DST_NET_ADMIN_PROHIBITED { + description + "ICMPv4 destination is unreachable as communication with the destination + network is administratively prohibited, code 9."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_DST_HOST_ADMIN_PROHIBITED { + description + "ICMPv4 destination is unreachable as communication with the destination + host is adminstratively prohibited, code 10."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_NET_UNREACHABLE_FOR_TOS { + description + "ICMPv4 destination network is unreachable for the specified type of + service, code 11."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_HOST_UNREACHABLE_FOR_TOS { + description + "ICMPv4 destination host is unreachable for the specified type of + service, code 12."; + base DST_UNREACHABLE_CODE; + reference "RFC1122: Requirements for Internet Hosts -- + Communication Layers"; + } + + identity DST_UNREACHABLE_ADMIN_PROHIBITED { + description + "ICMPv4 destination is unreacable as packets were adminstratively + filtered."; + base DST_UNREACHABLE_CODE; + reference "RFC1812: Requirements for IP Version 4 Routers"; + } + + identity DST_UNREACHABLE_HOST_PRECEDENCE_VIOLATION { + description + "ICMPv4 destination is unreachable as the first-hop router has determined + that the destination cannot be reached for the specified source/ + destination host, network, upper-layer protocol and source/destination + port. Code 14"; + base DST_UNREACHABLE_CODE; + } + + identity DST_UNREACHABLE_PRECEDENCE_CUTOFF { + description + "ICMPv4 Precedence cutoff in effect. The network operators have imposed + a minimum level of precedence required for operation, the + datagram was sent with a precedence below this level. + Code 15."; + base DST_UNREACHABLE_CODE; + reference "RFC1812: Requirements for IP Version 4 Routers"; + } + + identity REDIRECT_CODE { + base CODE; + description + "Codes for the ICMPv4 Redirect type."; + } + + identity REDIRECT_NETWORK { + base REDIRECT_CODE; + description + "ICMP redirect is being issued for the network or subnet, + code 0"; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity REDIRECT_HOST { + base REDIRECT_CODE; + description + "ICMP redirect is being issued for the host, code 1."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity REDIRECT_TOS_NETWORK { + base REDIRECT_CODE; + description + "ICMP redirect is being issued for the network and type of service. code 2."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity REDIRECT_TOS_HOST { + base REDIRECT_CODE; + description + "ICMP redirect is being issued for the host and type of service, + code 3"; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity ECHO_CODE { + base CODE; + description + "Codes for ICMPv4 echo messages."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity ECHO_NO_CODE { + base ECHO_CODE; + description + "No code."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity ROUTER_ADVERTISEMENT_CODE { + base CODE; + description + "Code for the ICMPv4 router advertisement message."; + } + identity ROUTER_ADVERTISEMENT_NORMAL { + base ROUTER_ADVERTISEMENT_CODE; + description + "Code 0: Normal router advertisement."; + reference "RFC3344: IP Mobility Support for IPv4"; + } + + identity ROUTER_ADVERTISEMENT_DOES_NOT_ROUTE_COMMON { + base ROUTER_ADVERTISEMENT_CODE; + description + "Code 16: Does not route common traffic."; + reference "RFC3344: IP Mobility Support for IPv4"; + } + + identity ROUTER_SELECTION_CODE { + base CODE; + description + "Codes for the ICMPv4 router selection message."; + } + + identity ROUTER_SELECTION_NO_CODE { + base ROUTER_SELECTION_CODE; + description + "No code."; + reference "RFC1256: ICMP Router Discovery Messages"; + } + + identity TIME_EXCEEDED_CODE { + base CODE; + description + "Codes for the ICMPv4 time exceeded code."; + } + + identity TIME_EXCEEDED_IN_TRANSIT { + base TIME_EXCEEDED_CODE; + description + "Code 0: Time to Live exceeded in Transit."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity TIME_EXCEEDED_FRAGMENT_REASSEMBLY_IN_TRANSIT { + base TIME_EXCEEDED_CODE; + description + "Code 1: Fragment reassembly time exceeded."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity PARAM_PROBLEM_CODE { + base CODE; + description + "Codes for the ICMPv4 parameter problem message (Type 12)."; + } + + identity PARAM_PROBLEM_POINTER_INDICATES_ERR { + base PARAM_PROBLEM_CODE; + description + "Code 0: Pointer indicates the error."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity PARAM_PROBLEM_MISSING_REQ_OPTION { + base PARAM_PROBLEM_CODE; + description + "Code 1: Missing a required option."; + reference "RFC1108: U.S. Department of Defense + Security Options for the Internet Protocol"; + } + + identity PARAM_PROBLEM_BAD_LENGTH { + base PARAM_PROBLEM_CODE; + description + "Code 2: Bad Length."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity TIMESTAMP_CODE { + base CODE; + description + "Codes of the ICMPv4 timestamp message (Type 13)."; + } + identity TIMESTAMP_NO_CODE { + base TIMESTAMP_CODE; + description + "No code."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity TIMESTAMP_REPLY_CODE { + base CODE; + description + "Codes of the ICMPv4 timestamp reply message (Type 14)."; + } + + identity TIMESTAMP_REPLY_NO_CODE { + base TIMESTAMP_REPLY_CODE; + description + "No code."; + reference "RFC792: INTERNET CONTROL MESSAGE PROTOCOL"; + } + + identity PHOTURIS_CODE { + base CODE; + description + "Codes of the ICMPv4 Photuris message (type 40)."; + } + + identity PHOTURIS_BAD_SPI { + base PHOTURIS_CODE; + description + "Code 0: Bad SPI."; + reference "RFC2521: ICMP Security Failures Messages"; + } + + identity PHOTURIS_AUTH_FAILED { + base PHOTURIS_CODE; + description + "Code 1: Authentication failed."; + reference "RFC2521: ICMP Security Failures Messages"; + } + + identity PHOTURIS_DECOMPRESS_FAILED { + base PHOTURIS_CODE; + description + "Code 2: Decompression failed."; + reference "RFC2521: ICMP Security Failures Messages"; + } + + identity PHOTURIS_DECRYPTION_FAILED { + base PHOTURIS_CODE; + description + "Code 3: Decryption failed."; + reference "RFC2521: ICMP Security Failures Messages"; + } + + identity PHOTURIS_NEED_AUTHENTICATION { + base PHOTURIS_CODE; + description + "Code 4: Need authentication."; + reference "RFC2521: ICMP Security Failures Messages"; + } + + identity PHOTURIS_NEED_AUTHORIZATION { + base PHOTURIS_CODE; + description + "Code 5: Need authorization."; + reference "RFC2521: ICMP Security Failures Messages"; + } + + identity EXT_ECHO_REQUEST_CODE { + description + "Codes of the extended echo request ICMP message."; + base CODE; + } + + identity EXT_ECHO_REQUEST_NO_ERROR { + base EXT_ECHO_REQUEST_CODE; + description + "Code 0: No error."; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_CODE { + description + "Codes of the extended echo reply ICMP message (Type 43)."; + base CODE; + } + + identity EXT_ECHO_REPLY_NO_ERROR { + base EXT_ECHO_REPLY_CODE; + description + "Code 0: No error."; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_MALFORMED_QUERY { + base EXT_ECHO_REPLY_CODE; + description + "Code 1: Malformed query."; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_NO_SUCH_INTF { + base EXT_ECHO_REPLY_CODE; + description + "Code 2: No such interface."; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_NO_SUB_TABLE_ENTRY { + base EXT_ECHO_REPLY_CODE; + description + "Code 3: No such table entry."; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY { + base EXT_ECHO_REPLY_CODE; + description + "Code 4: Multiple interfaces satisfy query."; + reference "RFC8335: PROBE: A Utility for Probing Interfaces"; + } +} diff --git a/release/models/acl/openconfig-icmpv6-types.yang b/release/models/acl/openconfig-icmpv6-types.yang new file mode 100644 index 000000000..ecd77cabf --- /dev/null +++ b/release/models/acl/openconfig-icmpv6-types.yang @@ -0,0 +1,1010 @@ +module openconfig-icmpv6-types { + + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-icmpv6-types"; + + prefix "oc-icmpv6-types"; + + import openconfig-extensions { prefix oc-ext; } + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "OpenConfig module defining the types and coresponding subcodes for + ICMPv6."; + + oc-ext:openconfig-version "0.1.1"; + + revision "2023-05-02" { + description + "Fix module prefix."; + reference "0.1.1"; + } + + revision "2023-01-26" { + description + "Initial revision of ICMPv6 types module."; + reference "0.1.0"; + } + + identity TYPE { + description + "Base identity for ICMPv6 codes"; + } + + identity CODE { + description + "Base identity for ICMPv6 subcodes."; + } + + identity DESTINATION_UNREACHABLE { + base TYPE; + description + "Type 1: Destination unreachable."; + reference + "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity PACKET_TOO_BIG { + base TYPE; + description + "Type 2: Packet too big."; + reference + "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity TIME_EXCEEDED { + base TYPE; + description + "Type 3: Time exceeded."; + reference + "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity PARAMETER_PROBLEM { + base TYPE; + description + "Type 4: Parameter problem."; + reference + "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity ECHO_REQUEST { + base TYPE; + description + "Type 128: Echo request."; + reference + "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity ECHO_REPLY { + base TYPE; + description + "Type 129: Echo reply"; + reference + "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity MULTICAST_LISTENER_QUERY { + base TYPE; + description + "Type 130: Multicast listener query"; + reference + "RFC2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity MULTICAST_LISTENER_REPORT { + base TYPE; + description + "Type 131: Multicast listener report"; + reference + "RFC2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity MULTICAST_LISTENER_DONE { + base TYPE; + description + "Type 132: Multicast listener done"; + reference + "RFC2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity ROUTER_SOLICITATION { + base TYPE; + description + "Type 133: IPv6 router soliciation."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity ROUTER_ADVERTISEMENT { + base TYPE; + description + "Type 134: IPv6 router advertisement."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity NEIGHBOR_SOLICITATION { + base TYPE; + description + "Type 135: IPv6 neighbor solicitation."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity NEIGHBOR_ADVERTISEMENT { + base TYPE; + description + "Type 136: IPv6 neighbor advertisement."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity REDIRECT { + base TYPE; + description + "Type 137: IPv6 ICMP redirect message."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity RENUNBERING { + base TYPE; + description + "Type 138: Router renumbering."; + reference + "RFC2894: Router Renumbering for IPv6"; + } + + identity NODE_INFORMATION_QUERY { + base TYPE; + description + "Type 139: ICMP Node Information Query."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + identity NODE_INFORMATION_RESPONSE { + base TYPE; + description + "Type 140: ICMP Node Information Response."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity INVERSE_NEIGHBOR_SOLICITATION { + base TYPE; + description + "Type 141: Inverse Neighbor Discovery Solicitation Message."; + reference "RFC3122: Extensions to IPv6 Neighbor Discovery for + Inverse Discovery Specification"; + } + + identity INVERSE_NEIGHBOR_ADVERTISEMENT { + base TYPE; + description + "Type 142: Inverse Neighbor Discovery Advertisement Message."; + reference "RFC3122: Extensions to IPv6 Neighbor Discovery for + Inverse Discovery Specification"; + } + + identity VERSION2_MULTICAST_LISTENER { + base TYPE; + description + "Type 143: Version 2 Multicast Listener Report"; + reference + "RFC3810: Multicast Listener Discovery Version 2 (MLDv2) for IPv6"; + } + + identity HOME_AGENT_ADDRESS_DISCOVERY_REQUEST { + base TYPE; + description + "Type 144: Home Agent Address Discovery Request Message."; + reference "RFC6275: Mobility Support in IPv6"; + + } + + identity HOME_AGENT_ADDRESS_DISCOVERY_REPLY { + base TYPE; + description + "Type 145: Home Agent Address Discovery Reply Message."; + reference "RFC6275: Mobility Support in IPv6"; + + } + + identity MOBILE_PREFIX_SOLICITATION { + base TYPE; + description + "Type 147: Mobile Prefix Solicitation."; + reference "RFC6275: Mobility Support in IPv6"; + } + + identity MOBILE_PREFIX_ADVERTISEMENT { + base TYPE; + description + "Type 147: Mobile Prefix Advertisement."; + reference "RFC6275: Mobility Support in IPv6"; + } + + identity CERTIFICATION_PATH_SOLICITATION { + base TYPE; + description + "Type 148: Certification Path Soliciation Message."; + reference "RFC3971: SEcure Neighbor Discovery (SEND)"; + } + + identity CERTIFICATION_PATH_ADVERTISEMENT { + base TYPE; + description + "Type 149: Certification Path Advertisement Message."; + reference "RFC3971: SEcure Neighbor Discovery (SEND)"; + } + + identity MULTICAST_ROUTER_ADVERTISEMENT { + base TYPE; + description + "Type 151: Multicast Router Advertisement."; + reference "RFC4286: Multicast Router Discovery"; + } + + identity MULTICAST_ROUTER_SOLICITATION { + base TYPE; + description + "Type 152: Multicast Router Solicitation."; + reference "RFC4286: Multicast Router Discovery"; + } + + identity MULTICAST_ROUTER_TERMINATION { + base TYPE; + description + "Type 153: Multicast Router Termination."; + reference "RFC4286: Multicast Router Discovery"; + } + + identity FMIPV6 { + base TYPE; + description + "Type 154: Fast handover mode for IPv6."; + reference + "RFC5568: Mobile IPv6 Fast Handovers"; + } + + identity RPL_CONTROL { + base TYPE; + description + "Type 155: RPL Control Message."; + reference + "RFC6550: RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks"; + } + + identity ILNPV6_LOCATOR_UPDATE { + base TYPE; + description + "Type 156: ILNPv6 Locator Update Message."; + reference + "RFC6743: ICMP Locator Update Message for + the Identifier-Locator Network Protocol for IPv6 (ILNPv6)"; + } + + identity DUPLICATE_ADDRESS_REQUEST { + base TYPE; + description + "Type 157: Duplicate address request."; + reference + "RFC6775: Neighbor Discovery Optimization for IPv6 over Low-Power Wireless + Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_CONFIRMATION { + base TYPE; + description + "Type 158: Duplicate address confirmation."; + reference + "RFC6775: Neighbor Discovery Optimization for IPv6 over Low-Power Wireless + Personal Area Networks (6LoWPANs)"; + } + + identity MPL_CONTROL { + base TYPE; + description + "Type 159: MPL Control Message."; + reference + "RFC7731: Multicast Protocol for Low-Power and Lossy Networks (MPL)"; + } + + identity EXT_ECHO_REQUEST { + base TYPE; + description + "Type 160: Extended echo request."; + reference + "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY { + base TYPE; + description + "Type 161: Extended echo reply."; + reference + "RFC8335: PROBE: A Utility for Probing Interfaces"; + } + + identity DST_UNREACHABLE_CODE { + base CODE; + description + "ICMPv6 destination unreachable subcodes."; + } + identity DST_UNREACHABLE_NO_ROUTE_TO_DST { + base DST_UNREACHABLE_CODE; + description + "Code 0: No route to destination."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + identity DST_UNREACHABLE_DST_ADMIN_PROHIBITED { + base DST_UNREACHABLE_CODE; + description + "Code 1: Communication with destination adminstratively prohibited."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity DST_UNREACHABLE_BEYOND_SCOPE_OF_SRC { + base DST_UNREACHABLE_CODE; + description + "Code 2: Beyond scope of source address."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity DST_UNREACHABLE_ADDR { + base DST_UNREACHABLE_CODE; + description + "Code 3: Address unreachable."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity DST_UNREACHABLE_PORT { + base DST_UNREACHABLE_CODE; + description + "Code 4: Port unreachable."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity DST_UNREACHABLE_SRC_ADDR_FAILED_POLICY { + base DST_UNREACHABLE_CODE; + description + "Code 5: Source address failed ingress/egress policy."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity DST_UNREACHABLE_REJECT_ROUTE_TO_DST { + base DST_UNREACHABLE_CODE; + description + "Code 6: Reject route to destination."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity DST_UNREACHABLE_ERR_IN_SRC_ROUTING_HDR { + base DST_UNREACHABLE_CODE; + description + "Code 7: Error in Source Routing Header."; + reference "RFC8554: An IPv6 Routing Header for Source Routes with + the Routing Protocol for Low-Power and Lossy Networks (RPL)"; + } + + identity DST_UNREACHABLE_HDRS_TOO_LONG { + base DST_UNREACHABLE_CODE; + description + "Type 8: Headers too long"; + reference "RFC8883: ICMPv6 Errors for Discarding Packets Due to + Processing Limits"; + } + + identity PACKET_TOO_BIG_CODE { + base CODE; + description + "Subcodes for the ICMPv6 Packet Too Big type."; + } + + identity PACKET_TOO_BIG_NO_CODE { + base PACKET_TOO_BIG_CODE; + description + "No code, value 0."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity TIME_EXCEEDED_CODE { + base CODE; + description + "Subcodes for the Time Exceeded ICMPv6 type."; + } + + identity TIME_EXCEEDED_HOP_LIMIT { + base TIME_EXCEEDED_CODE; + description + "Code 0: Hop limit exceeded in transit."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + identity TIME_EXCEEDED_FRAGMENT_REASSEMBLY { + base TIME_EXCEEDED_CODE; + description + "Code 1: Fragment reassembly time exceeded."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity PARAM_PROBLEM_CODE { + base CODE; + description + "Subcodes for the Parameter Problem ICMPv6 type."; + } + + identity PARAM_PROBLEM_ERR_HDR_FIELD { + base PARAM_PROBLEM_CODE; + description + "Erroneous header field encountered."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity PARAM_PROBLEM_UNRECOGNIZED_NET_HDR_TYPE { + base PARAM_PROBLEM_CODE; + description + "Unrecognized Next Header type encountered."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity PARAM_PROBLEM_UNRECOGNIZED_IPV6_OPT { + base PARAM_PROBLEM_CODE; + description + "Unrecognized IPv6 option encountered."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity PARAM_PROBLEM_INCOMPLETE_HDR_CHAIN { + base PARAM_PROBLEM_CODE; + description + "IPv6 First Fragment has incomplete IPv6 Header Chain."; + reference + "RFC7112: Implications of Oversized IPv6 Header Chains"; + } + + identity PARAM_PROBLEM_SR_UPPER_HDR_ERR { + base PARAM_PROBLEM_CODE; + description + "SR Upper-layer Header Error"; + reference + "RFC8754: IPv6 Segment Routing Header (SRH)"; + } + + identity PARAM_PROBLEM_UNRECOGNIZED_NEXT_HDR_TYPE { + base PARAM_PROBLEM_CODE; + description + "Unrecognized Next Header type encountered by intermediate node"; + reference + "RFC8883: ICMPv6 Errors for Discarding Packets Due to Processing Limits"; + } + + identity PARAM_PROBLEM_EXT_HDR_TOO_BIG { + base PARAM_PROBLEM_CODE; + description + "Extension header too big."; + reference + "RFC8883: ICMPv6 Errors for Discarding Packets Due to Processing Limits"; + } + + identity PARAM_PROBLEM_EXT_HDR_CHAIN_TOO_LONG { + base PARAM_PROBLEM_CODE; + description + "Extension header chain too long."; + reference + "RFC8883: ICMPv6 Errors for Discarding Packets Due to Processing Limits"; + } + + identity PARAM_PROBLEM_TOO_MANY_EXT_HDRS { + base PARAM_PROBLEM_CODE; + description + "Too many extension headers."; + reference + "RFC8883: ICMPv6 Errors for Discarding Packets Due to Processing Limits"; + } + + identity PARAM_PROBLEM_TOO_MANY_OPTS { + base PARAM_PROBLEM_CODE; + description + "Too many options in extension header."; + reference + "RFC8883: ICMPv6 Errors for Discarding Packets Due to Processing Limits"; + } + + identity PARAM_PROBLEM_OPT_TOO_BIG { + base PARAM_PROBLEM_CODE; + description + "Option too big."; + reference + "RFC8883: ICMPv6 Errors for Discarding Packets Due to Processing Limits"; + } + + identity ECHO_REQUEST_CODE { + base CODE; + description + "Subcodes for the ICMPv6 echo request type."; + } + + identity ECHO_REQUEST_NO_CODE { + base ECHO_REQUEST_CODE; + description + "No code."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity ECHO_REPLY_CODE { + base CODE; + description + "Subcodes for the ICMPv6 echo reply subcode."; + } + + identity ECHO_REPLY_NO_CODE { + base ECHO_REPLY_CODE; + description + "No code."; + reference "RFC4443: Internet Control Message Protocol (ICMPv6) + for the Internet Protocol Version 6 (IPv6) Specification"; + } + + identity MULTICAST_LISTENER_QUERY_CODE { + base CODE; + description + "Subcodes for the multicast listener query ICMPv6 type."; + } + + identity MULTICAST_LISTENER_QUERY_NO_CODE { + base MULTICAST_LISTENER_QUERY_CODE; + description + "No code."; + reference + "RFC2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity MULTICAST_LISTENER_REPORT_CODE { + base CODE; + description + "Subcodes for the multicast listener report ICMPv6 type."; + } + + identity MULTICAST_LISTENER_REPORT_NO_CODE { + base MULTICAST_LISTENER_REPORT_CODE; + description + "No code."; + reference + "RFC2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity MULTICAST_LISTENER_DONE_CODE { + base CODE; + description + "Subcodes for the multicast listener done ICMPv6 type."; + } + + identity MULTICAST_LISTENER_DONE_NO_CODE { + base MULTICAST_LISTENER_DONE_CODE; + description + "No code."; + reference + "RFC2710: Multicast Listener Discovery (MLD) for IPv6"; + } + + identity ROUTER_SOLICITATION_CODE { + base CODE; + description + "Subcodes for the router solicitation ICMPv6 type."; + } + identity ROUTER_SOLICITATION_NO_CODE { + base ROUTER_SOLICITATION_CODE; + description + "No code."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity ROUTER_ADVERTISEMENT_CODE { + base CODE; + description + "Subcodes for the router advertisement ICMPv6 type."; + } + + identity ROUTER_ADVERTISEMENT_NO_CODE { + base ROUTER_ADVERTISEMENT_CODE; + description + "No code."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity NEIGHBOR_SOLICITATION_CODE { + base CODE; + description + "Subcodes for the router solicitation ICMPv6 type."; + } + + identity NEIGHBOR_SOLICITATION_NO_CODE { + base NEIGHBOR_SOLICITATION_CODE; + description + "No code."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity NEIGHBOR_ADVERTISEMENT_CODE { + base CODE; + description + "Subcodes for the neighbor advertisement ICMPv6 type."; + } + + identity NEIGHBOR_ADVERTISEMENT_NO_CODE { + base NEIGHBOR_ADVERTISEMENT_CODE; + description + "No code."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity REDIRECT_CODE { + base CODE; + description + "Subcodes for the redirect ICMPv6 type."; + } + + identity REDIRECT_NO_CODE { + base REDIRECT_CODE; + description + "No code."; + reference + "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + identity RENUMBERING_CODE { + base CODE; + description + "Subcodes for the redirect ICMPv6 type for renumbering."; + } + + identity RENUMBERING_COMMAND { + base RENUMBERING_CODE; + description + "Router renumbering command."; + reference + "RFC2894: Router Renumbering for IPv6"; + } + + identity RENUNBERING_RESULT { + base RENUMBERING_CODE; + description + "Router renumbering result."; + reference + "RFC2894: Router Renumbering for IPv6"; + } + + identity RENUNBERING_SEQ_NUM_RESET { + base RENUMBERING_CODE; + description + "Router renumbering sequence number reset."; + reference + "RFC2894: Router Renumbering for IPv6"; + } + + identity NODE_INFORMATION_QUERY_CODE { + base CODE; + description + "Subcodes for the node information query ICMPv6 type."; + } + + identity NODE_INFORMATION_QUERY_IPV6_ADDR { + base NODE_INFORMATION_QUERY_CODE; + description + "The data field contains an IPv6 address which is the subject of the + query."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity NODE_INFORMATION_QUERY_NAME { + base NODE_INFORMATION_QUERY_CODE; + description + "The data field contains a name which is the subject of the + query."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity NODE_INFORMATION_QUERY_IPV4_ADDR { + base NODE_INFORMATION_QUERY_CODE; + description + "The data field contains an IPv4 address which is the subject of the + query."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity NDDE_INFORMATION_RESPONSE_CODE { + base CODE; + description + "Subcodes for the node information response ICMPv6 type."; + } + + identity NODE_INFORMATION_RESPONSE_SUCCESS { + base NDDE_INFORMATION_RESPONSE_CODE; + description + "A successful reply."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity NODE_INFORMATION_RESPONSE_REFUSED { + base NDDE_INFORMATION_RESPONSE_CODE; + description + "The responder refuses to supply the answer."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity NODE_INFORMATION_RESPONSE_UNKNOWN { + base NDDE_INFORMATION_RESPONSE_CODE; + description + "The query type is unknown to the responder."; + reference + "RFC4620: IPv6 Node Information Queries"; + } + + identity INVERSE_NEIGHBOR_ADVERTISEMENT_CODE { + base CODE; + description + "Subcodes for the Inverse Neighbor Discovery ICMPv6 type."; + } + + identity INVERSE_NEIGHBOR_ADVERTISEMENT_NO_CODE { + base INVERSE_NEIGHBOR_ADVERTISEMENT_CODE; + description + "No code."; + reference + "RFC3122: Extensions to IPv6 Neighbor Discovery for Inverse Discovery + Specification"; + } + + identity INVERSE_NEIGHBOR_SOLICITATION_CODE { + base CODE; + description + "Subcode for the inverse neighbor solicitation ICMP6 type."; + } + + identity INVERSE_NEIGHBOR_SOLICITATION_NO_CODE { + base INVERSE_NEIGHBOR_SOLICITATION_CODE; + description + "No code."; + reference + "RFC3122: Extensions to IPv6 Neighbor Discovery for Inverse Discovery + Specification"; + } + + identity HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE { + base CODE; + description + "Subcodes for the Home Agent Address Discovery Request ICMPv6 type."; + } + + identity HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_NO_CODE { + base HOME_AGENT_ADDRESS_DISCOVERY_REQUEST_CODE; + description + "No code."; + reference "RFC3775: Mobility Support in IPv6"; + } + + identity HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE { + base CODE; + description + "Subcodes for the Home Agent Address Discovery Reply ICMPv6 type."; + } + + identity HOME_AGENT_ADDRESS_DISCOVERY_REPLY_NO_CODE { + base HOME_AGENT_ADDRESS_DISCOVERY_REPLY_CODE; + description + "No code."; + reference "RFC3775: Mobility Support in IPv6"; + } + + identity MOBILE_PREFIX_SOLICITATION_CODE { + base CODE; + description + "Subcodes for the Mobile Prefix Solicitation ICMPv6 type."; + } + + identity MOBILE_PREFIX_SOLICITATION_NO_CODE { + base MOBILE_PREFIX_SOLICITATION_CODE; + description + "No code."; + reference "RFC3775: Mobility Support in IPv6"; + } + + identity MOBILE_PREFIX_ADVERTISEMENT_CODE { + base CODE; + description + "Subcodes for the Mobile Prefix Advertisement ICMPv6 type."; + } + + identity MOBILE_PREFIX_ADVERTISEMENT_NO_CODE { + base MOBILE_PREFIX_ADVERTISEMENT_CODE; + description + "No code."; + reference "RFC3775: Mobility Support in IPv6"; + } + + identity DUPLICATE_ADDRESS_REQUEST_CODE { + base CODE; + description + "Subcodes for the Duplicate Address Request ICMPv6 type."; + } + + identity DUPLICATE_ADDRESS_REQUEST_DAR { + base DUPLICATE_ADDRESS_REQUEST_CODE; + description + "DAR message"; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR64 { + base DUPLICATE_ADDRESS_REQUEST_CODE; + description + "EDAR message with 64-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR128 { + base DUPLICATE_ADDRESS_REQUEST_CODE; + description + "EDAR message with 128-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR192 { + base DUPLICATE_ADDRESS_REQUEST_CODE; + description + "EDAR message with 192-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REQUEST_EDAR_ROVR256 { + base DUPLICATE_ADDRESS_REQUEST_CODE; + description + "EDAR message with 256-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REPLY_CODE { + base CODE; + description + "Subcodes for the Duplicate Address Confirmation Code ICMPv6 type."; + } + + identity DUPLICATE_ADDRESS_REPLY_DAC { + base DUPLICATE_ADDRESS_REPLY_CODE; + description + "DAC message"; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + identity DUPLICATE_ADDRESS_REPLY_EDAC_ROVR64 { + base DUPLICATE_ADDRESS_REPLY_CODE; + description + "EDAC message with 64-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REPLY_EDAC_ROVR128 { + base DUPLICATE_ADDRESS_REPLY_CODE; + description + "EDAC message with 128-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REPLY_EDAC_ROVR192 { + base DUPLICATE_ADDRESS_REPLY_CODE; + description + "EDAC message with 192-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity DUPLICATE_ADDRESS_REPLY_EDAC_ROVR256 { + base DUPLICATE_ADDRESS_REPLY_CODE; + description + "EDAC message with 256-bit ROVR field."; + reference "RFC6775: Neighbor Discovery Optimization for IPv6 over + Low-Power Wireless Personal Area Networks (6LoWPANs)"; + } + + identity EXT_ECHO_REQUEST_CODE { + base CODE; + description + "Subcodes for the extended echo request ICMPv6 type."; + } + + identity EXT_ECHO_REQUEST_NO_ERROR { + base EXT_ECHO_REQUEST_CODE; + description + "No error."; + reference + "RFC8355: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_CODE { + base CODE; + description + "Subcodes for the extended echo reply ICMPv6 type."; + } + + identity EXT_ECHO_REPLY_NO_ERROR { + base EXT_ECHO_REPLY_CODE; + description + "No error."; + reference + "RFC8355: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_MALFORMED_QUERY { + base EXT_ECHO_REPLY_CODE; + description + "Malformed query."; + reference + "RFC8355: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_NO_SUCH_INTERFACE { + base EXT_ECHO_REPLY_CODE; + description + "No such interface."; + reference + "RFC8355: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_NO_SUCH_TABLE_ENTRY { + base EXT_ECHO_REPLY_CODE; + description + "No such table entry."; + reference + "RFC8355: PROBE: A Utility for Probing Interfaces"; + } + + identity EXT_ECHO_REPLY_MULTIPLE_INTF_SATISFY_QUERY { + base EXT_ECHO_REPLY_CODE; + description + "Multiple interfaces satisfy query."; + reference + "RFC8355: PROBE: A Utility for Probing Interfaces"; + } +} diff --git a/release/models/acl/openconfig-packet-match-types.yang b/release/models/acl/openconfig-packet-match-types.yang index 9963a920a..b5f467a74 100644 --- a/release/models/acl/openconfig-packet-match-types.yang +++ b/release/models/acl/openconfig-packet-match-types.yang @@ -23,7 +23,13 @@ module openconfig-packet-match-types { "This module defines common types for use in models requiring data definitions related to packet matches."; - oc-ext:openconfig-version "1.3.2"; + oc-ext:openconfig-version "1.3.3"; + + revision "2023-01-29" { + description + "Whitespace cleanup."; + reference "1.3.3"; + } revision "2021-07-14" { description @@ -365,5 +371,4 @@ module openconfig-packet-match-types { decimal notation, or using a type defined by the ETHERTYPE identity"; } - } diff --git a/release/models/acl/openconfig-packet-match.yang b/release/models/acl/openconfig-packet-match.yang index e319a46c0..c28798664 100644 --- a/release/models/acl/openconfig-packet-match.yang +++ b/release/models/acl/openconfig-packet-match.yang @@ -13,6 +13,9 @@ module openconfig-packet-match { import openconfig-packet-match-types { prefix oc-pkt-match-types; } import openconfig-extensions { prefix oc-ext; } import openconfig-mpls-types { prefix oc-mpls; } + import openconfig-defined-sets { prefix oc-sets; } + import openconfig-icmpv4-types { prefix oc-icmpv4-types; } + import openconfig-icmpv6-types { prefix oc-icmpv6-types; } // meta organization "OpenConfig working group"; @@ -27,11 +30,33 @@ module openconfig-packet-match { field is omitted from a match expression, the effect is a wildcard ('any') for that field."; - oc-ext:openconfig-version "1.3.1"; + + oc-ext:openconfig-version "2.1.0"; + + revision "2023-03-01" { + description + "Add ICMP Fields for filtering."; + reference "2.1.0"; + } + + revision "2023-01-27" { + description + "Update the mechanism to match detailed transport flags, + adding means for AND/OR in the explicitly specified flags + and commonly supported match aliases."; + reference "2.0.0"; + } + + revision "2022-06-01" { + description + "Add the ability to match source/destination ipv4 and + ipv6 prefix list and source/destination port list "; + reference "1.4.0"; + } revision "2021-06-16" { description - "Remove trailing whitespace"; + "Remove trailing whitespace."; reference "1.3.1"; } @@ -244,6 +269,20 @@ module openconfig-packet-match { leaf is specified. It is not valid to specify both 'dscp' and 'dscp-set together.'"; } + leaf length { + type uint16; + description + "In the IPv4 header field, this field is known as the Total + Length. Total Length is the length of the datagram, measured + in octets, including internet header and data. + In the IPv6 header field, this field is known as the Payload + Length, which is the length of the IPv6 payload, i.e., the rest + of the packet following the IPv6 header, in octets."; + reference + "RFC 791: Internet Protocol + RFC 8200: Internet Protocol, Version 6 (IPv6) Specification."; + } + leaf protocol { type oc-pkt-match-types:ip-protocol-type; description @@ -274,12 +313,32 @@ module openconfig-packet-match { "Source IPv4 address prefix."; } + leaf source-address-prefix-set { + type leafref { + path "/oc-sets:defined-sets/oc-sets:ipv4-prefix-sets" + + "/oc-sets:ipv4-prefix-set/oc-sets:name"; + } + description + "Reference to a IPv4 address prefix Set + to match the source address"; + } + leaf destination-address { type oc-inet:ipv4-prefix; description "Destination IPv4 address prefix."; } + leaf destination-address-prefix-set { + type leafref { + path "/oc-sets:defined-sets/oc-sets:ipv4-prefix-sets" + + "/oc-sets:ipv4-prefix-set/oc-sets:name"; + } + description + "Reference to a IPv4 address prefix set + to match the destination address"; + } + uses ip-protocol-fields-common-config; } @@ -310,6 +369,7 @@ module openconfig-packet-match { uses ipv4-protocol-fields-config; uses ipv4-protocol-fields-state; } + uses ip-icmpv4-header-fields-top; } } @@ -323,6 +383,16 @@ module openconfig-packet-match { "Source IPv6 address prefix."; } + leaf source-address-prefix-set { + type leafref { + path "/oc-sets:defined-sets/oc-sets:ipv6-prefix-sets" + + "/oc-sets:ipv6-prefix-set/oc-sets:name"; + } + description + "Reference to a IPv6 address prefix set + to match the source address"; + } + leaf source-flow-label { type oc-inet:ipv6-flow-label; description @@ -335,6 +405,16 @@ module openconfig-packet-match { "Destination IPv6 address prefix."; } + leaf destination-address-prefix-set { + type leafref { + path "/oc-sets:defined-sets/oc-sets:ipv6-prefix-sets" + + "/oc-sets:ipv6-prefix-set/oc-sets:name"; + } + description + "Reference to a IPv6 address prefix set + to match the destination address"; + } + leaf destination-flow-label { type oc-inet:ipv6-flow-label; description @@ -374,6 +454,7 @@ module openconfig-packet-match { uses ipv6-protocol-fields-config; uses ipv6-protocol-fields-state; } + uses ip-icmpv6-header-fields-top; } } @@ -388,18 +469,123 @@ module openconfig-packet-match { "Source port or range"; } + leaf source-port-set { + type leafref { + path "/oc-sets:defined-sets/oc-sets:port-sets" + + "/oc-sets:port-set/oc-sets:name"; + } + description + "Reference to a port set + to match the source port"; + } + leaf destination-port { type oc-pkt-match-types:port-num-range; description "Destination port or range"; } - leaf-list tcp-flags { + leaf destination-port-set { + type leafref { + path "/oc-sets:defined-sets/oc-sets:port-sets" + + "/oc-sets:port-set/oc-sets:name"; + } + description + "Reference to a port set + to match the destination port"; + } + + leaf detail-mode { + type enumeration { + enum EXPLICIT { + description + "Specifies that the mode for matching details at the transport + layer is to explicitly match transport flags."; + } + enum BUILTIN { + description + "Specifies that the mode for matching details at the transport + layer is to using implementation built-ins which may map to + multiple flags."; + } + } + description + "Mode that is used for matching detailed fields at the transport + layer. When EXPLICIT is specified, the implementation should + match based on the explicit flags that are specified in the + corresponding leaf. When BUILTIN is specified, the implementation + must expand the contents of the corresponding leaf to the flags + and/or fields that match the pre-defined built-in values."; + } + + leaf explicit-detail-match-mode { + type enumeration { + enum ANY { + description + "Matches of the explicit-detail-flags field are treated as + an OR between the values in the list."; + } + enum ALL { + description + "Matches of the explicit-details-flags field are treated + as an AND of the values in the list."; + } + } + description + "Specifies how the contents of the explicit-details-flags list + are to be treated. ANY implies that any of the flags may match, + where ALL indicates that all the flags must be matched."; + when "../detail-mode = 'EXPLICIT'" { + description + "This leaf is only valid when the mode for matches is specified to + be explicit."; + } + } + + leaf-list explicit-tcp-flags { type identityref { base oc-pkt-match-types:TCP_FLAGS; } description - "List of TCP flags to match"; + "An explicit list of the TCP flags that are to be matched. The + mechanism for the match is specified by the explicit-detail-match-mode + leaf."; + when "../detail-mode = 'EXPLICIT'" { + description + "This leaf is only valid when the mode for matches is specified to + be explicit."; + } + } + + leaf builtin-detail { + type enumeration { + enum TCP_INITIAL { + description + "Matches the first packet of a TCP session based on a packet + not having the ACK flag set, and having the SYN flag set."; + } + enum TCP_ESTABLISHED { + description + "Matches an established TCP session based on a packet having + the ACK or RST flags set. This does not match the first + packet."; + } + enum FRAGMENT { + description + "Matches non-zero values of the fragment-offset field, indicating + this packet is a follow up to a fragmented datagram."; + } + } + description + "Specifies a built-in (alias) for a match condition that matches + multiple flags, or specifies particular logic as to the flag matches + to be implemented. This leaf is only valid when the detail-match-mode + leaf is BUILTIN."; + when "../detail-mode = 'BUILTIN'" { + description + "This leaf is only valid when the mode for matches is specified to + be builtin."; + } } } @@ -432,4 +618,110 @@ module openconfig-packet-match { } } + grouping ip-icmpv4-header-fields-top { + description + "Top grouping for ICMPv4 filtering"; + + container icmpv4 { + description + "Top container for ICMPv4 filtering"; + + container config { + description + "Configuration attributes for ICMPv4 filtering"; + + uses ip-icmpv4-header-fields-config; + } + + container state { + description + "State attributes for ICMPv4 filtering"; + config false; + + uses ip-icmpv4-header-fields-config; + } + } + } + + grouping ip-icmpv6-header-fields-top { + description + "Top grouping for ICMPv6 filtering"; + + container icmpv6 { + description + "Top container for ICMPv6 filtering"; + + container config { + description + "Configuration attributes for ICMPv6 filtering"; + + uses ip-icmpv6-header-fields-config; + } + + container state { + description + "State attributes for ICMPv6 filtering"; + config false; + + uses ip-icmpv6-header-fields-config; + } + } + } + + grouping ip-icmpv4-header-fields-config { + description + "Collection of ICMPv4 header fields that can be + used to set up a match filter."; + + leaf type { + type identityref { + base oc-icmpv4-types:TYPE; + } + description + "ICMPv4 type to be matched."; + reference + "RFC 792: Internet Control Message Protocol"; + } + + leaf code { + type identityref { + base oc-icmpv4-types:CODE; + } + description + "ICMPv4 code to be matched."; + reference + "RFC 792: Internet Control Message Protocol"; + } + } + + grouping ip-icmpv6-header-fields-config { + description + "Collection of ICMPv6 header fields that can be + used to set up a match filter."; + + leaf type { + type identityref { + base oc-icmpv6-types:TYPE; + } + description + "ICMPv6 type to be matched."; + reference + "RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + + leaf code { + type identityref { + base oc-icmpv6-types:CODE; + } + description + "ICMP code to be matched."; + reference + "RFC 4443: Internet Control Message Protocol (ICMPv6) + for Internet Protocol Version 6 (IPv6) + Specification."; + } + } + } diff --git a/release/models/aft/.spec.yml b/release/models/aft/.spec.yml index 6320b2469..fd1079c0b 100644 --- a/release/models/aft/.spec.yml +++ b/release/models/aft/.spec.yml @@ -2,7 +2,9 @@ docs: - yang/aft/openconfig-aft.yang - yang/aft/openconfig-aft-types.yang + - yang/aft/openconfig-aft-summary.yang build: - yang/network-instance/openconfig-network-instance.yang - yang/aft/openconfig-aft-network-instance.yang + - yang/aft/openconfig-aft-summary.yang run-ci: true diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 65faad779..c69587e0f 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -10,6 +10,7 @@ submodule openconfig-aft-common { import openconfig-mpls-types { prefix "oc-mplst"; } import openconfig-policy-types { prefix "oc-pol-types"; } import openconfig-aft-types { prefix "oc-aftt"; } + import openconfig-evpn-types { prefix "oc-evpn-types"; } organization "OpenConfig working group"; @@ -22,7 +23,72 @@ submodule openconfig-aft-common { "Submodule containing definitions of groupings that are re-used across multiple contexts within the AFT model."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry. Updated description for + tunnel-src-ip-address properties under next-hops."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -115,6 +181,7 @@ submodule openconfig-aft-common { list next-hop { key "index"; + oc-ext:telemetry-atomic; description "A next-hop associated with the forwarding instance."; @@ -136,6 +203,16 @@ submodule openconfig-aft-common { uses aft-common-entry-nexthop-state; uses aft-labeled-entry-state; + + container counters { + description + "Surrounding container for counters."; + + uses aft-common-entry-counter-state; + } + + uses aft-evpn-entry-state; + } container ip-in-ip { @@ -151,6 +228,22 @@ submodule openconfig-aft-common { } } + container gre { + description + "When specified, the packet has an GRE + (Generic Routing Encapsulation)header applied to + it before forwarding to the specified next-hop. + encapsulate-header leaf should be set to GRE for this + to apply"; + + container state { + config false; + description + "State parameters relating to GRE encapsulation."; + uses aft-common-entry-nexthop-gre-state; + } + } + uses oc-if:interface-ref-state; } } @@ -160,45 +253,12 @@ submodule openconfig-aft-common { description "Operational state parameters relating to a forwarding entry"; - leaf packets-forwarded { - type oc-yang:counter64; + container counters { + config false; description - "The number of packets which have matched, and been forwarded, - based on the AFT entry."; - } + "Surrounding container for counters."; - leaf octets-forwarded { - type oc-yang:counter64; - description - "The number of octets which have matched, and been forwarded, - based on the AFT entry"; - } - - // This leafref needs to refer to any network-instance on the system - // hence must be absolute. This change means that this module cannot - // be used outside of the network instance model without changes being - // made to it. - leaf next-hop-group { - type leafref { - path "/network-instances/network-instance/afts/" + - "next-hop-groups/next-hop-group/state/id"; - } - description - "A reference to the next-hop-group that is in use for the entry - within the AFT. Traffic is distributed across the set of next-hops - within the next-hop group according to the weight."; - } - - leaf next-hop-group-network-instance { - type leafref { - path "/network-instances/network-instance/config/name"; - } - description - "The network instance to look up the next-hop-group in. If - unspecified, the next hop group is in the local network - instance. The referenced network-instance must be an existing - network instance on the device and have corresponding entries - in the /network-instances/network-instance list."; + uses aft-common-entry-counter-state; } leaf entry-metadata { @@ -224,6 +284,27 @@ submodule openconfig-aft-common { } } + grouping aft-evpn-entry-state { + description + "Operational state for evpn related information in forwarding entry"; + + leaf vni-label { + type oc-evpn-types:evi-id; + description + "Where applicable, the next hop label representing the virtual + network identifier (VNI) for the forwarding entry. This leaf is + applicable only to next-hops which include VXLAN encapsulation + header information"; + } + + leaf tunnel-src-ip-address { + type oc-inet:ip-address; + description + "Where applicable this represents the vxlan tunnel source ip address. + For VXLAN this represents the source VTEP ip address"; + } + } + grouping aft-common-entry-nexthop-state { description "Parameters relating to a next-hop."; @@ -262,6 +343,17 @@ submodule openconfig-aft-common { network instance."; } + leaf pop-top-label { + type boolean; + default false; + description + "Flag that controls pop action, i.e., the top-most MPLS label + should be popped from the packet when switched by the system. + + The top-most MPLS label associated with pop action is equal to + the label key used in 'mpls' AFT 'label-entry' list."; + } + leaf-list pushed-mpls-label-stack { type oc-mplst:mpls-label; ordered-by user; @@ -292,6 +384,18 @@ submodule openconfig-aft-common { specified header type."; } + leaf decapsulate-header { + type oc-aftt:encapsulation-header-type; + description + "When forwarding a packet to the specified next-hop, the local + system performs a decapsulation of the packet - removing the + specified header type. In the case that no next-hop is + specified, the packet header is removed, and a subsequent + forwarding lookup is performed on the packet encapsulated + within the header, matched within the relevant AFT within the + specified network-instance."; + } + uses aft-common-install-protocol; } @@ -312,6 +416,34 @@ submodule openconfig-aft-common { } } + grouping aft-common-entry-nexthop-gre-state { + description + "GRE encapsulation applied on a IPv4 and IPv6 next-hop."; + + leaf src-ip { + type oc-inet:ip-address; + description + "The source IP address for the GRE encapsulation may be expressed + using this leaf (src-ip) or if may be derived from + '../../interface-ref/state/subinterface'"; + } + + leaf dst-ip { + type oc-inet:ip-address; + description + "Destination IP address to use for the encapsulated packet."; + } + + leaf ttl { + type uint8; + description + "This leaf reflects the configured/default TTL value that is used in the + outer header during packet encapsulation. When this leaf is not set, + the TTL value of the inner packet is copied over as the outer packet's + TTL value during encapsulation."; + } + } + grouping aft-common-install-protocol { description "Grouping for a common reference to the protocol which @@ -357,6 +489,7 @@ submodule openconfig-aft-common { list next-hop-group { key "id"; + oc-ext:telemetry-atomic; description "An individual set of next-hops grouped into a common group. Each entry within an abstract forwarding table points to a @@ -511,6 +644,14 @@ submodule openconfig-aft-common { also be updated."; } + leaf next-hop-group-name { + type string; + description + "Where applicable, this leaf is a unique identifier string for the + next-hop-group. It is an arbitrary name for the group, that is + supported by vendors and is exposed for telemetry."; + } + leaf programmed-id { type uint64; description @@ -558,6 +699,20 @@ submodule openconfig-aft-common { entries within the next-hop group become unusable, the backup next-hop group is used if specified."; } + + leaf backup-active { + type boolean; + default false; + description + "Set to true if and only if the device no longer forwards traffic + using the primary NextHops of this NextHopGroup and instead uses + the specified backup-next-hop-group. This leaf should be set to + false if the backup-next-hop-group is either unspecified or unused + by the device."; + } + + + } grouping aft-nhg-nh-state { @@ -628,4 +783,42 @@ submodule openconfig-aft-common { uses oc-if:interface-ref-common; } + + grouping aft-common-entry-counter-state { + description + "Counters relating to a forwarding entry"; + + leaf packets-forwarded { + type oc-yang:counter64; + description + "The number of packets which have matched, and been forwarded, + based on the AFT entry."; + } + + leaf octets-forwarded { + type oc-yang:counter64; + description + "The number of octets which have matched, and been forwarded, + based on the AFT entry"; + } + } + + grouping aft-common-backup-entry-counter-state { + description + "Counters relating to a backup forwarding entry"; + + leaf packets-forwarded-backup { + type oc-yang:counter64; + description + "The number of packets which have matched, and been forwarded, + based on the AFT backup entry."; + } + + leaf octets-forwarded-backup { + type oc-yang:counter64; + description + "The number of octets which have matched, and been forwarded, + based on the AFT backup entry"; + } + } } diff --git a/release/models/aft/openconfig-aft-ethernet.yang b/release/models/aft/openconfig-aft-ethernet.yang index 647a4beae..b2c0758df 100644 --- a/release/models/aft/openconfig-aft-ethernet.yang +++ b/release/models/aft/openconfig-aft-ethernet.yang @@ -20,7 +20,71 @@ submodule openconfig-aft-ethernet { "Submodule containing definitions of groupings for the abstract forwarding tables for Ethernet."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add network-instance and decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -99,6 +163,7 @@ submodule openconfig-aft-ethernet { list mac-entry { key "mac-address"; + oc-ext:telemetry-atomic; description "List of the Ethernet entries within the abstract forwarding table. This list is keyed by the outer MAC address diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index 463632603..d582b2ad7 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -20,7 +20,70 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -99,6 +162,7 @@ submodule openconfig-aft-ipv4 { list ipv4-entry { key "prefix"; + oc-ext:telemetry-atomic; description "List of the IPv4 unicast entries within the abstract forwarding table. This list is keyed by the destination IPv4 @@ -132,7 +196,15 @@ submodule openconfig-aft-ipv4 { "The IPv4 destination prefix that should be matched to utilise the AFT entry."; } - uses aft-common-entry-state; + uses aft-common-entry-state { + augment counters { + description + "The number of packets and octets matched the AFT entry + and routed to next-hops within the backup next-hop-group"; + + uses aft-common-backup-entry-counter-state; + } + } uses aft-common-ip-state; } } diff --git a/release/models/aft/openconfig-aft-ipv6.yang b/release/models/aft/openconfig-aft-ipv6.yang index ab152b82f..c8aede635 100644 --- a/release/models/aft/openconfig-aft-ipv6.yang +++ b/release/models/aft/openconfig-aft-ipv6.yang @@ -20,7 +20,71 @@ submodule openconfig-aft-ipv6 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv6."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -99,6 +163,7 @@ submodule openconfig-aft-ipv6 { list ipv6-entry { key "prefix"; + oc-ext:telemetry-atomic; description "List of the IPv6 unicast entries within the abstract forwarding table. This list is keyed by the destination IPv6 @@ -132,7 +197,15 @@ submodule openconfig-aft-ipv6 { "The IPv6 destination prefix that should be matched to utilise the AFT entry."; } - uses aft-common-entry-state; + uses aft-common-entry-state { + augment counters { + description + "The number of packets and octets matched the AFT entry + and routed to next-hops within the backup next-hop-group"; + + uses aft-common-backup-entry-counter-state; + } + } uses aft-common-ip-state; } } diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index 46ab20e00..2418a5a9e 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -21,7 +21,63 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.5.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -100,6 +156,7 @@ submodule openconfig-aft-mpls { list label-entry { key "label"; + oc-ext:telemetry-atomic; description "List of the MPLS entries within the abstract forwarding table. This list is keyed by the top-most MPLS diff --git a/release/models/aft/openconfig-aft-network-instance.yang b/release/models/aft/openconfig-aft-network-instance.yang index 2d577ec18..8ac495dcb 100644 --- a/release/models/aft/openconfig-aft-network-instance.yang +++ b/release/models/aft/openconfig-aft-network-instance.yang @@ -19,7 +19,21 @@ module openconfig-aft-network-instance { when building the OpenConfig network instance model to add per-NI AFTs."; - oc-ext:openconfig-version "0.2.3"; + oc-ext:openconfig-version "0.3.1"; + + revision "2023-04-25" { + description + "Clarify use of the interface-ref type."; + reference "0.3.1"; + } + + revision "2022-03-29" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "0.3.0"; + } revision "2018-11-21" { description @@ -44,17 +58,6 @@ module openconfig-aft-network-instance { oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; - augment "/oc-ni:network-instances/oc-ni:network-instance/" + - "oc-ni:afts/oc-ni:next-hops/oc-ni:next-hop/oc-ni:state" { - - description - "Add leaves that require referencing of a network instance to the - operational state parameters of a next-hop within the AFT for IPv4 - unicast."; - - uses aft-nexthop-ni-state; - } - grouping aft-nexthop-ni-state { description "Operational state parameters relating to a next-hop which reference a @@ -69,12 +72,72 @@ module openconfig-aft-network-instance { } } + grouping aft-entry-ni-state { + description + "Operational state parameters relating to an AFT entry which reference + a network instance."; + + leaf origin-network-instance { + type oc-ni:network-instance-ref; + description + "If the AFT entry was imported from another network instance (e.g., it + corresponds to a L3 forwarding entry which was learned within another + network-instance), the value of this leaf reflects the network-instance + from which it was learned. + + For example, if the local network-instance corresponds to a L3VRF, and + routes are imported from the VPNv4 address-family of the BGP instance + in the DEFAULT_INSTANCE, then this value would reflect the + DEFAULT_INSTANCE as the origin-network-instance."; + } + } + + grouping aft-entry-nexthop-group-state { + description + "Operational state nexthop group parameters relating to an AFT entry + which reference a network instance."; + + leaf next-hop-group { + type leafref { + path "/oc-ni:network-instances/oc-ni:network-instance/oc-ni:afts/" + + "oc-ni:next-hop-groups/oc-ni:next-hop-group/oc-ni:state/oc-ni:id"; + } + description + "A reference to the next-hop-group that is in use for the entry within + the AFT. Traffic is distributed across the set of next-hops within the + next-hop group according to the weight. This node needs to refer to any + network-instance on the system hence must be absolute."; + } + + leaf next-hop-group-network-instance { + type oc-ni:network-instance-ref; + description + "The network instance to look up the next-hop-group in. If unspecified, + the next hop group is in the local network instance. The referenced + network-instance must be an existing network instance on the device and + have corresponding entries in the /network-instances/network-instance + list."; + } + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:afts/oc-ni:next-hops/oc-ni:next-hop/oc-ni:state" { + + description + "Add leaves that require referencing of a network instance to the + operational state parameters of a next-hop within the AFT for IPv4 + unicast."; + + uses aft-nexthop-ni-state; + } + augment "/oc-ni:network-instances/oc-ni:network-instance/" + "oc-ni:afts/oc-ni:ipv4-unicast/oc-ni:ipv4-entry/oc-ni:state" { description "Add leaves that require referencing of a network instance to the operational state parameters of an entry within the IPv4 unicast AFT."; + uses aft-entry-nexthop-group-state; uses aft-entry-ni-state; } @@ -84,26 +147,36 @@ module openconfig-aft-network-instance { "Add leaves that require referencing of a network instance to the operational state parameters of an entry within the IPv6 unicast AFT."; + uses aft-entry-nexthop-group-state; uses aft-entry-ni-state; } - grouping aft-entry-ni-state { + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:afts/oc-ni:policy-forwarding/oc-ni:policy-forwarding-entry/" + + "oc-ni:state" { description - "Operational state parameters relating to an AFT entry which reference - a network instance."; + "Add leaves that require referencing of a network instance to the + operational state parameters of an entry within the Policy Forwarding + AFT."; - leaf origin-network-instance { - type oc-ni:network-instance-ref; - description - "If the AFT entry was imported from another network instance (e.g., it - corresponds to a L3 forwarding entry which was learned within another - network-instance), the value of this leaf reflects the network-instance - from which it was learned. + uses aft-entry-nexthop-group-state; + } - For example, if the local network-instance corresponds to a L3VRF, and - routes are imported from the VPNv4 address-family of the BGP instance - in the DEFAULT_INSTANCE, then this value would reflect the - DEFAULT_INSTANCE as the origin-network-instance."; - } + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:afts/oc-ni:mpls/oc-ni:label-entry/oc-ni:state" { + description + "Add leaves that require referencing of a network instance to the + operational state parameters of an entry within the MPLS AFT."; + + uses aft-entry-nexthop-group-state; + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:afts/oc-ni:ethernet/oc-ni:mac-entry/oc-ni:state" { + description + "Add leaves that require referencing of a network instance to the + operational state parameters of an entry within the Ethernet AFT."; + + uses aft-entry-nexthop-group-state; } } diff --git a/release/models/aft/openconfig-aft-pf.yang b/release/models/aft/openconfig-aft-pf.yang index acf9e54c8..8f0d5a243 100644 --- a/release/models/aft/openconfig-aft-pf.yang +++ b/release/models/aft/openconfig-aft-pf.yang @@ -28,7 +28,71 @@ submodule openconfig-aft-pf { fields other than the destination address that is used in other forwarding tables."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -107,6 +171,7 @@ submodule openconfig-aft-pf { list policy-forwarding-entry { key "index"; + oc-ext:telemetry-atomic; description "List of the policy forwarding entries within the abstract forwarding table. Each entry is uniquely identified by an diff --git a/release/models/aft/openconfig-aft-state-synced.yang b/release/models/aft/openconfig-aft-state-synced.yang new file mode 100644 index 000000000..3e0950826 --- /dev/null +++ b/release/models/aft/openconfig-aft-state-synced.yang @@ -0,0 +1,87 @@ +submodule openconfig-aft-state-synced { + belongs-to "openconfig-aft" { + prefix "oc-aft"; + } + + import openconfig-extensions { prefix "oc-ext"; } + + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "Submodule containing definitions of groupings for the state + synced signals corresponding to various abstract forwarding tables."; + + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + grouping aft-state-synced-structural { + description + "Structural grouping defining the schema for the state synced signals + of various abstract forwarding table."; + + container state { + config false; + description + "Operational state parameters relating to the state + synced signals of various AFTs."; + + leaf ipv4-unicast { + type boolean; + default false; + description + "State synced signal indicating consistent device snapshot of + IPv4 unicast AFT entries. Before setting this flag to true + next-hop-groups and next-hops AFT entries, associated with + ipv4-unicast AFT entries, are expected to be consistent with + device snapshot."; + } + + leaf ipv6-unicast { + type boolean; + default false; + description + "State synced signal indicating consistent device snapshot of + IPv6 unicast AFT entries. Before setting this flag to true + next-hop-groups and next-hops AFT entries, associated with + ipv6-unicast AFT entries, are expected to be consistent with + device snapshot."; + } + } + } +} diff --git a/release/models/aft/openconfig-aft-summary.yang b/release/models/aft/openconfig-aft-summary.yang new file mode 100644 index 000000000..8a4cc1730 --- /dev/null +++ b/release/models/aft/openconfig-aft-summary.yang @@ -0,0 +1,125 @@ +module openconfig-aft-summary { + yang-version "1"; + + namespace "http://openconfig.net/yang/aft-summary"; + + prefix "oc-aftsummary"; + + import openconfig-extensions { prefix "oc-ext"; } + import openconfig-policy-types { prefix "oc-pol-types"; } + import openconfig-network-instance { prefix "oc-ni"; } + + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides summary of aft entry counts per protocol type for each network + instance."; + + oc-ext:openconfig-version "0.2.0"; + + revision "2024-01-12" { + description + "Change count of entries from counter64 to uint64."; + reference "0.2.0"; + } + + revision "2023-11-09" { + description + "Initial version."; + reference "0.1.0"; + } + + grouping protocols-state { + description + "Grouping for protocol type state."; + + leaf origin-protocol { + description + "Protocol type that keys the protocol list."; + + type identityref { + base "oc-pol-types:INSTALL_PROTOCOL_TYPE"; + } + } + + container counters { + description + "Enclosing container for aft entry counters"; + + leaf aft-entries { + description + "Total number of entries in the aft."; + type uint64; + } + } + } + + grouping aft-summary { + description + "A summary of aft entries by protocol type."; + + container protocols { + description + "Enclosing container for a list of protocols"; + list protocol { + key "origin-protocol"; + + description + "Protocol type that keys the aft entry count list."; + + leaf origin-protocol { + type leafref { + path "../state/origin-protocol"; + } + description + "Reference to the protocol type which added the aft entry."; + } + + container state { + description + "State parameters for the aft entry list."; + uses protocols-state; + } + } + } + } + + grouping aft-summary-ipv4 { + description + "Grouping of all aft summaries for ipv4."; + container ipv4-unicast { + description + "Container for ipv4 unicast aft summary by protocol type."; + uses aft-summary; + } + } + + grouping aft-summary-ipv6 { + description + "Grouping of all aft summaries for ipv6."; + container ipv6-unicast { + description + "Container for ipv6 aft counts by protocol type."; + uses aft-summary; + } + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/oc-ni:afts" { + description + "Augment the afts model with the aft summary container."; + + container aft-summaries { + uses aft-summary-ipv4; + uses aft-summary-ipv6; + + description + "Aft summary for the network instance."; + } + } + +} diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index ade141f44..4b7fc8f64 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -16,7 +16,19 @@ module openconfig-aft-types { "Types related to the OpenConfig Abstract Forwarding Table (AFT) model"; - oc-ext:openconfig-version "0.3.4"; + oc-ext:openconfig-version "1.1.0"; + + revision "2022-05-05" { + description + "Add network-instance and decapsulate-header in NH AFT entry state"; + reference "1.1.0"; + } + + revision "2021-08-24" { + description + "Add vxlan to next-hops encapsulation-header-type."; + reference "0.3.5"; + } revision "2019-11-07" { description @@ -73,6 +85,10 @@ module openconfig-aft-types { "The encapsulation header is one or more MPLS labels indicated by the pushed and popped label stack lists."; } + enum VXLAN { + description + "The encapsulation header is a VXLAN packet header"; + } } description "Types of tunnel encapsulation that are supported by systems as either diff --git a/release/models/aft/openconfig-aft.yang b/release/models/aft/openconfig-aft.yang index 3065ec027..d1af3e977 100644 --- a/release/models/aft/openconfig-aft.yang +++ b/release/models/aft/openconfig-aft.yang @@ -20,6 +20,8 @@ module openconfig-aft { include openconfig-aft-ethernet; // Include the common cross-AFT entities. include openconfig-aft-common; + // Include the state synced submodule. + include openconfig-aft-state-synced; organization "OpenConfig working group"; @@ -40,7 +42,71 @@ module openconfig-aft { is referred to as an Abstract Forwarding Table (AFT), rather than the FIB."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "2.6.0"; + + revision "2024-04-25" { + description + "Add backup-active to AFT NHG state."; + reference "2.6.0"; + } + + revision "2024-01-26" { + description + "Add gre container under next-hops aft entry state. + Add src-ip, dst-ip and ttl under gre aft entry state + for telemetry."; + reference "2.5.0"; + } + + revision "2023-09-26" { + description + "Add next-hop-group-name in NHG AFT entry state."; + reference "2.4.0"; + } + + revision "2023-04-19" { + description + "Add atomic attribute to AFT containers."; + reference "2.3.0"; + } + + revision "2022-06-16" { + description + "Add state-synced container under afts."; + reference "2.2.0"; + } + + revision "2022-06-15" { + description + "Add decapsulate-header in NH AFT entry state"; + reference "2.1.0"; + } + + revision "2022-05-17" { + description + "Relocate next-hop-group/next-hop-group-network-instance + from openconfig-aft-common to resolve absolute path + leafref specific to network-instances"; + reference "2.0.0"; + } + + revision "2022-01-27" { + description + "Add next hop counters and prefix counters."; + reference "1.0.0"; + } + + revision "2022-01-26" { + description + "Add vni-label and tunnel-src-ip-address properties under next-hops"; + reference "0.10.0"; + } + + revision "2021-12-09" { + description + "Add pop-top-label in NH AFT entry state"; + reference "0.9.0"; + } revision "2021-08-06" { description @@ -158,10 +224,11 @@ module openconfig-aft { destination prefix which is matched by ingress packets. The data set represented by the IPv6 Unicast AFTis the set - of entries within the IPv6 RIB that "; + of entries within the IPv6 unicast RIB that have been + selected for installation into the FIB of the device + exporting the data structure."; uses aft-ipv6-unicast-structural; - } container policy-forwarding { @@ -200,6 +267,27 @@ module openconfig-aft { uses aft-ethernet-structural; } + container state-synced { + description + "In some cases AFT streaming (e.g., over gNMI) is an eventually consistent system. + When the device updates an entry it is usually expected to + stream an update to the client within a vert short amount + of time (few milliseconds). Given this is the casee, a telemetry collector or a + controller that parse the AFT doesn't have a consistent + snapshot, or overall versioned copy of AFT with the device + at any specific point of time. + + In certain failure modes like device boot up, gNMI daemon + failure and device/routing engine stateful switchover + a telemetry collector or a controller need a flag to + determine whether it is in consistent with the device or + not such that it can a corrective action when needed. + A device sets this leaf or flag to indicate to the + client that AFT data/view is consistent."; + + uses aft-state-synced-structural; + } + uses aft-next-hop-groups-structural; uses aft-nhop-structural; } diff --git a/release/models/ate/.spec.yml b/release/models/ate/.spec.yml index 673f94a7a..90963be13 100644 --- a/release/models/ate/.spec.yml +++ b/release/models/ate/.spec.yml @@ -1,8 +1,6 @@ -- name: openconfig-ate +- name: openconfig-ate-flow docs: - yang/ate/openconfig-ate-flow.yang - - yang/ate/openconfig-ate-intf.yang build: - yang/ate/openconfig-ate-flow.yang - - yang/ate/openconfig-ate-intf.yang run-ci: true diff --git a/release/models/ate/openconfig-ate-flow.yang b/release/models/ate/openconfig-ate-flow.yang index f52495f66..c03d45c42 100644 --- a/release/models/ate/openconfig-ate-flow.yang +++ b/release/models/ate/openconfig-ate-flow.yang @@ -9,6 +9,7 @@ module openconfig-ate-flow { import openconfig-types { prefix "oc-types"; } import openconfig-inet-types { prefix "oc-inet"; } import openconfig-mpls-types { prefix "oc-mplst"; } + import openconfig-vlan-types { prefix "oc-vlan"; } organization "OpenConfig working group"; @@ -23,7 +24,19 @@ module openconfig-ate-flow { stream of packets whose definition is outside of the context of this module."; - oc-ext:openconfig-version "0.2.0"; + oc-ext:openconfig-version "0.4.0"; + + revision 2022-04-29 { + description + "Add protocol convergence tracking statistics."; + reference "0.4.0"; + } + + revision 2022-02-16 { + description + "Add VLAN ID to ingress tracked values."; + reference "0.3.0"; + } revision 2019-08-07 { description @@ -161,6 +174,12 @@ module openconfig-ate-flow { "The destination IPv6 value of the traffic header."; } + leaf vlan-id { + type oc-vlan:vlan-id; + description + "The VLAN ID of the traffic header."; + } + leaf filter { type string; description @@ -206,6 +225,20 @@ module openconfig-ate-flow { "The rate, measured in bits per second, at which the flow is being received."; } + + leaf first-packet-latency { + type oc-types:timeticks64; + description + "The time from when the flow was started to when the first packet was + received."; + } + + leaf convergence-time { + type oc-types:timeticks64; + description + "The time from when the first packet was received to when traffic + loss dropped below a minimal threshold value."; + } } grouping flow-counters-state { @@ -252,7 +285,7 @@ module openconfig-ate-flow { fields to the flow statistics specific to frames that match that combination."; - key "src-port dst-port mpls-label src-ipv4 dst-ipv4 src-ipv6 dst-ipv6"; + key "src-port dst-port mpls-label src-ipv4 dst-ipv4 src-ipv6 dst-ipv6 vlan-id"; leaf src-port { type leafref { @@ -310,6 +343,14 @@ module openconfig-ate-flow { "The dst IPv6 value of the traffic header."; } + leaf vlan-id { + type leafref { + path "../state/vlan-id"; + } + description + "The VLAN ID value of the traffic header."; + } + container state { config false; diff --git a/release/models/bfd/.spec.yml b/release/models/bfd/.spec.yml index 623e6b5c5..44ad51b24 100644 --- a/release/models/bfd/.spec.yml +++ b/release/models/bfd/.spec.yml @@ -4,8 +4,3 @@ build: - yang/bfd/openconfig-bfd.yang run-ci: true -- name: openconfig-bfd-ni - build: - - yang/bfd/openconfig-bfd.yang - - yang/network-instance/openconfig-network-instance.yang - run-ci: true diff --git a/release/models/bfd/openconfig-bfd.yang b/release/models/bfd/openconfig-bfd.yang index 8a0755bf8..8f5041b79 100644 --- a/release/models/bfd/openconfig-bfd.yang +++ b/release/models/bfd/openconfig-bfd.yang @@ -11,7 +11,6 @@ module openconfig-bfd { import openconfig-extensions { prefix "oc-ext"; } import openconfig-types { prefix "oc-types"; } import openconfig-interfaces { prefix "oc-if"; } - import openconfig-if-types { prefix "oc-ift"; } import openconfig-inet-types { prefix "oc-inet"; } import openconfig-policy-types { prefix "oc-pol-types"; } import ietf-inet-types { prefix "ietf-if"; } @@ -27,7 +26,32 @@ module openconfig-bfd { "An OpenConfig model of Bi-Directional Forwarding Detection (BFD) configuration and operational state."; - oc-ext:openconfig-version "0.2.3"; + oc-ext:openconfig-version "0.3.0"; + + revision "2024-03-05" { + description + "Add configuration of min interval, multiplier when + BFD is enabled at protocol level"; + reference "0.3.0"; + } + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.2.6"; + } + + revision "2023-02-06" { + description + "Clarify interface references."; + reference "0.2.5"; + } + + revision "2022-06-28" { + description + "Remove reference to invalid oc-ift type check"; + reference "0.2.4"; + } revision "2021-06-16" { description @@ -183,7 +207,7 @@ module openconfig-bfd { "Top-level per-interface configuration parameters for BFD."; leaf id { - type string; + type oc-if:interface-id; description "A unique identifier for the interface."; } @@ -203,43 +227,7 @@ module openconfig-bfd { interface."; } - leaf desired-minimum-tx-interval { - type uint32; - units microseconds; - description - "The minimum interval between transmission of BFD control - packets that the operator desires. This value is advertised to - the peer, however the actual interval used is specified by - taking the maximum of desired-minimum-tx-interval and the - value of the remote required-minimum-receive interval value. - - This value is specified as an integer number of microseconds."; - } - - leaf required-minimum-receive { - type uint32; - units microseconds; - description - "The minimum interval between received BFD control packets that - this system should support. This value is advertised to the - remote peer to indicate the maximum frequency (i.e., minimum - inter-packet interval) between BFD control packets that is - acceptable to the local system."; - } - - // rjs: Could have required-minimum-echo-receive here, but this is - // generally not configurable. - - leaf detection-multiplier { - type uint8 { - range "1..max"; - } - description - "The number of packets that must be missed to declare this - session as down. The detection interval for the BFD session - is calculated by multiplying the value of the negotiated - transmission interval by this value."; - } + uses bfd-configuration; leaf enable-per-member-link { type boolean; @@ -527,9 +515,6 @@ module openconfig-bfd { container micro-bfd-sessions { when "/oc-if:interfaces/oc-if:interface" + - "[oc-if:name=current()/../interface-ref/config/interface]/" + - "oc-if:config/oc-if:type = 'oc-ift:IF_AGGREGATE' or " + - "/oc-if:interfaces/oc-if:interface" + "[oc-if:name=current()/../interface-ref/config/interface]/" + "oc-if:config/oc-if:type = 'ietf-if:ieee8023adLag'" { description @@ -632,7 +617,11 @@ module openconfig-bfd { key "id"; description - "Per-interface configuration and state parameters for BFD."; + "Per-interface configuration and state parameters for BFD. + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf id { type leafref { @@ -680,6 +669,49 @@ module openconfig-bfd { } } + grouping bfd-configuration { + description + "Configuration parameters of BFD when it is enabled in protocols."; + leaf desired-minimum-tx-interval { + type uint32; + units microseconds; + description + "The minimum interval between transmission of BFD control + packets that the operator desires. This value is advertised to + the peer, however the actual interval used is specified by + taking the maximum of desired-minimum-tx-interval and the + value of the remote required-minimum-receive interval value. + This value is specified as an integer number of microseconds. + The value 0 is reserved and cannot be used."; + reference "section 4.1 of RFC 5880"; + } + + leaf required-minimum-receive { + type uint32; + units microseconds; + description + "The minimum interval between received BFD control packets that + this system should support. This value is advertised to the + remote peer to indicate the maximum frequency (i.e., minimum + inter-packet interval) between BFD control packets that is + acceptable to the local system."; + reference "section 4.1 of RFC 5880"; + } + + leaf detection-multiplier { + type uint8 { + range "1..max"; + } + description + "The number of packets that must be missed to declare this + session as down. The detection interval for the BFD session + is calculated by multiplying the value of the negotiated + transmission interval by this value."; + reference "section 4.1 of RFC 5880"; + } + + } + grouping enable-bfd-state { description "Operational state parameters relating to enabling BFD."; @@ -723,6 +755,8 @@ module openconfig-bfd { "Configuration parameters relating to enabling BFD."; uses enable-bfd-config; + uses bfd-configuration; + } container state { @@ -731,6 +765,7 @@ module openconfig-bfd { "Operational state parameters relating to enabing BFD."; uses enable-bfd-config; + uses bfd-configuration; //uses enable-bfd-state; } } diff --git a/release/models/bgp/openconfig-bgp-common-multiprotocol.yang b/release/models/bgp/openconfig-bgp-common-multiprotocol.yang index b97ecaa78..884bbe8be 100644 --- a/release/models/bgp/openconfig-bgp-common-multiprotocol.yang +++ b/release/models/bgp/openconfig-bgp-common-multiprotocol.yang @@ -24,7 +24,113 @@ submodule openconfig-bgp-common-multiprotocol { for multiple protocols in BGP. The groupings are common across multiple contexts."; - oc-ext:openconfig-version "6.0.0"; + oc-ext:openconfig-version "9.8.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp remote-port description"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "6.1.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "6.1.0"; + } revision "2019-07-10" { description @@ -114,9 +220,23 @@ submodule openconfig-bgp-common-multiprotocol { } } - grouping bgp-common-mp-afi-safi-config { + grouping bgp-common-mp-afi-safi-extended-next-hop-encoding-config { + description + "BGP extended next-hop encoding parameters that apply on a per-AFI-SAFI + basis"; + + leaf extended-next-hop-encoding { + type boolean; + default false; + description + "This leaf indicates whether extended next-hop encoding is enabled for + this AFI-SAFI"; + } + } + + grouping bgp-common-mp-global-afi-safi-config { description - "Configuration parameters used for all BGP AFI-SAFIs"; + "Configuration parameters used for all BGP global AFI-SAFIs"; leaf afi-safi-name { type identityref { @@ -128,9 +248,47 @@ submodule openconfig-bgp-common-multiprotocol { leaf enabled { type boolean; default false; + description + "This leaf indicates whether the AFI-SAFI is enabled for all + neighbors or groups."; + } + + leaf-list send-community-type { + type oc-bgp-types:community-type; + description + "Specify which types of community should be sent to the + neighbor or group. The default is to not send the + community attribute. This takes precedence over the neighbor + or group configuration"; + } + } + + grouping bgp-common-mp-afi-safi-config { + description + "Configuration parameters used for all BGP neighbors + or groups AFI-SAFIs"; + + leaf afi-safi-name { + type identityref { + base oc-bgp-types:AFI_SAFI_TYPE; + } + description "AFI,SAFI"; + } + + leaf enabled { + type boolean; description "This leaf indicates whether the AFI-SAFI is - enabled for the neighbour or group"; + enabled for the neighbor or group"; + } + + leaf-list send-community-type { + type oc-bgp-types:community-type; + description + "Specify which types of community should be sent to the + neighbor or group. The default is to not send the + community attribute. This takes precedence over the neighbor + or group configuration"; } } @@ -169,11 +327,7 @@ submodule openconfig-bgp-common-multiprotocol { } description "IPv4 unicast configuration options"; - - // include common IPv[46] unicast options - uses bgp-common-mp-ipv4-ipv6-unicast-common; - - // placeholder for IPv4 unicast specific configuration + uses bgp-common-mp-ipv4-unicast-common; } } @@ -189,12 +343,7 @@ submodule openconfig-bgp-common-multiprotocol { } description "IPv6 unicast configuration options"; - - // include common IPv[46] unicast options - uses bgp-common-mp-ipv4-ipv6-unicast-common; - - // placeholder for IPv6 unicast specific configuration - // options + uses bgp-common-mp-ipv6-unicast-common; } } @@ -385,14 +534,62 @@ submodule openconfig-bgp-common-multiprotocol { "State information relating to the prefix-limit for the AFI-SAFI"; uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; + uses bgp-common-mp-all-afi-safi-common-prefix-limit-state; + } + } + + container prefix-limit-received { + description + "Configure the maximum number of prefixes that will be + received from a peer"; + + container config { + description + "Configuration parameters relating to the prefix + limit for the AFI-SAFI"; + uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; + } + + container state { + config false; + description + "State information relating to the prefix-limit for the + AFI-SAFI"; + uses bgp-common-mp-all-afi-safi-common-prefix-limit-config; + uses bgp-common-mp-all-afi-safi-common-prefix-limit-state; } } } - grouping bgp-common-mp-ipv4-ipv6-unicast-common { + grouping bgp-common-mp-ipv4-unicast-common { + description + "Configuration that is applicable for IPv4 unicast"; + + // include common afi-safi options. + uses bgp-common-mp-all-afi-safi-common; + + container config { + description + "Configuration parameters for IPv4 unicast AFI-SAFI options"; + // configuration options that are common to IPv[46] unicast + uses bgp-common-mp-ipv4-ipv6-unicast-common-config; + + // configuration options that are specific to IPv4 unicast + uses bgp-common-mp-afi-safi-extended-next-hop-encoding-config; + } + + container state { + config false; + description + "State information for IPv4 parameters"; + uses bgp-common-mp-ipv4-ipv6-unicast-common-config; + uses bgp-common-mp-afi-safi-extended-next-hop-encoding-config; + } + } + + grouping bgp-common-mp-ipv6-unicast-common { description - "Common configuration that is applicable for IPv4 and IPv6 - unicast"; + "Configuration that is applicable for IPv6 unicast"; // include common afi-safi options. uses bgp-common-mp-all-afi-safi-common; @@ -400,15 +597,16 @@ submodule openconfig-bgp-common-multiprotocol { // configuration options that are specific to IPv[46] unicast container config { description - "Configuration parameters for common IPv4 and IPv6 unicast - AFI-SAFI options"; + "Configuration parameters for IPv6 unicast AFI-SAFI options"; + // configuration options that are common to IPv[46] unicast uses bgp-common-mp-ipv4-ipv6-unicast-common-config; + + // placholder for IPv6 unicast specific options } container state { config false; description - "State information for common IPv4 and IPv6 unicast - parameters"; + "State information for IPv6 unicast parameters"; uses bgp-common-mp-ipv4-ipv6-unicast-common-config; } } @@ -493,7 +691,7 @@ submodule openconfig-bgp-common-multiprotocol { type uint32; description "Maximum number of prefixes that will be accepted - from the neighbour"; + from the neighbor"; } leaf prevent-teardown { @@ -511,23 +709,27 @@ submodule openconfig-bgp-common-multiprotocol { type oc-types:percentage; description "Threshold on number of prefixes that can be received - from a neighbour before generation of warning messages + from a neighbor before generation of warning messages or log entries. Expressed as a percentage of max-prefixes"; } + } - leaf restart-timer { - type decimal64 { - fraction-digits 2; - } - units "seconds"; + grouping bgp-common-mp-all-afi-safi-common-prefix-limit-state { + description + "State parameters relating to prefix-limits for an AFI-SAFI"; + + leaf prefix-limit-exceeded { + type boolean; description - "Time interval in seconds after which the BGP session - is re-established after being torn down due to exceeding - the max-prefix limit."; + "If set to true, the prefix-limit has been exceeded. When the + prefix-limit has been exceeded, the value of true must be retained + until the restart-time has expired. Prior to session re-establishment, + the value must be reset to false"; } } + grouping bgp-common-mp-ipv4-ipv6-unicast-common-config { description "Common configuration parameters for IPv4 and IPv6 Unicast @@ -537,7 +739,7 @@ submodule openconfig-bgp-common-multiprotocol { type boolean; default "false"; description - "If set to true, send the default-route to the neighbour(s)"; + "If set to true, send the default-route to the neighbor(s)"; } } } diff --git a/release/models/bgp/openconfig-bgp-common-structure.yang b/release/models/bgp/openconfig-bgp-common-structure.yang index a28588ddd..8aee8797b 100644 --- a/release/models/bgp/openconfig-bgp-common-structure.yang +++ b/release/models/bgp/openconfig-bgp-common-structure.yang @@ -21,7 +21,114 @@ submodule openconfig-bgp-common-structure { "This sub-module contains groupings that are common across multiple BGP contexts and provide structure around other primitive groupings."; - oc-ext:openconfig-version "6.0.0"; + oc-ext:openconfig-version "9.8.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } + + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp remote-port description"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "6.1.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "6.1.0"; + } revision "2019-07-10" { description @@ -29,7 +136,6 @@ submodule openconfig-bgp-common-structure { reference "6.0.0"; } - revision "2019-05-28" { description "Clarify prefix counter descriptions, add received-pre-policy diff --git a/release/models/bgp/openconfig-bgp-common.yang b/release/models/bgp/openconfig-bgp-common.yang index 5aa36afe7..ac1a3983f 100644 --- a/release/models/bgp/openconfig-bgp-common.yang +++ b/release/models/bgp/openconfig-bgp-common.yang @@ -24,7 +24,114 @@ submodule openconfig-bgp-common { may be application to a subset of global, peer-group or neighbor contexts."; - oc-ext:openconfig-version "6.0.0"; + oc-ext:openconfig-version "9.8.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } + + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp remote-port description"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "6.1.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "6.1.0"; + } revision "2019-07-10" { description @@ -106,9 +213,7 @@ submodule openconfig-bgp-common { peer"; leaf connect-retry { - type decimal64 { - fraction-digits 2; - } + type uint16; default 30; description "Time interval in seconds between attempts to establish a @@ -116,9 +221,7 @@ submodule openconfig-bgp-common { } leaf hold-time { - type decimal64 { - fraction-digits 2; - } + type uint16; default 90; description "Time interval in seconds that a BGP session will be @@ -130,9 +233,7 @@ submodule openconfig-bgp-common { } leaf keepalive-interval { - type decimal64 { - fraction-digits 2; - } + type uint16; default 30; description "Time interval in seconds between transmission of keepalive @@ -141,9 +242,7 @@ submodule openconfig-bgp-common { } leaf minimum-advertisement-interval { - type decimal64 { - fraction-digits 2; - } + type uint16; default 30; description "Minimum time which must elapse between subsequent UPDATE @@ -155,6 +254,15 @@ submodule openconfig-bgp-common { reference "RFC 4271 - A Border Gateway Protocol 4, Sec 9.2.1.1"; } + + leaf restart-time { + type uint16; + units "seconds"; + description + "Time interval in seconds after which the BGP session is + re-established after being torn down due to exceeding any + configured max prefix-limit."; + } } grouping bgp-common-neighbor-group-config { @@ -209,14 +317,27 @@ submodule openconfig-bgp-common { } leaf send-community { + status deprecated; type oc-bgp-types:community-type; default "NONE"; description - "Specify which types of community should be sent to the + "This leaf has been deprecated and replaced by send-community-type to + support large communities. + + Specify which types of community should be sent to the neighbor or group. The default is to not send the community attribute"; } + leaf-list send-community-type { + type oc-bgp-types:community-type; + description + "Specify which types of community should be sent to the neighbor or + group. The default is to not send the community attribute. Note, if + the NONE community-type is specified, no other types must be + specified."; + } + leaf description { type string; description @@ -442,9 +563,7 @@ submodule openconfig-bgp-common { } leaf stale-routes-time { - type decimal64 { - fraction-digits 2; - } + type uint16; description "An upper-bound on the time thate stale routes will be retained by a router after a session is restarted. If an @@ -521,6 +640,21 @@ submodule openconfig-bgp-common { container ebgp { description "Multipath parameters for eBGP"; + container link-bandwidth-ext-community { + description + "Usage of DMZ Link-Bandwidth extended community"; + container config { + description + "Configuration parameters relating to usage of link-bandwidth"; + uses bgp-common-use-multiple-paths-link-bandwidth-config; + } + container state { + config false; + description + "State information relating to usage of link-bandwidth"; + uses bgp-common-use-multiple-paths-link-bandwidth-config; + } + } container config { description "Configuration parameters relating to eBGP multipath"; @@ -537,6 +671,21 @@ submodule openconfig-bgp-common { container ibgp { description "Multipath parameters for iBGP"; + container link-bandwidth-ext-community { + description + "Usage of DMZ Link-Bandwidth extended community"; + container config { + description + "Configuration parameters relating to usage of link-bandwidth"; + uses bgp-common-use-multiple-paths-link-bandwidth-config; + } + container state { + config false; + description + "State information relating to usage of link-bandwidth"; + uses bgp-common-use-multiple-paths-link-bandwidth-config; + } + } container config { description "Configuration parameters relating to iBGP multipath"; @@ -552,6 +701,23 @@ submodule openconfig-bgp-common { } } + grouping bgp-common-use-multiple-paths-link-bandwidth-config { + description + "Parameters controlling usage of of DMZ Link-Bandwidth + extended community in pultipath RIB/FIB formation"; + leaf enabled { + type boolean; + description + "When set to TRUE, BGP multiplepath shall distributed traffic + load among contributing routes proportionally to value of + Local Administrator subfield of link-bandwidth extended + community [draft-ietf-idr-link-bandwidth-07]. + This leaf has no effect if BGP multi-path is disabled or + if maximum-path attribute of BGP multi-path value is set + to 1"; + } + } + grouping bgp-common-use-multiple-paths-ebgp-config { description "Configuration parameters relating to multipath for eBGP"; diff --git a/release/models/bgp/openconfig-bgp-errors.yang b/release/models/bgp/openconfig-bgp-errors.yang index 86aad056e..53372afc7 100644 --- a/release/models/bgp/openconfig-bgp-errors.yang +++ b/release/models/bgp/openconfig-bgp-errors.yang @@ -18,7 +18,81 @@ submodule openconfig-bgp-errors { "This module defines BGP NOTIFICATION message error codes and subcodes"; - oc-ext:openconfig-version "5.0.2"; + oc-ext:openconfig-version "6.1.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "6.1.0"; + } + + revision "2024-01-31" { + description + "Update community-sets/members/member union type by replacing + the bgp-regex type with posix-eregexp."; + reference "6.0.0"; + } + + revision "2023-12-26" { + description + "Add regex for bgp link bandwidth"; + reference "5.6.0"; + } + + revision "2023-09-06" { + description + "Add GRACEFUL_SHUTDOWN as a BGP_WELL_KNOWN_STD_COMMUNITY"; + reference "5.5.0"; + } + + revision "2023-03-31" { + description + "Add support for BGP large communities [rfc8092] in + send-community-type + + Types impacted: + - community-type"; + reference "5.4.0"; + } + + revision "2021-08-06" { + description + "Fix pattern regexes to allow full 4-byte private ASN range including + 42xxxxxxxx in extended communities + + Types impacted: + - bgp-ext-community-type"; + reference "5.3.1"; + } + + revision "2021-01-07" { + description + "Remove module extension oc-ext:regexp-posix by making pattern regexes + conform to RFC7950. + + Types impacted: + - bgp-std-community-type + - bgp-ext-community-type"; + reference "5.3.0"; + } + + revision "2020-06-30" { + description + "Add OpenConfig POSIX pattern extensions."; + reference "5.2.1"; + } + + revision "2020-06-17" { + description + "Add RFC5549 capability identity."; + reference "5.2.0"; + } + + revision "2020-03-24" { + description + "Add FlowSpec, BGP-LS and LSVR AFI-SAFI identities."; + reference "5.1.0"; + } revision "2018-11-21" { description diff --git a/release/models/bgp/openconfig-bgp-global.yang b/release/models/bgp/openconfig-bgp-global.yang index 150835596..9a1480182 100644 --- a/release/models/bgp/openconfig-bgp-global.yang +++ b/release/models/bgp/openconfig-bgp-global.yang @@ -7,6 +7,7 @@ submodule openconfig-bgp-global { import openconfig-extensions { prefix oc-ext; } import openconfig-yang-types { prefix oc-yang; } import openconfig-inet-types { prefix oc-inet; } + import openconfig-routing-policy { prefix oc-rpol; } // Include common submodules include openconfig-bgp-common; @@ -26,7 +27,114 @@ submodule openconfig-bgp-global { "This sub-module contains groupings that are specific to the global context of the OpenConfig BGP module"; - oc-ext:openconfig-version "6.0.0"; + oc-ext:openconfig-version "9.8.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } + + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp remote-port description"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "6.1.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "6.1.0"; + } revision "2019-07-10" { description @@ -294,13 +402,13 @@ submodule openconfig-bgp-global { container config { description "Configuration parameters for the AFI-SAFI"; - uses bgp-common-mp-afi-safi-config; + uses bgp-common-mp-global-afi-safi-config; } container state { config false; description "State information relating to the AFI-SAFI"; - uses bgp-common-mp-afi-safi-config; + uses bgp-common-mp-global-afi-safi-config; uses bgp-common-state; } @@ -324,6 +432,7 @@ submodule openconfig-bgp-global { uses bgp-common-global-group-use-multiple-paths; uses bgp-common-structure-neighbor-group-add-paths; uses bgp-global-mp-all-afi-safi-list-contents; + uses oc-rpol:default-policy-group; } } @@ -409,6 +518,7 @@ submodule openconfig-bgp-global { } uses bgp-global-dynamic-neighbors; + uses oc-rpol:default-policy-group; } } diff --git a/release/models/bgp/openconfig-bgp-neighbor.yang b/release/models/bgp/openconfig-bgp-neighbor.yang index dbdd765ff..ddcef2e8b 100644 --- a/release/models/bgp/openconfig-bgp-neighbor.yang +++ b/release/models/bgp/openconfig-bgp-neighbor.yang @@ -30,7 +30,108 @@ submodule openconfig-bgp-neighbor { "This sub-module contains groupings that are specific to the neighbor context of the OpenConfig BGP module."; - oc-ext:openconfig-version "6.1.0"; + oc-ext:openconfig-version "9.8.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } + + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp neighbor-port, remote-port and local-port descriptions"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "6.1.1"; + } revision "2021-03-17" { description @@ -132,6 +233,14 @@ submodule openconfig-bgp-neighbor { "Address of the BGP peer, either in IPv4 or IPv6"; } + leaf neighbor-port { + type oc-inet:port-number; + default 179; + description + "Destination TCP port number of the BGP peer when initiating a + session from the local router"; + } + leaf enabled { type boolean; default true; @@ -293,6 +402,25 @@ submodule openconfig-bgp-neighbor { due to an inbound connection request from a specified source prefix within a dynamic-neighbor-prefix."; } + + leaf last-prefix-limit-exceeded { + type oc-types:timeticks64; + description + "This timestamp indicates the time that the BGP session last + violated a configured recived (pre-policy) or accepted (post-policy) + max prefix-limit for any AFI/SAFI combination + on the session. The value is the timestamp in nanoseconds relative + to the Unix Epoch (Jan 1, 1970 00:00:00 UTC). + + If the 'prefix-limit-exceeded' node is set to true for any AFI/SAFI + on the session, then the next restart time for the session can be + calculated as this value plus the configured 'restart-time' under + the neighbor timers. + + This value should be retained across established sessions and is only + set/updated when prefix-limit-exceeded transitions from false/unset to + true."; + } } grouping bgp-neighbor-counters-message-types-state { @@ -374,7 +502,7 @@ submodule openconfig-bgp-neighbor { leaf local-port { type oc-inet:port-number; description - "Local TCP port being used for the TCP session supporting + "Local, source TCP port being used for the TCP session supporting the BGP session"; } @@ -388,8 +516,11 @@ submodule openconfig-bgp-neighbor { leaf remote-port { type oc-inet:port-number; description - "Remote port being used by the peer for the TCP session - supporting the BGP session"; + "The source TCP port being used by the peer for the TCP session + supporting the BGP session. This is expected to be the same value + as the configured neighbor-port if the local device initiated the + connection or a different TCP port if the peer initiated the TCP + session."; } } @@ -413,9 +544,7 @@ submodule openconfig-bgp-neighbor { with the BGP session"; leaf negotiated-hold-time { - type decimal64 { - fraction-digits 2; - } + type uint16; description "The negotiated hold-time for the BGP session"; } diff --git a/release/models/bgp/openconfig-bgp-peer-group.yang b/release/models/bgp/openconfig-bgp-peer-group.yang index 366b6d87d..aba5163ac 100644 --- a/release/models/bgp/openconfig-bgp-peer-group.yang +++ b/release/models/bgp/openconfig-bgp-peer-group.yang @@ -25,8 +25,102 @@ submodule openconfig-bgp-peer-group { "This sub-module contains groupings that are specific to the peer-group context of the OpenConfig BGP module."; - oc-ext:openconfig-version "6.1.1"; + oc-ext:openconfig-version "9.8.0"; + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } + + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp remote-port description"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } revision "2021-06-16" { description diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index 639a8ef50..f4c0c18c4 100644 --- a/release/models/bgp/openconfig-bgp-policy.yang +++ b/release/models/bgp/openconfig-bgp-policy.yang @@ -13,7 +13,7 @@ module openconfig-bgp-policy { import openconfig-policy-types { prefix oc-pol-types; } import openconfig-bgp-types { prefix oc-bgp-types; } import openconfig-extensions { prefix oc-ext; } - + import openconfig-types { prefix oc-types; } // meta organization @@ -28,7 +28,64 @@ module openconfig-bgp-policy { It augments the base routing-policy module with BGP-specific options for conditions and actions."; - oc-ext:openconfig-version "6.0.2"; + oc-ext:openconfig-version "7.1.0"; + + revision "2024-07-02" { + description + "Add ext-community-count container, which also clarifies that + community-count does not include other types of communities (e.g. + extended)."; + reference "7.1.0"; + } + + revision "2024-01-31" { + description + "Update community-sets/members/member union type by replacing + the bgp-regex type with posix-eregexp."; + reference "7.0.0"; + } + + revision "2023-12-19" { + description + "Add PEER_ADDRESS to bgp-next-hop-type."; + reference "6.4.0"; + } + + revision "2023-10-23" { + description + "Revert revision 2019-02-01. + Move match-set-options of BGP community and BGP extended community from + defined-sets/bgp-defined-sets/community-set and + defined-sets/bgp-defined-sets/ext-community-set back to + policy-definitions/statements/.../bgp-conditions + for consistency across sets."; + reference "6.3.0"; + } + + revision "2023-10-03" { + description + "Deprecate community-set-ref and ext-community-set-ref, + add the following leaf-list nodes: + * community-set-refs + * ext-community-set-refs"; + reference "6.2.0"; + } + + revision "2023-03-27" { + description + "Clarify bgp-set-med-type description"; + reference "6.1.1"; + } + + revision "2022-05-24" { + description + "Remove module extension oc-ext:regexp-posix by making pattern regexes + conform to RFC6020/RFC7950. + + Types impacted: + - bgp-set-med-type"; + reference "6.1.0"; + } revision "2020-06-30" { description @@ -101,7 +158,6 @@ module openconfig-bgp-policy { } // OpenConfig specific extensions for module metadata. - oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -140,6 +196,11 @@ module openconfig-bgp-policy { description "special designation for local router's own address, i.e., next-hop-self"; } + enum PEER_ADDRESS { + description "The ip address of the peer should be used. + This enum is efficient to use when setting the next hop + in a policy applied to a peer group."; + } } } description @@ -150,7 +211,7 @@ module openconfig-bgp-policy { type union { type uint32; type string { - pattern '^[+-][0-9]+$'; + pattern '[+-][0-9]+'; oc-ext:posix-pattern '^[+-][0-9]+$'; } type enumeration { @@ -163,8 +224,9 @@ module openconfig-bgp-policy { description "Type definition for specifying how the BGP MED can be set in BGP policy actions. The three choices are to set - the MED directly, increment/decrement using +/- notation, - and setting it to the IGP cost (predefined value)."; + the MED directly using the uint32 type or increment/decrement + using +/- notation in the string type or setting it to + the IGP cost using the enum (predefined value)."; } // grouping statements @@ -219,38 +281,139 @@ module openconfig-bgp-policy { } } + grouping match-community-config { + description + "Configuration data for match conditions on community set"; + + leaf community-set { + type leafref { + path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + + "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:community-sets/" + + "oc-bgp-pol:community-set/oc-bgp-pol:community-set-name"; + } + description "References a defined community set"; + } + uses oc-rpol:match-set-options-group; + } + + grouping match-community-state { + description + "Operational state data for match conditions on community set"; + } + + grouping match-community-top { + description + "Top-level grouping for match conditions on community set"; + + container match-community-set { + description + "Match a referenced community set according to the logic + defined in the match-set-options leaf"; + + container config { + description + "Configuration data for match conditions on community set"; + + uses match-community-config; + } + + container state { + + config false; + + description + "Operational state data for match conditions on community set"; + + uses match-community-config; + uses match-community-state; + } + } + } + + grouping match-ext-community-config { + description + "Configuration data for match conditions on extended community set"; + + leaf ext-community-set { + type leafref { + path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + + "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:ext-community-sets/" + + "oc-bgp-pol:ext-community-set/oc-bgp-pol:ext-community-set-name"; + } + description "References a defined extended community set"; + } + uses oc-rpol:match-set-options-group; + } + + grouping match-ext-community-state { + description + "Operational state data for match conditions on extended community set"; + } + + grouping match-ext-community-top { + description + "Top-level grouping for match conditions on extended community set"; + + container match-ext-community-set { + description + "Match a referenced extended community set according to the logic + defined in the match-set-options leaf"; + + container config { + description + "Configuration data for match conditions on extended community set"; + + uses match-ext-community-config; + } + + container state { + + config false; + + description + "Operational state data for match conditions on extended + community set"; + + uses match-ext-community-config; + uses match-ext-community-state; + } + } + } + grouping bgp-match-set-conditions { description "Condition statement definitions for checking membership in a defined set"; uses match-as-path-top; + uses match-community-top; + uses match-ext-community-top; } grouping community-count-config { description - "Configuration data for community count condition"; + "Configuration data for different community count conditions"; uses oc-pol-types:attribute-compare-operators; } grouping community-count-state { description - "Operational state data for community count condition"; + "Operational state data for different community count conditions"; } grouping community-count-top { description - "Top-level grouping for community count condition"; + "Top-level grouping for different community count conditions"; container community-count { description "Value and comparison operations for conditions based on the - number of communities in the route update"; + number of regular communities in the route update."; container config { description - "Configuration data for community count condition"; + "Configuration data for regular community count condition"; uses community-count-config; } @@ -260,7 +423,31 @@ module openconfig-bgp-policy { config false; description - "Operational state data for community count condition"; + "Operational state data for regular community count condition"; + + uses community-count-config; + uses community-count-state; + } + } + + container ext-community-count { + description + "Value and comparison operations for conditions based on the + number of extended communities in the route update."; + + container config { + description + "Configuration data for extended community count condition"; + + uses community-count-config; + } + + container state { + + config false; + + description + "Operational state data for extended community count condition"; uses community-count-config; uses community-count-state; @@ -366,6 +553,7 @@ module openconfig-bgp-policy { } leaf community-set { + status deprecated; type leafref { path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:community-sets/" + @@ -376,6 +564,7 @@ module openconfig-bgp-policy { } leaf ext-community-set { + status deprecated; type leafref { path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + "oc-bgp-pol:bgp-defined-sets/oc-bgp-pol:ext-community-sets/" + @@ -443,16 +632,29 @@ module openconfig-bgp-policy { type oc-bgp-types:bgp-well-known-community-type; } description - "members of the community set. - For an ADD operation these are the communities that will be added; - the regexp type is not valid in this operation. + "Members of the community set. + For an ADD operation these are the communities that will be + added. The regexp type is not valid in this operation. + For REMOVE or REPLACE operations then matching communities will be removed unless match-set-options is INVERT which will reverse this to mean that anything that does not match will be - removed."; + removed. + + For MATCH operations the posix-eregexp type should be evaluated + against each community associated with a prefix one community + at a time. Communities must be represented as strings in formats + conforming to oc-bgp-types:bgp-std-community-type. For example: + `1000:1000` for a standard community"; } - uses oc-rpol:match-set-options-group; + leaf match-set-options { + status deprecated; + type oc-pol-types:match-set-options-type; + description + "Optional parameter that governs the behaviour of the + match operation"; + } } grouping community-set-state { @@ -516,19 +718,33 @@ module openconfig-bgp-policy { leaf-list ext-community-member { type union { type oc-bgp-types:bgp-ext-community-type; - type oc-bgp-types:bgp-community-regexp-type; + type oc-types:posix-eregexp; } description - "members of the extended community set + "Members of the extended community set. For an ADD operation these are the communities that will be added; the regexp type is not valid in this operation. + For REMOVE or REPLACE operations then matching communities will be removed unless match-set-options is INVERT which will reverse this to mean that anything that does not match will be - removed."; + removed. + + For MATCH operations the posix-eregexp type should be evaluated + against each community associated with a prefix one community + at a time. Communities must be represented as strings in formats + conforming to oc-bgp-types:bgp-ext-community-type. For example: + `route-origin:1000:1000` for the origin type extended community, + and so on."; } - uses oc-rpol:match-set-options-group; + leaf match-set-options { + status deprecated; + type oc-pol-types:match-set-options-type; + description + "Optional parameter that governs the behaviour of the + match operation"; + } } grouping ext-community-set-state { @@ -815,7 +1031,19 @@ module openconfig-bgp-policy { "Configuration data for referening a community-set in the set-community action"; + leaf-list community-set-refs { + type leafref { + path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + + "oc-bgp-pol:bgp-defined-sets/" + + "oc-bgp-pol:community-sets/oc-bgp-pol:community-set/" + + "oc-bgp-pol:community-set-name"; + } + description + "References a list of defined community sets by name"; + } + leaf community-set-ref { + status deprecated; type leafref { path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + "oc-bgp-pol:bgp-defined-sets/" + @@ -978,7 +1206,21 @@ module openconfig-bgp-policy { "Configuration data for referening a extended community-set in the set-ext-community action"; + leaf-list ext-community-set-refs { + type leafref { + path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + + "oc-bgp-pol:bgp-defined-sets/" + + "oc-bgp-pol:ext-community-sets/" + + "oc-bgp-pol:ext-community-set/" + + "oc-bgp-pol:ext-community-set-name"; + } + description + "References a list of defined extended community sets by + name"; + } + leaf ext-community-set-ref { + status deprecated; type leafref { path "/oc-rpol:routing-policy/oc-rpol:defined-sets/" + "oc-bgp-pol:bgp-defined-sets/" + diff --git a/release/models/bgp/openconfig-bgp-types.yang b/release/models/bgp/openconfig-bgp-types.yang index 8b1d2b4ee..57b8e9b65 100644 --- a/release/models/bgp/openconfig-bgp-types.yang +++ b/release/models/bgp/openconfig-bgp-types.yang @@ -4,7 +4,6 @@ module openconfig-bgp-types { namespace "http://openconfig.net/yang/bgp-types"; prefix "oc-bgp-types"; - import openconfig-types { prefix "oc-types"; } import openconfig-inet-types { prefix "oc-inet"; } import openconfig-extensions { prefix "oc-ext"; } @@ -25,7 +24,51 @@ module openconfig-bgp-types { policy. It can be imported by modules that make use of BGP attributes"; - oc-ext:openconfig-version "5.3.0"; + oc-ext:openconfig-version "6.1.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "6.1.0"; + } + + revision "2024-02-01" { + description + "Modify bgp-community-regexp-type."; + reference "6.0.0"; + } + + revision "2023-12-26" { + description + "Add regex for bgp link bandwidth"; + reference "5.6.0"; + } + + revision "2023-09-06" { + description + "Add GRACEFUL_SHUTDOWN as a BGP_WELL_KNOWN_STD_COMMUNITY"; + reference "5.5.0"; + } + + revision "2023-03-31" { + description + "Add support for BGP large communities [rfc8092] in + send-community + + Types impacted: + - community-type"; + reference "5.4.0"; + } + + revision "2021-08-06" { + description + "Fix pattern regexes to allow full 4-byte private ASN range including + 42xxxxxxxx in extended communities + + Types impacted: + - bgp-ext-community-type"; + reference "5.3.1"; + } revision "2021-01-07" { description @@ -341,6 +384,16 @@ module openconfig-bgp-types { reference "RFC3765"; } + identity GRACEFUL_SHUTDOWN { + base BGP_WELL_KNOWN_STD_COMMUNITY; + description + "An autonomous system which supports the graceful shutdown + receiver procedure receiving NLRI tagged with this community + will set LOCAL_PREF to a low value for those NLRI. This + community has a value of 0xFFFF0000."; + reference "RFC8326"; + } + typedef bgp-session-direction { type enumeration { enum INBOUND { @@ -379,13 +432,13 @@ module openconfig-bgp-types { // 0xFFFFFFFF are reserved } type string { - pattern '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + pattern '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; - oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } } @@ -401,17 +454,17 @@ module openconfig-bgp-types { type string { // Type 1: 2-octet global and 4-octet local // (AS number) (Integer) - pattern '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + pattern '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])'; - oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + oc-ext:posix-pattern '^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])$'; } type string { @@ -420,46 +473,46 @@ module openconfig-bgp-types { pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; oc-ext:posix-pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } type string { // RFC5668: 4-octet global and 2-octet local // (AS number) (integer) - pattern '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + + pattern '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; oc-ext:posix-pattern '^(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } type string { // route-target with Type 1 // route-target:(ASN):(local-part) pattern 'route\-target:' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])'; - oc-ext:posix-pattern '^route\-target:' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + oc-ext:posix-pattern '^route\-target:' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])$'; } type string { @@ -469,13 +522,13 @@ module openconfig-bgp-types { '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; oc-ext:posix-pattern '^route\-target:' + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } type string { @@ -483,33 +536,33 @@ module openconfig-bgp-types { pattern 'route\-target:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; oc-ext:posix-pattern '^route\-target:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } type string { // route-origin with Type 1 pattern 'route\-origin:' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])'; oc-ext:posix-pattern '^route\-origin:' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])$'; } type string { @@ -518,13 +571,13 @@ module openconfig-bgp-types { '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; oc-ext:posix-pattern '^route\-origin:' + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' + '2[0-4][0-9]|25[0-5]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } type string { @@ -532,16 +585,16 @@ module openconfig-bgp-types { pattern 'route\-origin:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])'; oc-ext:posix-pattern '^route\-origin:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9]):' + - '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$'; } type string { @@ -550,15 +603,36 @@ module openconfig-bgp-types { '[0-1]{2}:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])'; oc-ext:posix-pattern '^color:' + '[0-1]{2}:' + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + - '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + '[1-9][0-9]{1,8}|[0-9])$'; } + type string { + // Extended Link Bandwidth Community + // link-bandwidth:<2 byte asn>: + // Example: link-bandwidth:20:100M + pattern 'link-bandwidth:' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):' + + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + + '[1-9][0-9]{1,8}|[0-9])(k|K|M|G)?'; + oc-ext:posix-pattern '^link-bandwidth:' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}' + + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$' + + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}' + + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[0-1][0-9]{8}|[1-3][0-9]{9}|' + + '[1-9][0-9]{1,8}|[0-9])(k|K|M|G)?$'; + } + } description "Type definition for extended community attributes. In the case that @@ -572,11 +646,15 @@ module openconfig-bgp-types { - route-origin:<2b ASN>:<4b value> per RFC4360 section 5 - route-origin:<4b IPv4>:<2b value> per RFC4360 section 5 - color::<4b value> per draft-ietf-idr-segment-routing-te-policy - section 3"; + section 3 + - link-bandwidth:<2 byte asn>: per + draft-ietf-idr-link-bandwidth-07"; + reference "RFC 4360 - BGP Extended Communities Attribute RFC 5668 - 4-Octet AS Specific BGP Extended Community - draft-ietf-idr-segment-routing-te-policy"; + draft-ietf-idr-segment-routing-te-policy + draft-ietf-idr-link-bandwidth-07"; } typedef bgp-ext-community-recv-type { @@ -610,12 +688,15 @@ module openconfig-bgp-types { } typedef bgp-community-regexp-type { - // TODO: needs more work to decide what format these regexps can - // take. - type oc-types:std-regexp; + type oc-types:posix-eregexp; description "Type definition for communities specified as regular - expression patterns"; + expression patterns. The regular expression must be a + POSIX extended regular expression with some limitations + which are commonly found in device implementations described + in draft-ietf-idr-bgp-model."; + reference + "draft-ietf-idr-bgp-model"; } typedef bgp-origin-attr-type { @@ -703,23 +784,32 @@ module openconfig-bgp-types { typedef community-type { type enumeration { enum STANDARD { - description "Send only standard communities"; + description "Send standard communities"; } enum EXTENDED { - description "Send only extended communities"; + description "Send extended communities"; + } + enum LARGE { + description "Send large communities"; } enum BOTH { - description "Send both standard and extended communities"; + description + "Send both standard and extended communities. + This value has been deprecated because the node is now + a leaf-list."; + status deprecated; } enum NONE { - description "Do not send any community attribute"; + description + "Do not send any community attribute. If this value is present + then the other community-types must not be present."; } } description "type describing variations of community attributes: STANDARD: standard BGP community [rfc1997] EXTENDED: extended BGP community [rfc4360] - BOTH: both standard and extended community"; + LARGE: large BGP community [rfc8092]"; } diff --git a/release/models/bgp/openconfig-bgp.yang b/release/models/bgp/openconfig-bgp.yang index 60bd7759d..054f3cdd9 100644 --- a/release/models/bgp/openconfig-bgp.yang +++ b/release/models/bgp/openconfig-bgp.yang @@ -58,9 +58,112 @@ module openconfig-bgp { +-> neighbor +-> [ neighbor config ] +-> [ optional pointer to peer-group ] - +-> AFI / SAFI [ per-AFI overrides ]"; + +-> AFI / SAFI [ per-AFI overrides ] + + Most BGP features can be configured at multiple levels in the BGP + configuration level hierarchy. The common inheritance model allows + the more specific configuration (e.g. neighbor) to inherit from or + override the less specific configuration (e.g. global). + Leaf present at one level overrides leafs present at higher levels, + whereas leaf not present inherits its value from the leaf present + at the next higher level in the hierarchy."; + + oc-ext:openconfig-version "9.8.0"; + + revision "2024-09-06" { + description + "Restore NONE enum value for community-type."; + reference "9.8.0"; + } + + revision "2023-12-28" { + description + "Clarification to last-prefix-limit-exceeded in description"; + reference "9.7.1"; + } + + revision "2023-12-28" { + description + "Add support for controling use of link-bandwidth extended + community for BGP multipath."; + reference "9.7.0"; + } - oc-ext:openconfig-version "6.1.1"; + revision "2023-11-02" { + description + "Fix revision '2023-03-31': send-community-type was added to the + wrong grouping. + Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.6.0"; + } + + revision "2023-11-01" { + description + "Add default apply policy to global and per afi-safi config."; + reference "9.5.0"; + } + + revision "2023-06-27" { + description + "Clarify bgp remote-port description"; + reference "9.4.1"; + } + + revision "2023-04-01" { + description + "Add support for BGP large communities [rfc8092] in + send-community. + Leaf send-community was replaced by the leaf-list + send-community-type to allow the combination of different + community types"; + reference "9.4.0"; + } + + revision "2023-03-31" { + description + "Allow configuring send-community per AFI-SAFI at + neighbor/peer-group."; + reference "9.3.0"; + } + + revision "2022-12-12" { + description + "Removed the default of enabled leaf of AFI-SAFI + at neighbor/peer-group to support BGP inheritance model."; + reference "9.2.0"; + } + + revision "2022-05-21" { + description + "Added extended-next-hop-encoding leaf."; + reference "9.1.0"; + } + + revision "2022-04-26" { + description + "Transition decimal64 types to uint16 for various BGP timers"; + reference "9.0.0"; + } + + revision "2022-03-21" { + description + "Add BGP port"; + reference "8.1.0"; + } + + revision "2021-12-01" { + description + "Add prefix-limit-received, add prefix-limit + state nodes, change/relocate restart-timer"; + reference "8.0.0"; + } + + revision "2021-10-21" { + description + "Removal of top-level /bgp container"; + reference "7.0.0"; + } revision "2021-06-16" { description @@ -160,7 +263,7 @@ module openconfig-bgp { reference "2.0.1"; } - // OpenConfig specific extensions for module metadata. + // OpenConfig specific extensions for module metadata. oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -195,6 +298,4 @@ module openconfig-bgp { } } - uses bgp-top; - } diff --git a/release/models/catalog/.spec.yml b/release/models/catalog/.spec.yml index ce41cde5f..e658906d9 100644 --- a/release/models/catalog/.spec.yml +++ b/release/models/catalog/.spec.yml @@ -1,4 +1,4 @@ -- name: openconfig-catalog +- name: openconfig-module-catalog build: - yang/catalog/openconfig-module-catalog.yang docs: diff --git a/release/models/defined-sets/.spec.yml b/release/models/defined-sets/.spec.yml new file mode 100644 index 000000000..6947d635b --- /dev/null +++ b/release/models/defined-sets/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-defined-sets + docs: + - yang/defined-sets/openconfig-defined-sets.yang + build: + - yang/defined-sets/openconfig-defined-sets.yang + run-ci: true diff --git a/release/models/defined-sets/openconfig-defined-sets.yang b/release/models/defined-sets/openconfig-defined-sets.yang new file mode 100644 index 000000000..0c2a92bec --- /dev/null +++ b/release/models/defined-sets/openconfig-defined-sets.yang @@ -0,0 +1,227 @@ +module openconfig-defined-sets { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/defined-sets"; + + prefix "oc-sets"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-inet-types { prefix oc-inet; } + import openconfig-packet-match-types { prefix oc-pkt-match-types; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines configuration and operational state + data for defined sets (sets of IPv4 prefixes, sets of + IPv6 prefixes, sets of ports, etc). These sets are used, + for example, in network access control lists (i.e., filters, + rules, etc.) in the matching fields."; + + oc-ext:openconfig-version "1.0.0"; + + revision "2022-12-14" { + description + "Initial version of the defined set model"; + reference "1.0.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + grouping ipv4-prefix-sets-config { + description "Configuration parameters of IPv4 prefix sets."; + + leaf name { + type string; + description + "A user defined name of the IPv4 prefix set."; + } + + leaf description { + type string; + description "A user defined IPv4 prefix set description."; + } + + leaf-list prefix { + type oc-inet:ipv4-prefix; + description + "A user defined list of IPv4 prefixes to be used in match + conditions. Each entry is a IPv4 + mask combination."; + } + } + + grouping ipv6-prefix-sets-config { + description "Configuration parameters of IPv6 prefix sets."; + + leaf name { + type string; + description + "Name of the IPv6 prefix set."; + } + + leaf description { + type string; + description + "A user defined IPv6 prefix set description."; + } + + leaf-list prefix { + type oc-inet:ipv6-prefix; + description + "A user defined list of IPv6 prefixes to be used in match + conditions. Each entry is a IPv6 + mask combination."; + } + } + + grouping port-sets-config { + description + "Configuration parameters of port sets."; + + leaf name { + type string; + description + "A user defined name of the port set."; + } + + leaf description { + type string; + description + "A user defined description for the port set"; + } + + leaf-list port { + type oc-pkt-match-types:port-num-range; + description + "A user defined set of ports to be + used in the match conditions."; + } + } + + grouping defined-sets { + description "Configuration of Defined Sets."; + + container ipv4-prefix-sets { + description + "Container to hold the list of IPv4 prefix sets."; + + list ipv4-prefix-set { + key "name"; + description + "List of IPv4 prefix sets."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Reference to the name of the IPv4 prefix set."; + } + + container config { + description + "Configuration data for IPv4 prefix sets."; + uses ipv4-prefix-sets-config; + } + + container state { + config false; + description + "State data for IPv4 prefix sets."; + uses ipv4-prefix-sets-config; + } + } + } + + container ipv6-prefix-sets { + description + "Container to hold the list of IPv4 prefix sets."; + + list ipv6-prefix-set { + key "name"; + description "List of IPv6 prefix sets. Each defined set + is uniquely identified by a name"; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Reference to the name of the IPv6 prefix set."; + } + + container config { + description + "Configuration data for IPv6 prefix sets."; + uses ipv6-prefix-sets-config; + } + + container state { + config false; + description + "State data for prefix lists."; + uses ipv6-prefix-sets-config; + } + } + } + + container port-sets { + description + "Container to hold the list of port sets."; + + list port-set { + key "name"; + description + "List of port sets. Each por set is uniquely + identified by its name"; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Name of the port set. The name is used to + reference the set in match conditions."; + } + + container config { + description + "Configuration data for port lists."; + uses port-sets-config; + } + + container state { + config false; + description + "State data for port lists."; + uses port-sets-config; + } + } + } + } + + + + grouping defined-sets-top { + description + "Top level grouping for defined-sets"; + + container defined-sets { + description + "Top level enclosing container for defined-set model + config and operational state data."; + uses defined-sets; + } + } + + uses defined-sets-top; + +} diff --git a/release/models/devices-manifest/.spec.yml b/release/models/devices-manifest/.spec.yml new file mode 100644 index 000000000..2f8d19d14 --- /dev/null +++ b/release/models/devices-manifest/.spec.yml @@ -0,0 +1,12 @@ +- name: openconfig-terminal-device-properties + docs: + - yang/devices-manifest/openconfig-terminal-device-properties.yang + build: + - yang/devices-manifest/openconfig-terminal-device-properties.yang + run-ci: true +- name: openconfig-terminal-device-property-types + docs: + - yang/devices-manifest/openconfig-terminal-device-property-types.yang + build: + - yang/devices-manifest/openconfig-terminal-device-property-types.yang + run-ci: true diff --git a/release/models/devices-manifest/openconfig-terminal-device-properties.yang b/release/models/devices-manifest/openconfig-terminal-device-properties.yang new file mode 100644 index 000000000..862676c40 --- /dev/null +++ b/release/models/devices-manifest/openconfig-terminal-device-properties.yang @@ -0,0 +1,978 @@ +module openconfig-terminal-device-properties { + + // Yang version can be "1" without mandatory fields. + // Yang version 1.1 allows mandatory fiels in an augment + // https://tools.ietf.org/html/rfc7950#section-7.17 + // If the augmentation adds mandatory nodes (see Section 3) that + // represent configuration to a target node in another module, the + // augmentation MUST be made conditional with a "when" statement. + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/openconfig-terminal-device-properties"; + prefix "oc-opt-term-properties"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-transport-types { prefix oc-opt-types; } + import openconfig-terminal-device-property-types { prefix oc-opt-term-prop-types; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "Module to extend OpenConfig terminal device's operational modes' + data. It supports operational modes for one Optical + Channel, with a single OTSi. The operational mode includes key + attributes such modulation format, symbol rate, nominal central + frequency (NFC) tunability constraints (grid, min/max NCF), FEC + gain, minimum and maximum output power of the transmitter or + minimum OSNR at the receiver as well as the spectrum width of + the OTSi (OTSiMC). It also includes (optional) aspects such as + filter characterization, CD and DGD tolerance."; + + oc-ext:openconfig-version "0.2.0"; + + + // Revisions + revision "2024-05-28" { + description "Comprehensive model update to undertake the limitations + of the first version of the model, such the introduction of modes + dependencies on hardware components and the interoperability information + between terminal devices, linecards, transceviers and modes."; + reference "0.2.0"; + } + + revision "2024-05-15" { + description + "Fix yang namespace URI to openconfig.net."; + reference "0.1.2"; + } + + revision "2023-12-13" { + description + "Add reference to the terminal-device-properties-guide.md doc for operational-modes."; + reference "0.1.1"; + } + + revision "2022-04-26" { + description "Initial manifest fine to extend the information + related to the operational modes supported by a terminal device."; + reference "0.1.0"; + } + + + // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig-properties"; + + // grouping statements + + grouping penalties-list-element-attributes { + description + "OSNR penalties grouping, including the set of attributes + which defines each element of the penalties list."; + + leaf parameter-and-unit { + type oc-opt-term-prop-types:impairment-type; + description + "Impairment and unit leading to the penalty (i.e., cd-ps)"; + } + + leaf up-to-boundary { + type decimal64 { + fraction-digits 2; + } + description + "defines the upper (for positive values) and lower (for negative values) + limit for which the penalty value is valid."; + } + + leaf penalty-value { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "OSNR penalty associated to the given values, expressed in dB."; + } + } + + grouping fec-codes-attributes { + description + "FEC codes attributes grouping, including the set of attributes + which defines the FEC code employed on the transmission represented + by the operational-mode."; + + leaf fec-coding { + type union { + type string; + type oc-opt-term-prop-types:fec-coding; + } + description + "Forward error correction (FEC) coding schema used in the + transmission mode. Type union of string (for proprietary codes) + and a set of standard codes encoded as identity references"; + } + + leaf coding-overhead { + type decimal64 { + fraction-digits 2; + } + description + "Coding overhead rate in %."; + } + + leaf coding-gain { + type decimal64 { + fraction-digits 2; + } + units dB; + default 0.00; + description + "Net coding gain (NCG) in dB units at 10E-15 bit error rate. + It may vary depending on the modulation format used in the + associated transmission mode (operational-mode)."; + } + } + + grouping filter-attributes-top { + description + "This grouping includes the attributes which characterises the filter + at transceiver transmission for the given operational-mode."; + + leaf pulse-shaping-type { + type union { + type string; + type oc-opt-term-prop-types:pulse-shaping-type; + } + description + "Pulse/spectral shaping type such as Raised-cosine (RC), + root-raised-cosine (RRC) and OFF. The attribute allows + other pulse-shaping types to be encoded as strings."; + } + + leaf roll-off { + type decimal64 { + fraction-digits 2; + } + description + "Decimal fraction between 0 and 1. Roll-off parameter (𝛽) of the + TX pulse shaping filter. This assumes a raised-cosine filter"; + + } + } + + grouping operational-mode-descriptor-explicit-config-constraints-state { + description + "Configuration value constraints for optical channels + configured on the target operational mode."; + + leaf min-central-frequency { + type oc-opt-types:frequency-type; + description + "The lowest configurable central frequency in MHz."; + } + + leaf max-central-frequency { + type oc-opt-types:frequency-type; + description + "The highest configurable central frequency in MHz."; + } + + leaf grid-type { + type oc-opt-term-prop-types:grid-type; + description + "Frequency ITU-T G.694.1 (10/2020) grid specification attribute."; + } + + leaf adjustment-granularity { + type oc-opt-term-prop-types:adjustment-granularity; + description + "Adjustment granularity in Gigahertz. As per ITU-T G.694.1 + (10/2020), it is used to calculate nominal central frequency of an + optical channel. It defines the minimum granularity supporting by the + optical channel's central frequency setting."; + } + + leaf min-channel-spacing { + type decimal64 { + fraction-digits 2; + } + units GHz; + description + "Minimum recommended spectrum spacing between the central frequency of two + adjacent optical channels of the same mode. In case of two adjacent optical + channels with different operational-modes, it is up to the path computation + engine to determine the minimum distance between the central frequencies of + these two optical channels."; + } + + leaf min-output-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "Minimum target output optical power level of the optical channel, + configurable according to the optical transceiver mode properties, + expressed in increments of 0.01 dBm (decibel-milliwats)"; + } + + leaf max-output-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "Maximum target output optical power level of the optical channel, + configurable according to the optical transceiver mode properties, + expressed in increments of 0.01 dBm (decibel-milliwatts)"; + } + } + + grouping mode-descriptor-design-properties-state { + description + "For each given mode supported by the device there might be + one or multiple implementations related to the transceiver hardware + modules which implements the mode. For a given implementation, + a set of design properties are represented within the mode-descriptor + data structure, which is identified by a unique local identifier. + A mode-descriptor shall uniquely characterize a given operational mode + implemented by a given transceiver component described within the + terminal-device manfiest file."; + + leaf mode-descriptor-id { + type uint16; + description + "Two-octet encoding of the vendor-defined operational + mode"; + } + + leaf min-tx-osnr { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "Minimum in-band transmitter OSNR measured at 0.1nm@193.6Thz, + considering the maximum transceiver inserted noise. "; + } + + leaf min-rx-osnr { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "Minimum back-to-back OSNR measured over 0.1nm@193.6Thz or + 12.5GHz noise resolution bandwidth at the min-input-power. + If received OSNR at min-input-power is lower than this value, + an increased level of bit-errors post-FEC needs to be + expected."; + } + + leaf min-input-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "Minimum value required input power in dBm of an optical channel + at the receiver (Rx) according to the given min-rx-osnr value. If + the input-power is lower it is expected to introduce an OSNR + penalty."; + } + + leaf max-input-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "Maximum tolerated input power in dBm at the receiver (Rx) + of the coherence transceiver, which if exceeded can cause an + overload."; + } + + leaf max-chromatic-dispersion { + type decimal64 { + fraction-digits 2; + } + units ps-nm; + description + "Maximum chromatic-dispersion, accumulated value, supported by the + optical channel associated to the associated transmission mode + (operational model), expressed in picoseconds / nanometer (ps/nm)."; + } + + leaf max-differential-group-delay { + type decimal64 { + fraction-digits 2; + } + units ps; + description + "Maximum differential-group-delay, absolute value, supported by the + optical channel associated to the associated tranmission mode + (operational model), expressed in picoseconds (ps)."; + } + + leaf max-polarization-dependent-loss { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "Maximum polarization-dependent-loss accumulated value, supported by the + optical channel associated to the associated transmission mode + (operational model), expressed in decibels (dB)"; + } + + leaf pre-fec-ber-threshold { + type decimal64 { + fraction-digits 18; + } + units bit-errors-per-second; + description + "Threshold on the PRE-FEC-BER, for which FEC code is able to + correct errors."; + } + } + + grouping operational-mode-descriptor-design-properties-top { + description + "Definition of proprietary or non-standard operational-modes, which can be + uniformly characterized by the set of attributes included in their + operational-mode-capabilities which defines the related signal physical + impairment related aspects such Rx and Tx associated attributes and tolerances; + and its optical-channel-config-value-constraints, which defines what are the + allowed values to be configured at the oc-component:optical-channel instance + configured to this mode."; + + container mode-descriptors { + description + "Explicit definition of the operational-mode. Typically this is used + for non-standard/proprietary modes defined by the terminal-device + vendor and it is self-described by the capabilities included in + the subtree underneath."; + + list mode-descriptor{ + key "mode-descriptor-id"; + description + ""; + + leaf mode-descriptor-id { + type leafref { + path "../state/mode-descriptor-id"; + } + description + "Reference to mode-descriptor-id"; + } + container state { + config false; + description + "Mode-descriptor state attributes top container."; + uses mode-descriptor-design-properties-state; + } + uses operational-mode-descriptor-penalties-top; + uses operational-mode-descriptor-interoperable-modes-top; + } + } + } + + grouping interoperable-mode-properties-state { + description + "System-defined configuration data for component properties"; + + leaf name { + type string; + description + "System-supplied name of the property -- this is typically + non-configurable"; + } + + leaf value { + type union { + type string; + type boolean; + type int64; + type uint64; + type decimal64 { + fraction-digits 2; + } + } + description + "Property values can take on a variety of types. Signed and + unsigned integer types may be provided in smaller sizes, + e.g., int8, uint16, etc."; + } + } + + grouping operational-mode-descriptor-interoperable-mode-state { + description + "Interoperable mode features attributes grouping."; + + leaf mode-name { + type string; + description + "Public well-know free-format name reference to the mode name."; + } + + leaf publisher-organization { + type union { + type string; + type oc-opt-term-prop-types:interoperability-modes-organization; + } + description + "Name of the organization, standard body, Multi-Source Agreement, or + open source project, responsible of the definition of the interoperable + mode."; + } + } + grouping operational-mode-descriptor-penalties-top { + description + "Top container grouping for operational-mode-descriptor."; + container penalties { + description + "Enconsing list's container."; + + list penalty { + key "parameter-and-unit up-to-boundary"; + description + "Penalties includes contributions from different impairments including + cd, pmd, low RX Power, pdl,... + - For parameter values below lowest up-to-boundary value, the penalty is 0. + - For parameter values between lowest and highest up-to-boundary + values, penalty could be linearly interpolated. + - For parameter values above highest up-to-boundary value, the penalty is the one + included within penalty-value attribute associated to the highest up-to-boundary"; + + leaf parameter-and-unit { + type leafref { + path "../state/parameter-and-unit"; + } + description + "Impairment and unit leading to the penalty (i.e., cd-ps)"; + } + + leaf up-to-boundary { + type leafref { + path "../state/up-to-boundary"; + } + description + "defines the upper (for positive values) and lower (for negative values) + limit for which the penalty value is valid."; + } + + container state { + config false; + description + "Penalties list element's state attributes top container."; + uses penalties-list-element-attributes; + } + } + } + } + + grouping operational-mode-descriptor-interoperable-modes-top { + description + "Each mode-descriptor of a given operational-mode could be compatible + with many interoperable modes which are defined, elsewhere, by standard + bodies, multi-source agreements, vendor forums or any other public forum. + This compatibility characteristic shall be assured by the system-vendor + and imply that the design properties of the implementations of that + specific operational mode are a superset of the all listed supported + standard modes"; + + container interoperable-modes { + description + "Top level container of interoperable modes."; + + list interoperable-mode { + key "mode-name"; + description + "Each interoperable mode is defined by its public name reference + and a set of free form key-value properties which augments with + the required information provided by the system-vendor."; + + leaf mode-name { + type leafref { + path "../state/mode-name"; + } + description + "Reference to mode-name."; + } + + container state { + config false; + description + "Operational-mode interoperbale mode state top container."; + + uses operational-mode-descriptor-interoperable-mode-state; + } + } + } + } + + + grouping operational-mode-descriptor-state{ + description + "Top-level operational-mode-features grouping definitions"; + + leaf mode-id { + type uint16; + description + "Two-octet encoding of the vendor-defined operational + mode"; + } + + leaf modulation-format { + type union { + type string; + type oc-opt-term-prop-types:modulation-format; + } + description + "Optical modulation format associated to the mode. The + modulation format associated to the optical signal."; + } + + leaf bit-rate { + type oc-opt-term-prop-types:bit-rate; + description + "Rounded bit rate of the tributary signal delivered by the + optical channel associated to the specific operational mode. + Exact bit rate will be refined by protocol selection at the + associated tributary logical channel."; + } + + leaf baud-rate { + type decimal64 { + fraction-digits 2; + } + units Bd; + description + "Baud-rate or symbol rate."; + } + + leaf optical-channel-spectrum-width { + type decimal64 { + fraction-digits 2; + } + units GHz; + description + "Spectrum width of the optical channel associated to this + operational mode, calculated as the baud-rate*(1+roll-off)."; + } + } + + grouping operation-mode-filter-and-fec { + description + "Enclosing grouping for Operational Mode filter and FEC attributes."; + + container filter { + description + "This container includes information which characterises the filter at + transceiver transmission for the given operational-mode."; + + container state { + config false; + description + "Filter's state attributes top container."; + uses filter-attributes-top; + } + } + container fec { + description + "The Forward Error Coding (FEC) coding schema used, + including the name, overhead, pre-fec-ber threshold and + gain properties."; + + container state { + config false; + description + "FEC state attributes top container."; + + uses fec-codes-attributes; + } + } + } + + grouping operational-mode-top{ + description + "top-level operational-mode definitions"; + + container operational-mode-descriptors { + config false; + description + "Indicates the transceiver's list of supported operational + modes and its associated transmission features"; + reference + "https://github.com/openconfig/public/blob/master/doc/terminal-device-properties-guide.md"; + + list operational-modes { + key "mode-id"; + description + "List of operational modes supported by the terminal-device. + The operational mode descriptor list provides a platform-defined + summary of the modes' information such as symbol rate, modulation, pulse + shaping, etc."; + + leaf mode-id { + type leafref { + path "../state/mode-id"; + } + description + "Reference to mode-id"; + } + + container state { + description + "Static features or properties which characterize the + operational mode."; + + uses operational-mode-descriptor-state; + } + uses operation-mode-filter-and-fec; + uses operational-mode-descriptor-design-properties-top; + } + } + } + + // Definition of terminal-device transceiver descriptors. + + grouping terminal-device-component-descriptor-state { + description + "State data for terminal device descriptor components."; + + leaf component-descriptor-id { + type string; + description + "Unique identifier assigned by the system vendor for the + component descriptor."; + } + + leaf system-vendor-name { + type string; + description + "System vendor company name"; + } + + leaf system-vendor-part-no { + type string; + description + "System-vendor assigned part number for the component. This should + be present in particular if the component is also an FRU + (field replaceable unit)"; + } + + leaf mfg-name { + type string; + description + "System-supplied identifier for the manufacturer of the + component. This data is particularly useful when a + component manufacturer is different than the overall + device vendor."; + } + + leaf mfg-part-no { + type string; + description + "Transceiver manufacturer assigned part number for the component."; + } + + leaf hardware-version { + type string; + description + "For hardware components, this is the hardware revision of + the component."; + } + + leaf firmware-version { + type string; + description + "For hardware components, this is the version of associated + firmware that is running on the component, if applicable."; + } + + leaf software-version { + type string; + description + "For software components such as operating system or other + software module, this is the version of the currently + running software."; + } + + leaf clei-code { + type string; + description + "Common Language Equipment Identifier (CLEI) code of the + component. This should be present in particular if the + component is also an FRU (field replaceable unit)"; + } + } + grouping transceiver-compatible-mode-state { + description + "Each compatible mode has associated a mode-descriptor which represents + the operational mode design properties associated to the transceiver which + transmits the mode."; + + container state { + description + "State container of transciever compatible modes."; + + leaf mode-id { + type uint16; + must "../../../../../../operational-mode-descriptors/operational-modes[mode-id=current()]/mode-id"; + + description + "Two-octet encoding of the vendor-defined operational mode. + Each value shall reference a valid mode-id included in the + operational-mode-descriptors list."; + } + + leaf mode-descriptor-id { + type leafref { + path "/oc-opt-term-properties:operational-mode-descriptors/operational-modes/mode-descriptors/mode-descriptor/mode-descriptor-id"; + } + description + "Reference to the associated mode-descriptor-id which describes + the specific design properties of the mode once it is being transmitted + by the parent transceiver component."; + } + } + } + + grouping transceiver-compatible-modes { + description + "Transceiver compatible modes definition."; + + container transceiver-compatible-modes { + config false; + description + "Indicates the set of operatational-modes, present in the terminal- + device manifest, which are compatible with the described transceiver + component."; + + list transceiver-compatible-mode { + key "mode-id"; + description + "List of operational modes supported by the target transceiver."; + + leaf mode-id { + type leafref { + path "../state/mode-id"; + } + description + "Reference to a ../state/mode-id."; + } + uses transceiver-compatible-mode-state; + } + } + } + + grouping transceiver-descriptor-top { + description + "top-level transceiver-descriptor definitions"; + + container transceiver-descriptors { + config false; + description + "Indicates the terminal-device's list of compatible transceiver + component and its associated modes and mode descriptors compatibility + matrix."; + + list transceiver-descriptor { + key "component-descriptor-id"; + description + "List of transceiver components supported by the terminal-device. + The operational mode provides a platform-defined summary + of information such as symbol rate, modulation, pulse + shaping, etc."; + + leaf component-descriptor-id { + type leafref { + path "../state/component-descriptor-id"; + } + description + "Reference to component-descriptor-id"; + } + + container state { + description + "Static features or properties which characterize the + component descriptor."; + + uses terminal-device-component-descriptor-state; + } + uses transceiver-compatible-modes; + } + } + } + + // Definition of terminal-device linecard descriptors. + + grouping linecards-constrained-compatible-modes-state { + description + "Grouping for the linecards' contrained compatible modes + state attributes."; + + container state { + description + "State container for linecard constrained compatible modes"; + + leaf mode-id { + type uint16; + must "../../../../../../../../operational-mode-descriptors/operational-modes[mode-id=current()]/mode-id"; + + description + "Absolute reference to an operational-mode-id. Each value shall + reference a valid mode-id included in the operational-mode-descriptors + list."; + } + + leaf mode-descriptor-id { + type leafref { + path "/oc-opt-term-properties:operational-mode-descriptors/operational-modes/mode-descriptors/mode-descriptor/mode-descriptor-id"; + } + description + "Reference to the associated mode-descriptor-id which describes + the specific design properties of the mode once it is being transmitted + by the parent transceiver component."; + } + } + } + + grouping constrained-compatible-modes { + description + "Linecards' compatible transceiver list of compatible modes which are + constrained by the integration made by the system vendor of the given + terminal-device."; + + container constrained-compatible-modes { + config false; + description + "Indicates the set of operatational-modes, present in the terminal- + device manifest, which are compatible with the described transceiver + component within the linecard component."; + + list constrained-compatible-mode { + key "mode-id"; + description + "List of operational modes supported by the target transceiver."; + + leaf mode-id { + type leafref { + path "../state/mode-id"; + } + description + "Reference to linecard-descriptor/constrained-compatible-mode/state/mode-id."; + } + + uses linecards-constrained-compatible-modes-state; + + container optical-channel-config-value-constraints{ + description + "Set of constraints of the configuration attributes + of the optical-channel associated to the selected + operational-mode."; + + container state { + config false; + description + "Operational-mode explicit mode config value constrains state top + container."; + + uses operational-mode-descriptor-explicit-config-constraints-state; + } + } + } + } + } + + grouping linecard-compatible-transceivers { + description + "Linecard-transceiver compatibility matrix definition."; + + container compatible-transceivers { + config false; + description + "Indicates the set of transceiver component which are compatible + with the described linecard component."; + + list compatible-transceiver { + key "transceiver-descriptor-id"; + description + "List of transceiver descriptor ids."; + + leaf transceiver-descriptor-id { + type leafref { + path "../state/transceiver-descriptor-id"; + } + description + "Reference to transceiver-descriptor-id"; + } + container state { + description + "Static features or properties which characterize the + component descriptor."; + + leaf transceiver-descriptor-id { + type string; + description + "String rerference of the system vendor defined transciever + component descriptor id."; + } + } + uses constrained-compatible-modes; + } + } + } + + grouping linecard-descriptor-top { + description + "top-level linecard-descriptor definitions"; + + container linecard-descriptors { + config false; + description + "Indicates the terminal-device's list of compatible linecard + component and its associated modes and mode descriptors compatibility + matrix."; + + list linecard-descriptor { + key "component-descriptor-id"; + description + "List of linecard components supported by the terminal-device. + The operational mode provides a platform-defined summary + of information such as symbol rate, modulation, pulse + shaping, etc."; + + leaf component-descriptor-id { + type leafref { + path "../state/component-descriptor-id"; + } + description + "Reference to component-descriptor-id"; + } + + container state { + description + "Static features or properties which characterize the + component descriptor."; + + uses terminal-device-component-descriptor-state; + } + uses linecard-compatible-transceivers; + } + } + } + + uses transceiver-descriptor-top; + uses linecard-descriptor-top; + uses operational-mode-top; +} diff --git a/release/models/devices-manifest/openconfig-terminal-device-property-types.yang b/release/models/devices-manifest/openconfig-terminal-device-property-types.yang new file mode 100644 index 000000000..b1fd0ef9b --- /dev/null +++ b/release/models/devices-manifest/openconfig-terminal-device-property-types.yang @@ -0,0 +1,484 @@ +module openconfig-terminal-device-property-types { + + // Yang version can be "1" without mandatory fields. + // Yang version 1.1 allows mandatory fiels in an augment + // https://tools.ietf.org/html/rfc7950#section-7.17 + // If the augmentation adds mandatory nodes (see Section 3) that + // represent configuration to a target node in another module, the + // augmentation MUST be made conditional with a "when" statement. + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/openconfig-terminal-device-property-types"; + prefix "oc-opt-term-prop-types"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-transport-types { prefix oc-opt-types; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "Supplementary module to expose identity types for the + openconfig-terminal-device-properties model. This model includes + definitions of the set of modulation format, FEC codes and adjustment + granularity types use in the reffered model."; + + oc-ext:openconfig-version "0.2.0"; + + + // Revisions + revision "2024-05-28" { + description "Comprehensive model update to undertake the limitations + of the first version of the model, such the introduction of modes + dependencies on hardware components and the interoperability information + between terminal devices, linecards, transceviers and modes."; + reference "0.2.0"; + } + + revision "2024-05-15" { + description + "Fix yang namespace URI to openconfig.net."; + reference "0.1.1"; + } + + revision "2022-03-08" { + description "Initial version to provide the initial set of identities + used in the openconfig-terminal-device-properties model."; + reference "0.1.0"; + } + + + // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig-properties"; + + + typedef standard-mode { + type string; + description + "ITU-T G.698.2 standard mode that guarantees interoperability. + It must be an string with the following format: + B-DScW-ytz(v) where all these attributes are conformant + to the ITU-T recomendation"; + reference "ITU-T G.698.2 (11/2018)"; + } + + typedef interoperability-modes-organization { + type identityref { + base INTEROPERABILITY_MODES_ORGANIZATION; + } + description + "Optical modulation format associated to the mode"; + } + + typedef bit-rate { + type identityref { + base oc-opt-types:TRIBUTARY_RATE_CLASS_TYPE; + } + description + "Rounded bit rate of the tributary signal delivered by the + optical channel associated to the specifc operational mode. + Exact bit rate will be refined by protocol selection at the + associated tributary logical channel."; + } + + typedef pulse-shaping-type { + type identityref { + base SHAPING_TYPE; + } + description + "Pulse/spectral shaping type associated to the mode."; + } + + typedef modulation-format { + type identityref { + base MODULATION_FORMAT; + } + description + "Optical modulation format associated to the mode"; + } + + typedef fec-coding { + type identityref { + base FEC; + } + description + "FEC Type identityref, e.g., FEC_G"; + } + + typedef grid-type { + type identityref { + base GRID_TYPE; + } + description + "Type for frequency ITU-T grid specification attributes."; + } + + typedef adjustment-granularity { + type identityref { + base ADJUSTMENT_GRANULARITY; + } + description + "Type definition for the possible adjustment granularity attributes. + As per ITU-T G.694.1 (10/2020), it is used to calculate nominal + central frequency."; + } + + typedef impairment-type { + type identityref { + base IMPAIRMENT_TYPE; + } + description + "Definition of impairment type and unit used in penaty list"; + } + + identity INTEROPERABILITY_MODES_ORGANIZATION { + description + "Base identity for interoperability modes' defining organizations."; + } + + identity SHAPING_TYPE { + description + "Base identity for pulse-shaping-type, to help characterize the + filter type included in the transceiver which support the mode."; + } + + identity RC { + base SHAPING_TYPE; + description + "Raised-cosine filter shape."; + } + + identity RRC { + base SHAPING_TYPE; + description + "Root-raised-cosine filter shape."; + } + + identity OFF { + base SHAPING_TYPE; + description + "No filter."; + } + + identity IMPAIRMENT_TYPE { + description + "Base identity for impairment type and units, used in penaty list."; + } + + identity CD_PS_NM { + base IMPAIRMENT_TYPE; + description + "Chromatic Dispersion (CD) in picoseconds per nanometer units."; + } + + identity PMD_PS { + base IMPAIRMENT_TYPE; + description + "Polarization Mode Dispersion (PMD) in picoseconds units."; + } + + identity PDL_DB { + base IMPAIRMENT_TYPE; + description + "Polarization Dependent Loss (PDL) in decibels (dB) units."; + } + + identity GRID_TYPE { + description + "Base identity for Grid Type definitions according to ITU-T + ITU-T G.694.1 (10/2020) standard which defines the possible + configurable values of the optical channel component's + central frequency attribute."; + } + + identity DWDM { + base GRID_TYPE; + description + "Fixed frequency grid in C & L bands as specified + in ITU-T G.694.1 (10/2020)"; + } + + identity CWDM { + base GRID_TYPE; + description + "Fixed frequency grid as specified in ITU-T G.694.1 (10/2020)."; + } + + identity FLEX { + base GRID_TYPE; + description + "Flexible frequency grid as specified in ITU-T G.694.1 (10/2020)."; + } + + identity GRIDLESS { + base GRID_TYPE; + description + "No grid"; + } + + identity UNSPECIFIED { + base GRID_TYPE; + description + "Unspecified/proprietary frequency grid"; + } + + identity ADJUSTMENT_GRANULARITY { + description + "Base identity for the adjustment granularity or nominal central + frequency granularity, according to ITU-T G.694.1 (10/2020) standard, + defined as the minimun spectrum separation between the central + frequencies of two contiguous optical channels"; + } + + identity G_100GHZ { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value of 100 gigahertz."; + } + + identity G_50GHZ { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value of 50 gigahertz."; + } + + identity G_25GHZ { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value of 25 gigahertz."; + } + + identity G_12_5GHZ { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value of 12.5 gigahertz."; + } + + identity G_6_25GHZ { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value of 6.25 gigahertz."; + } + + identity G_3_125GHZ { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value of 3.125 gigahertz."; + } + + identity UNCONSTRAINED { + base ADJUSTMENT_GRANULARITY; + description + "Adjustment granularity value unconstrained, i.e., + no minimun spacing between channels is defined."; + } + + identity FEC { + description + "Forward Error Correction base identity."; + } + + identity FEC_HD { + base FEC; + description + "Hard-Decision (HD) Staircase FEC, defined in + ITU-T G.709.2 (07/18)"; + } + + identity FEC_G { + base FEC; + description + "Generic FEC, Reed Solomon (255,239) coding schema, + defined in ITU-T G.975 (10/2000)."; + } + + identity FEC_E { + base FEC; + description + "Enhanced FEC (EFEC) from G.975.1 Clause I.4."; + } + identity FEC_O { + base FEC; + description + "OpenROADM 200G Open FEC (oFEC) soft-decision coding + schema."; + } + + identity FEC_C { + base FEC; + description + "OIF 400G concatenated FEC (cFEC) with soft-decision inner + Hamming code and hard-decision outer Staircase code"; + } + + identity FEC_OTHER { + base FEC; + description + "Placeholder identity to refer to any other propiertary or + non-propiertary FEC coding schema non-defined in this model + yet."; + } + + identity MODULATION_FORMAT { + description + "Base identity for identiying the optical modulation + format associated to the operational mode."; + } + + identity MODULATION_FORMAT_BPSK { + base MODULATION_FORMAT; + description + "Binary phase-shift keying (BPSK) modulation format + identity"; + } + + identity MODULATION_FORMAT_DPSK { + base MODULATION_FORMAT; + description + "Differential phase-shift keying (DPSK) modulation format + identity"; + } + + identity MODULATION_FORMAT_QPSK { + base MODULATION_FORMAT; + description + "Quadrature phase-shift keying (QPSK) modulation format + identity"; + } + + identity MODULATION_FORMAT_DP_QPSK { + base MODULATION_FORMAT; + description + "Dual-Polarization Quadrature Phase-Shift Keying (QPSK) + modulation format identity"; + } + + identity MODULATION_FORMAT_8QAM { + base MODULATION_FORMAT; + description + "8-Quadrature Amplitude Modulation (QAM) identity"; + } + + identity MODULATION_FORMAT_DP_8QAM { + base MODULATION_FORMAT; + description + "Dual-Polarization 8-Quadrature Amplitude Modulation (QAM) + identity"; + } + + identity MODULATION_FORMAT_DC_DP_8QAM { + base MODULATION_FORMAT; + description + "Dual-Carrier Dual-Polarization 8-Quadrature Amplitude + Modulation identity"; + } + + identity MODULATION_FORMAT_16QAM { + base MODULATION_FORMAT; + description + "16-Quadrature Amplitude Modulation (QAM) identity"; + } + + identity MODULATION_FORMAT_DP_16QAM { + base MODULATION_FORMAT; + description + "Dual-Polarization 16-Quadrature Amplitude Modulation (QAM) + identity"; + } + + identity MODULATION_FORMAT_DC_DP_16QAM { + base MODULATION_FORMAT; + description + "Dual-Carrier Dual-Polarization 16-Quadrature Amplitude Modulation + (QAM) identity"; + } + + identity MODULATION_FORMAT_32QAM { + base MODULATION_FORMAT; + description + "32-Quadrature Amplitude Modulation (QAM) identity"; + } + + identity MODULATION_FORMAT_DP_32QAM { + base MODULATION_FORMAT; + description + "Dual-Polarization 32-Quadrature Amplitude Modulation (QAM) + identity"; + } + + identity MODULATION_FORMAT_DC_DP_32QAM { + base MODULATION_FORMAT; + description + "Dual-Carrier Dual-Polarization 32-Quadrature Amplitude Modulation + (QAM) identity"; + } + + identity MODULATION_FORMAT_64QAM { + base MODULATION_FORMAT; + description + "64-Quadrature Amplitude Modulation (QAM) identity"; + } + + identity MODULATION_FORMAT_DP_64QAM { + base MODULATION_FORMAT; + description + "Dual-Polarization 64-Quadrature Amplitude Modulation (QAM) + identity"; + } + + identity MODULATION_FORMAT_DC_DP_64QAM { + base MODULATION_FORMAT; + description + "Dual-Carrier Dual-Polarization 64-Quadrature Amplitude Modulation + (QAM) identity"; + } + + identity MODULATION_FORMAT_PAM4 { + base MODULATION_FORMAT; + description + "4-level Pulse Amplitud Modulation (PAM)"; + } + + identity MODULATION_FORMAT_PAM8 { + base MODULATION_FORMAT; + description + "8-level Pulse Amplitud Modulation (PAM)"; + } + + identity MODULATION_FORMAT_PROPRIETARY { + base MODULATION_FORMAT; + description + "Proprietary modulation format."; + } + + identity TRANSCEIVER_MODE_TYPE{ + description + "Base identity for identiying the transceiver's mode category: + Standard or Explicit. This differentiates on the way operational + mode's features are expose by the transceiver device."; + } + + identity TRANSCEIVER_MODE_TYPE_STANDARD{ + base TRANSCEIVER_MODE_TYPE; + description + "Operational model type Standard, according to ITU-T G.698.2, + indicates the mode is interoperable with other transceiver-modules + supporting the same Standard mode."; + } + + identity TRANSCEIVER_MODE_TYPE_EXPLICIT{ + base TRANSCEIVER_MODE_TYPE; + description + "Operational model type Explicit, indicating the description of the + operational mode features follows the model subtree explicit + features description."; + } +} diff --git a/release/models/ethernet-segments/.spec.yml b/release/models/ethernet-segments/.spec.yml new file mode 100644 index 000000000..f41f4ff79 --- /dev/null +++ b/release/models/ethernet-segments/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-ethernet-segments + docs: + - yang/ethernet-segments/openconfig-ethernet-segments.yang + build: + - yang/ethernet-segments/openconfig-ethernet-segments.yang + run-ci: true diff --git a/release/models/ethernet-segments/openconfig-ethernet-segments.yang b/release/models/ethernet-segments/openconfig-ethernet-segments.yang new file mode 100644 index 000000000..b09357564 --- /dev/null +++ b/release/models/ethernet-segments/openconfig-ethernet-segments.yang @@ -0,0 +1,250 @@ +module openconfig-ethernet-segments { + + // namespace + namespace "http://openconfig.net/yang/ethernet-segments"; + + prefix "oc-es"; + + + import openconfig-extensions { prefix oc-ext; } + import openconfig-interfaces { prefix oc-if; } + import openconfig-evpn-types { prefix oc-evpn-types; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains definitions of ethernet segements. + The ethernet segments are used in EVPN services are + defined for the whole device"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2021-06-28" { + description + "First Version"; + reference "0.1.0"; + } + + +grouping evpn-ethernet-segment-df-config { + description + "Configuration parameters for the Designated forwarding + Election"; + + leaf df-election-method { + type enumeration { + enum DEFAULT { + value 0; + description + "The default Designated Forwarder Election election method"; + } + enum HIGHEST_RANDOM_WEIGHT { + value 1; + description + "The highest random weight (HRW) method"; + reference + "RFC8584: Framework for Ethernet VPN Designated Forwarder + Election Extensibility"; + } + enum PREFERENCE { + value 2; + description + "The preference based method"; + reference + "RFC8584: Framework for Ethernet VPN Designated Forwarder + Election Extensibility"; + } + } + description + "Select the Designated Forwarder Election (DF) election method"; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN. + RFC 8584:Framework for Ethernet VPN Designated Forwarder + Election Extensibility"; + } + + leaf preference { + when "../df-election-method = 'PREFERENCE'" { + description + "The preference value is only applicable + to the preference based method"; + } + type uint16; + description + "Defines a 2-octet value that indicates the PE + preference to become the DF in the Ethernet-Segment."; + reference + "RFC8584: Framework for Ethernet VPN Designated Forwarder + Election Extensibility"; + } + + leaf revertive { + when "../df-election-method = 'PREFERENCE'" { + description + "The revertive value is only applicable + to the preference method"; + } + type boolean; + default true; + description + "The 'preempt' or 'revertive' behavior. This option will allow a + non-revertive behavior in the DF election."; + reference + "RFC8584: Framework for Ethernet VPN Designated Forwarder + Election Extensibility"; + } + + leaf election-wait-time { + when "../df-election-method = 'PREFERENCE'" { + description + "The Designated Forwarder Election wait-time is only applicable + to the preference method"; + } + type uint32; + description + "Designated Forwarder Election wait-time. When the DF timer expires, + the PE device selects the DF based on the highest preference value"; + reference + "RFC8584: Framework for Ethernet VPN Designated Forwarder + Election Extensibility"; + } + } + + grouping evpn-ethernet-segment-df-top { + description + "Top grouping for the configuration and state parameters + for the Designated forwarding Election"; + + container df-election { + description + "Top container for the configuration and state parameters + for the Designated forwarding Election"; + + container config { + description + "Configuration parameters for the Designated forwarding Election"; + + uses evpn-ethernet-segment-df-config; + } + + container state { + description + "Configuration parameters for the Designated forwarding Election"; + config false; + + uses evpn-ethernet-segment-df-config; + } + } + } + + grouping evpn-ethernet-segment-config { + description + "Configuration attributes for the Ethernet + Segment."; + + leaf name { + type string; + description + "Ethernet Segment name"; + } + + leaf esi-type { + type oc-evpn-types:esi-type; + default "TYPE_0_OPERATOR_CONFIGURED"; + description + "ESI Type is a 1-octet field (most significant octet) that + specifies the format of the remaining 9 octets (ESI Value)."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN page-16"; + } + + leaf esi { + type union { + type oc-evpn-types:esi; + type enumeration { + enum AUTO { + description + "This ESI type indicates an auto-generated ESI value."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN"; + } + } + } + description + "Ethernet Segment Identifier (ESI) value. + For ESI Type 0: The esi leaf value is directly configured by the operator. + For ESI Type 1: The AUTO enum must be used. + For ESI Type 2: The AUTO enum must be used. + For ESI Type 3: The directly configured or AUTO enum must be used. + For ESI Type 4: The directly configured or AUTO enum must be used. + For ESI Type 5: The directly configured or AUTO enum must be used."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN."; + } + + leaf redundancy-mode { + type identityref { + base oc-evpn-types:EVPN_REDUNDANCY_MODE; + } + description + "Multihoming options for load balancing of + traffic in the Ethernet Segment."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN"; + } + + uses oc-if:interface-ref-common; + } + + grouping evpn-ethernet-segment-top { + description + "Top-level grouping for ethernet segments. An Ethernet Segment + is referenced by a name and an ESI"; + + container ethernet-segments { + description + "Top-level container for ethernet segments. An Ethernet Segment + is referenced by a name and an ESI"; + + list ethernet-segment { + key "name"; + description + "List of Ethernet Segments."; + + leaf name { + type leafref { + path '../config/name'; + } + description + "Ethernet Segment Name "; + } + + container config { + description + "Configuration data for the Ethernet Segments."; + + uses evpn-ethernet-segment-config; + } + + container state { + config false; + description + "Operational state data for the Ethernet Segments."; + + uses evpn-ethernet-segment-config; + } + + uses evpn-ethernet-segment-df-top; + } + } + } + + uses evpn-ethernet-segment-top; + +} \ No newline at end of file diff --git a/release/models/firewall/.spec.yml b/release/models/firewall/.spec.yml index 8218d44e1..4ec8c3c7b 100644 --- a/release/models/firewall/.spec.yml +++ b/release/models/firewall/.spec.yml @@ -1,7 +1,12 @@ -- name: openconfig-firewall +- name: openconfig-fw-high-availability docs: - yang/firewall/openconfig-fw-high-availability.yang - - yang/firewall/openconfig-fw-link-monitoring.yang build: - yang/firewall/openconfig-fw-high-availability.yang run-ci: true +- name: openconfig-fw-link-monitoring + docs: + - yang/firewall/openconfig-fw-link-monitoring.yang + build: + - yang/firewall/openconfig-fw-link-monitoring.yang + run-ci: true diff --git a/release/models/flex-algo/.spec.yml b/release/models/flex-algo/.spec.yml new file mode 100644 index 000000000..8b2e4b3ec --- /dev/null +++ b/release/models/flex-algo/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-flexalgo + docs: + - yang/flex-algo/openconfig-flexalgo.yang + build: + - yang/flex-algo/openconfig-flexalgo.yang + run-ci: true diff --git a/release/models/flex-algo/openconfig-flexalgo.yang b/release/models/flex-algo/openconfig-flexalgo.yang new file mode 100644 index 000000000..2fd904b86 --- /dev/null +++ b/release/models/flex-algo/openconfig-flexalgo.yang @@ -0,0 +1,407 @@ +module openconfig-flexalgo { + yang-version 1.1; + namespace "http://openconfig.net/yang/flexalgo"; + prefix "oc-flexalgo"; + + import openconfig-network-instance { + prefix "oc-ni"; + } + import openconfig-extensions { + prefix oc-ext; + } + import openconfig-interfaces { + prefix oc-if; + } + oc-ext:openconfig-version "0.1.0"; + + organization + "OpenConfig working group"; + contact + "OpenConfig working group + www.openconfig.net "; + description + "This YANG module defines the configurational and operational + parameters related to IGP Flex-Algorithms"; + + revision 2023-05-24 { + description + "Initial revision of flexalgo module"; + reference + "0.1.0"; + } + + /* Types definitions */ + + typedef flex-algo-metric-type { + type enumeration { + enum IGP { + value 0; + description + "IGP metric to be used during the calculation."; + } + enum MIN_DELAY { + value 1; + description + "Min Unidirectional Link Delay as defined in [RFC7810] to + be used during the calculation."; + } + enum TE_METRIC { + value 2; + description + "TE default metric as defined in [RFC5305] to be used + during the calculation."; + } + } + description + "Type of metric to be used during a Flex Algo path + computation"; + } + + typedef flex-algo-id { + type uint8 { + range "128..255"; + } + description + "Flex-Algorithm identifies which algorithm should be used during + path computation"; + } + + typedef flex-algo-calc-type { + type uint8 { + range "0..127"; + } + default "0"; + description + "Calculation type value ranges from 0 to 127 both inclusive + from the IGP Algorithm Types registry defined under + Interior Gateway Protocol (IGP) + Parameters IANA registries. + If the required calculation type is Shortest Path First, + the value 0 SHOULD appear in this field."; + } + + grouping algorithm-attributes { + description + "All of the possible attributes for an flexible algorithm + definition"; + leaf flex-algo-id { + type flex-algo-id; + mandatory true; + description + "Flex Algorithm Identifier"; + } + leaf flex-algo-name { + type string; + description + "Flexible Algorithm name"; + } + leaf flex-algo-description { + type string; + description + "Description of this flex-algo"; + } + leaf metric-type { + type flex-algo-metric-type; + default "IGP"; + description + "Indicates which is the corresponding metric type for + this algorithm"; + } + leaf calc-type { + type flex-algo-calc-type; + description + "Indicates the calculation type, if advertised"; + } + leaf priority { + type uint8; + default "237"; + description + "Indicates the priority for this algorithm"; + } + + leaf-list exclude { + type leafref { + path "../../../../flex-algo-global-attributes/flex-algo-admin-groups/" + + "admin-group/admin-group-name"; + } + description + "extended-admin-groups to exclude in path calculation."; + } + leaf-list include-all { + type leafref { + path "../../../../flex-algo-global-attributes/flex-algo-admin-groups/" + + "admin-group/admin-group-name"; + } + description + "extended-admin-groups, all of which must be included"; + } + leaf-list include-any { + type leafref { + path "../../../../flex-algo-global-attributes/flex-algo-admin-groups/" + + "admin-group/admin-group-name"; + } + description + "extended-admin-groups, one of which must be included"; + } + leaf-list srlg-exclude { + type leafref { + path "../../../../flex-algo-global-attributes/srlgs/srlg/name"; + } + description + "list of references to named SRLGs to be excluded"; + } + leaf algo-flags { + type boolean; + description + "Advertise flex-algo definition flags"; + } + } + + grouping flex-algo-definition-top { + description + "Top level grouping for flexible Algorithms and their definitions"; + list algorithm { + key "flex-algo-id"; + description + "List of Flexible Algorithms"; + leaf flex-algo-id { + type leafref { + path "../config/flex-algo-id"; + } + description + "Name for a Flexible Algorithm"; + } + container config { + description + "Attributes for a Flexible Algorithm"; + uses algorithm-attributes; + } + container state { + config false; + description + "Attributes for a Flexible Algorithm"; + uses algorithm-attributes; + } + } + } + + grouping flex-algo-interface-attributes-config { + description + "global level definitions for interfaces + on which TE is run"; + + leaf interface-id { + type oc-if:interface-id; + description + "Id of the interface"; + } + + leaf te-metric { + type uint32; + description + "TE specific metric for the link"; + } + + leaf min-delay { + type uint32; + description + "Min delay for the link"; + } + + leaf-list srlg-membership { + type leafref { + path "../../../../flex-algo-global-attributes/srlgs/srlg/name"; + } + description + "list of references to named shared risk link groups that the + interface belongs to."; + } + + leaf-list admin-group { + type leafref { + path "../../../../flex-algo-global-attributes/flex-algo-admin-groups/" + + "admin-group/admin-group-name"; + } + description + "list of admin groups (by name) on the interface"; + } + } + + grouping flex-algo-interface-attributes-top { + description "Top level grouping for flex Algorithm attributes for interfaces"; + + list interface { + key "interface-id"; + description + "List of flex-algo interfaces"; + + leaf interface-id { + type leafref { + path "../config/interface-id"; + } + description + "Reference to the interface id list key"; + } + + container config { + description + "Configuration parameters related to flex-algo interfaces:"; + uses flex-algo-interface-attributes-config; + } + + container state { + config false; + description + "State parameters related to flex-algo interfaces"; + uses flex-algo-interface-attributes-config; + } + } + } + + grouping flex-algo-srlg-config { + description + "Configuration of various attributes associated with the SRLG"; + + leaf name { + type string; + description + "SRLG group identifier"; + } + + leaf value { + type uint32; + description + "group ID for the SRLG"; + } + } + + grouping flex-algo-srlg-top { + description + "Top level grouping for flex algo shared risk link groups."; + + container srlgs { + description + "Shared risk link groups attributes"; + list srlg { + key "name"; + description + "List of shared risk link groups"; + + leaf name { + type leafref { + path "../config/name"; + } + description + "The SRLG group identifier"; + } + + container config { + description + "Configuration parameters related to the SRLG"; + uses flex-algo-srlg-config; + } + + container state { + config false; + description + "State parameters related to the SRLG"; + uses flex-algo-srlg-config; + } + } + } + } + + grouping flex-algo-admin-group-config { + description + "configuration data for MPLS link admin groups"; + + leaf admin-group-name { + type string; + description + "name for mpls admin-group"; + } + + leaf bit-position { + type uint32; + description + "bit-position value for mpls admin-group. The value + for the admin group is an integer that represents one + of the bit positions in the admin-group bitmask. Values + between 0 and 31 are interpreted as the original limit + of 32 admin groups. Values >=32 are interpreted as + extended admin group values as per RFC7308."; + } + } + + grouping flex-algo-admin-groups-top { + description + "top-level mpls admin-groups config + and state containers"; + + container flex-algo-admin-groups { + description + "Top-level container for admin-groups configuration + and state"; + + list admin-group { + key "admin-group-name"; + description + "configuration of value to name mapping + for mpls affinities/admin-groups"; + + leaf admin-group-name { + type leafref { + path "../config/admin-group-name"; + } + description + "name for mpls admin-group"; + } + container config { + description + "Configurable items for admin-groups"; + uses flex-algo-admin-group-config; + } + + container state { + config false; + description + "Operational state for admin-groups"; + uses flex-algo-admin-group-config; + } + } + } + } + + grouping flex-algo-top { + description + "Top level grouping for Flexible Algorithm Definitions"; + + container flex-algorithm { + description "Flex Algorithms definitions and the attributes"; + + container flex-algorithm-definition { + description "Flexible Algorithms and their definitions"; + uses flex-algo-definition-top; + } + + container flex-algo-global-attributes { + description "Flexible Algorithm global attributes"; + uses flex-algo-srlg-top; + uses flex-algo-admin-groups-top; + } + + container flex-algo-interface-attributes { + description "Flexible Algorithm attributes for interfaces"; + uses flex-algo-interface-attributes-top; + } + } + } + + augment "/oc-ni:network-instances/oc-ni:network-instance" { + description + "List of Flexible Algorithms and their definitions"; + + uses flex-algo-top; + } +} + diff --git a/release/models/gnpsi/.spec.yml b/release/models/gnpsi/.spec.yml new file mode 100644 index 000000000..a38191a7f --- /dev/null +++ b/release/models/gnpsi/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-gnpsi + docs: + - yang/gnpsi/openconfig-gnpsi-types.yang + build: + - yang/gnpsi/openconfig-gnpsi-types.yang + run-ci: false diff --git a/release/models/gnpsi/openconfig-gnpsi-types.yang b/release/models/gnpsi/openconfig-gnpsi-types.yang new file mode 100644 index 000000000..ef241b635 --- /dev/null +++ b/release/models/gnpsi/openconfig-gnpsi-types.yang @@ -0,0 +1,38 @@ +module openconfig-gnpsi-types { + yang-version "1"; + namespace "http://openconfig.net/yang/gnpsi/types"; + prefix "oc-gnpsit"; + + import openconfig-extensions { + prefix oc-ext; + } + + import openconfig-grpc-types { + prefix oc-grpct; + } + + organization + "OpenConfig working group"; + contact + "www.openconfig.net"; + + description + "This module adds gRPC server type relating to gNPSI running on + a network device."; + + oc-ext:openconfig-version "0.1.0"; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + revision 2024-05-29 { + description + "Initial revision."; + reference "0.1.0"; + } + + identity GNPSI { + base oc-grpct:GRPC_SERVICE; + description + "gNMI: gRPC Network Management Interface"; + } +} diff --git a/release/models/gnsi/.spec.yml b/release/models/gnsi/.spec.yml new file mode 100644 index 000000000..d8c79b235 --- /dev/null +++ b/release/models/gnsi/.spec.yml @@ -0,0 +1,10 @@ +- name: openconfig-system-gnsi + build: + - yang/system/openconfig-system.yang + - yang/gnsi/openconfig-gnsi.yang + - yang/gnsi/openconfig-gnsi-acctz.yang + - yang/gnsi/openconfig-gnsi-authz.yang + - yang/gnsi/openconfig-gnsi-certz.yang + - yang/gnsi/openconfig-gnsi-credentialz.yang + - yang/gnsi/openconfig-gnsi-pathz.yang + run-ci: true diff --git a/release/models/gnsi/openconfig-gnsi-acctz.yang b/release/models/gnsi/openconfig-gnsi-acctz.yang new file mode 100644 index 000000000..d95ccccfb --- /dev/null +++ b/release/models/gnsi/openconfig-gnsi-acctz.yang @@ -0,0 +1,245 @@ +module openconfig-gnsi-acctz { + yang-version 1; + namespace "https://github.com/openconfig/yang/gnsi/acctz"; + prefix oc-gnsi-acctz; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { + prefix oc-sys; + } + import openconfig-system-grpc { + prefix oc-sys-grpc; + } + import openconfig-types { + prefix oc-types; + } + import openconfig-yang-types { + prefix oc-yang; + } + import openconfig-gnsi { + prefix oc-gnsi; + } + organization + "OpenConfig Working Group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module provides counters of gNSI accountZ requests and responses and + the quantity of data transferred."; + + oc-ext:openconfig-version "0.2.0"; + + revision 2024-02-13 { + description + "Major style updates and move to openconfig/public from openconfig/gnsi. + Last commit at + https://github.com/openconfig/gnsi/commit/347935aac66135d5649dadb9583ed0914578aab0"; + reference "0.2.0"; + } + + revision 2023-12-01 { + description + "Initial revision."; + reference "0.1.0"; + } + + typedef cmd-service { + description "enum CommandService.CmdServiceType"; + type enumeration { + enum UNSPECIFIED { + value 0; + } + enum SHELL { + value 1; + } + enum CLI { + value 2; + } + enum WEBUI { + value 3; + } + enum RESTCONF { + value 4; + } + enum NETCONF { + value 5; + } + } + } + typedef grpc-service { + description "enum GrpcService.GrpcServiceType"; + type enumeration { + enum UNSPECIFIED { + value 0; + } + enum GNMI { + value 1; + } + enum GNOI { + value 2; + } + enum GNSI { + value 3; + } + enum GRIBI { + value 4; + } + enum P4RT { + value 5; + } + } + } + typedef service-request { + description "enum RecordResponse.service_request"; + type enumeration { + enum CMD_SERVICE { + value 4; + } + enum GRPC_SERVICE { + value 5; + } + } + } + typedef service-type { + description "enum cmd or grpc service type"; + type union { + type cmd-service; + type grpc-service; + } + } + + // gnsi.acctz client statistics + grouping client-counters { + description + "A collection of counters that were collected by the gNSI.acctz + module while servicing acctz clients."; + + container client-counters { + description + "A collection of counters that were collected by the gNSI.acctz + module while servicing acctz clients."; + leaf history-istruncated { + type oc-yang:counter64; + description + "The total number of times that a RecordRequest resulted in + a RecordResponse being marked history-istruncated. ie: a + request was made for a timestamp that did not exist in the + history."; + } + leaf idle-timeouts { + type oc-yang:counter64; + description + "The total number of times that a client was disconnected + due to missing keepalives (ie: RecordRequests)."; + } + leaf record-requests { + type oc-yang:counter64; + description + "The total number of RecordRequest RPCs that have been received."; + } + leaf record-responses { + type oc-yang:counter64; + description + "The total number of RecordResponse RPCs that have been sent."; + } + } + } + + // gnsi.acctz producer statistics + grouping source-counters { + description + "A collection of counters for gNSI.acctz record production per + service request type."; + + container source-counters { + description + "A collection of counters for gNSI.acctz record production per + service request type."; + list source-records { + key "service type"; + // unique "service type"; + description + "The total number of times the gNSI.authz module denied access + to a RPC."; + + leaf service { + type leafref { + path "../state/service"; + } + description + "service request type for the gNSI.acctz record."; + } + leaf type { + type leafref { + path "../state/type"; + } + description + "service request application enum for the gNSI.acctz record."; + } + + container state { + description + "Operational state for gNSI.acctz counters of record production per + service request type."; + leaf service { + type service-request; + description + "service request type for the gNSI.acctz record."; + } + leaf type { + type service-type; + description + "service request application enum for the gNSI.acctz record."; + } + leaf records { + type oc-yang:counter64; + description + "The total number of records produced for the service-request + type."; + } + } + } + } + } + + grouping grpc-server-acctz-counters { + description + "A collection of counters from the gNSI.acctz module."; + + container acctz-counters { + config false; + description + "A collection of counters from the gNSI.acctz module + for acctz clients and sources."; + + container state { + description + "Operational state relating to acctz-counters."; + + leaf counters-last-cleared { + type oc-types:timeticks64; + description + "The last time that the counters were cleared (reset to + zero). This value is reported as nanoseconds since epoch + (January 1st, 1970 00:00:00 GMT)."; + } + + uses client-counters; + } + + uses source-counters; + } + } + + // Augments section. + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" { + when "config[contains(services, 'oc-gnsi:GNSI')]/enable = 'true'"; + description + "Counters collected by the gNSI.acctz module."; + + uses grpc-server-acctz-counters; + } +} diff --git a/release/models/gnsi/openconfig-gnsi-authz.yang b/release/models/gnsi/openconfig-gnsi-authz.yang new file mode 100644 index 000000000..870fcac2b --- /dev/null +++ b/release/models/gnsi/openconfig-gnsi-authz.yang @@ -0,0 +1,212 @@ +module openconfig-gnsi-authz { + yang-version 1; + namespace "https://github.com/openconfig/yang/gnsi/authz"; + prefix oc-gnsi-authz; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { + prefix oc-sys; + } + import openconfig-system-grpc { + prefix oc-sys-grpc; + } + import openconfig-types { + prefix oc-types; + } + import openconfig-yang-types { + prefix oc-yang; + } + import openconfig-gnsi { + prefix oc-gnsi; + } + organization + "OpenConfig Working Group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module provides a data model for the metadata of the gRPC + authorization policies installed on a networking device."; + + oc-ext:openconfig-version "0.4.0"; + + revision 2024-02-13 { + description + "Major style updates and move to openconfig/public from openconfig/gnsi. + Last commit at + https://github.com/openconfig/gnsi/commit/347935aac66135d5649dadb9583ed0914578aab0"; + reference "0.4.0"; + } + + revision 2022-10-30 { + description + "Adds success/failure counters."; + reference "0.3.0"; + } + + revision 2022-08-01 { + description + "Single authz policy."; + reference "0.2.0"; + } + + revision 2022-01-17 { + description + "Initial revision."; + reference "0.1.0"; + } + + typedef version { + type string; + description + "The version ID of the gRPC authorization policy as provided by + the gRPC Authorization Policy Manager when the policy was pushed. + This leaf persists through a reboot."; + } + + typedef created-on { + type oc-types:timeticks64; + description + "The creation time of the gRPC authorization policy as reported by + the gRPC Authorization Policy manager when the policy was pushed + to the device. This value is reported as nanoseconds since epoch + (January 1st, 1970 00:00:00 GMT). This leaf persists through + a reboot."; + } + + // gRPC server authorization policy related definitions. + grouping counters { + description + "A collection of counters that were collected by the gNSI.authz + module while evaluating access to a RPC."; + + leaf access-rejects { + type oc-yang:counter64; + description + "The total number of times the gNSI.authz module denied access + to a RPC."; + } + leaf last-access-reject { + type oc-types:timeticks64; + description + "A timestamp of the last time the gNSI.authz denied access to + a RPC."; + } + leaf access-accepts { + type oc-yang:counter64; + description + "The total number of times the gNSI.authz module allowed access + to a RPC."; + } + leaf last-access-accept { + type oc-types:timeticks64; + description + "A timestamp of the last time the gNSI.authz allowed access to + a RPC."; + } + } + + grouping grpc-server-user-authz-policy-success-failure-counters { + description + "A collection of counters collected by the gNSI.authz module."; + + container rpcs { + description + "A collection of counters collected by the gNSI.authz module + for each RPC separately."; + + list rpc { + description + "A collection of counters collected by the gNSI.authz module + for a RPC identified by the `name`."; + + key "name"; + leaf name { + type leafref { + path "../state/name"; + } + description + "The name of the RPC the counters were collected for. + + The name MUST match the HTTP/2 Path header value in + https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests + + For example, + /gnmi.gNMI/Subscribe + /gnoi.healthz.Healthz/Get + "; + } + container state { + description + "operational state for authz policy success/failure counters."; + leaf name { + type string; + description + "The name of the RPC the counters were collected for. + + The name MUST match the HTTP/2 Path header value in + https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests + + For example, + /gnmi.gNMI/Subscribe + /gnoi.healthz.Healthz/Get + "; + } + uses counters; + } + } + } + } + + grouping grpc-server-authz-policy-success-failure-counters { + description + "A collection of counters collected by the gNSI.authz module."; + + container authz-policy-counters { + description + "A collection of counters collected by the gNSI.authz module."; + config false; + + uses grpc-server-user-authz-policy-success-failure-counters; + } + } + + grouping grpc-server-authz-policy-state { + description + "gNMI server's gRPC authorization policy freshness-related data."; + + leaf grpc-authz-policy-version { + type version; + description + "The version of the gRPC authorization policy that is used by + this system."; + } + leaf grpc-authz-policy-created-on { + type created-on; + description + "The timestamp of the moment when the gRPC authorization policy + that is currently used by this system was created."; + } + } + + // Augments section. + + augment "/oc-sys:system/oc-sys:aaa/oc-sys:authorization/" + + "oc-sys:state" { + description + "A system's gRPC authorization policy freshness information."; + + uses grpc-server-authz-policy-state; + } + + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" { + when "config[contains(services, 'oc-gnsi:GNSI')]/enable = 'true'"; + description + "Counters collected while evaluating access to a gRPC server using + the gNSI.authz authorization policy."; + + uses grpc-server-authz-policy-success-failure-counters; + } +} diff --git a/release/models/gnsi/openconfig-gnsi-certz.yang b/release/models/gnsi/openconfig-gnsi-certz.yang new file mode 100644 index 000000000..0b303cdc0 --- /dev/null +++ b/release/models/gnsi/openconfig-gnsi-certz.yang @@ -0,0 +1,215 @@ +module openconfig-gnsi-certz { + yang-version 1; + namespace "https://github.com/openconfig/yang/gnsi/certz"; + prefix oc-gnsi-certz; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { + prefix oc-sys; + } + import openconfig-system-grpc { + prefix oc-sys-grpc; + } + import openconfig-types { + prefix oc-types; + } + import openconfig-yang-types { + prefix oc-yang; + } + import openconfig-gnsi { + prefix oc-gnsi; + } + organization + "OpenConfig Working Group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module provides a data model for the metadata of gRPC credentials + installed on a networking device."; + + oc-ext:openconfig-version "0.6.0"; + + revision 2024-03-05 { + description + "rename access/reject counters"; + reference "0.6.0"; + } + + revision 2024-02-13 { + description + "Major style updates and move to openconfig/public from openconfig/gnsi. + Last commit at + https://github.com/openconfig/gnsi/commit/347935aac66135d5649dadb9583ed0914578aab0"; + reference "0.5.0"; + } + + revision 2023-08-24 { + description + "Adds ssl-profile-id leaf"; + reference "0.4.0"; + } + + revision 2023-05-10 { + description + "Adds authentication policy freshness information."; + reference "0.3.0"; + } + + revision 2022-10-30 { + description + "Adds success/failure counters."; + reference "0.2.0"; + } + + revision 2022-09-20 { + description + "Initial revision."; + reference "0.1.0"; + } + + typedef version { + type string; + description + "The version ID of the credential as provided by the credential + manager when the credential was pushed. This leaf persists through + a reboot."; + } + + typedef created-on { + type oc-types:timeticks64; + description + "The creation time of the credential as reported by the credential + manager when the credential was pushed to the device. This value is + reported as nanoseconds since epoch (January 1st, 1970 00:00:00 GMT). + This leaf persists through a reboot."; + } + // gRPC server related definitions. + // Success/failure counters. + grouping grpc-server-certz-counters { + description + "A collection of counters that were collected while evaluating + access to the gRPC server."; + + container counters { + config false; + description + "A collection of counters that were collected by the gRPC during + the authentication process."; + + leaf connection-rejects { + type oc-yang:counter64; + description + "The total number of times that gRPC clients have failed + in establishing a connection to the server."; + } + leaf last-connection-reject { + type oc-types:timeticks64; + description + "A timestamp of the last time a gRPC client failed + in establishing a connection to the server."; + } + leaf connection-accepts { + type oc-yang:counter64; + description + "The total number of times that gRPC clients have succeeded + in establishing a connection to the server."; + } + leaf last-connection-accept { + type oc-types:timeticks64; + description + "A timestamp of the last time a gRPC client succeeded + in establishing a connection to the server."; + } + } + } + + // TODO(earies): move to a system-wide subtree: + // https://github.com/openconfig/public/issues/1049 + grouping grpc-server-credentials-state { + description + "gRPC server credentials freshness-related data."; + + leaf certificate-version { + type version; + description + "The version of the certificate (and associated + private key) that is used by this gRPC server."; + } + leaf certificate-created-on { + type created-on; + description + "The timestamp of the moment when the certificate + (and associated private key) that is currently used + by this gRPC server was created."; + } + leaf ca-trust-bundle-version { + type version; + description + "The version of the bundle of the Certificate + Authority certificates a.k.a. trust bundle used by + this gRPC server."; + } + leaf ca-trust-bundle-created-on { + type created-on; + description + "The timestamp of the moment when the bundle of + the Certificate Authority certificates (a.k.a. + trust bundle) was created."; + } + leaf certificate-revocation-list-bundle-version { + type version; + description + "The version of the Certificate Revocation List bundle used by + this gRPC server."; + } + leaf certificate-revocation-list-bundle-created-on { + type created-on; + description + "The timestamp of the moment when the Certificate Revocation + List bundle was created."; + } + leaf authentication-policy-version { + type version; + description + "The version of the authentication policy that is used by + this gRPC server."; + } + leaf authentication-policy-created-on { + type created-on; + description + "The timestamp of the moment when the authentication policy + that is currently used by this gRPC server was created."; + } + // TODO(earies): Consider aligning this with grpc-server key after moving + // to a system-wide subtree: + // https://github.com/openconfig/public/issues/1050 + leaf ssl-profile-id { + type string; + description + "The ID of this gRPC server's SSL profile + as used by the gNSI Certz service"; + } + } + + // Augments section. + + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server/" + + "oc-sys-grpc:state" { + when "../config[contains(services, 'oc-gnsi:GNSI')]/enable = 'true'"; + description + "A gRPC server credentials freshness information."; + + uses grpc-server-credentials-state; + } + + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server/" + + "oc-sys-grpc:state" { + when "../config[contains(services, 'oc-gnsi:GNSI')]/enable = 'true'"; + uses grpc-server-certz-counters; + description + "gNSI certz server access counters."; + } +} diff --git a/release/models/gnsi/openconfig-gnsi-credentialz.yang b/release/models/gnsi/openconfig-gnsi-credentialz.yang new file mode 100644 index 000000000..cf611fd9c --- /dev/null +++ b/release/models/gnsi/openconfig-gnsi-credentialz.yang @@ -0,0 +1,335 @@ +module openconfig-gnsi-credentialz { + yang-version 1; + namespace "https://github.com/openconfig/yang/gnsi/credentialz"; + prefix oc-gnsi-credz; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { + prefix oc-sys; + } + import openconfig-types { + prefix oc-types; + } + import openconfig-yang-types { + prefix oc-yang; + } + import openconfig-system-grpc { + prefix oc-sys-grpc; + } + import openconfig-gnsi { + prefix oc-gnsi; + } + organization + "OpenConfig Working Group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module provides a data model for the metadata of SSH and console + credentials installed on a networking device. + + The following leaves MUST be treated as invalid when the gNSI server is + enabled and credentialz is supported by the implementation: + /system/aaa/authentication/users/user/config/ssh-key + /system/aaa/authentication/users/user/state/ssh-key + /system/aaa/authentication/users/user/config/password + /system/aaa/authentication/users/user/state/password + /system/aaa/authentication/users/user/config/password-hashed + /system/aaa/authentication/users/user/state/password-hashed"; + + oc-ext:openconfig-version "0.7.0"; + + revision 2024-09-10 { + description + "Adding GLOME capabilities."; + reference "0.7.0"; + } + + revision 2024-02-13 { + description + "Major style updates and move to openconfig/public from openconfig/gnsi. + Last commit at + https://github.com/openconfig/gnsi/commit/347935aac66135d5649dadb9583ed0914578aab0"; + reference "0.6.0"; + } + + revision 2024-01-05 { + description + "Fix typo in YANG leaves"; + reference "0.5.0"; + } + + revision 2023-10-03 { + description + "Added state leaves for admin-user"; + reference "0.4.0"; + } + + revision 2023-08-18 { + description + "Fixed the canonical order of config field."; + reference "0.3.0"; + } + + revision 2022-10-30 { + description + "Adds success/failure counters."; + reference "0.2.0"; + } + + revision 2022-08-22 { + description + "Initial revision."; + reference "0.1.0"; + } + + typedef version { + type string; + description + "The version ID of the credential as provided by the credential + manager when the credential was pushed. This leaf persists through + a reboot."; + } + + typedef created-on { + type oc-types:timeticks64; + description + "The creation time of the credential as reported by the credential + manager when the credential was pushed to the device. This value is + reported as nanoseconds since epoch (January 1st, 1970 00:00:00 GMT). + This leaf persists through a reboot."; + } + + // SSH server related definitions. + + grouping ssh-server-credentials-version { + description + "SSH server credentials freshness-related data."; + + leaf active-trusted-user-ca-keys-version { + type version; + description + "The version of the Certificate Authority keys."; + } + + leaf active-trusted-user-ca-keys-created-on { + type created-on; + description + "The timestamp of the moment when the trusted user CA keys + were created."; + } + + leaf active-host-certificate-version { + type version; + description + "The version of the host certificate."; + } + + leaf active-host-certificate-created-on { + type created-on; + description + "The timestamp of the moment when the host certificate + was created."; + } + + leaf active-host-key-version { + type version; + description + "The version of the host public key."; + } + + leaf active-host-key-created-on { + type created-on; + description + "The timestamp of the moment when the host key was + created."; + } + } + + // GLOME related definitions. + + grouping glome-key-version { + description + "Version identifier for the configured GLOME key."; + + leaf active-glome-key-version { + type version; + description + "The version of the GLOME key."; + } + + leaf active-glome-key-created-on { + type created-on; + description + "The timestamp of the moment when the GLOME key + was created."; + } + } + + // Success/failure counters. + grouping counters { + description + "A collection of counters that were collected while evaluating + access to the target."; + + container counters { + config false; + description + "A collection of counters collected while authorizing users + accessing the target."; + leaf access-rejects { + type oc-yang:counter64; + description + "The total number of times access to the target has been + denied."; + } + leaf last-access-reject { + type oc-types:timeticks64; + description + "A timestamp of the last time access to the target has been + denied."; + } + leaf access-accepts { + type oc-yang:counter64; + description + "The total number of times access to the target has been + allowed."; + } + leaf last-access-accept { + type oc-types:timeticks64; + description + "A timestamp of the last time access to the target has been + allowed."; + } + } + } + // System role SSH related definitions. + + grouping user-ssh-credentials-version { + description + "System role credentials freshness-related data."; + + leaf authorized-principals-list-version { + type version; + description + "The version of the list of authorized principals currently + associated with this system role."; + } + + leaf authorized-principals-list-created-on { + type created-on; + description + "The timestamp of the moment the currently used list of + authorized principals has been created."; + } + + leaf authorized-keys-list-version { + type version; + description + "The version of the list of authorized keys that is currently + associated with this system role."; + } + + leaf authorized-keys-list-created-on { + type created-on; + description + "The timestamp of the moment the currently used list of + authorized keys has been created."; + } + } + + grouping console-config-state { + description + "Console-related configuration and state."; + container console { + description + "Console-related configuration and state."; + + container config { + description + "Console-related configuration."; + } + + container state { + config false; + description + "Console-related state."; + + uses counters; + + leaf enabled { + type boolean; + description + "Whether GLOME is enabled or not."; + } + } + } + } + + // System role console related definitions. + + grouping user-console-credentials-version { + description + "System role credentials freshness-related data."; + + leaf password-version { + type version; + description + "The version of the password that is currently used to + authenticate this user account."; + } + + leaf password-created-on { + type created-on; + description + "The timestamp of the moment the currently used password has + been created."; + } + } + + // Augments section. + + augment "/oc-sys:system" { + when "oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" + + "/oc-sys-grpc:config[contains(oc-sys-grpc:services, 'oc-gnsi:GNSI')]" + + "/oc-sys-grpc:enable = 'true'"; + description + "Console credentials freshness data."; + + uses console-config-state; + } + augment "/oc-sys:system/oc-sys:ssh-server/oc-sys:state" { + when "../../oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" + + "/oc-sys-grpc:config[contains(oc-sys-grpc:services, 'oc-gnsi:GNSI')]" + + "/oc-sys-grpc:enable = 'true'"; + description + "SSH server credentials freshness data."; + + uses ssh-server-credentials-version; + uses counters; + } + augment "/oc-sys:system/oc-sys:aaa/oc-sys:authentication/oc-sys:users/" + + "oc-sys:user/oc-sys:state" { + when "../../../../../oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" + + "/oc-sys-grpc:config[contains(oc-sys-grpc:services, 'oc-gnsi:GNSI')]" + + "/oc-sys-grpc:enable = 'true'"; + description + "A system role credentials freshness information."; + + uses user-console-credentials-version; + uses user-ssh-credentials-version; + } + augment "/oc-sys:system/oc-sys:aaa/oc-sys:authentication/oc-sys:admin-user/" + + "oc-sys:state" { + when "../../../../oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" + + "/oc-sys-grpc:config[contains(oc-sys-grpc:services, 'oc-gnsi:GNSI')]" + + "/oc-sys-grpc:enable = 'true'"; + description + "A system role credentials freshness information."; + + uses user-console-credentials-version; + uses user-ssh-credentials-version; + } +} diff --git a/release/models/gnsi/openconfig-gnsi-pathz.yang b/release/models/gnsi/openconfig-gnsi-pathz.yang new file mode 100644 index 000000000..962ea79c4 --- /dev/null +++ b/release/models/gnsi/openconfig-gnsi-pathz.yang @@ -0,0 +1,331 @@ +module openconfig-gnsi-pathz { + yang-version 1; + namespace "https://github.com/openconfig/yang/gnsi/pathz"; + prefix oc-gnsi-pathz; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { + prefix oc-sys; + } + import openconfig-system-grpc { + prefix oc-sys-grpc; + } + import openconfig-types { + prefix oc-types; + } + import openconfig-yang-types { + prefix oc-yang; + } + import openconfig-gnsi { + prefix oc-gnsi; + } + + organization + "OpenConfig Working Group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module provides a data model for the metadata of + OpenConfig-path-based authorization policies installed on a networking + device."; + + oc-ext:openconfig-version "0.3.0"; + + revision 2024-02-13 { + description + "Major style updates and move to openconfig/public from openconfig/gnsi. + Last commit at + https://github.com/openconfig/gnsi/commit/347935aac66135d5649dadb9583ed0914578aab0"; + reference "0.3.0"; + } + + revision 2022-10-30 { + description + "Adds success/failure counters."; + reference "0.2.0"; + } + + revision 2022-01-17 { + description + "Initial revision."; + reference "0.1.0"; + } + + typedef version { + type string; + description + "The version ID of the OpenConfig-path-based authorization policy + as provided by the OpenConfig-path-based Authorization Policy + Manager when the policy was pushed. This leaf persists through + a reboot."; + } + + typedef created-on { + type oc-types:timeticks64; + description + "The creation time of the OpenConfig-path-based authorization policy + as reported by the OpenConfig-path-based Authorization Policy + manager when the policy was pushed to the device. This value is + reported as nanoseconds since epoch (January 1st, 1970 00:00:00 GMT). + This leaf persists through a reboot."; + } + + // gRPC server related definitions. + grouping counters { + description + "A collection of counters that were collected by the gNSI.pathz + module while evaluating access to an OpenConfig path."; + + leaf access-rejects { + type oc-yang:counter64; + description + "The total number of times the gNSI.pathz module denied access + to an OpenConfig path."; + } + leaf last-access-reject { + type oc-types:timeticks64; + description + "A timestamp of the last time the gNSI.pathz denied access to + an OpenConfig path"; + } + leaf access-accepts { + type oc-yang:counter64; + description + "The total number of times the gNSI.pathz module allowed access + to an OpenConfig path."; + } + leaf last-access-accept { + type oc-types:timeticks64; + description + "A timestamp of the last time the gNSI.pathz allowed access to + an OpenConfig path"; + } + } + + grouping gnmi-pathz-policy-success-failure-counters { + description + "A collection of counters collected by the gNSI.pathz module."; + + container gnmi-pathz-policy-counters { + config false; + description + "A collection of per-OpenConfig path counters."; + + uses gnmi-pathz-policy-xpath-success-failure-counters; + } + } + + grouping gnmi-pathz-policy-xpath-success-failure-counters { + description + "A collection of per-OpenConfig path counters."; + + container paths { + description + "Container for a collection of per-OpenConfig path counters."; + + list path { + description + "List for a collection of per-OpenConfig path counters."; + key "name"; + leaf name { + type leafref { + path "../state/name"; + } + description + "A OpenConfig schema path the counter were + collected for. + + For documentation on the naming of paths, see + https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-path-conventions.md"; + } + container state { + description + "Operational state for per-OpenConfig path counters."; + leaf name { + type string; + description + "A OpenConfig schema path the counter were + collected for. + + For documentation on the naming of paths, see + https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-path-conventions.md"; + } + container reads { + description + "The counter were collected while + performing a read operation on the + schema path."; + uses counters; + } + container writes { + description + "The counter were collected while + performing a write operation on the + schema path."; + uses counters; + } + } + } + } + } + + grouping grpc-server-gnmi-pathz-policy-state { + description + "gNMI server OpenConfig-path-based authorization policy + freshness-related data."; + + leaf gnmi-pathz-policy-version { + type version; + description + "The version of the OpenConfig-path-based authorization policy + that is used by this gNMI server."; + } + leaf gnmi-pathz-policy-created-on { + type created-on; + description + "The timestamp of the moment when the OpenConfig-path-based + authorization policy that is currently used by this gNMI server + was created."; + } + } + + grouping gnmi-pathz-policy-state { + description + "Operational state data for a gNMI OpenConfig-path-based + authorization policy."; + leaf instance { + type enumeration { + enum ACTIVE { + value 1; + description + "The policy that is currently used by the gNMI service + to authorize access."; + } + enum SANDBOX { + value 2; + description + "The most recent policy that has been uploaded during + the Rotation() RPC. If there is no Rotate() RPC in + progress, then referring to this instance of the policy + will result in an error."; + } + } + description + "The instance identifier of the gNMI OpenConfig-path-based + authorization policy."; + } + leaf version { + type version; + description + "The version of the gNMI OpenConfig-path-based authorization + policy."; + } + leaf created-on { + type created-on; + description + "The timestamp of the moment when the policy was + created."; + } + } + + grouping gnmi-pathz-policies { + description + "Collection of OpenConfig-path-based authorization policies that + have been installed on the device using the gNSI OpenConfig-path- + based authorization policy management service. + Each OpenConfig-path-based authorization policy listed here is + identified by its status (either ACTIVE or SANDBOX) and has its + version and creation date/time listed."; + + container policies { + config false; + description + "Information about freshness of an OpenConfig-path-based + authorization policy that have been installed + on the device using the gNSI OpenConfig-path-based + authorization policy management service."; + + list policy { + key "instance"; + ordered-by system; + description + "Information about the OpenConfig-path-based authorization + policy that is identified by the `instance`."; + leaf instance { + type leafref { + path "../state/instance"; + } + description + "The ID of the OpenConfig-path-based authorization + policy."; + } + container state { + description + "Operational state data for an OpenConfig-path-based + authorization policies."; + + uses gnmi-pathz-policy-state; + } + } + } + } + + grouping system-gnmi-pathz-policies { + description + "Collection of OpenConfig-path-based authorization policies that + have been installed on the device using the gNSI OpenConfig-path- + based authorization policy management service. + Each policy listed here is identified by its status (either ACTIVE + or SANDBOX) and has its version and creation date/time listed."; + + container gnmi-pathz-policies { + config false; + description + "Collection of OpenConfig-path-based authorization policies that + have been installed on the device using the gNSI OpenConfig- + path-based authorization policy management service. + Each policy listed here is identified by its status (either + ACTIVE or SANDBOX) and has its version and creation date/time + listed."; + + uses gnmi-pathz-policies; + } + } + + // Augments section. + + augment "/oc-sys:system" { + when "oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" + + "/oc-sys-grpc:config[contains(oc-sys-grpc:services, 'oc-gnsi:GNSI')]" + + "/oc-sys-grpc:enable = 'true'"; + description + "Collection of OpenConfig-path-based authorization policies that + have been installed on the device using the gNSI OpenConfig-path- + based authorization policy management service. + Each policy listed here is identified by its status (either ACTIVE + or SANDBOX) and has its version and creation date/time listed."; + + uses system-gnmi-pathz-policies; + } + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" + + "/oc-sys-grpc:state" { + when "../config[contains(services, 'oc-gnsi:GNSI')]/enable = 'true'"; + description + "A gNMI server OpenConfig-path-based authorization policy freshness + information."; + + uses grpc-server-gnmi-pathz-policy-state; + } + augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" { + when "oc-sys-grpc:config[contains(oc-sys-grpc:services, 'oc-gnsi:GNSI')]" + + "/oc-sys-grpc:enable = 'true'"; + description + "A gNMI server OpenConfig-path-based authorization policy + success/failure counters."; + + uses gnmi-pathz-policy-success-failure-counters; + } +} diff --git a/release/models/gnsi/openconfig-gnsi.yang b/release/models/gnsi/openconfig-gnsi.yang new file mode 100644 index 000000000..0c10a2a0b --- /dev/null +++ b/release/models/gnsi/openconfig-gnsi.yang @@ -0,0 +1,40 @@ +module openconfig-gnsi { + yang-version "1"; + + prefix "oc-gnsi"; + + namespace "http://openconfig.net/yang/gnsi"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system-grpc { prefix oc-grpc; } + + organization + "OpenConfig Working Group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module defines a set of extensions that provide gNSI (the gRPC + Network Security Interface) specific extensions to the OpenConfig data models. + Specifically, the parameters for the configuration of the service, and + configuration and state are added. + + The gNSI protobufs and documentation are published at + https://github.com/openconfig/gnsi."; + + oc-ext:openconfig-version "0.1.0"; + + revision 2024-02-13 { + description + "Initial revision."; + reference "0.1.0"; + } + + identity GNSI { + base "oc-grpc:GRPC_SERVICE"; + description + "gNSI: gRPC Network Security Interface"; + } +} diff --git a/release/models/grpc/.spec.yml b/release/models/grpc/.spec.yml new file mode 100644 index 000000000..5e9761d03 --- /dev/null +++ b/release/models/grpc/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-grpc + docs: + - yang/grpc/openconfig-grpc-types.yang + build: + - yang/grpc/openconfig-grpc-types.yang + run-ci: false diff --git a/release/models/grpc/openconfig-grpc-types.yang b/release/models/grpc/openconfig-grpc-types.yang new file mode 100644 index 000000000..d9944070b --- /dev/null +++ b/release/models/grpc/openconfig-grpc-types.yang @@ -0,0 +1,36 @@ +module openconfig-grpc-types { + yang-version "1"; + namespace "http://openconfig.net/yang/grpc/types"; + prefix "oc-grpct"; + + import openconfig-extensions { + prefix oc-ext; + } + + organization + "OpenConfig working group"; + contact + "www.openconfig.net"; + + description + "This module adds gRPC server type relating to gRPC services running on + a network device. + The GRPC_SERVICE identity is used to create an extensible list of services + that can be instantiated, with a base set defined in this module. New + services can extend the identity to be included in the list."; + + oc-ext:openconfig-version "0.1.0"; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + revision "2024-05-29" { + description + "Initial revision."; + reference "0.1.0"; + } + + identity GRPC_SERVICE { + description + "Base identity for a gRPC-based service."; + } +} diff --git a/release/models/interfaces/.spec.yml b/release/models/interfaces/.spec.yml index a192cd795..2e66f339e 100644 --- a/release/models/interfaces/.spec.yml +++ b/release/models/interfaces/.spec.yml @@ -1,6 +1,5 @@ - name: openconfig-interfaces docs: - - yang/interfaces/openconfig-if-types.yang - yang/interfaces/openconfig-interfaces.yang - yang/interfaces/openconfig-if-ip.yang - yang/interfaces/openconfig-if-aggregate.yang @@ -9,11 +8,16 @@ - yang/interfaces/openconfig-if-poe.yang - yang/interfaces/openconfig-if-ip-ext.yang - yang/interfaces/openconfig-if-8021x.yang + - yang/interfaces/openconfig-if-rates.yang - yang/vlan/openconfig-vlan.yang - yang/interfaces/openconfig-if-tunnel.yang - yang/platform/openconfig-platform-port.yang - yang/platform/openconfig-platform-transceiver.yang - yang/interfaces/openconfig-if-sdn-ext.yang + - yang/p4rt/openconfig-p4rt.yang + - yang/optical-transport/openconfig-transport-line-common.yang + - yang/ate/openconfig-ate-intf.yang + - yang/vlan/openconfig-vlan-types.yang build: - yang/interfaces/openconfig-interfaces.yang - yang/interfaces/openconfig-if-ip.yang @@ -23,9 +27,13 @@ - yang/interfaces/openconfig-if-poe.yang - yang/interfaces/openconfig-if-ip-ext.yang - yang/interfaces/openconfig-if-8021x.yang + - yang/interfaces/openconfig-if-rates.yang - yang/vlan/openconfig-vlan.yang - yang/interfaces/openconfig-if-tunnel.yang - yang/platform/openconfig-platform-port.yang - yang/platform/openconfig-platform-transceiver.yang - yang/interfaces/openconfig-if-sdn-ext.yang + - yang/p4rt/openconfig-p4rt.yang + - yang/optical-transport/openconfig-transport-line-common.yang + - yang/ate/openconfig-ate-intf.yang run-ci: true diff --git a/release/models/interfaces/openconfig-if-aggregate.yang b/release/models/interfaces/openconfig-if-aggregate.yang index 996a8c599..f6a577bb0 100644 --- a/release/models/interfaces/openconfig-if-aggregate.yang +++ b/release/models/interfaces/openconfig-if-aggregate.yang @@ -11,7 +11,6 @@ module openconfig-if-aggregate { import openconfig-interfaces { prefix oc-if; } import openconfig-if-ethernet { prefix oc-eth; } import iana-if-type { prefix ianaift; } - import openconfig-if-types { prefix oc-ift; } import openconfig-extensions { prefix oc-ext; } // meta @@ -24,7 +23,13 @@ module openconfig-if-aggregate { description "Model for managing aggregated (aka bundle, LAG) interfaces."; - oc-ext:openconfig-version "2.4.3"; + oc-ext:openconfig-version "2.4.4"; + + revision "2022-06-28" { + description + "Remove reference to invalid oc-ift type check"; + reference "2.4.4"; + } revision "2020-05-01" { description @@ -214,8 +219,7 @@ module openconfig-if-aggregate { description "Adds LAG configuration to the interface module"; uses aggregation-logical-top { - when "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag' or " + - "oc-if:config/oc-if:type = 'oc-ift:IF_AGGREGATE'" { + when "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag'" { description "active when the interface is set to type LAG"; } diff --git a/release/models/interfaces/openconfig-if-ethernet.yang b/release/models/interfaces/openconfig-if-ethernet.yang index 202d75be2..3991923f6 100644 --- a/release/models/interfaces/openconfig-if-ethernet.yang +++ b/release/models/interfaces/openconfig-if-ethernet.yang @@ -10,7 +10,6 @@ module openconfig-if-ethernet { // import some basic types import openconfig-interfaces { prefix oc-if; } import iana-if-type { prefix ianaift; } - import openconfig-platform-types { prefix oc-platform-types; } import openconfig-yang-types { prefix oc-yang; } import openconfig-extensions { prefix oc-ext; } @@ -25,7 +24,26 @@ module openconfig-if-ethernet { "Model for managing Ethernet interfaces -- augments the OpenConfig model for interface configuration and state."; - oc-ext:openconfig-version "2.12.0"; + oc-ext:openconfig-version "2.13.0"; + + revision "2023-03-10" { + description + "Allow Ethernet configuration parameters to be + used for aggregate (LAG) interfaces."; + reference "2.13.0"; + } + + revision "2022-04-20" { + description + "Remove unused import"; + reference "2.12.2"; + } + + revision "2021-07-20" { + description + "Fix typo in hardware MAC address description."; + reference "2.12.1"; + } revision "2021-07-07" { description @@ -585,7 +603,7 @@ module openconfig-if-ethernet { leaf hw-mac-address { type oc-yang:mac-address; description - "Represenets the 'burned-in', or system-assigned, MAC + "Represents the 'burned-in', or system-assigned, MAC address for the Ethernet interface."; } @@ -658,9 +676,12 @@ module openconfig-if-ethernet { interfaces model"; uses ethernet-top { - when "oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd'" { - description "Additional interface configuration parameters when - the interface type is Ethernet"; + when "oc-if:config/oc-if:type = 'ianaift:ethernetCsmacd' or " + + "oc-if:config/oc-if:type = 'ianaift:ieee8023adLag'" { + description + "Additional interface configuration parameters when + the interface type is Ethernet, or the interface is an aggregate + interface."; } } } diff --git a/release/models/interfaces/openconfig-if-ip.yang b/release/models/interfaces/openconfig-if-ip.yang index 8c9fc171f..8aebaaa06 100644 --- a/release/models/interfaces/openconfig-if-ip.yang +++ b/release/models/interfaces/openconfig-if-ip.yang @@ -44,7 +44,44 @@ module openconfig-if-ip { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "3.0.0"; + oc-ext:openconfig-version "3.5.1"; + + revision "2024-03-13" { + description + "Update in-pkts and out-pkts descriptions."; + reference "3.5.1"; + } + + revision "2023-08-14" { + description + "Add multicast counters for IPv4, IPv6."; + reference "3.5.0"; + } + +revision "2023-06-30" { + description + "Deprecate IPv6 router advertisment config suppress leaf and add config + mode leaf."; + reference "3.4.0"; + } + + revision "2023-04-12" { + description + "Add ipv4 address type configuration."; + reference "3.3.0"; + } + + revision "2023-02-06" { + description + "Add IPv6 link-local configuration."; + reference "3.2.0"; + } + + revision "2022-11-09" { + description + "Add additional IPv6 router-advertisement features."; + reference "3.1.0"; + } revision "2019-01-08" { description @@ -161,6 +198,24 @@ module openconfig-if-ip { "The origin of a neighbor entry."; } + typedef ipv4-address-type { + type enumeration { + enum PRIMARY { + description + "The primary address on the interface. There can only be one primary + address associated on an interface."; + } + enum SECONDARY { + description + "Secondary address on an interface. There can be multiple secondary + addresses associated on an interface."; + } + } + + description + "The type of an IPv4 address."; + } + // grouping statements grouping ip-common-global-config { @@ -192,7 +247,8 @@ module openconfig-if-ip { type oc-yang:counter64; description "The total number of IP packets received for the specified - address family, including those received in error"; + address family, including all IP unicast, multicast, + broadcast and error packets."; reference "RFC 4293 - Management Information Base for the Internet Protocol (IP)"; @@ -209,6 +265,31 @@ module openconfig-if-ip { Internet Protocol (IP)"; } + leaf in-multicast-pkts { + type oc-yang:counter64; + description + "The number of IP packets received for the specified + address family that are multicast packets. + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 4293: Management Information Base for the Internet + Protocol (IP) - ipSystemStatsHCInMcastPkts"; + } + + leaf in-multicast-octets { + type oc-yang:counter64; + description + "The total number of octets received in input IP + multicast packets for the specified address + family, including those received in error."; + reference + "RFC 4293: Management Information Base for the Internet + Protocol (IP) - ipSystemStatsHCInMcastOctets"; + } + leaf in-error-pkts { // TODO: this counter combines several error conditions -- // could consider breaking them out to separate leaf nodes @@ -267,7 +348,8 @@ module openconfig-if-ip { specified address family that the device supplied to the lower layers for transmission. This includes packets generated locally and those forwarded by the - device."; + device as well as unicast, multicast and broadcast + packets."; reference "RFC 4293 - Management Information Base for the Internet Protocol (IP)"; @@ -286,6 +368,32 @@ module openconfig-if-ip { Internet Protocol (IP)"; } + leaf out-multicast-pkts { + type oc-yang:counter64; + description + "The total number of IP multicast packets transmitted. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 4293 - Management Information Base for the + Internet Protocol (IP) + - ipSystemStatsHCOutMcastPkts"; + } + + leaf out-multicast-octets { + type oc-yang:counter64; + description + "The total number of IP multicast octets transmitted. This + includes packets generated locally and those forwarded by + the device."; + reference + "RFC 4293 - Management Information Base for the + Internet Protocol (IP)"; + } + leaf out-error-pkts { // TODO: this counter combines several error conditions -- // could consider breaking them out to separate leaf nodes @@ -378,7 +486,6 @@ module openconfig-if-ip { } grouping ipv4-address-config { - description "Per IPv4 adresss configuration data for the interface."; @@ -396,6 +503,16 @@ module openconfig-if-ip { description "The length of the subnet prefix."; } + + leaf type { + type ipv4-address-type; + default PRIMARY; + description + "Specifies the explicit type of the IPv4 address being assigned + to the interface. By default, addresses are assumed to be a primary address. + Where secondary addresses is to be configured, this leaf should be set + to SECONDARY."; + } } grouping ipv4-neighbor-config { @@ -508,6 +625,17 @@ module openconfig-if-ip { description "The length of the subnet prefix."; } + + leaf type { + type oc-inet:ipv6-address-type; + default GLOBAL_UNICAST; + description + "Specifies the explicit type of the IPv6 address being assigned + to the interface. By default, addresses are assumed to be + global unicast. Where a link-local address is to be explicitly + configured, this leaf should be set to LINK_LOCAL."; + } + } grouping ipv6-address-state { @@ -883,6 +1011,15 @@ module openconfig-if-ip { description "Configuration parameters for IPv6 router advertisements."; + leaf enable { + type boolean; + default true; + description + "If set to false, all IPv6 router advertisement functions are + disabled. The local system will not transmit router advertisement + messages and will not respond to router solicitation messages."; + } + leaf interval { type uint32; units seconds; @@ -901,12 +1038,112 @@ module openconfig-if-ip { } leaf suppress { + status deprecated; type boolean; default false; description "When set to true, router advertisement neighbor discovery messages are not transmitted on this interface."; } + + leaf mode { + type enumeration { + enum ALL { + description + "The system will transmit unsolicited router advertisement + messages and respond to router solicitation requests."; + } + enum DISABLE_UNSOLICITED_RA { + description + "Unsolicted router advertisement messages are not transmitted on + this interface. Responses to router solicitation messages will + be transmitted."; + } + } + default "ALL"; + description + "Mode controls which set of behaviors the local system should perform + to support IPv6 router advertisements."; + reference "RFC4861: Neighbor Discovery for IP version 6 (IPv6)"; + } + + leaf managed { + type boolean; + default false; + description + "When set to true, the managed address configuration (M) flag is set in + the advertised router advertisement. The M flag indicates that there are + addresses available via DHCPv6."; + reference "RFC4861: Neighbor Discovery for IPv6, section 4.2"; + } + + leaf other-config { + type boolean; + default false; + description + "When set to true, the other configuration (O) flag is set in the + advertised router advertisement. The O flag indicates that there is + other configuration available via DHCPv6 (e.g., DNS servers)."; + reference "RFC4861: Neighbor Discovery for IPv6, section 4.2"; + } + } + + grouping ipv6-ra-prefix-config { + description + "Configuration parameters for an individual prefix within an IPv6 + router advertisement."; + + leaf prefix { + type oc-inet:ipv6-prefix; + description + "IPv6 prefix to be advertised within the router advertisement + message."; + } + + leaf valid-lifetime { + type uint32; + units seconds; + description + "The length of time that the prefix is valid relative to the time + the packet was sent."; + reference "RFC4861: Neighbor Discovery for IPv6, section 4.6.2"; + } + + leaf preferred-lifetime { + type uint32; + units seconds; + description + "The length of time that the address within the prefix remains + in the preferred state, i.e., unrestricted use is allowed by + upper-layer protocols. See RFC4862 for a complete definition + of preferred behaviours."; + reference "RFC4861: Neighbor Discovery for IPv6, section 4.6.2"; + } + + leaf disable-advertisement { + type boolean; + description + "When set to true, the prefix is not advertised within + router advertisement messages that are sent as a result of + router soliciation messages."; + } + + leaf disable-autoconfiguration { + type boolean; + description + "When set to true, the prefix is marked as not to be used for stateless + address configuration. This is achieved by setting the autonomous address + configuration bit for the prefix."; + reference "RFC4861: Neighbor Discovery for IPv6, section 4.6.1"; + } + + leaf enable-onlink { + type boolean; + description + "When set to true, the prefix is marked as being on link by setting the + L-bit for the prefix within a router advertisement."; + reference "RFC4861: Neighbor Discovery for IPv6, section 4.6.1"; + } } grouping ipv4-proxy-arp-config { @@ -1142,6 +1379,52 @@ module openconfig-if-ip { advertisements for IPv6."; uses ipv6-ra-config; } + + container prefixes { + description + "Container for a list of prefixes that are included in the + router advertisement message."; + + list prefix { + key "prefix"; + + description + "List of prefixes that are to be included in the IPv6 + router-advertisement messages for the interface. The list + is keyed by the IPv6 prefix in CIDR representation. + + Prefixes that are listed are those that are to be + advertised in router advertisement messages. Where there + are IPv6 global addresses configured on an interface and + the prefix is not listed in the prefix list, it MUST NOT + be advertised in the router advertisement message."; + + leaf prefix { + type leafref { + path "../config/prefix"; + } + description + "Reference to the IPv6 prefix key for the prefix list."; + } + + container config { + description + "Configuration parameters corresponding to an IPv6 prefix + within the router advertisement."; + + uses ipv6-ra-prefix-config; + } + + container state { + config false; + description + "Operational state parameters corresponding to an IPv6 prefix + within the router advertisement."; + + uses ipv6-ra-prefix-config; + } + } + } } container neighbors { diff --git a/release/models/interfaces/openconfig-if-rates.yang b/release/models/interfaces/openconfig-if-rates.yang new file mode 100644 index 000000000..78d972e14 --- /dev/null +++ b/release/models/interfaces/openconfig-if-rates.yang @@ -0,0 +1,114 @@ +module openconfig-if-rates { + + yang-version "1"; + + namespace "http://openconfig.net/yang/interfaces/rates"; + + prefix "oc-if-rates"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-interfaces { prefix "oc-if"; } + + organization + "OpenConfig working group"; + + contact + "www.openconfig.net"; + + description + "This module adds configuration and operational state for interface rates."; + + oc-ext:openconfig-version "0.1.0"; + + revision 2024-04-02 { + description + "Augment of /interfaces/interface to include interface rates."; + reference + "0.1.0"; + } + + grouping interface-rates-config { + description + "Grouping of interface rates related configuration"; + + leaf load-interval { + type uint16 { + range "1..600"; + } + units "seconds"; + default 300; + description + "The interval of interface rates calculation in seconds"; + } + } + + grouping interface-rates-state { + description + "Grouping of interface rates with different direction and units"; + + leaf load-interval { + type uint16; + units "seconds"; + description + "The interval of interface rates calculation in seconds"; + } + + leaf out-bits-rate { + type uint64; + units "bps"; + description + "The calculated transmitted rate of the interface, measured in bits + per second."; + } + + leaf in-bits-rate { + type uint64; + units "bps"; + description + "The calculated received rate of the interface, measured in bits + per second."; + } + + leaf out-pkts-rate { + type uint64; + units "pps"; + description + "The calculated transmitted rate of the interface, measured in packets + per second."; + } + + leaf in-pkts-rate { + type uint64; + units "pps"; + description + "The calculated received rate of the interface, measured in packets + per second."; + } + } + + augment "/oc-if:interfaces/oc-if:interface" { + description + "Adds interface rates."; + + container rates { + description + "Enclosing container for interface rates."; + + container config { + description + "Enclosing container for interface rates related configuration"; + + uses interface-rates-config; + } + + container state { + config false; + description + "Enclosing container for operational state representing + interface rates."; + + uses interface-rates-state; + } + } + } +} diff --git a/release/models/interfaces/openconfig-if-sdn-ext.yang b/release/models/interfaces/openconfig-if-sdn-ext.yang index fb4cfeef0..a96e1b823 100644 --- a/release/models/interfaces/openconfig-if-sdn-ext.yang +++ b/release/models/interfaces/openconfig-if-sdn-ext.yang @@ -21,7 +21,13 @@ module openconfig-if-sdn-ext { oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; - oc-ext:openconfig-version "0.1.0"; + oc-ext:openconfig-version "0.2.0"; + + revision 2024-02-21 { + description + "Initial revision."; + reference "0.2.0"; + } revision 2021-03-30 { description @@ -47,11 +53,42 @@ module openconfig-if-sdn-ext { This is used by an external programming entity to disable an interface (usually part of an aggregate) for the purposes of forwarding traffic. This allows a logical aggregate to continue to be - used with partial capacity, for example. Note that setting - `forwarding-viable = false` is not equivalent to - administratively disabling the interface -- in particular, the - interface is expected to participate in L2 protocols such as - LLDP or LACP even if it blocked from forwarding traffic."; + used with partial capacity. Setting `forwarding-viable = false` is not + equivalent to administratively disabling the interface. + Some rules to follow when an interface or aggregate interface is set for + Forwarding-viable=False: + 1. Aggregate interface '/interfaces/interface/aggregation/state/min-links' + checks should be evaluated based on + `/interfaces/interface/state/oper-status`. 'min-links' should not be + affected by the use of forwarding viable. + + 2. L2 protocols like LLDP and LACP must be processed normally on + transmit and receive on such ports/bundles. IS-IS PDUs should be + handled as per the requirements for L3 packets below. + + 3. L3 packets must not be transmitted on the interface. + + 4. Received L3 packets must be processed normally. Received data-plane + traffic will continue to forwarded to its destination post FIB lookup. + Received control-plane traffic must also be processed normally. + + 5. It is possible that the dead-interval or hold-down timer of L3 + protocols like IS-IS/BGP on the peer router may expire taking down the + adjacency or peering on that connection. However, the peer may still + continue to transmit packets which are received by the local device. + These received packet should continue to be processed normally as + per rule #4 above. + + For example, if the peer's forwarding table is programmed using gRIBI + by an external controller, the local device will continue to receive + packets. + + 6. An implementation should follow rule #3 even when the subject + interface on the local device is the last resort of communication for a + given destination. For example, the only nexthop for a destination is + an aggregate interface which has all member interfaces set to + forwarding-viable = false. In this scenario all L3 packets for that + destination will be dropped."; } } diff --git a/release/models/interfaces/openconfig-if-types.yang b/release/models/interfaces/openconfig-if-types.yang deleted file mode 100644 index 27d2dc1d8..000000000 --- a/release/models/interfaces/openconfig-if-types.yang +++ /dev/null @@ -1,108 +0,0 @@ -module openconfig-if-types { - yang-version "1"; - - namespace "http://openconfig.net/yang/openconfig-if-types"; - - prefix "oc-ift"; - - // import statements - import openconfig-extensions { prefix oc-ext; } - - // meta - organization - "OpenConfig working group"; - - contact - "OpenConfig working group - netopenconfig@googlegroups.com"; - - description - "This module contains a set of interface type definitions that - are used across OpenConfig models. These are generally physical - or logical interfaces, distinct from hardware ports (which are - described by the OpenConfig platform model)."; - - oc-ext:openconfig-version "0.2.1"; - - revision "2018-11-21" { - description - "Add OpenConfig module metadata extensions."; - reference "0.2.1"; - } - - revision "2018-01-05" { - description - "Add tunnel types into the INTERFACE_TYPE identity."; - reference "0.2.0"; - } - - revision "2016-11-14" { - description - "Initial version"; - reference "0.1.0"; - } - - // OpenConfig specific extensions for module metadata. - oc-ext:regexp-posix; - oc-ext:catalog-organization "openconfig"; - oc-ext:origin "openconfig"; - - identity INTERFACE_TYPE { - description - "Base identity from which interface types are derived."; - } - - identity IF_ETHERNET { - base INTERFACE_TYPE; - description - "Ethernet interfaces based on IEEE 802.3 standards, as well - as FlexEthernet"; - reference - "IEEE 802.3-2015 - IEEE Standard for Ethernet - OIF Flex Ethernet Implementation Agreement 1.0"; - } - - identity IF_AGGREGATE { - base INTERFACE_TYPE; - description - "An aggregated, or bonded, interface forming a - Link Aggregation Group (LAG), or bundle, most often based on - the IEEE 802.1AX (or 802.3ad) standard."; - reference - "IEEE 802.1AX-2008"; - } - - identity IF_LOOPBACK { - base INTERFACE_TYPE; - description - "A virtual interface designated as a loopback used for - various management and operations tasks."; - } - - identity IF_ROUTED_VLAN { - base INTERFACE_TYPE; - description - "A logical interface used for routing services on a VLAN. - Such interfaces are also known as switch virtual interfaces - (SVI) or integrated routing and bridging interfaces (IRBs)."; - } - - identity IF_SONET { - base INTERFACE_TYPE; - description - "SONET/SDH interface"; - } - - identity IF_TUNNEL_GRE4 { - base INTERFACE_TYPE; - description - "A GRE tunnel over IPv4 transport."; - } - - identity IF_TUNNEL_GRE6 { - base INTERFACE_TYPE; - description - "A GRE tunnel over IPv6 transport."; - } - -} diff --git a/release/models/interfaces/openconfig-interfaces.yang b/release/models/interfaces/openconfig-interfaces.yang index a91d43980..2cf2bdc84 100644 --- a/release/models/interfaces/openconfig-interfaces.yang +++ b/release/models/interfaces/openconfig-interfaces.yang @@ -12,6 +12,7 @@ module openconfig-interfaces { import openconfig-yang-types { prefix oc-yang; } import openconfig-types { prefix oc-types; } import openconfig-extensions { prefix oc-ext; } + import openconfig-transport-types { prefix oc-opt-types; } // meta organization "OpenConfig working group"; @@ -50,7 +51,50 @@ module openconfig-interfaces { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "2.5.0"; + oc-ext:openconfig-version "3.7.1"; + + revision "2024-04-04" { + description + "Use single quotes in descriptions."; + reference + "3.7.1"; + } + + revision "2023-11-06" { + description + "Clarify description for admin-status TESTING."; + reference + "3.7.0"; + } + + revision "2023-08-29" { + description + "Add augment for penalty-based additive-increase, exponential-decrease link damping algorithm."; + reference + "3.6.0"; + } + + revision "2023-07-14" { + description + "Move counters which apply to both interfaces and subinterfaces to + a common grouping. Deprecate physical counters from subinterface"; + reference "3.5.0"; + } + + revision "2023-02-06" { + description + "Add further specification to interface-ref type to + clarify that the interface and subinterface leaves + are how an interface is referenced, regardless of + context."; + reference "3.0.2"; + } + + revision "2022-10-25" { + description + "change loopback-mode to align with available modes"; + reference "3.0.1"; + } revision "2021-04-06" { description @@ -211,7 +255,19 @@ module openconfig-interfaces { container interface-ref { description - "Reference to an interface or subinterface"; + "Reference to an interface or subinterface. The interface + that is being referenced is uniquely referenced based on + the specified interface and subinterface leaves. In contexts + where a Layer 3 interface is to be referenced, both the + interface and subinterface leaves must be populated, as + Layer 3 configuration within the OpenConfig models is + associated with a subinterface. In the case where a + Layer 2 interface is to be referenced, only the + interface is specified. + + The interface/subinterface leaf tuple must be used as + the means by which the interface is specified, regardless + of any other context information (e.g., key in a list)."; container config { description @@ -390,12 +446,11 @@ module openconfig-interfaces { } leaf loopback-mode { - type boolean; - default false; + type oc-opt-types:loopback-mode-type; description - "When set to true, the interface is logically looped back, - such that packets that are forwarded via the interface - are received on the same interface."; + "Sets the loopback type on the interface. Setting the + mode to something besides NONE activates the loopback in + the specified mode."; } uses interface-common-config; @@ -463,6 +518,75 @@ module openconfig-interfaces { } } + grouping interface-link-damping-config { + description + "Configuration data for interface link damping settings."; + + leaf max-suppress-time { + type uint32; + units milliseconds; + default 0; + description + "Maximum time an interface can remain damped since the last link down event no matter how unstable it has been prior to this period of stability. In a damped state, the interface's state change will not be advertised."; + } + + leaf decay-half-life { + type uint32; + units milliseconds; + default 0; + description + "The amount of time after which an interface's penalty is decreased by half. Decay-half-time should not be more than max-suppress-time."; + } + + leaf suppress-threshold { + type uint32; + default 0; + description + "The accumulated penalty that triggers the damping of an interface. A value of 0 indicates config is disabled."; + } + + leaf reuse-threshold { + type uint32; + default 0; + description + "When the accumulated penalty decreases to this reuse threshold, the interface is not damped anymore. Interface state changes are advertised to applications. A value of 0 indicates config is disabled."; + } + + leaf flap-penalty { + type uint32; + default 0; + description + "A penalty that each down event costs. A value of 0 indicates the config is disabled."; + } + } + grouping interface-link-damping-state { + description + "Operational state data for interface link damping settings."; + } + grouping link-damping-top { + description + "Top level grouping for link damping parameters."; + + container penalty-based-aied { + description + "Top level container to suppress UP->DOWN link events using a penalty based additive-increase, exponential-decrease algorithm."; + + container config { + description + "Configuration data for link damping settings."; + uses interface-link-damping-config; + } + + container state { + config false; + description + "Operational state data for link damping settings."; + uses interface-link-damping-config; + uses interface-link-damping-state; + } + } + } + grouping interface-common-state { description "Operational state data (in addition to intended configuration) @@ -491,11 +615,16 @@ module openconfig-interfaces { "Not ready to pass packets and not in some test mode."; } enum TESTING { - //TODO: This is generally not supported as a configured - //admin state, though it's in the standard interfaces MIB. - //Consider removing it. description - "In some test mode."; + "The interface should be treated as if in admin-down state for + control plane protocols. In addition, while in TESTING state the + device should remove the interface from aggregate interfaces. + An interface transition to the TESTING state based on a qualification + workflow, or internal device triggered action - such as the gNOI Link + Qualification service"; + reference + "gNOI Link Qualification Service + https://github.com/openconfig/gnoi/blob/main/packet_link_qualification/index.md"; } } //TODO:consider converting to an identity to have the @@ -527,7 +656,7 @@ module openconfig-interfaces { enum TESTING { value 3; description - "In some test mode. No operational packets can + "In test mode. No operational packets can be passed."; } enum UNKNOWN { @@ -610,300 +739,376 @@ module openconfig-interfaces { } } - - grouping interface-counters-state { + grouping interface-common-counters-state { description - "Operational state representing interface counters - and statistics."; + "Operational state representing interface counters and statistics + applicable to (physical) interfaces and (logical) subinterfaces."; - //TODO: we may need to break this list of counters into those - //that would appear for physical vs. subinterface or logical - //interfaces. For now, just replicating the full stats - //grouping to both interface and subinterface. + leaf in-octets { + type oc-yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. - oc-ext:operational; + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - container counters { + leaf in-pkts { + type oc-yang:counter64; description - "A collection of interface-related statistics objects."; + "The total number of packets received on the interface, + including all unicast, multicast, broadcast and bad packets + etc."; + reference + "RFC 2819: Remote Network Monitoring Management Information Base. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-octets { - type oc-yang:counter64; - description - "The total number of octets received on the interface, - including framing characters. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; - } + leaf in-unicast-pkts { + type oc-yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-pkts { - type oc-yang:counter64; - description - "The total number of packets received on the interface, - including all unicast, multicast, broadcast and bad packets - etc."; - reference - "RFC 2819: Remote Network Monitoring Management Information - Base"; - } + leaf in-broadcast-pkts { + type oc-yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInBroadcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-unicast-pkts { - type oc-yang:counter64; - description - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, that were not addressed to a - multicast or broadcast address at this sub-layer. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; - } + leaf in-multicast-pkts { + type oc-yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInMulticastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-broadcast-pkts { - type oc-yang:counter64; - description - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, that were addressed to a broadcast - address at this sub-layer. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCInBroadcastPkts"; - } + leaf in-errors { + type oc-yang:counter64; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-multicast-pkts { - type oc-yang:counter64; - description - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, that were addressed to a multicast - address at this sub-layer. For a MAC-layer protocol, - this includes both Group and Functional addresses. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCInMulticastPkts"; - } + leaf in-discards { + type oc-yang:counter64; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. - leaf in-discards { - type oc-yang:counter64; - description - "The number of inbound packets that were chosen to be - discarded even though no errors had been detected to - prevent their being deliverable to a higher-layer - protocol. One possible reason for discarding such a - packet could be to free up buffer space. + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - reference - "RFC 2863: The Interfaces Group MIB - ifInDiscards"; - } + leaf out-octets { + type oc-yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. - leaf in-errors { - type oc-yang:counter64; - description - "For packet-oriented interfaces, the number of inbound - packets that contained errors preventing them from being - deliverable to a higher-layer protocol. For character- - oriented or fixed-length interfaces, the number of - inbound transmission units that contained errors - preventing them from being deliverable to a higher-layer - protocol. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifInErrors"; - } + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-unknown-protos { - type oc-yang:counter64; - description - "For packet-oriented interfaces, the number of packets - received via the interface that were discarded because - of an unknown or unsupported protocol. For - character-oriented or fixed-length interfaces that - support protocol multiplexing, the number of - transmission units received via the interface that were - discarded because of an unknown or unsupported protocol. - For any interface that does not support protocol - multiplexing, this counter is not present. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; - } + leaf out-pkts { + type oc-yang:counter64; + description + "The total number of packets transmitted out of the + interface, including all unicast, multicast, broadcast, + and bad packets etc."; + reference + "RFC 2819: Remote Network Monitoring Management Information Base. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf in-fcs-errors { - type oc-yang:counter64; - description - "Number of received packets which had errors in the - frame check sequence (FCS), i.e., framing errors. + leaf out-unicast-pkts { + type oc-yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - Discontinuities in the value of this counter can occur - when the device is re-initialization as indicated by the - value of 'last-clear'."; - } + leaf out-broadcast-pkts { + type oc-yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutBroadcastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-octets { - type oc-yang:counter64; - description - "The total number of octets transmitted out of the - interface, including framing characters. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; - } + leaf out-multicast-pkts { + type oc-yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted, and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutMulticastPkts. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-pkts { - type oc-yang:counter64; - description - "The total number of packets transmitted out of the - interface, including all unicast, multicast, broadcast, - and bad packets etc."; - reference - "RFC 2819: Remote Network Monitoring Management Information - Base"; - } + leaf out-discards { + type oc-yang:counter64; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-unicast-pkts { - type oc-yang:counter64; - description - "The total number of packets that higher-level protocols - requested be transmitted, and that were not addressed - to a multicast or broadcast address at this sub-layer, - including those that were discarded or not sent. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; - } + leaf out-errors { + type oc-yang:counter64; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors. + RFC 4293: Management Information Base for the + Internet Protocol (IP)."; + } - leaf out-broadcast-pkts { - type oc-yang:counter64; - description - "The total number of packets that higher-level protocols - requested be transmitted, and that were addressed to a - broadcast address at this sub-layer, including those - that were discarded or not sent. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCOutBroadcastPkts"; - } + leaf last-clear { + type oc-types:timeticks64; + description + "Timestamp of the last time the interface counters were + cleared. + The value is the timestamp in nanoseconds relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + oc-ext:telemetry-on-change; + } + } - leaf out-multicast-pkts { - type oc-yang:counter64; - description - "The total number of packets that higher-level protocols - requested be transmitted, and that were addressed to a - multicast address at this sub-layer, including those - that were discarded or not sent. For a MAC-layer - protocol, this includes both Group and Functional - addresses. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - - ifHCOutMulticastPkts"; - } + grouping interface-counters-state { + description + "Operational state representing interface counters + and statistics."; - leaf out-discards { - type oc-yang:counter64; - description - "The number of outbound packets that were chosen to be - discarded even though no errors had been detected to - prevent their being transmitted. One possible reason - for discarding such a packet could be to free up buffer - space. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; - } + oc-ext:operational; - leaf out-errors { - type oc-yang:counter64; - description - "For packet-oriented interfaces, the number of outbound - packets that could not be transmitted because of errors. - For character-oriented or fixed-length interfaces, the - number of outbound transmission units that could not be - transmitted because of errors. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by the value of - 'last-clear'."; - reference - "RFC 2863: The Interfaces Group MIB - ifOutErrors"; - } + leaf in-unknown-protos { + type oc-yang:counter64; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } - leaf carrier-transitions { - type oc-yang:counter64; - description - "Number of times the interface state has transitioned - between up and down since the time the device restarted - or the last-clear time, whichever is most recent."; - oc-ext:telemetry-on-change; - } + leaf in-fcs-errors { + type oc-yang:counter64; + description + "Number of received packets which had errors in the + frame check sequence (FCS), i.e., framing errors. - leaf last-clear { - type oc-types:timeticks64; - description - "Timestamp of the last time the interface counters were - cleared. + Discontinuities in the value of this counter can occur + when the device is re-initialization as indicated by the + value of 'last-clear'."; + } + + leaf carrier-transitions { + type oc-yang:counter64; + description + "Number of times the interface state has transitioned + between up and down since the time the device restarted + or the last-clear time, whichever is most recent."; + oc-ext:telemetry-on-change; + } + + leaf resets { + type oc-yang:counter64; + description + "Number of times the interface hardware has been reset. The + triggers and effects of this event are hardware-specifc."; + oc-ext:telemetry-on-change; - The value is the timestamp in nanoseconds relative to - the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; - oc-ext:telemetry-on-change; - } } } + grouping subinterfaces-counters-state { + description + "Operational state representing counters unique to subinterfaces"; + + oc-ext:operational; + leaf in-unknown-protos { + type oc-yang:counter64; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system, and at + other times as indicated by the value of + 'last-clear'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf in-fcs-errors { + type oc-yang:counter64; + status deprecated; + description + "Number of received packets which had errors in the + frame check sequence (FCS), i.e., framing errors. + + Discontinuities in the value of this counter can occur + when the device is re-initialization as indicated by the + value of 'last-clear'."; + } + + leaf carrier-transitions { + type oc-yang:counter64; + status deprecated; + description + "Number of times the interface state has transitioned + between up and down since the time the device restarted + or the last-clear time, whichever is most recent."; + oc-ext:telemetry-on-change; + } + + } + // data definition statements grouping sub-unnumbered-config { @@ -993,7 +1198,15 @@ module openconfig-interfaces { } uses interface-common-state; - uses interface-counters-state; + + container counters { + description + "A collection of interface specific statistics entitites which are + not common to subinterfaces."; + + uses interface-common-counters-state; + uses subinterfaces-counters-state; + } } grouping subinterfaces-top { @@ -1092,10 +1305,27 @@ module openconfig-interfaces { uses interface-phys-config; uses interface-common-state; - uses interface-counters-state; + + container counters { + description + "A collection of interface specific statistics entitites which are + not common to subinterfaces."; + + uses interface-common-counters-state; + uses interface-counters-state; + } } - uses interface-phys-holdtime-top; + uses interface-phys-holdtime-top { + when "./penalty-based-aied/config/suppress-threshold = 0 + or ./penalty-based-aied/config/reuse-threshold = 0 + or ./penalty-based-aied/config/flap-penalty = 0" { + description + "Hold time and penalty-based-aied are two algorithms to suppress + link transitions and must be mutually exclusive."; + } + } + uses link-damping-top; uses subinterfaces-top; } } diff --git a/release/models/isis/openconfig-isis-lsp.yang b/release/models/isis/openconfig-isis-lsp.yang index 219c57ec3..707a8706e 100644 --- a/release/models/isis/openconfig-isis-lsp.yang +++ b/release/models/isis/openconfig-isis-lsp.yang @@ -34,7 +34,110 @@ submodule openconfig-isis-lsp { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "0.6.2"; + oc-ext:openconfig-version "1.7.0"; + + revision "2024-02-28" { + description + "ISIS graceful-restart timers and per-level configuration."; + reference "1.7.0"; + } + + revision "2024-02-20" { + description + "Fix typo in RFC reference for adjacency-state."; + reference "1.6.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "1.6.1"; + } + + revision "2023-05-01" { + description + "Add ISIS total-lsps counter."; + reference "1.6.0"; + } + + revision "2023-04-25" { + description + "Clarify use of the interface-ref type."; + reference "1.5.1"; + } + + revision "2023-03-27" { + description + "Add weighted ecmp."; + reference "1.5.0"; + } + + revision "2023-03-20" { + description + "Per-level global enabled configuration default false re-added to keep + backward compatibility."; + reference "1.4.1"; + } + + revision "2023-02-22" { + description + "Deprecate the instance leaf, and add a new instance-id leaf + that indicates the value to be used in the Instance Identifier + TLV."; + reference "1.4.0"; + } + + revision "2023-01-25" { + description + "Per-level global enabled configuration removed, since it duplicates + the level-capability leaf."; + reference "1.3.0"; + } + + revision "2023-01-04" { + description + "Add max ecmp paths for address family."; + reference "1.2.0"; + } + + revision "2022-09-20" { + description + "Add CSNP enable to IS-IS global configuration."; + reference "1.1.0"; + } + + revision "2022-05-10" { + description + "Modify internal/external route preference to unrestricted uint32 + type."; + reference "1.0.0"; + } + + revision "2022-03-01" { + description + "Add simple key authentication support."; + reference "0.9.0"; + } + + revision "2022-02-24" { + description + "Add Hello PDU padding type to IS-IS global configuration."; + reference "0.8.0"; + } + + revision "2022-01-19" { + description + "Align revisions across modules."; + reference "0.7.1"; + } + + revision "2021-12-31" { + description + "Add support for per-interface hello authentication, and per-level + *SNP authentication."; + reference "0.7.0"; + } revision "2021-06-16" { description diff --git a/release/models/isis/openconfig-isis-policy.yang b/release/models/isis/openconfig-isis-policy.yang index c9ef83ab8..caa4c1278 100644 --- a/release/models/isis/openconfig-isis-policy.yang +++ b/release/models/isis/openconfig-isis-policy.yang @@ -26,7 +26,25 @@ module openconfig-isis-policy { It augments the base routing-policy module with BGP-specific options for conditions and actions."; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "0.8.0"; + + revision "2023-11-02" { + description + "Fixing metric type leafs for action and condition branches."; + reference "0.8.0"; + } + + revision "2023-04-28" { + description + "Adding set metric-type leaf"; + reference "0.7.0"; + } + + revision "2023-02-27" { + description + "Fixing type for set-metric-type leaf"; + reference "0.6.0"; + } revision "2020-02-04" { description @@ -138,6 +156,12 @@ module openconfig-isis-policy { to an IS-IS instance that has multiple levels configured within it"; } + + leaf match-metric-type { + type isis-types:metric-type; + description + "Matches the type of the route to redistribute to INTERNAL or EXTERNAL"; + } } grouping isis-actions { @@ -177,10 +201,16 @@ module openconfig-isis-policy { } leaf set-metric-type { - type isis-types:level-number; + type isis-types:metric-type; + description + "This leaf sets the type of metric that is to be specified + when the set-metric leaf is specified"; + } + + leaf set-metric-style-type { + type isis-types:metric-style; description - "Set the type of metric that is to be specified when the - set metric leaf is specified"; + "Set the style of the metric"; } leaf set-metric { diff --git a/release/models/isis/openconfig-isis-routing.yang b/release/models/isis/openconfig-isis-routing.yang index 4675cce5b..80a3154ff 100644 --- a/release/models/isis/openconfig-isis-routing.yang +++ b/release/models/isis/openconfig-isis-routing.yang @@ -20,7 +20,116 @@ submodule openconfig-isis-routing { description "This module describes YANG model for ISIS Routing"; - oc-ext:openconfig-version "0.6.1"; + oc-ext:openconfig-version "1.7.0"; + + revision "2024-02-28" { + description + "ISIS graceful-restart timers and per-level configuration."; + reference "1.7.0"; + } + + revision "2024-02-20" { + description + "Fix typo in RFC reference for adjacency-state."; + reference "1.6.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "1.6.1"; + } + + revision "2023-05-01" { + description + "Add ISIS total-lsps counter."; + reference "1.6.0"; + } + + revision "2023-04-25" { + description + "Clarify use of the interface-ref type."; + reference "1.5.1"; + } + + revision "2023-03-27" { + description + "Add weighted ecmp."; + reference "1.5.0"; + } + + revision "2023-03-20" { + description + "Per-level global enabled configuration default false re-added to keep + backward compatibility."; + reference "1.4.1"; + } + + revision "2023-02-22" { + description + "Deprecate the instance leaf, and add a new instance-id leaf + that indicates the value to be used in the Instance Identifier + TLV."; + reference "1.4.0"; + } + + revision "2023-01-25" { + description + "Per-level global enabled configuration removed, since it duplicates + the level-capability leaf."; + reference "1.3.0"; + } + + revision "2023-01-04" { + description + "Add max ecmp paths for address family."; + reference "1.2.0"; + } + + revision "2022-09-20" { + description + "Add CSNP enable to IS-IS global configuration."; + reference "1.1.0"; + } + + revision "2022-05-10" { + description + "Modify internal/external route preference to unrestricted uint32 + type."; + reference "1.0.0"; + } + + revision "2022-03-01" { + description + "Add simple authentication key support."; + reference "0.9.0"; + } + + revision "2022-02-24" { + description + "Add Hello PDU padding type to IS-IS global configuration."; + reference "0.8.0"; + } + + revision "2022-01-19" { + description + "Align revisions across modules."; + reference "0.7.1"; + } + + revision "2021-12-31" { + description + "Add support for per-interface hello authentication, and per-level + *SNP authentication."; + reference "0.7.0"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "0.6.2"; + } revision "2021-03-17" { description @@ -205,6 +314,17 @@ submodule openconfig-isis-routing { description "ISIS metric value(default=10)."; } } + grouping isis-ecmp-config { + description + "This grouping defines ISIS ecmp configuration."; + + leaf max-ecmp-paths { + type uint8; + description + "ISIS max-paths count."; + } + + } grouping isis-afi-safi-list { description @@ -240,6 +360,7 @@ submodule openconfig-isis-routing { uses isis-afi-safi-config; uses isis-metric-config; uses rt-admin-config; + uses isis-ecmp-config; } container state { @@ -250,6 +371,7 @@ submodule openconfig-isis-routing { uses isis-afi-safi-config; uses isis-metric-config; uses rt-admin-config; + uses isis-ecmp-config; } uses isis-mt-list; diff --git a/release/models/isis/openconfig-isis-types.yang b/release/models/isis/openconfig-isis-types.yang index 3e8628c11..eb33a4ea3 100644 --- a/release/models/isis/openconfig-isis-types.yang +++ b/release/models/isis/openconfig-isis-types.yang @@ -20,7 +20,13 @@ module openconfig-isis-types { "This module contains general data definitions for use in ISIS YANG model."; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "0.6.0"; + + revision "2022-02-11" { + description + "Add simple authentication key support."; + reference "0.6.0"; + } revision "2021-08-12" { description @@ -179,6 +185,25 @@ module openconfig-isis-types { "Base identify type for IPv6 address family"; } + identity AUTH_MODE { + description + "Base identify to define the authentication mode"; + } + + identity TEXT { + base AUTH_MODE; + description + "Simple Text Authentication"; + reference "RFC1195"; + } + + identity MD5 { + base AUTH_MODE; + description + "HMAC-MD5 Authentication"; + reference "RFC5304"; + } + // typedef statements typedef level-type { type enumeration { diff --git a/release/models/isis/openconfig-isis.yang b/release/models/isis/openconfig-isis.yang index 27b743b8b..fcad2fb68 100644 --- a/release/models/isis/openconfig-isis.yang +++ b/release/models/isis/openconfig-isis.yang @@ -8,19 +8,17 @@ module openconfig-isis { prefix "oc-isis"; // import some basic types - import ietf-inet-types { prefix "inet"; } - import ietf-yang-types { prefix "yang"; } import openconfig-types { prefix "oc-types"; } + import openconfig-inet-types { prefix "oc-inet"; } + import openconfig-yang-types { prefix "oc-yang"; } import openconfig-isis-types { prefix "oc-isis-types"; } import openconfig-routing-policy { prefix "oc-rpol"; } import openconfig-extensions { prefix "oc-ext"; } import openconfig-interfaces { prefix "oc-if"; } import openconfig-segment-routing { prefix "oc-sr"; } import openconfig-bfd { prefix "oc-bfd"; } - // TODO(robjs): Import authentication and keychain following merge of these - // modules. - //import openconfig-authentication-types { prefix "oc-auth-types"; } - //import openconfig-keychain { prefix "oc-keychain"; } + import openconfig-keychain { prefix "oc-keychain"; } + import openconfig-keychain-types { prefix "oc-keychain-types"; } // Include submodules: // IS-IS LSP is the LSDB for IS-IS. @@ -56,7 +54,110 @@ module openconfig-isis { +-> { levels config } +-> { level adjacencies }"; - oc-ext:openconfig-version "0.6.2"; + oc-ext:openconfig-version "1.7.0"; + + revision "2024-02-28" { + description + "ISIS graceful-restart timers and per-level configuration."; + reference "1.7.0"; + } + + revision "2024-02-20" { + description + "Fix typo in RFC reference for adjacency-state."; + reference "1.6.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "1.6.1"; + } + + revision "2023-05-01" { + description + "Add ISIS total-lsps counter."; + reference "1.6.0"; + } + + revision "2023-04-25" { + description + "Clarify use of the interface-ref type."; + reference "1.5.1"; + } + + revision "2023-03-27" { + description + "Add weighted ecmp."; + reference "1.5.0"; + } + + revision "2023-03-20" { + description + "Per-level global enabled configuration default false re-added to keep + backward compatibility."; + reference "1.4.1"; + } + + revision "2023-02-22" { + description + "Deprecate the instance leaf, and add a new instance-id leaf + that indicates the value to be used in the Instance Identifier + TLV."; + reference "1.4.0"; + } + + revision "2023-01-25" { + description + "Per-level global enabled configuration removed, since it duplicates + the level-capability leaf."; + reference "1.3.0"; + } + + revision "2023-01-04" { + description + "Add max ecmp paths for address family."; + reference "1.2.0"; + } + + revision "2022-09-20" { + description + "Add CSNP enable to IS-IS global configuration."; + reference "1.1.0"; + } + + revision "2022-05-10" { + description + "Modify internal/external route preference to unrestricted uint32 + type."; + reference "1.0.0"; + } + + revision "2022-03-01" { + description + "Add simple authentication key support."; + reference "0.9.0"; + } + + revision "2022-02-24" { + description + "Add Hello PDU padding type to IS-IS global configuration."; + reference "0.8.0"; + } + + revision "2022-01-19" { + description + "Align revisions across modules."; + reference "0.7.1"; + } + + revision "2021-12-31" { + description + "Add support for per-interface hello authentication, and per-level + *SNP authentication."; + reference "0.7.0"; + } revision "2021-06-16" { description @@ -156,16 +257,31 @@ module openconfig-isis { grouping isis-global-config { description - "This grouping defines lobal configuration options for ISIS router."; + "This grouping defines global configuration options for ISIS router."; - // multi-instance leaf instance { type string; default 0; description - "ISIS Instance."; + "ISIS Instance. This leaf has been deprecated. The instance name + is specified within the + /network-instances/network-instance/protocols/protocol/config/name + leaf (list key). If a user requires a specific instance identifier + used in the Instance Identifier TLV to be configured the instance-id + leaf is used."; + status deprecated; + } + + leaf instance-id { + type uint16; + description + "When specified, this leaf explicitly indicates the instance identifier + that is to be used for the IS-IS instance. The value should be included + in the Instance Identifier (IID) TLV."; + reference "RFC6822: IS-IS Multi-Instance"; } + leaf-list net { type oc-isis-types:net; description @@ -198,6 +314,16 @@ module openconfig-isis { "ISIS max-paths count."; } + leaf weighted-ecmp { + type boolean; + default "false"; + description + "When set to true, all eligible multipath IS-IS routes associated with + the instance are programmed to use weighted ECMP. An IS-IS route is + eligible for weighted ECMP if all the next-hop interfaces in the + multipath set have a load-balancing-weight other than 'none'."; + } + leaf poi-tlv { type boolean; default false; @@ -224,6 +350,20 @@ module openconfig-isis { "When set to true, IS will always flood the LSP that triggered an SPF before the router actually runs the SPF computation."; } + + leaf csnp-enable-on-p2p-links { + type boolean; + default true; + description + "When set to true, ISIS will always enable CSNP on P2P Links."; + } + + leaf hello-padding { + type oc-isis-types:hello-padding-type; + default "STRICT"; + description + "Controls the padding type for IS-IS Hello PDUs on a global level."; + } } grouping admin-config { @@ -239,140 +379,77 @@ module openconfig-isis { } } - grouping isis-authentication-check-config { + grouping admin-config-deprecated { description - "This grouping defines ISIS authentication check."; + "Re-usable grouping for the enabled leaf in contexts where it is deprecated."; - leaf authentication-check { + leaf enabled { type boolean; - default true; - description - "When set to true, reject all ISIS protocol PDUs that either have a mismatch - in authentication-type or authentication-key."; - } - } - - grouping isis-metric-style-config { - description - "This grouping defines ISIS metric style."; - - leaf metric-style { - type oc-isis-types:metric-style; + default false; + status deprecated; description - "ISIS metric style types(narrow, wide)."; + "Formerly this leaf was used to enable or disable the functionality + within the context specified. This leaf is DEPRECATED."; } } - grouping authentication-key-config { + grouping isis-authentication-check-config { description - "This grouping defines authentication key configuration."; + "This grouping defines ISIS authentication check."; - leaf auth-password { - type oc-types:routing-password; + leaf authentication-check { + type boolean; + default true; description - "Authentication key string."; + "When set to true, reject all ISIS protocol PDUs that either have a mismatch + in authentication-type or authentication-key."; } } - grouping keychain-base-group { + grouping isis-authentication-type-config { description - "This grouping defines keychain configuration."; + "This grouping defines the ISIS authentication type."; - container keychain { + leaf auth-type { + type identityref { + base oc-keychain-types:AUTH_TYPE; + } description - "This container defines keychain parameters."; - - // TODO(robjs): Import keychain parameters following merge of the auth - // models. - //uses oc-keychain:keychain-common-base; - //uses oc-keychain:tolerance-base; - //uses oc-keychain:keychain-key-base; + "The type of authentication used in the applicable IS-IS PDUs + (simple_key, keychain)."; } } - grouping isis-authentication-config { + grouping isis-simple-key-authentication-config { description - "This grouping defines ISIS authentication configuration."; + "This grouping defines ISIS simple authentication config."; - // TODO(robjs): Add authentication following merge of auth modules. - //leaf auth-type { - // type oc-auth-types:auth-type; - // description - // "ISIS authentication type (key, key-chain)."; - //} - - leaf csnp-authentication { - type boolean; - default false; + leaf auth-mode { + type identityref { + base oc-isis-types:AUTH_MODE; + } description - "Enable or disable for IS-IS CSNPs."; - } + "The type of authentication used in the applicable IS-IS PDUs. - leaf psnp-authentication { - type boolean; - default false; - description - "Enable or disable authentication for IS-IS PSNPs."; + This leaf along with the sibling leaf 'auth-password' can be used + to configure the simple key authentication."; } - leaf lsp-authentication { - type boolean; - default false; + leaf auth-password { + type oc-types:routing-password; description - "Enable or disable authentication for IS-IS LSPs."; + "The authentication key used in the applicable IS-IS PDUs. The key in the + packet may be encrypted according to the configured authentication type."; } } + grouping isis-metric-style-config { + description + "This grouping defines ISIS metric style."; - grouping isis-authentication-group { - description - "This grouping defines ISIS authentication."; - - container config { - description - "This container defines ISIS authentication configuration."; - - uses isis-authentication-config; - } - - container state { - config false; - description - "This container defines ISIS authentication state."; - - uses isis-authentication-config; - } - - container key { + leaf metric-style { + type oc-isis-types:metric-style; description - "This container defines ISIS authentication key"; - container config { - description - "This container defines ISIS authentication key configuration."; - - uses authentication-key-group-config { - // TODO(aashaikh): Add auth-type conditions after merge of - // auth models. - // when "../auth-type = 'KEY'"; - } - } - - container state { - config false; - description - "This container defines ISIS authentication key state."; - - uses authentication-key-group-config { - // TODO(aashaikh): Add auth-type conditions after merge of - // auth models. - // when "../auth-type = 'KEY'"; - } - } - } - - uses keychain-base-group { - // TODO(aashaikh): Add auth-type conditions after merge of - // auth models. - // when "../auth-type = 'KEY_CHAIN'"; + "ISIS metric style types(narrow, wide)."; } } @@ -380,19 +457,20 @@ module openconfig-isis { description "Configuration options for IS-IS hello authentication."; - leaf hello-authentication { + leaf enabled { type boolean; default false; description - "Enabled or disable ISIS Hello authentication."; + "Enabled or disable ISIS Hello authentication. Hello authentication + is used on a per-interface basis to authenticate adjacencies on the + interface."; } - // TODO(robjs): Add hello-auth-type following merge of auth models. - //leaf hello-auth-type { - // type oc-auth-types:auth-type; - // description - // "ISIS authentication type (key, key-chain)."; - //} + leaf keychain { + type oc-keychain:keychain-ref; + description + "Reference to a keychain that should be used for hello authentication."; + } } grouping isis-hello-authentication-group { @@ -404,6 +482,8 @@ module openconfig-isis { "This container defines ISIS authentication configuration."; uses isis-hello-authentication-config; + uses isis-authentication-type-config; + uses isis-simple-key-authentication-config; } container state { @@ -412,40 +492,8 @@ module openconfig-isis { "This container defines ISIS authentication state."; uses isis-hello-authentication-config; - } - - container key { - description - "This container defines ISIS authentication key"; - - container config { - description - "This container defines ISIS authentication key configuration."; - - uses authentication-key-group-config { - // TODO(aashaikh): Add auth-type conditions after merge of - // auth models. - // when "../auth-type = 'KEY'"; - } - } - - container state { - config false; - description - "This container defines ISIS authentication key state."; - - uses authentication-key-group-config { - // TODO(aashaikh): Add auth-type conditions after merge of - // auth models. - // when "../auth-type = 'KEY'"; - } - } - } - - uses keychain-base-group { - // TODO(aashaikh): Add auth-type conditions after merge of - // auth models. - // when "../auth-type = 'KEY_CHAIN'"; + uses isis-authentication-type-config; + uses isis-simple-key-authentication-config; } } @@ -477,13 +525,13 @@ module openconfig-isis { "This grouping defines ISIS Traffic Engineering configuration."; leaf ipv4-router-id { - type inet:ipv4-address-no-zone; + type oc-inet:ipv4-address; description "IPv4 MPLS Traffic Engineering Router-ID."; } leaf ipv6-router-id { - type inet:ipv6-address-no-zone; + type oc-inet:ipv6-address; description "IPv6 MPLS Traffic Engineering Router-ID."; } @@ -711,7 +759,7 @@ module openconfig-isis { leaf hello-padding { type oc-isis-types:hello-padding-type; description - "This leaf controls padding type for IS-IS Hello PDUs."; + "Controls the padding type for IS-IS Hello PDUs."; } leaf circuit-type { @@ -832,6 +880,33 @@ module openconfig-isis { } } + grouping isis-interface-weighted-ecmp-config { + description + "This grouping defines ISIS weighted ECMP configuration"; + + leaf load-balancing-weight { + description + "The load-balancing weight of the interface, which applies when + weighted ECMP is enabled and the interface is part of a multipath set."; + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum "auto" { + description "Load-balancing weight is based on the bandwidth of + the parent interface (port or LAG)"; + } + enum "none" { + description "The interface should not participate in weighted + ECMP"; + } + } + } + default "auto"; + } + } + grouping isis-transport-config { description "This grouping defines configuration parameters relating to the @@ -856,7 +931,60 @@ module openconfig-isis { graceful restart procedures during its own restart, but supports retaining forwarding information during a remote speaker's restart."; } - reference "RFC 5306: Restart Signaling for IS-IS."; + + leaf non-planned-only { + type boolean; + description + "When this leaf is set to TRUE, planned restart procedures as + described in RFC 8706 are not used."; + reference + "RFC 5706: Restart Signaling for IS-IS"; + } + + reference + "RFC 5306: Restart Signaling for IS-IS; RFC 5706: Restart Signaling + for IS-IS"; + } + + grouping isis-graceful-restart-level-config { + description + "This grouping defines ISIS graceful restart configuration relevant + for ISIS level/LSDB"; + + leaf restart-time { + type uint16; + default 30; + description + "Value of RFC5306/RFC8706 T2 timer"; + } + + reference + "RFC 5306: Restart Signaling for IS-IS; RFC 5706: Restart Signaling + for IS-IS"; + } + + grouping isis-graceful-restart-interface-config { + description + "This grouping defines ISIS graceful restart configuration relevant + for ISIS interface/adjacency"; + + leaf interface-timer { + type uint16; + description + "Value of RFC5306/RFC8706 T1 timer"; + } + + leaf interface-time-expirations { + type int64; + description + "Number of times T1 expires before IIH without Restart TLV's RR flag + set is sent. That is GR helper is not supported by adjacents + Inermediate System"; + } + + reference + "RFC 5306: Restart Signaling for IS-IS; RFC 5706: Restart Signaling + for IS-IS"; } // configuration context containers @@ -922,22 +1050,7 @@ module openconfig-isis { "Policy governing the propagation of prefixes between levels."; uses oc-rpol:apply-policy-import-config; - } - - grouping authentication-key-group-config { - description - "This grouping defines ISIS authentication key configuration."; - - uses authentication-key-config; - - // TODO(robjs): Add crypto-algorithm after merge of authentication modules. - //leaf crypto-algorithm { - // type identityref { - // base oc-auth-types:CRYPTO_TYPE; - // } - // description - // "Authentication key cryptographic algorithm to be used for key encryption."; - //} + uses oc-rpol:default-policy-import-config; } grouping isis-mpls-config { @@ -1073,6 +1186,8 @@ module openconfig-isis { uses admin-config; uses isis-graceful-restart-config; + uses isis-graceful-restart-level-config; + uses isis-graceful-restart-interface-config; } container state { @@ -1082,6 +1197,8 @@ module openconfig-isis { uses admin-config; uses isis-graceful-restart-config; + uses isis-graceful-restart-level-config; + uses isis-graceful-restart-interface-config; } } @@ -1196,19 +1313,15 @@ module openconfig-isis { "This grouping defines ISIS route preference configuration"; leaf external-route-preference { - type uint8 { - range "1..max"; - } + type uint32; description - "Administrative Distance(preference) for external ISIS routes."; + "Administrative Distance (preference) for external ISIS routes."; } leaf internal-route-preference { - type uint8 { - range "1..max"; - } + type uint32; description - "Administrative Distance(preference) for internal ISIS routes."; + "Administrative Distance (preference) for internal ISIS routes."; } } @@ -1220,7 +1333,12 @@ module openconfig-isis { key "interface-id"; description - "This list contains ISIS interfaces."; + "This list contains ISIS interfaces. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { @@ -1308,6 +1426,24 @@ module openconfig-isis { } } + container weighted-ecmp { + description + "This container defines ISIS interface weighted ECMP options"; + + container config { + description + "Configuration parameters relating to weighted ecmp"; + uses isis-interface-weighted-ecmp-config; + } + + container state { + config false; + description + "This container defines state information for weighted ecmp"; + uses isis-interface-weighted-ecmp-config; + } + } + uses oc-bfd:bfd-enable; container bfd { description @@ -1328,6 +1464,25 @@ module openconfig-isis { uses isis-bfd-config; } } + container graceful-restart { + description + "This container defines ISIS Graceful Restart for interface"; + + container config { + description + "This container defines interface config parameters for ISIS + graceful-restart."; + + uses isis-graceful-restart-interface-config; + } + container state { + config false; + description + "This container defines information for ISIS graceful-restart."; + + uses isis-graceful-restart-interface-config; + } + } } grouping isis-bfd-config { @@ -1404,7 +1559,7 @@ module openconfig-isis { description "This container defines ISIS level based configuration."; - uses admin-config; + uses admin-config-deprecated; uses isis-base-level-config; uses isis-metric-style-config; uses isis-authentication-check-config; @@ -1421,6 +1576,28 @@ module openconfig-isis { uses isis-authentication-check-config; } + container graceful-restart { + description + "This container defines ISIS Graceful Restart."; + + container config { + description + "This container defines ISIS graceful-restart configuration."; + + uses admin-config; + uses isis-graceful-restart-level-config; + } + + container state { + config false; + description + "This container defines state information for ISIS graceful-restart."; + + uses admin-config; + uses isis-graceful-restart-level-config; + } + } + container system-level-counters { description "This container defines ISIS system level counters."; @@ -1486,9 +1663,81 @@ module openconfig-isis { container authentication { description "This container defines ISIS authentication."; - uses isis-authentication-group; + uses isis-level-authentication-group; + } + } + + grouping isis-level-authentication-group { + description + "Grouping containing structural elements for authentication in IS-IS."; + + container config { + description + "Configuration parameters relating to IS-IS authentication."; + + uses isis-level-authentication-config; + uses isis-authentication-type-config; + uses isis-simple-key-authentication-config; + } + + container state { + config false; + description + "Operational state parameters relating to IS-IS authentication."; + uses isis-level-authentication-config; + uses isis-authentication-type-config; + uses isis-simple-key-authentication-config; + } + } + + grouping isis-level-authentication-config { + description + "Configuration leaves for IS-IS authentication."; + + leaf enabled { + type boolean; + default false; + description + "When this leaf is set to true, authentication of IS-IS PSNP, CSNP and + LSP packets is enabled using the specified authentication details in + the sibling leaves. + + The sibling 'disable-' leaves can be used to override the value + of this leaf and disable authentication for a specific packet type."; + } + + leaf disable-csnp { + type boolean; + default false; + description + "When this leaf is set to true, authentication is disabled for CSNP + packets, overriding the value of the enabled leaf in this context."; } + leaf disable-psnp { + type boolean; + default false; + description + "When this leaf is set to true, authentication is disabled for PSNP + packets, overriding the value of the enabled leaf in this context."; + } + + leaf disable-lsp { + type boolean; + default false; + description + "When this leaf is set to true, authentication is disabled for LSP + packets, overriding the value of the enabled leaf in this context."; + } + + leaf keychain { + type oc-keychain:keychain-ref; + description + "Reference to the keychain that should be used for authenticating IS-IS + packets - the keychain may contain either a simple password, or + HMAC-MD5 key that is used for authenticating CSNP, PSNP and LSP packets + within the specified IS-IS level."; + } } grouping isis-interface-level-group { @@ -1630,13 +1879,13 @@ module openconfig-isis { } leaf neighbor-ipv4-address { - type inet:ipv4-address-no-zone; + type oc-inet:ipv4-address; description "ISIS Neighbor IPv4 address."; } leaf neighbor-ipv6-address { - type inet:ipv6-address-no-zone; + type oc-inet:ipv6-address; description "ISIS Neighbor IPv6 address."; } @@ -1688,21 +1937,15 @@ module openconfig-isis { type oc-isis-types:isis-interface-adj-state; description "P2P 3-way ISIS adjacency state(up, down, init, failed)."; - reference "RFC4303. TLV 240."; + reference "RFC5303: TLV 240."; } - leaf remaining-hold-time { - type uint16; - units seconds; + leaf up-timestamp { + type oc-types:timeticks64; description - "Holding time in seconds for adjacency. This value is based on received - hello PDUs and the elapsed time since receipt."; - } - - leaf up-time { - type yang:timestamp; - description - "Adjacency up time."; + "Time at which the adjacency transitioned into the up state, expressed + as number of nanoseconds since the Unix epoch (Jan 1, 1970 00:00:00 + UTC)."; } leaf multi-topology { @@ -1784,32 +2027,32 @@ module openconfig-isis { "Operational state parameters relating to LSP packet counters."; leaf received { - type yang:counter32; + type oc-yang:counter32; description "The number of the specified type of PDU received on the interface."; } leaf processed { - type yang:counter32; + type oc-yang:counter32; description "The number of the specified type of PDU received on the interface that have been processed by the local system."; } leaf dropped { - type yang:counter32; + type oc-yang:counter32; description "The number of the specified type of PDU received on the interface that have been dropped."; } leaf sent { - type yang:counter32; + type oc-yang:counter32; description "The number of the specified type of PDU that have been sent by the local system on the interface."; } leaf retransmit { - type yang:counter32; + type oc-yang:counter32; description "The number of the specified type of PDU that that have been retransmitted by the local system on the interface."; @@ -1916,8 +2159,14 @@ module openconfig-isis { description "IS-IS counters that are relevant to the system IS-IS context."; + leaf total-lsps { + type oc-yang:counter32; + description + "Number of LSPs in the database at the system level."; + } + leaf corrupted-lsps { - type yang:counter32; + type oc-yang:counter32; description "Number of corrupted in-memory LSPs detected. LSPs received from the wire with a bad checksum are silently dropped and not counted. LSPs @@ -1926,7 +2175,7 @@ module openconfig-isis { } leaf database-overloads { - type yang:counter32; + type oc-yang:counter32; description "Number of times the database has become overloaded. @@ -1934,27 +2183,27 @@ module openconfig-isis { } leaf manual-address-drop-from-areas { - type yang:counter32; + type oc-yang:counter32; description "Number of times a manual address has been dropped from area. MIB Entry: SysManAddrDropFromAreas."; } leaf exceed-max-seq-nums { - type yang:counter32; + type oc-yang:counter32; description "The number of times the system has attempted to exceed the maximum sequence number. MIB Entry: SysAttmptToExMaxSeqNums."; } leaf seq-num-skips { - type yang:counter32; + type oc-yang:counter32; description "Number of times a sequence number skip has occurred. MIB Entry: SysSeqNumSkips."; } leaf own-lsp-purges { - type yang:counter32; + type oc-yang:counter32; description "Number of times a zero-aged copy of the system's own LSP is received from some other node. @@ -1962,7 +2211,7 @@ module openconfig-isis { } leaf id-len-mismatch { - type yang:counter32; + type oc-yang:counter32; description "Number of times a PDU is received with a different value for ID field length from that of the receiving system. MIB Entry: @@ -1970,13 +2219,13 @@ module openconfig-isis { } leaf part-changes { - type yang:counter32; + type oc-yang:counter32; description "The number of partition changes detected. MIB Entry: SysPartChanges."; } leaf max-area-address-mismatches { - type yang:counter32; + type oc-yang:counter32; description "Number of times a PDU is received with a different value for MaximumAreaAddresses from that of the receiving system. MIB Entry: @@ -1984,26 +2233,26 @@ module openconfig-isis { } leaf auth-fails { - type yang:counter32; + type oc-yang:counter32; description "The number of authentication key failures. MIB Entry: SysAuthFails."; } leaf spf-runs { - type yang:counter32; + type oc-yang:counter32; description "The number of times SPF was ran at this level."; } leaf auth-type-fails { - type yang:counter32; + type oc-yang:counter32; description "The number of authentication type mismatches."; } leaf lsp-errors { - type yang:counter32; + type oc-yang:counter32; description "The number of received LSPs with errors."; } @@ -2028,28 +2277,28 @@ module openconfig-isis { interface or circuit."; leaf adj-changes { - type yang:counter32; + type oc-yang:counter32; description "Number of times an adjacency state change has occurred on this circuit. MIB Entry: CircAdjChanges."; } leaf init-fails { - type yang:counter32; + type oc-yang:counter32; description "Number of times initialization of this circuit has failed. This counts events such as PPP NCP failures. MIB Entry: CircInitFails."; } leaf rejected-adj { - type yang:counter32; + type oc-yang:counter32; description "Number of times an adjacency has been rejected on this circuit. MIB Entry: CircRejAdjs."; } leaf id-field-len-mismatches { - type yang:counter32; + type oc-yang:counter32; description "Number of times an IS-IS control PDU with an ID field length different from that for this system has been received. @@ -2057,7 +2306,7 @@ module openconfig-isis { } leaf max-area-address-mismatches { - type yang:counter32; + type oc-yang:counter32; description "Number of times an IS-IS control PDU with a max area address field different from that for this system has been received. MIB Entry: @@ -2065,7 +2314,7 @@ module openconfig-isis { } leaf auth-type-fails { - type yang:counter32; + type oc-yang:counter32; description "Number of times an IS-IS control PDU with an auth type field different from that for this system has been received. MIB Entry: @@ -2073,14 +2322,14 @@ module openconfig-isis { } leaf auth-fails { - type yang:counter32; + type oc-yang:counter32; description "Number of times an IS-IS control PDU with the correct auth type has failed to pass authentication validation. MIB Entry: CircAuthFails."; } leaf lan-dis-changes { - type yang:counter32; + type oc-yang:counter32; description "Number of times the Designated IS has changed on this circuit at this level. If the circuit is point to point, this count is zero. MIB Entry: diff --git a/release/models/keychain/.spec.yml b/release/models/keychain/.spec.yml new file mode 100644 index 000000000..8c56cb134 --- /dev/null +++ b/release/models/keychain/.spec.yml @@ -0,0 +1,7 @@ +- name: openconfig-keychain + docs: + - yang/keychain/openconfig-keychain-types.yang + - yang/keychain/openconfig-keychain.yang + build: + - yang/keychain/openconfig-keychain.yang + run-ci: true diff --git a/release/models/keychain/openconfig-keychain-types.yang b/release/models/keychain/openconfig-keychain-types.yang new file mode 100644 index 000000000..3a49c6857 --- /dev/null +++ b/release/models/keychain/openconfig-keychain-types.yang @@ -0,0 +1,176 @@ +module openconfig-keychain-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/oc-keychain-types"; + + prefix "oc-keychain-types"; + + import openconfig-extensions { prefix oc-ext; } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module contains general data definitions for use in + keychain-based authentication."; + + oc-ext:openconfig-version "0.3.1"; + + revision "2024-08-27" { + description + "fix typo on AES_128_CMAC"; + reference "0.3.1"; + } + + revision "2024-08-27" { + description + "Added AES_128_CMAC and AES_256_CMAC"; + reference "0.3.0"; + } + + revision "2024-08-27" { + description + "Fix typo in identity AES_128_CMAC_96"; + reference "0.2.1"; + } + + revision "2022-03-01" { + description + "Remove NONE identity from AUTH_TYPE"; + reference "0.2.0"; + } + + revision "2021-10-01" { + description + "Initial revision of types for keychain model"; + reference "0.1.0"; + } + + + identity AUTH_TYPE { + description + "Base identify to define the type of authentication"; + } + + identity SIMPLE_KEY { + base AUTH_TYPE; + description + "Authentication is provided via a simple authentication key. The + key is configured at each end, and the exchange of the key may be + encrypted or not"; + } + + identity KEYCHAIN { + base AUTH_TYPE; + description + "This identity indicates that the authentication is selected + from a keychain."; + } + + identity CRYPTO_TYPE { + description + "Base identify for the cryptographic algorithm"; + } + + identity CRYPTO_NONE{ + base CRYPTO_TYPE; + description + "No encryption is used"; + } + + identity MD5 { + base CRYPTO_TYPE; + description + "MD5 message-digest algorithm produces a 128-bit hash value."; + reference + "RFC 1321 - The MD5 Message-Digest Algorithm"; + } + + identity HMAC_MD5 { + base CRYPTO_TYPE; + description + "HMAC-MD5 keyed hash algorithm constructed from MD5 hash + function and used as a HMAC."; + reference + "RFC 2104 - HMAC: Keyed-Hashing for Message Authentication"; + } + + identity SHA_1 { + base CRYPTO_TYPE; + description + "SHA-1 cryptographic hash function that produces a 160-bit hash value."; + reference + "RFC 3174 - US Secure Hash Algorithm 1 (SHA1)"; + } + identity HMAC_SHA_1 { + base CRYPTO_TYPE; + description + "HMAC-SHA-1 keyed hash algorithm constructed from SHA-1 hash + function and used as a HMAC."; + } + + identity HMAC_SHA_1_12 { + base CRYPTO_TYPE; + description + "HMAC-SHA-1-12 algorithm"; + } + + identity HMAC_SHA_1_20 { + base CRYPTO_TYPE; + description + "HMAC-SHA-1-20 algorithm"; + } + + identity HMAC_SHA_1_96 { + base CRYPTO_TYPE; + description + "HMAC-SHA-1-96 keyed hash algorithm constructed from SHA-1 hash + function and used as a HMAC, operating on 64-byte blocks of data."; + reference + "RFC 2404 - The Use of HMAC-SHA-1-96 within ESP and AH"; + } + + identity HMAC_SHA_256 { + base CRYPTO_TYPE; + description + "HMAC-SHA-256 keyed hash algorithm constructed from the secure + SHA-256 hash function and used as a HMAC."; + reference + "RFC 6234 - US Secure Hash Algorithms (SHA and SHA-based + HMAC and HKDF)"; + } + + identity AES_128_CMAC_96 { + base CRYPTO_TYPE; + description + "AES-128-CMAC-96 keyed hash function based on a AES-128 block + cipher."; + reference + "RFC 4494 - The AES-CMAC-96 Algorithm and Its Use with IPsec"; + } + + identity AES_128_CMAC { + base CRYPTO_TYPE; + description + "AES-128-CMAC keyed hash function based on a AES-128 block + cipher."; + reference + "RFC 4493 - The AES-CMAC Algorithm and Its Use with IPsec"; + } + + identity AES_256_CMAC { + base CRYPTO_TYPE; + description + "AES-256-CMAC keyed hash function based on a AES-256 block + cipher."; + reference + "RFC 4493 - The AES-CMAC Algorithm and Its Use with IPsec"; + } +} diff --git a/release/models/keychain/openconfig-keychain.yang b/release/models/keychain/openconfig-keychain.yang new file mode 100644 index 000000000..d073f13a1 --- /dev/null +++ b/release/models/keychain/openconfig-keychain.yang @@ -0,0 +1,320 @@ +module openconfig-keychain { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/oc-keychain"; + + prefix "oc-keychain"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-keychain-types { prefix oc-keychain-types; } + import openconfig-types { prefix oc-types; } + import openconfig-yang-types { prefix oc-yang; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module describes a YANG model for keychain configuration + and management. These keys can be changed frequently to + increase security in long-lived connections. A keychain can be used + for authenticaion in a number of scenarios, including in routing protocols + (e.g. BGP, IS-IS, OSPF). A keychain provides a solution for storing + a number of different keys, each key string value is associated with a + specific key id, name, the lifetime that the key is valid and an + encryption algorithm. + + This model defines a central location for defining named keychains, + which may be then referenced by other models such as routing protocol + management."; + + oc-ext:openconfig-version "0.5.0"; + +revision "2024-05-30" { + description + "Update key-id to a union of hex-string-prefixed and uint64."; + reference "0.5.0"; + } + + revision "2022-11-05" { + description + "Update key-id to a union of hex-string and uint64."; + reference "0.4.0"; + } + + revision "2022-03-05" { + description + "Add prefix qualification to keychain-ref"; + reference "0.3.0"; + } + + revision "2021-12-31" { + description + "Add keychain-ref type to allow for a resuable reference to a keychain."; + reference "0.2.0"; + } + + revision "2021-10-01" { + description + "Initial revision of keychain model."; + reference "0.1.0"; + } + + typedef keychain-ref { + type leafref { + path "/oc-keychain:keychains/oc-keychain:keychain/" + + "oc-keychain:config/oc-keychain:name"; + } + description + "A reference to a keychain defined on the system that can be used by + modules that require access to keychains."; + } + + grouping valid-lifetime-config { + description + "This grouping defines key begin lifetime parameters."; + + leaf start-time { + type oc-types:timeticks64; + description + "The time at which the key becomes valid for use. + The value is the timestamp in nanoseconds relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + } + + leaf end-time { + type oc-types:timeticks64; + description + "The time at which the key becomes invalid for use. + The value is the timestamp in nanoseconds relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC). + + Leaving this value unset, or setting it to 0, indicates that + the key remains valid forever (no end time)."; + } + } + + grouping lifetime-symmetry-config { + description + "Grouping to define configuration data for managing how + send and receive lifetime are specified."; + + leaf send-and-receive { + type boolean; + description + "When this is set to true (the default value), the specified + send lifetime is also used in the receive direction. When set + to false, the device should use the specified receive-lifetime + for the receive direction (asymmetric mode). If send-and-receive + is false, and the device does not support asymmetric configuration, + the config should be rejected as unsupported."; + default true; + } + } + + grouping lifetime-base { + description + "This grouping defines key lifetime parameters."; + + container send-lifetime { + description + "Specifies the lifetime of the key for sending authentication + information to the peer."; + + container config { + description + "Configuration data for key send lifetime."; + + uses valid-lifetime-config; + uses lifetime-symmetry-config; + } + + container state { + config false; + description + "Operational state data for key send lifetime."; + + uses valid-lifetime-config; + uses lifetime-symmetry-config; + } + } + + container receive-lifetime { + description + "Specify the validity lifetime of the key in the receive direction. + Some platforms may only support symmetric send and receive lifetimes, + in which case the receive-lifetime is typically not specified."; + + container config { + description + "Configuration data for key receive lifetime."; + + uses valid-lifetime-config; + } + + container state { + config false; + description + "Operational state data for key receive lifetime."; + + uses valid-lifetime-config; + } + } + } + + grouping keychain-base-config { + description + "This grouping defines key-chain parameters."; + + leaf name { + type string; + description + "Keychain name."; + } + + leaf tolerance { + type union { + type enumeration { + enum FOREVER { + description + "Receive key does not expire (equivalent to infinite tolerance)."; + } + } + type uint32; + } + description + "Tolerance (overlap time) that a receive key should be accepted. May be + expressed as range in seconds, or using the FOREVER value to indicate + that the key does not expire. The default value should be 0, i.e., no + tolerance."; + } + } + + grouping keychain-key-config { + description "This grouping defines key-chain key parameters."; + + leaf key-id { + type union { + type oc-yang:hex-string-prefixed { + length "3..66"; + } + type uint64; + } + description + "Identifier for the key within the keychain. Note that the + hex-string type is deprecated and will be removed from a future + version of this model. Implementations should transition to using + the hex-string-prefixed type."; + } + + leaf secret-key { + type string; + description + "Authentication key supplied as an encrypted value. The system should store and + return the key in encrypted form."; + } + + leaf crypto-algorithm { + type identityref { + base oc-keychain-types:CRYPTO_TYPE; + } + description + "Cryptographic algorithm associated with the key. Note that not all cryptographic + algorithms are available in all contexts (e.g., across different protocols)."; + } + } + + grouping keychain-key-base { + description + "This grouping defines keychain parameters"; + + container keys { + description + "list of keys to be stored"; + list key { + key "key-id"; + description + "List of configured keys for the keychain."; + + leaf key-id { + type leafref { + path "../config/key-id"; + } + description + "Reference to key id."; + } + + container config { + description + "This container defines keychain key configuration."; + + uses keychain-key-config; + } + + container state { + config false; + description + "This container defines keychain key state."; + + uses keychain-key-config; + } + + uses lifetime-base; + } + } + } + + grouping keychain-common-base { + description + "This grouping defines keychain parameters"; + + container config { + description + "This container defines keychain configuration."; + + uses keychain-base-config; + } + + container state { + config false; + description + "This container defines keychain state information."; + + uses keychain-base-config; + } + } + + grouping keychain-top { + description + "This grouping define top level structure."; + + container keychains { + description + "This container defines keychains."; + + list keychain { + key "name"; + description + "List of defined keychains."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Reference to configured keychain name"; + } + + uses keychain-common-base; + uses keychain-key-base; + } + } + } + + uses keychain-top; +} diff --git a/release/models/lacp/openconfig-lacp.yang b/release/models/lacp/openconfig-lacp.yang index 078a6ef3b..f69f15f71 100644 --- a/release/models/lacp/openconfig-lacp.yang +++ b/release/models/lacp/openconfig-lacp.yang @@ -26,7 +26,20 @@ module openconfig-lacp { managing aggregate interfaces. It works in conjunction with the OpenConfig interfaces and aggregate interfaces models."; - oc-ext:openconfig-version "1.2.0"; + oc-ext:openconfig-version "2.1.0"; + + revision "2024-09-24" { + description + "Add LACP fallback leaf under both config and state."; + reference "2.1.0"; + } + + revision "2023-12-11" { + description + "Add config container for aggregation member and port-priority leaf under + both config and state"; + reference "2.0.0"; + } revision "2021-07-20" { description @@ -138,20 +151,23 @@ module openconfig-lacp { description "Configuration data for lacp member interfaces"; - //currently a placeholder -- the list of member interfaces - //and their status is considered opstate only - } - - grouping aggregation-lacp-members-state { - description - "Operational status data for the member interfaces"; - leaf interface { type oc-if:base-interface-ref; description "Reference to interface member of the LACP aggregate"; } + leaf port-priority { + type uint16; + description + "Member interface's priority in its aggregate interface."; + } + } + + grouping aggregation-lacp-members-state { + description + "Operational status data for the member interfaces"; + leaf activity { type lacp-activity-type; description "Indicates participant is active or passive"; @@ -234,6 +250,12 @@ module openconfig-lacp { port"; } + leaf partner-port-priority { + type uint16; + description + "Member interface partner's priority in its aggregate interface."; + } + leaf last-change { type oc-types:timeticks64; description @@ -310,28 +332,31 @@ grouping aggregation-lacp-members-statistics { "Top-level grouping for aggregate members list"; container members { - config false; description - "Enclosing container for the list of members interfaces of - the aggregate. This list is considered operational state - only so is labeled config false and has no config container"; + "Configuration and operational state of the aggregate member + interfaces"; list member { key "interface"; description "List of member interfaces and their associated status for - a LACP-controlled aggregate interface. Member list is not - configurable here -- each interface indicates items - its participation in the LAG."; + a LACP-controlled aggregate interface"; leaf interface { type leafref { - path "../state/interface"; + path "../config/interface"; } description "Reference to aggregate member interface"; } + container config { + description + "Operational state data for aggregate members"; + + uses aggregation-lacp-members-config; + } + container state { @@ -340,6 +365,7 @@ grouping aggregation-lacp-members-statistics { description "Operational state data for aggregate members"; + uses aggregation-lacp-members-config; uses aggregation-lacp-members-state; uses aggregation-lacp-members-statistics; } @@ -387,6 +413,15 @@ grouping aggregation-lacp-members-statistics { system-id"; } + leaf fallback { + type boolean; + description + "If the fallback is set to true, current LACP interface is + able to establish a Link Aggregation (LAG) before it receives + LACP PDUs from its peer, and fallback to a single port active + after the expiry of the timeout period."; + } + uses aggregation-lacp-global-config; } diff --git a/release/models/local-routing/openconfig-local-routing.yang b/release/models/local-routing/openconfig-local-routing.yang index 37a653881..2b9a90a01 100644 --- a/release/models/local-routing/openconfig-local-routing.yang +++ b/release/models/local-routing/openconfig-local-routing.yang @@ -43,7 +43,21 @@ module openconfig-local-routing { protocol-specific policy after importing the route into the protocol for distribution (again via routing policy)."; - oc-ext:openconfig-version "1.2.0"; + oc-ext:openconfig-version "2.0.1"; + + revision "2022-11-01" { + description + "Update static route nexthop index description."; + reference "2.0.1"; + } + + revision "2022-05-10" { + description + "Removal of top-level /local-routes, description update to + static route metric, addition of static/aggregate route + preference, addition of aggregate route metric."; + reference "2.0.0"; + } revision "2020-03-24" { description @@ -119,7 +133,7 @@ module openconfig-local-routing { grouping local-generic-settings { description - "Generic options that can be set on local routes When + "Generic options that can be set on local routes when they are defined"; leaf set-tag { @@ -137,6 +151,39 @@ module openconfig-local-routing { } } + grouping local-common-route-attributes { + description + "Common route attributes that can be set on static route next-hops + as well as aggregate routes."; + + leaf metric { + type uint32; + description + "A metric (or cost) which is utilized to specify the order of + selection of the next-hop entry. The lower the metric, the more + preferable the prefix entry is. When this value is not + specified, the metric is inherited from the default metric of + the implementation for static route entries. When multiple + next-hops are specified for a static route, the metric is + utilized to determine which of the next-hops to be installed in + the RIB. When multiple next-hops have the same metric (be it + specified, or simply the default) then these next-hops should + all be installed in the RIB."; + } + + leaf preference { + type uint32; + description + "Administrative Distance (preference) of the entry. The + preference defines the order of selection when multiple + sources (protocols, static, etc.) contribute to the same + prefix entry. The lower the preference, the more preferable the + prefix is. When this value is not specified, the preference is + inherited from the default preference of the implementation for + static routes."; + } + } + grouping local-static-config { description "Configuration data for static routes."; @@ -168,7 +215,8 @@ module openconfig-local-routing { "An user-specified identifier utilised to uniquely reference the next-hop entry in the next-hop list. The value of this index has no semantic meaning other than for referencing - the entry."; + the entry. It is observed that implementations typically + only support a numeric value for this string. "; } leaf next-hop { @@ -186,23 +234,6 @@ module openconfig-local-routing { interface."; } - leaf metric { - type uint32; - description - "A metric which is utilised to specify the preference of - the next-hop entry when it is injected into the RIB. The - lower the metric, the more preferable the prefix is. When - this value is not specified the metric is inherited from - the default metric utilised for static routes within the - network instance that the static routes are being - instantiated. When multiple next-hops are specified for a - static route, the metric is utilised to determine which of - the next-hops is to be installed in the RIB. When multiple - next-hops have the same metric (be it specified, or simply - the default) then these next-hops should all be installed - in the RIB"; - } - leaf recurse { type boolean; default false; @@ -217,6 +248,8 @@ module openconfig-local-routing { restricted to being via the interface specified - and recursion is hence disabled."; } + + uses local-common-route-attributes; } grouping local-static-nexthop-state { @@ -339,7 +372,7 @@ module openconfig-local-routing { } uses local-generic-settings; - + uses local-common-route-attributes; } grouping local-aggregate-state { @@ -392,47 +425,4 @@ module openconfig-local-routing { } } - grouping local-routes-config { - description - "Configuration data for locally defined routes"; - } - - grouping local-routes-state { - description - "Operational state data for locally defined routes"; - } - - grouping local-routes-top { - description - "Top-level grouping for local routes"; - - container local-routes { - description - "Top-level container for local routes"; - - container config { - description - "Configuration data for locally defined routes"; - - uses local-routes-config; - } - - container state { - - config false; - - description - "Operational state data for locally defined routes"; - - uses local-routes-config; - uses local-routes-state; - } - - uses local-static-top; - uses local-aggregate-top; - } - } - - uses local-routes-top; - } diff --git a/release/models/macsec/openconfig-macsec.yang b/release/models/macsec/openconfig-macsec.yang index 039565bfa..2b2d4e51e 100644 --- a/release/models/macsec/openconfig-macsec.yang +++ b/release/models/macsec/openconfig-macsec.yang @@ -7,6 +7,7 @@ module openconfig-macsec { import openconfig-interfaces { prefix oc-if; } import openconfig-macsec-types { prefix macsec-types; } import openconfig-yang-types { prefix oc-yang; } + import openconfig-keychain { prefix "oc-keychain"; } organization "OpenConfig working group"; @@ -17,11 +18,29 @@ module openconfig-macsec { "This module defines configuration and state data for MACsec IEEE Std 802.1AE-2018."; - oc-ext:openconfig-version "0.2.0"; + oc-ext:openconfig-version "1.1.1"; oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; + revision "2023-08-03" { + description + "Clarify in-cak and out-cak leaf descriptions."; + reference "1.1.1"; + } + +revision "2023-06-08" { + description + "Support rx-late-pkts leaf."; + reference "1.1.0"; + } + + revision "2022-04-28" { + description + "Use global key chain model."; + reference "1.0.0"; + } + revision "2020-05-01" { description "Move identifiers for scsa-[tr]x out of @@ -136,59 +155,6 @@ module openconfig-macsec { } } - grouping macsec-mka-key-chain-config { - description - "MKA Key chain config grouping"; - - leaf name { - type string; - description - "MKA Key-chain name"; - } - } - - grouping macsec-mka-key-chain-top { - description - "MKA key chain top level grouping"; - - container key-chains { - description - "Enclosing container for the MKA key chains"; - - list key-chain { - key "name"; - - description - "MKA Key chain name"; - - leaf name { - type leafref { - path "../config/name"; - } - description - "Reference to the MKA Key chain name"; - } - - container config { - description - "Configuration of the MKA key chain"; - - uses macsec-mka-key-chain-config; - } - - container state { - config false; - description - "Operational state data for MKA key chain"; - - uses macsec-mka-key-chain-config; - } - - uses macsec-mka-key-top; - } - } - } - grouping macsec-mka-interface-config { description "MKA interface config grouping"; @@ -203,7 +169,8 @@ module openconfig-macsec { leaf key-chain { type leafref { - path "/macsec/mka/key-chains/key-chain/name"; + path "/oc-keychain:keychains/oc-keychain:keychain/" + + "oc-keychain:name"; } description "Configure Key Chain name"; @@ -229,7 +196,9 @@ module openconfig-macsec { leaf in-cak-mkpdu { type oc-yang:counter64; description - "Validated MKPDU received CAK count"; + "Count of validated MKPDU connectivity association key (CAK) pdus + received. This counter is related to the group-cak feature in the + 802.1X-2010 standard."; } leaf out-mkpdu { @@ -247,7 +216,9 @@ module openconfig-macsec { leaf out-cak-mkpdu { type oc-yang:counter64; description - "MKPDU CAK sent count"; + "Count of MKPDU connectivity association key (CAK) pdu's sent. + This counter is related to the group-cak feature in the + 802.1X-2010 standard."; } } @@ -464,6 +435,15 @@ module openconfig-macsec { This counter will increment if MACsec is enabled on interface and incoming packet does not have SCI field in MACsec tag."; } + + leaf rx-late-pkts { + type oc-yang:counter64; + description + "MACsec interface level Receive Late Packets counter. + This counter will increment if MACsec is enabled on the interface and + packet number of incoming packet is less than the lowest acceptable + packet number and replay protection is enabled."; + } } grouping macsec-scsa-interface-top { @@ -812,7 +792,6 @@ module openconfig-macsec { "The MKA"; uses macsec-mka-policy-top; - uses macsec-mka-key-chain-top; uses macsec-mka-global-top; } } diff --git a/release/models/mpls/openconfig-mpls-igp.yang b/release/models/mpls/openconfig-mpls-igp.yang index 9409138a5..c88eb0807 100644 --- a/release/models/mpls/openconfig-mpls-igp.yang +++ b/release/models/mpls/openconfig-mpls-igp.yang @@ -21,7 +21,71 @@ submodule openconfig-mpls-igp { "Configuration generic configuration parameters for IGP-congruent LSPs"; - oc-ext:openconfig-version "3.0.1"; + oc-ext:openconfig-version "3.6.0"; + + revision "2024-06-19" { + description + "Added support with backward compatibility to configure ECMP + of next-hops for the same LSP name. Also marked attributes + push-label, next-hop and interface as deprecated under egress, + transit and ingress config"; + reference "3.6.0"; + } + + revision "2023-12-14" { + description + "Added additional attributes oc-if:interface-ref + and metric attributes to static lsp"; + reference "3.5.0"; + } + + revision "2023-07-25" { + description + "Added record-route-enabled to MPLS p2p tunnel config"; + reference "3.4.0"; + } + + revision "2023-04-28" { + description + "Fixed typo in cspf-tiebreaker leaf description"; + reference "3.3.2"; + } + + revision "2023-02-03" { + description + "Clarify usage of interface-ref."; + reference "3.3.1"; + } + + revision "2022-02-11" { + description + "Add lsp-path PCE control mode"; + reference "3.3.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "3.2.2"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "3.2.1"; + } + + revision "2021-03-24" { + description + "Add Metric bounds constraints for LSPs."; + reference "3.2.0"; + } + + revision "2019-03-26" { + description + "Add Pseudowire encapsulation."; + reference "3.1.0"; + } revision "2018-11-21" { description diff --git a/release/models/mpls/openconfig-mpls-ldp.yang b/release/models/mpls/openconfig-mpls-ldp.yang index 4810fafe8..46fb6c363 100644 --- a/release/models/mpls/openconfig-mpls-ldp.yang +++ b/release/models/mpls/openconfig-mpls-ldp.yang @@ -43,7 +43,19 @@ module openconfig-mpls-ldp { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "3.1.0"; + oc-ext:openconfig-version "3.2.1"; + + revision "2023-02-06" { + description + "Add clarification of use of interface-ref."; + reference "3.2.1"; + } + + revision "2022-02-21" { + description + "Added downstream-on-demand support"; + reference "3.2.0"; + } revision "2020-01-09" { description @@ -168,6 +180,21 @@ module openconfig-mpls-ldp { "enumerated type for specifying LDP AFIs"; } + typedef label-advertisement-mode { + type enumeration { + enum DOWNSTREAM_UNSOLICITED { + description + "Downstream Unsolicited."; + } + enum DOWNSTREAM_ON_DEMAND { + description + "Downstream on Demand."; + } + } + description + "Label Advertisement Mode."; + } + // grouping statements grouping ldp-global { @@ -343,6 +370,16 @@ module openconfig-mpls-ldp { "Label space ID of the neighbor."; } + leaf enable-downstream-on-demand { + type boolean; + default "false"; + description + "If this leaf is set to true, LDP downstream on demand is enabled in + the LDP session and the router advertises DoD to the peer. If the peer + also adverstises DoD, then downstream on demand is used in the session, + otherwise downstream unsolicited is used."; + } + } grouping mpls-ldp-neighbor-state { @@ -375,6 +412,20 @@ module openconfig-mpls-ldp { "RFC5036, Sec. 2.5.4."; } + leaf peer-label-advertisement-mode { + type label-advertisement-mode; + description + "This leaf shows the Label Advertisement Mode which is advertised by the peer."; + } + + leaf negotiated-label-advertisement-mode { + type label-advertisement-mode; + description + "This leaf shows the Label Advertisement Mode negotiated based on local + and remote preferences. If DoD is enabled and the peer also adverstises DoD, + then downstream is negotiated. Otherwise, downstream unsolicited is used."; + } + } grouping mpls-ldp-adjacency-state { @@ -523,7 +574,12 @@ module openconfig-mpls-ldp { list interface { key "interface-id"; description - "list of per-interface LDP configurations"; + "List of per-interface LDP configurations. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { diff --git a/release/models/mpls/openconfig-mpls-rsvp.yang b/release/models/mpls/openconfig-mpls-rsvp.yang index 2507aa95e..2a3fdd79b 100644 --- a/release/models/mpls/openconfig-mpls-rsvp.yang +++ b/release/models/mpls/openconfig-mpls-rsvp.yang @@ -28,7 +28,26 @@ module openconfig-mpls-rsvp { parameters and LSP-specific configuration for constrained-path LSPs"; - oc-ext:openconfig-version "3.0.2"; + oc-ext:openconfig-version "4.0.1"; + + revision "2023-02-06" { + description + "Clarify use of interface-ref."; + reference "4.0.1"; + } + + revision "2022-03-27" { + description + "Change authentication-key to routing-password type, Add new + authentication-type to indicate hashing algorithm."; + reference "4.0.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "3.0.3"; + } revision "2020-02-04" { description @@ -343,15 +362,18 @@ module openconfig-mpls-rsvp { "Enables RSVP authentication on the node."; } - leaf authentication-key { - type string { - // Juniper supports 1..16 while - // Cisco has a much bigger range, up to 60. - length "1..32"; + leaf authentication-type { + type identityref { + base oc-mplst:RSVP_AUTH_TYPE; } description - "authenticate RSVP signaling - messages"; + "RSVP message authentication algorithm type"; + } + + leaf authentication-key { + type oc-types:routing-password; + description + "Authenticate RSVP signaling messages"; reference "RFC 2747: RSVP Cryptographic Authentication"; } @@ -518,7 +540,12 @@ module openconfig-mpls-rsvp { list interface { key "interface-id"; description - "list of per-interface RSVP configurations"; + "List of per-interface RSVP configurations. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { @@ -574,7 +601,7 @@ module openconfig-mpls-rsvp { "properties of RSVP point-to-point paths"; leaf source { - when "../signaling-protocol = 'PATH_SETUP_RSVP'" { + when "../signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } @@ -584,7 +611,7 @@ module openconfig-mpls-rsvp { } leaf soft-preemption { - when "../signaling-protocol = 'PATH_SETUP_RSVP'" { + when "../signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } @@ -603,7 +630,7 @@ module openconfig-mpls-rsvp { an LSP tunnel"; leaf setup-priority { - when "../signaling-protocol = 'PATH_SETUP_RSVP'" { + when "../signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } @@ -620,7 +647,7 @@ module openconfig-mpls-rsvp { } leaf hold-priority { - when "../signaling-protocol = 'PATH_SETUP_RSVP'" { + when "../signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } @@ -644,7 +671,7 @@ module openconfig-mpls-rsvp { leaf setup-priority { when "../../../../../" + - "config/signaling-protocol = 'PATH_SETUP_RSVP'" { + "config/signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } @@ -662,7 +689,7 @@ module openconfig-mpls-rsvp { leaf hold-priority { when "../../../../../" + - "config/signaling-protocol = 'PATH_SETUP_RSVP'" { + "config/signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } @@ -687,7 +714,7 @@ module openconfig-mpls-rsvp { leaf retry-timer { when "../../../../../" + - "config/signaling-protocol = 'PATH_SETUP_RSVP'" { + "config/signaling-protocol = 'oc-mplst:PATH_SETUP_RSVP'" { description "When the signaling protocol is RSVP-TE "; } diff --git a/release/models/mpls/openconfig-mpls-static.yang b/release/models/mpls/openconfig-mpls-static.yang index f3d051297..a8e7c2faf 100644 --- a/release/models/mpls/openconfig-mpls-static.yang +++ b/release/models/mpls/openconfig-mpls-static.yang @@ -10,6 +10,7 @@ submodule openconfig-mpls-static { import openconfig-mpls-types {prefix oc-mplst; } import openconfig-inet-types { prefix inet; } import openconfig-extensions { prefix oc-ext; } + import openconfig-interfaces { prefix oc-if; } // meta @@ -23,7 +24,71 @@ submodule openconfig-mpls-static { "Defines static LSP configuration"; - oc-ext:openconfig-version "3.0.1"; + oc-ext:openconfig-version "3.6.0"; + + revision "2024-06-19" { + description + "Added support with backward compatibility to configure ECMP + of next-hops for the same LSP name. Also marked attributes + push-label, next-hop and interface as deprecated under egress, + transit and ingress config"; + reference "3.6.0"; + } + + revision "2023-12-14" { + description + "Added additional attributes oc-if:interface-ref + and metric attributes to static lsp"; + reference "3.5.0"; + } + + revision "2023-07-25" { + description + "Added record-route-enabled to MPLS p2p tunnel config"; + reference "3.4.0"; + } + + revision "2023-04-28" { + description + "Fixed typo in cspf-tiebreaker leaf description"; + reference "3.3.2"; + } + + revision "2023-02-03" { + description + "Clarify usage of interface-ref."; + reference "3.3.1"; + } + + revision "2022-02-11" { + description + "Add lsp-path PCE control mode"; + reference "3.3.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "3.2.2"; + } + + revision "2021-06-16" { + description + "Remove trailing whitespace"; + reference "3.2.1"; + } + + revision "2021-03-24" { + description + "Add Metric bounds constraints for LSPs."; + reference "3.2.0"; + } + + revision "2019-03-26" { + description + "Add Pseudowire encapsulation."; + reference "3.1.0"; + } revision "2018-11-21" { description @@ -100,28 +165,127 @@ submodule openconfig-mpls-static { // grouping statements - grouping static-lsp-common-config { + grouping static-lsp-nexthop-index { description - "common definitions for static LSPs"; + "Next hop index definition for static LSPs"; - leaf next-hop { + leaf index { + type uint32; + description + "An user-specified identifier utilised to uniquely reference + the next-hop entry in the next-hop list. The value of this + index has no semantic meaning other than for referencing + the entry."; + } + } + + grouping static-lsp-nexthop-common-config { + description + "Common definition of next hop configuration for static LSPs"; + + leaf ip-address { type inet:ip-address; description - "next hop IP address for the LSP"; + "Next hop IP address for the LSP"; } + leaf push-label { + type oc-mplst:mpls-label; + description + "Label value to push at the current hop for the + LSP"; + } + + // interface-ref + uses oc-if:interface-ref-common; + } + + grouping static-lsp-common-config { + description + "Common definitions for static LSPs"; + leaf incoming-label { type oc-mplst:mpls-label; description - "label value on the incoming packet"; + "Label value on the incoming packet"; + } + + leaf next-hop { + type inet:ip-address; + status deprecated; + description + "Next hop IP address for the LSP"; } leaf push-label { type oc-mplst:mpls-label; + status deprecated; description - "label value to push at the current hop for the + "Label value to push at the current hop for the LSP"; } + + // interface-ref + uses oc-if:interface-ref-common { + status deprecated; + } + + leaf metric { + type uint8; + description + "Specifies metric value used for the MPLS route."; + } + } + + grouping static-lsp-nexthops-common { + description + "MPLS Static LSP next-hops configuration"; + + container lsp-next-hops { + description + "Configuration and state parameters relating to the + next-hops that are to be utilised for the MPLS static + route being specified"; + + list lsp-next-hop { + key "index"; + + description + "A list of next-hops to be utilised for the MPLS + static route being specified."; + + leaf index { + type leafref { + path "../config/index"; + } + description + "A reference to the index of the current next-hop. + The index is intended to be a user-specified value + which can be used to reference the next-hop in + question, without any other semantics being + assigned to it."; + } + + container config { + description + "Configuration parameters relating to the next-hop + entry"; + + uses static-lsp-nexthop-index; + uses static-lsp-nexthop-common-config; + } + + container state { + config false; + description + "Operational state parameters relating to the + next-hop entry"; + + uses static-lsp-nexthop-index; + uses static-lsp-nexthop-common-config; + } + } + } } grouping static-lsp-ingress-config { @@ -162,6 +326,8 @@ submodule openconfig-mpls-static { uses static-lsp-ingress-config; uses static-lsp-ingress-state; } + + uses static-lsp-nexthops-common; } } @@ -203,6 +369,8 @@ submodule openconfig-mpls-static { uses static-lsp-transit-config; uses static-lsp-transit-state; } + + uses static-lsp-nexthops-common; } } @@ -244,6 +412,8 @@ submodule openconfig-mpls-static { uses static-lsp-egress-config; uses static-lsp-egress-state; } + + uses static-lsp-nexthops-common; } } diff --git a/release/models/mpls/openconfig-mpls-te.yang b/release/models/mpls/openconfig-mpls-te.yang index 8bbcfe973..647325357 100644 --- a/release/models/mpls/openconfig-mpls-te.yang +++ b/release/models/mpls/openconfig-mpls-te.yang @@ -15,6 +15,7 @@ submodule openconfig-mpls-te { import openconfig-types { prefix oc-types; } import openconfig-yang-types { prefix yang; } import openconfig-extensions { prefix oc-ext; } + import openconfig-pcep { prefix oc-pcep; } // meta organization "OpenConfig working group"; @@ -29,11 +30,57 @@ submodule openconfig-mpls-te { signaling protocol or mechanism (see related submodules for signaling protocol-specific configuration)."; - oc-ext:openconfig-version "3.1.1"; + oc-ext:openconfig-version "3.6.0"; + + revision "2024-06-19" { + description + "Added support with backward compatibility to configure ECMP + of next-hops for the same LSP name. Also marked attributes + push-label, next-hop and interface as deprecated under egress, + transit and ingress config"; + reference "3.6.0"; + } + + revision "2023-12-14" { + description + "Added additional attributes oc-if:interface-ref + and metric attributes to static lsp"; + reference "3.5.0"; + } + + revision "2023-07-25" { + description + "Added record-route-enabled to MPLS p2p tunnel config"; + reference "3.4.0"; + } + + revision "2023-04-28" { + description + "Fixed typo in cspf-tiebreaker leaf description"; + reference "3.3.2"; + } + + revision "2023-04-25" { + description + "Add clarifying comments on use of interface-ref."; + reference "3.3.1"; + } + + revision "2022-02-11" { + description + "Add lsp-path PCE control mode"; + reference "3.3.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "3.2.2"; + } revision "2021-06-16" { description - "Remove trailing whitespace"; + "Remove trailing whitespace."; reference "3.1.1"; } @@ -779,6 +826,11 @@ submodule openconfig-mpls-te { description "P2P tunnel destination address"; } + leaf record-route-enabled { + type boolean; + description + "Enables recording a path on an LSP using the record route object (RRO)"; + } } grouping p2p-path-state { @@ -840,7 +892,7 @@ submodule openconfig-mpls-te { } leaf use-cspf { - when "../path-computation-method = 'LOCALLY_COMPUTED'" { + when "../path-computation-method = 'oc-mplst:LOCALLY_COMPUTED'" { description "The use of cspf when the path-computation method is local computation"; @@ -851,7 +903,7 @@ submodule openconfig-mpls-te { } leaf cspf-tiebreaker { - when "../path-computation-method = 'LOCALLY_COMPUTED'" { + when "../path-computation-method = 'oc-mplst:LOCALLY_COMPUTED'" { description "The cspf tiebreaking method when the path is locally computed"; @@ -859,24 +911,34 @@ submodule openconfig-mpls-te { type cspf-tie-breaking; description "Determine the tie-breaking method to choose between - equally desirable paths during CSFP computation"; + equally desirable paths during CSPF computation"; } - leaf path-computation-server { - when "../path-computation-method = 'EXTERNALLY_QUERIED'" { + when "../path-computation-method = 'oc-mplst:EXTERNALLY_QUERIED'" { description "The path-computation server when the path is externally queried"; } - type inet:ip-address; + type leafref { + path "../../../../../../../../../../protocols/protocol/pcep/path-computation-servers/" + + "path-computation-server/pce-server-address"; + } + description + "Reference to the address of a previously configured + external path computation server."; + } + + leaf path-control { + type oc-pcep:lsp-control-type; description - "Address of the external path computation - server"; + "Set the LSP path control mode as PCE_DELEGATED + PCC_CONTROLLED or PCC_REPORT_ONLY information + state to the PCE."; } leaf explicit-path-name { - when "../path-computation-method = 'EXPLICITLY_DEFINED'" { + when "../path-computation-method = 'oc-mplst:EXPLICITLY_DEFINED'" { description "The name of the explicitly defined path used"; } @@ -910,7 +972,7 @@ submodule openconfig-mpls-te { "Top level grouping for p2p configuration"; container p2p-tunnel-attributes { - when "../config/type = 'P2P'" { + when "../config/type = 'oc-mplst:P2P'" { description "Include this container for LSPs of type P2P"; } diff --git a/release/models/mpls/openconfig-mpls-types.yang b/release/models/mpls/openconfig-mpls-types.yang index 6cba7ddc2..765e467cf 100644 --- a/release/models/mpls/openconfig-mpls-types.yang +++ b/release/models/mpls/openconfig-mpls-types.yang @@ -19,7 +19,20 @@ module openconfig-mpls-types { description "General types for MPLS / TE data model"; - oc-ext:openconfig-version "3.3.1"; + oc-ext:openconfig-version "3.5.0"; + + revision "2023-12-14" { + description + "Added additional attributes oc-if:interface-ref + and metric attributes to static lsp"; + reference "3.5.0"; + } + + revision "2021-12-01" { + description + "Add new identity for RSVP authentication types"; + reference "3.4.0"; + } revision "2021-06-16" { description @@ -286,7 +299,7 @@ module openconfig-mpls-types { "LSP is administratively up"; } - identity NULL_LABEL_TYPE { + identity NULL_LABEL_TYPE { description "Base identity from which specific null-label types are derived."; @@ -353,10 +366,10 @@ module openconfig-mpls-types { reference "IANA PWE3 0x0005"; } -identity PATH_METRIC_TYPE { - description - "Base identity for path metric type."; -} + identity PATH_METRIC_TYPE { + description + "Base identity for path metric type."; + } identity TE_METRIC { base PATH_METRIC_TYPE; @@ -398,6 +411,19 @@ identity PATH_METRIC_TYPE { Communication Protocol (PCEP)."; } + identity RSVP_AUTH_TYPE { + description + "Base identity for RSVP message authentication types"; + reference + "RFC2747: RSVP Cryptographic Authentication"; + } + + identity RSVP_AUTH_MD5 { + base RSVP_AUTH_TYPE; + description + "HMAC-MD5 message authentication"; + } + // typedef statements typedef mpls-label { type union { diff --git a/release/models/mpls/openconfig-mpls.yang b/release/models/mpls/openconfig-mpls.yang index ae76c1e68..693d67e4c 100644 --- a/release/models/mpls/openconfig-mpls.yang +++ b/release/models/mpls/openconfig-mpls.yang @@ -70,8 +70,53 @@ module openconfig-mpls { +------+ |ROUTING| +-----+ +-------+ "; + oc-ext:openconfig-version "3.6.0"; - oc-ext:openconfig-version "3.2.1"; + revision "2024-06-19" { + description + "Added support with backward compatibility to configure ECMP + of next-hops for the same LSP name. Also marked attributes + push-label, next-hop and interface as deprecated under egress, + transit and ingress config"; + reference "3.6.0"; + } + + revision "2023-12-14" { + description + "Added additional attributes oc-if:interface-ref + and metric attributes to static lsp"; + reference "3.5.0"; + } + + revision "2023-07-25" { + description + "Added record-route-enabled to MPLS p2p tunnel config"; + reference "3.4.0"; + } + + revision "2023-04-28" { + description + "Fixed typo in cspf-tiebreaker leaf description"; + reference "3.3.2"; + } + + revision "2023-04-25" { + description + "Clarify usage of interface-ref."; + reference "3.3.1"; + } + + revision "2022-02-11" { + description + "Add lsp-path PCE control mode"; + reference "3.3.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "3.2.2"; + } revision "2021-06-16" { description @@ -426,7 +471,12 @@ module openconfig-mpls { list interface { key "interface-id"; description - "List of TE interfaces"; + "List of TE interfaces. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { @@ -573,13 +623,20 @@ module openconfig-mpls { description "Top level grouping for attributes for MPLS-enabled interfaces."; + container interface-attributes { description "Parameters related to MPLS interfaces"; + list interface { key "interface-id"; description - "List of TE interfaces"; + "List of MPLS-enabled interfaces. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { diff --git a/release/models/multicast/openconfig-igmp.yang b/release/models/multicast/openconfig-igmp.yang index 5aa892ad3..4ed7881a8 100644 --- a/release/models/multicast/openconfig-igmp.yang +++ b/release/models/multicast/openconfig-igmp.yang @@ -26,7 +26,13 @@ module openconfig-igmp { description "An OpenConfig model for Internet Group Management Protocol (IGMP)."; - oc-ext:openconfig-version "0.3.0"; + oc-ext:openconfig-version "0.3.1"; + + revision "2023-02-03" { + description + "Clarify use of interface-ref."; + reference "0.3.1"; + } revision "2021-05-17" { description @@ -303,7 +309,12 @@ module openconfig-igmp { key "interface-id"; description "This container defines interface IGMP configuration and - state information."; + state information. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { diff --git a/release/models/multicast/openconfig-pim.yang b/release/models/multicast/openconfig-pim.yang index 7c3b0e83a..56639da97 100644 --- a/release/models/multicast/openconfig-pim.yang +++ b/release/models/multicast/openconfig-pim.yang @@ -27,7 +27,13 @@ module openconfig-pim { description "An OpenConfig model for Protocol Independent Multicast (PIM)."; - oc-ext:openconfig-version "0.4.2"; + oc-ext:openconfig-version "0.4.3"; + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.3"; + } revision "2021-06-16" { description @@ -292,7 +298,12 @@ module openconfig-pim { key "interface-id"; description "This container defines interface PIM configuration and - state information."; + state information. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { diff --git a/release/models/network-instance/.spec.yml b/release/models/network-instance/.spec.yml index 9c72f78a4..992b4a491 100644 --- a/release/models/network-instance/.spec.yml +++ b/release/models/network-instance/.spec.yml @@ -1,11 +1,22 @@ - name: openconfig-network-instance docs: - - yang/network-instance/openconfig-network-instance-types.yang - - yang/network-instance/openconfig-network-instance.yang + - yang/aft/openconfig-aft-network-instance.yang + - yang/aft/openconfig-aft-summary.yang - yang/network-instance/openconfig-evpn-types.yang - yang/network-instance/openconfig-evpn.yang + - yang/network-instance/openconfig-network-instance-types.yang + - yang/network-instance/openconfig-network-instance.yang + - yang/network-instance/openconfig-programming-errors.yang + - yang/segment-routing/openconfig-rsvp-sr-ext.yang + - yang/segment-routing/openconfig-segment-routing.yang + - yang/rib/openconfig-rib-bgp-ext.yang + build: + - yang/aft/openconfig-aft-network-instance.yang + - yang/aft/openconfig-aft-summary.yang - yang/network-instance/openconfig-network-instance.yang + - yang/network-instance/openconfig-programming-errors.yang + - yang/segment-routing/openconfig-rsvp-sr-ext.yang run-ci: true - name: openconfig-network-instance-bgp-rib-augment build: diff --git a/release/models/network-instance/openconfig-evpn-types.yang b/release/models/network-instance/openconfig-evpn-types.yang index 2d95214b4..4246426f4 100644 --- a/release/models/network-instance/openconfig-evpn-types.yang +++ b/release/models/network-instance/openconfig-evpn-types.yang @@ -25,7 +25,13 @@ module openconfig-evpn-types { policy. It can be imported by modules that make use of EVPN attributes"; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "0.2.0"; + + revision "2021-06-21" { + description + "Add types needed for BGP l2vpn evpn support"; + reference "0.2.0"; + } revision "2021-06-16" { description @@ -287,4 +293,13 @@ module openconfig-evpn-types { "Type of MAC address learning procedure"; } + typedef ethernet-tag { + type uint32; + description + "An Ethernet Tag ID is a 32-bit field containing either a 12-bit + or 24-bit identifier that identifies a particular broadcast + domain (e.g., a VLAN) in an EVPN instance."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN page-10"; + } } diff --git a/release/models/network-instance/openconfig-evpn.yang b/release/models/network-instance/openconfig-evpn.yang index 6c98b26ea..a3fd800e3 100644 --- a/release/models/network-instance/openconfig-evpn.yang +++ b/release/models/network-instance/openconfig-evpn.yang @@ -12,6 +12,7 @@ module openconfig-evpn { import openconfig-inet-types { prefix oc-inet; } import openconfig-interfaces { prefix oc-if; } import openconfig-bgp-types { prefix oc-bgp-types; } + import openconfig-types { prefix oc-types; } // meta organization @@ -39,7 +40,64 @@ module openconfig-evpn { domains, this is not currently supported and requires an extension of the model."; - oc-ext:openconfig-version "0.2.0"; + oc-ext:openconfig-version "0.11.0"; + + revision "2024-08-14" { + description + "Add new local-endpoint-vnis config container to Vxlan connection point to allow + configuration of local VNI-to-VLAN and VNI-to-VRF maps"; + reference "0.11.0"; + } + + revision "2024-06-07" { + description + "Add new vni-list leaf list to EVI config to support VLAN-aware-bundle + MACVRFs. Make existing vni leaf conditional on MACVRF type being VLAN-based"; + reference "0.10.0"; + } + + revision "2024-05-14" { + description + "Add configuration of VPWS identifier + for EVPN Virtual Private Wire Services (RFC 8214)"; + reference "0.9.0"; + } + + revision "2024-04-03" { + description + "Add vni-peer-groups container"; + reference "0.8.0"; + } + + revision "2024-02-01" { + description + "Add counters under endpoint-peer and endpoint-vni"; + reference "0.7.0"; + } + + revision "2023-07-12" { + description + "Removed ethernet segment"; + reference "0.6.0"; + } + + revision "2023-03-08" { + description + "Change control-plane-vnis property to leaf-list"; + reference "0.5.0"; + } + + revision "2023-01-24" { + description + "Add control word support"; + reference "0.4.0"; + } + + revision "2021-06-28" { + description + "Add vxlan endpoint oper data"; + reference "0.3.0"; + } revision "2021-06-11" { description @@ -142,218 +200,7 @@ module openconfig-evpn { } } - grouping evpn-ethernet-segment-df-config { - description - "Configuration parameters for the Designated forwarding - Election"; - - leaf df-election-method { - type enumeration { - enum DEFAULT { - value 0; - description - "The default Designated Forwarder Election election method"; - } - enum HIGHEST_RANDOM_WEIGHT { - value 1; - description - "The highest random weight (HRW) method"; - reference - "RFC8584: Framework for Ethernet VPN Designated Forwarder - Election Extensibility"; - } - enum PREFERENCE { - value 2; - description - "The preference based method"; - reference - "RFC8584: Framework for Ethernet VPN Designated Forwarder - Election Extensibility"; - } - } - description - "Select the Designated Forwarder Election (DF) election method"; - reference - "RFC 7432: BGP MPLS-Based Ethernet VPN. - RFC 8584:Framework for Ethernet VPN Designated Forwarder - Election Extensibility"; - } - - leaf preference { - when "../df-election-method = 'PREFERENCE'" { - description - "The preference value is only applicable - to the preference based method"; - } - type uint16; - description - "Defines a 2-octet value that indicates the PE - preference to become the DF in the Ethernet-Segment."; - reference - "RFC8584: Framework for Ethernet VPN Designated Forwarder - Election Extensibility"; - } - - leaf revertive { - when "../df-election-method = 'PREFERENCE'" { - description - "The revertive value is only applicable - to the preference method"; - } - type boolean; - default true; - description - "The 'preempt' or 'revertive' behavior. This option will allow a - non-revertive behavior in the DF election."; - reference - "RFC8584: Framework for Ethernet VPN Designated Forwarder - Election Extensibility"; - } - - leaf election-wait-time { - when "../df-election-method = 'PREFERENCE'" { - description - "The Designated Forwarder Election wait-time is only applicable - to the preference method"; - } - type uint32; - description - "Designated Forwarder Election wait-time. When the DF timer expires, - the PE device selects the DF based on the highest preference value"; - reference - "RFC8584: Framework for Ethernet VPN Designated Forwarder - Election Extensibility"; - } - } - - grouping evpn-ethernet-segment-df-top { - description - "Top grouping for the configuration and state parameters - for the Designated forwarding Election"; - - container df-election { - description - "Top container for the configuration and state parameters - for the Designated forwarding Election"; - - container config { - description - "Configuration parameters for the Designated forwarding Election"; - - uses evpn-ethernet-segment-df-config; - } - - container state { - description - "Configuration parameters for the Designated forwarding Election"; - config false; - - uses evpn-ethernet-segment-df-config; - } - } - } - - grouping evpn-ethernet-segment-config { - description - "Configuration attributes for the Ethernet - Segment."; - - leaf name { - type string; - description - "Ethernet Segment name"; - } - - leaf esi-type { - type oc-evpn-types:esi-type; - default "TYPE_0_OPERATOR_CONFIGURED"; - description - "ESI Type is a 1-octet field (most significant octet) that - specifies the format of the remaining 9 octets (ESI Value)."; - reference - "RFC 7432: BGP MPLS-Based Ethernet VPN page-16"; - } - - leaf esi { - type union { - type oc-evpn-types:esi; - type enumeration { - enum AUTO { - description - "This ESI type indicates an auto-generated ESI value."; - reference - "RFC 7432: BGP MPLS-Based Ethernet VPN"; - } - } - } - description - "Ethernet Segment Identifier (ESI) value. - For ESI Type 0: The esi leaf value is directly configured by the operator. - For ESI Type 1: The AUTO enum must be used. - For ESI Type 2: The AUTO enum must be used. - For ESI Type 3: The directly configured or AUTO enum must be used. - For ESI Type 4: The directly configured or AUTO enum must be used. - For ESI Type 5: The directly configured or AUTO enum must be used."; - reference - "RFC 7432: BGP MPLS-Based Ethernet VPN."; - } - - leaf redundancy-mode { - type identityref { - base oc-evpn-types:EVPN_REDUNDANCY_MODE; - } - description - "Multihoming options for load balancing of - traffic in the Ethernet Segment."; - reference - "RFC 7432: BGP MPLS-Based Ethernet VPN"; - } - - uses oc-if:interface-ref-common; - } - - grouping evpn-ethernet-segment-top { - description - "Top-level grouping for ethernet segments. An Ethernet Segment - is referenced by a name and an ESI"; - container ethernet-segments { - description - "Top-level container for ethernet segments. An Ethernet Segment - is referenced by a name and an ESI"; - - list ethernet-segment { - key "name"; - description - "List of Ethernet Segments."; - - leaf name { - type leafref { - path '../config/name'; - } - description - "Ethernet Segment Name "; - } - - container config { - description - "Configuration data for the Ethernet Segments."; - - uses evpn-ethernet-segment-config; - } - - container state { - config false; - description - "Operational state data for the Ethernet Segments."; - - uses evpn-ethernet-segment-config; - } - - uses evpn-ethernet-segment-df-top; - } - } - } /* Groupings related to the Layer 2 forwarding (aka MAC-VRF)*/ @@ -718,6 +565,41 @@ module openconfig-evpn { reference "RFC 7432: BGP MPLS-Based Ethernet VPN page-18"; } + + leaf control-word-enabled { + type boolean; + description + "When true, the control word is signaled and sent."; + reference + "RFC8214 Virtual Private Wire Service Support + in Ethernet VPN + draft-ietf-bess-rfc7432bis-05 BGP MPLS-Based + Ethernet VPN"; + } + + leaf local-vpws-service-id { + type uint32 { + range "1..16777215"; + } + description + "Indicates the local VPWS identifier assigned + to the Attachment Circuit (AC)."; + reference + "RFC8214 Virtual Private Wire Service Support + in Ethernet VPN."; + } + + leaf remote-vpws-service-id { + type uint32 { + range "1..16777215"; + } + description + "Indicates the remote VPWS identifier assigned + to the Attachment Circuit (AC)."; + reference + "RFC8214 Virtual Private Wire Service Support + in Ethernet VPN."; + } } grouping evpn-import-export-config { @@ -808,12 +690,27 @@ module openconfig-evpn { Using Ethernet VPN"; leaf vni { + when "../../../config/service-type = 'oc-evpn-types:VLAN_BASED' or + ../../../config/service-type = 'oc-evpn-types:VLAN_BUNDLE'" { + description + "For VLAN-based and VLAN-bundle EVIs, use a single VNI"; + } type oc-evpn-types:vni-id; description "Virtual Network Identifier (VNI) associated to the EVI. This VNI is used for ingress and egress in the VXLAN domain."; } + leaf-list vni-list { + when "../../../config/service-type = 'oc-evpn-types:VLAN_AWARE'" { + description + "For VLAN-aware-bundle EVIs, use a list of VNIs"; + } + type oc-evpn-types:vni-id; + description + "List of VNIs participating in a VLAN-aware-bundle EVI"; + } + leaf overlay-endpoint-network-instance { type leafref { path "/network-instances/network-instance/name"; @@ -1061,5 +958,397 @@ module openconfig-evpn { uses evpn-vxlan-parameters-config; } + + container endpoint-peers { + description + "Top level container for state information related to peer VXLAN Tunnel + Endpoints(VTEPs) learned by the local VTEP in the default network + instance"; + config false; + + list endpoint-peer { + key "peer-address"; + description "List of VTEP peers and associated state information"; + + leaf peer-address { + type leafref { + path '../state/peer-address'; + } + description "IP address for the VTEP peer"; + } + + container state { + config false; + description + "Container for state parameters related to this VTEP peer"; + uses evpn-endpoint-peer-state; + uses evpn-endpoint-counters; + } + container vni-peer-groups { + config false; + description + "Container for associating ingress and egress VNIs to router MACs"; + list vni-peer-group { + key "cp-vni egress-vni"; + description + "List of VNI peer groups"; + leaf cp-vni { + type leafref { + path "../state/cp-vni"; + } + description + "A reference to the control-plane VNI for the VNI peer group"; + } + leaf egress-vni { + type leafref { + path "../state/egress-vni"; + } + description + "A reference to the egress VNI for the VNI peer group"; + } + + container state { + description "State container for the VNI peer group"; + config false; + + leaf cp-vni { + type oc-evpn-types:vni-id; + description + "The control-plane VNI discovered behind this peer VTEP"; + } + leaf egress-vni { + type oc-evpn-types:vni-id; + description "Egress VNI associated with the remote VTEP"; + } + leaf router-mac { + type oc-yang:mac-address; + description "MAC address of the remote VTEP"; + } + } + } + } + } + } + + container endpoint-vnis { + description + "Top level container for state information related to Layer 2 virtual + network identifiers (L2VNIs) and Layer 3 virtual network identifiers + (L3VNIs) that are learned on the local VXLAN Tunnel End Point from + remote VTEPs in the default network instance"; + config false; + + list endpoint-vni { + key "vni"; + description "List of L2VNIs and L3VNIs learned on the local VTEP"; + + leaf vni { + type leafref { + path '../state/vni'; + } + description "L2VNI or L3VNI Identifier"; + } + + container state { + config false; + description + "Container for state parameters related to this L2VNI or L3VNI"; + uses evpn-endpoint-vni-config; + uses evpn-endpoint-vni-state; + } + + uses ipv4-top; + uses ipv6-top; + } + } + + container local-endpoint-vnis { + description + "Top level container for local configuration related to Layer 2 virtual + network identifiers (L2VNIs) and Layer 3 virtual network identifiers + (L3VNIs) in the default network instance"; + + list local-endpoint-vni { + key "vni"; + description "List of L2VNIs and L3VNIs configured on the local VTEP"; + + leaf vni { + type leafref { + path '../config/vni'; + } + description "L2VNI or L3VNI Identifier"; + } + + container config { + description + "Container for configuration parameters related to this local L2VNI or + L3VNI"; + uses evpn-endpoint-vni-config; + } + + container state { + config false; + description + "Container for state parameters related to this local L2VNI or L3VNI"; + uses evpn-endpoint-vni-config; + } + } + } + } + + grouping evpn-endpoint-peer-state { + description + "Grouping for state information related to peer VXLAN Tunnel + Endpoints(VTEPs) learned by the local VTEP"; + + leaf peer-address { + type oc-inet:ip-address; + description "IP address of the remote VXLAN Tunnel Endpoint peer"; + } + + leaf peer-state { + type enumeration { + enum UP { + description + "Operational status of the remote VTEP to indicate that the peer + status is UP"; + } + enum DOWN { + description + "Operational status of the remote VTEP to indicate that the peer + status is DOWN"; + } + } + description "State parameters related to the remote VTEP peer state"; + } + + leaf uptime { + type oc-types:timeticks64; + description + "This timestamp indicates the time elapsed relative to the moment that + the remote VTEP peer was discovered."; + } + + leaf-list control-plane-vnis { + type oc-evpn-types:vni-id; + status deprecated; + description + "The control-plane VNIs are all of the VNIs that are discovered by the + control-plane behind this peer VTEP"; + } + + leaf router-mac { + type oc-yang:mac-address; + status deprecated; + description "MAC address of the remote VTEP"; + } + } + + grouping evpn-endpoint-counters { + description + "Grouping for Operational state regarding encapsulated traffic."; + container counters { + description + "Operational state regarding encapsulated traffic."; + leaf total-encap-pkts { + type oc-yang:counter64; + description + "The total number of encapsulated packets."; + } + leaf total-encap-bytes { + type oc-yang:counter64; + description + "The total number of encapsulated bytes."; + } + leaf bum-encap-pkts { + type oc-yang:counter64; + description + "The total number of encapsulated BUM packets."; + } + leaf total-decap-pkts { + type oc-yang:counter64; + description + "The total number of decapsulated packets."; + } + leaf total-decap-bytes { + type oc-yang:counter64; + description + "The total number of decapsulated bytes."; + } + leaf unicast-decap-pkts { + type oc-yang:counter64; + description + "The total number of decapsulated unicast packets."; + } + leaf bum-decap-pkts { + type oc-yang:counter64; + description + "The total number of decapsulated BUM packets."; + } + leaf bum-decap-multicast-pkts { + type oc-yang:counter64; + description + "The number of decapsulated BUM packets received via underlay multicast."; + } + leaf bum-decap-ir-pkts { + type oc-yang:counter64; + description + "The number of decapsulated BUM packets received via underlay ingress replication."; + } + leaf drop-decap-pkts { + type oc-yang:counter64; + description + "The total number of decapsulated packets that have been dropped locally."; + } + leaf except-decap-pkts { + type oc-yang:counter64; + description + "The total number of decapsulated packets that hit an exceptional condition."; + } + } + } + + grouping ipv4-top { + description + "Grouping for Operational state of IPv4 address family."; + container ipv4 { + description + "Parameters for the IPv4 address family."; + container state { + config false; + description + "Top level IPv4 operational state data."; + uses evpn-endpoint-counters; + } + } + } + + grouping ipv6-top { + description + "Grouping for Operational state of IPv6 address family."; + container ipv6 { + description + "Parameters for the IPv6 address family."; + container state { + config false; + description + "Top level IPv6 operational state data."; + uses evpn-endpoint-counters; + } + } + } + + grouping evpn-endpoint-vni-config { + description + "Grouping for L2VNI and L3VNI configuration parameters"; + + leaf vni { + type oc-evpn-types:evi-id; + description "L2VNI or L3VNI Identifier"; + } + + leaf vni-type { + type enumeration { + enum L2 { + description + "This is a Layer 2 service virtual network identifier (L2VNI) + that is used for communication within the same subnet or + broadcast domain"; + } + enum L3 { + description + "This is a Layer 3 service virtual network identifier (L3VNI) + or VRF VNI that is used for communication between subnets"; + } + } + description "The type of virtual network identfier"; + } + + leaf bridge-domain { + type uint32; + description + "This reflects the configured VLAN or Bridge Domain that maps to this + L2VNI in the VXLAN fabric"; + } + + leaf l3-vrf-name { + type string; + description + "This refects the configured VRF instance that maps to this L3VNI + that is used for routing between subnets in the VXLAN fabric"; + } + } + + grouping evpn-endpoint-vni-state { + description + "Grouping for L2VNI and L3VNI state information learned on the + local VXLAN Tunnel End Point from remote VTEPs"; + + leaf multidestination-traffic { + type union { + type oc-inet:ip-address; + type enumeration { + enum STATIC_INGRESS_REPLICATION { + description + "Static ingress replication mode."; + } + enum BGP_INGRESS_REPLICATION { + description + "BGP EVPN ingress replication mode. It includes the ability to + signal a P2MP LSP for the EVPN Inclusive Provider Tunnel + for BUM traffic"; + } + } + } + description + "The data plane for overlays needs to handle the transport of + multidestination traffic. Multidestination traffic is typically + referred to as (BUM) which stands for broadcast, unknown unicast, + or multicast. The two most common methods that can accommodate this + replication and transport in the underlay are IP multicast and + ingress replication + (also called head-end replication or unicast mode)."; + } + + leaf learning-mode { + type oc-evpn-types:learning-mode; + description + "Indicates whether the learning mode for this VNI is either + control-plane or data-plane"; + } + + leaf vni-state { + type enumeration { + enum UP { + description + "Operational status of the virtual network identifier (VNI) to + indicate that it is UP"; + } + enum DOWN { + description + "Operational status of the virtual network identifier (VNI) to + indicate that it is DOWN"; + } + } + description "Operational state of the L2VNI or L3VNI"; + } + + leaf svi-state { + type enumeration { + enum UP { + description + "Operational status of the SVI mapped to the L3VNI used for routing + between subnets to indicate the SVI is UP"; + } + enum DOWN { + description + "Operational status of the SVI mapped to the L3VNI used for routing + between subnets to indicate the SVI is DOWN"; + } + } + description + "Operational status of the SVI mapped to the L3VNI that is used for + routing between subnets in the VXLAN fabric"; + } } } diff --git a/release/models/network-instance/openconfig-network-instance-l2.yang b/release/models/network-instance/openconfig-network-instance-l2.yang index 2a397be88..fb8b515d3 100644 --- a/release/models/network-instance/openconfig-network-instance-l2.yang +++ b/release/models/network-instance/openconfig-network-instance-l2.yang @@ -7,7 +7,8 @@ submodule openconfig-network-instance-l2 { // import some basic types import openconfig-extensions { prefix "oc-ext"; } import openconfig-interfaces { prefix "oc-if"; } - import ietf-yang-types { prefix "yang"; } + import openconfig-yang-types { prefix "oc-yang"; } + import openconfig-inet-types { prefix "oc-inet"; } import openconfig-evpn-types { prefix oc-evpn-types; } import openconfig-evpn { prefix "oc-evpn"; } @@ -23,7 +24,148 @@ submodule openconfig-network-instance-l2 { Layer 2 network instance configuration and operational state parameters."; - oc-ext:openconfig-version "0.16.1"; + oc-ext:openconfig-version "4.4.1"; + + revision "2024-02-27" { + description + "Clarify that tables are created only by the system and not + users."; + reference "4.4.1"; + } + + revision "2024-02-27" { + description + "Clarify metric to be used for route redistribution when + disable-metric-propagation is set to true."; + reference "4.4.0"; + } + + revision "2023-12-13" { + description + "Expand when statement for connection-points endpoints"; + reference "4.3.0"; + } + + revision "2023-11-03" { + description + "Add reference URL for Route Redistribution rules"; + reference "4.2.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "4.2.1"; + } + + revision "2023-09-07" { + description + "Add L2RIB Per Producer Next-Hop Capability"; + reference "4.2.0"; + } + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "4.1.1"; + } + + revision "2023-07-12" { + description + "Moved ethernet-segments to top level + container."; + reference "4.1.0"; + } + + revision "2023-04-25" { + description + "Clarify use of interface-ref."; + reference "4.0.3"; + } + + revision "2023-03-15" { + description + "Clarify that tables are to be deleted by the + network operating system"; + reference "4.0.2"; + } + + revision "2023-02-07" { + description + "Add prefixes to identity values in when statements"; + reference "4.0.1"; + } + + revision "2022-12-21" { + description + "Removal of global per network-instance MTU"; + reference "4.0.0"; + } + + revision "2022-12-21" { + description + "Removal of interface list unique statement"; + reference "3.1.0"; + } + + revision "2022-12-20" { + description + "Removal of top-level enabled-address-families leaf-list"; + reference "3.0.0"; + } + + revision "2022-11-18" { + description + "Enforce network-instance type as mandatory, removal of top-level + enabled leaf, migrate IETF types to OpenConfig types"; + reference "2.0.0"; + } + + revision "2022-09-15" { + description + "Add fallback-vrf option."; + reference "1.4.0"; + } + + revision "2022-07-04" { + description + "Add pcep protocol to network-instance"; + reference "1.3.0"; + } + + revision "2022-06-21" { + description + "Add prefix to qualification netinst-ref."; + reference "1.2.0"; + } + + revision "2022-04-20" { + description + "Add support for l2rib state data"; + reference "1.1.0"; + } + + revision "2022-04-19" { + description + "Description updates for DEFAULT_INSTANCE implementation + guidance and default value/guidance for protocol instances"; + reference "1.0.0"; + } + + revision "2022-04-19" { + description + "Fix some broken xpath references in when statements."; + reference "0.16.3"; + + } + + revision "2021-11-17" { + description + "Add prefix to qualification prefix to when statements + at identifier level."; + reference "0.16.2"; + } revision "2021-07-22" { description @@ -197,19 +339,7 @@ submodule openconfig-network-instance-l2 { uses oc-evpn:evpn-mac-mobility-top; uses oc-evpn:evpn-arp-proxy-top; uses oc-evpn:evpn-nd-proxy-top; - } - } - - grouping l2ni-instance-common-config { - description - "Common configuration options which are specific to Layer 2 - network instances"; - - leaf mtu { - type uint16; - description - "The maximum frame size which should be supported for this - instance for Layer 2 frames"; + uses l2ni-l2rib-top; } } @@ -272,7 +402,7 @@ submodule openconfig-network-instance-l2 { "Configuration data for MAC table entries"; leaf mac-address { - type yang:mac-address; + type oc-yang:mac-address; description "MAC address for the dynamic or static MAC table entry"; @@ -390,4 +520,415 @@ submodule openconfig-network-instance-l2 { } } } + + grouping l2ni-l2rib-top { + description + "Top-level grouping for l2rib MAC and MAC-IP table list"; + + container l2rib { + config false; + description + "Operational state container for MAC address and MAC-IP address + information that is learned and installed into the MAC VRF Layer 2 + Routing Information Base (L2RIB)"; + + container mac-table { + description + "Operational state container for MAC address information installed + into the MAC VRF of the L2RIB"; + + container entries { + description + "Enclosing container for list of MAC address entries"; + + list entry { + key "mac-address"; + description "List of learned MAC addresses"; + + leaf mac-address { + type leafref { + path "../state/mac-address"; + } + description "Leafref of MAC address object"; + } + + container state { + config false; + description + "Operational state data for L2RIB MAC table object entry"; + uses l2ni-l2rib-mac-table-state; + } + + container producers { + description "Source producers for each MAC Table entry"; + list producer { + key "producer"; + description + "List of producers for each MAC table entry"; + + leaf producer { + type leafref { + path "../state/producer"; + } + description + "Reference to producer list key"; + } + + container state { + config false; + description "State container for L2RIB MAC Table Entries"; + uses l2ni-l2rib-common-producer-state; + uses l2ni-l2rib-mac-table-producer-state; + } + } + } + } + } + uses l2ni-l2rib-common-next-hop-group-state; + uses l2ni-l2rib-common-next-hop-state; + } + + container mac-ip-table { + description + "Operational state container for MAC-IP address information installed + into the MAC VRF of the L2RIB"; + + container entries { + description + "Enclosing container for list of MAC-IP address entries"; + + list entry { + key "mac-address host-ip"; + description "List of learned MAC-IP addresses"; + + leaf mac-address { + type leafref { + path "../state/mac-address"; + } + description "Leafref of MAC-IP address object"; + } + + leaf host-ip { + type leafref { + path "../state/host-ip"; + } + description "IP address of the Customer Edge device"; + } + + container state { + config false; + description + "Operational state data for L2RIB MAC-IP table object entry"; + uses l2ni-l2rib-mac-ip-table-state; + } + + container producers { + description "Source producers for each MAC-IP Table entry"; + list producer { + key "producer"; + description + "List of producers for each MAC-IP table entry"; + + leaf producer { + type leafref { + path "../state/producer"; + } + description + "Reference to producer list key"; + } + + container state { + config false; + description "State container for L2RIB MAC Table Entries"; + uses l2ni-l2rib-common-producer-state; + } + } + } + } + } + uses l2ni-l2rib-common-next-hop-group-state; + uses l2ni-l2rib-common-next-hop-state; + } + } + } + + grouping l2ni-l2rib-mac-table-state { + description "L2RIB MAC Table Operational State Grouping"; + uses l2ni-l2rib-common-state; + } + + grouping l2ni-l2rib-mac-ip-table-state { + description "L2RIB Mac-IP Table Operational State Grouping"; + uses l2ni-l2rib-common-state; + + leaf host-ip { + type oc-inet:ip-address; + description + "Host IP address of the CE device for the L2RIB MAC-IP entry"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf l3-vni { + type oc-evpn-types:evi-id; + description + "Symmetric IRB uses the same forwarding semantics when routing + between IP subnets with VRF Lite or MPLS L3VPNs. With symmetric IRB, + all traffic egressing and returning from a VTEP uses the same VNI. + Specifically, the same Layer 3 VNI (L3VNI) associated with the VRF + is used for all routed traffic. Layer3 VNI used for inter-subnet + routing"; + } + } + + grouping l2ni-l2rib-common-state { + description "L2RIB Common Property Operational State Data Grouping"; + + leaf mac-address { + type oc-yang:mac-address; + description "MAC address of the L2RIB MAC or MAC-IP entry"; + } + leaf vlan { + type leafref { + path "../../../../../../../vlans/vlan/config/vlan-id"; + } + description + "VLAN on which the MAC or MAC-IP address is present."; + } + leaf evi { + type oc-evpn-types:evi-id; + description "EVPN Instance Identifier for the MAC or MAC-IP"; + } + leaf l2-vni { + type oc-evpn-types:evi-id; + description "Layer2 VNI segment mapped to given vlan-id"; + } + } + + grouping l2ni-l2rib-common-producer-state { + description "L2RIB Common Producer Attributes Operational State Data Grouping"; + + leaf producer { + type enumeration { + enum LOCAL { + description "local producer source"; + } + enum STATIC { + description "static producer source"; + } + enum BGP { + description "bgp producer source"; + } + } + description "Source of the learned L2RIB route"; + } + + leaf seq-number { + type uint32; + description + "The sequence number is used to ensure that PEs retain the correct + MAC/IP Advertisement route when multiple updates occur for the same + MAC address"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf mobility-state { + type enumeration { + enum FROZEN { + description + "Permanently frozen mac-address"; + } + enum DUPLICATE { + description + "Duplicate mac-address"; + } + } + description + "Indicates if learned MAC address is duplicate or frozen"; + reference "draft-ietf-bess-evpn-irb-extended-mobility-05"; + } + + leaf esi { + type oc-evpn-types:esi; + description + "Ethernet Segment Identifier (ESI) for local and remote routes. + ESI is used to resolve the next-hop-group. All mac-addresses + learned with the same ESI should point to the same next-hop-group"; + } + + leaf sticky { + type boolean; + description "MAC address is sticky and not subjected to MAC moves"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf next-hop { + type leafref { + path "../../../../../../next-hops/next-hop/index"; + } + status deprecated; + description "Leafref next-hop for the MAC-IP table entry"; + } + + leaf-list next-hop-group { + type leafref { + path "../../../../../../next-hop-groups/next-hop-group/id"; + } + description "Leafref next-hop-group for the MAC-IP table entry"; + } + } + + grouping l2ni-l2rib-common-next-hop-state { + description "L2RIB Common Next Hop Attributes Operational State Data Grouping"; + + container next-hops { + description "A next-hop associated with the MAC or MAC-IP entry"; + list next-hop { + key "index"; + description "List of next hop attributes for each MAC or MAC-IP"; + + leaf index { + type leafref { + path "../state/index"; + } + description + "A unique index identifying the next-hop entry for the + MAC or MAC-IP entry"; + } + container state { + description "State container for common next-hop attributes"; + config false; + leaf index { + type uint64; + description "A unique entry for the next-hop."; + } + leaf peer-ip { + type oc-inet:ip-address; + description "Next hop peer address"; + } + leaf label { + type oc-evpn-types:evi-id; + description "Next hop label representing the l2vni for the route"; + } + leaf esi { + type oc-evpn-types:esi; + description "Ethernet Segment Identifier (ESI)"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + leaf resolved { + type boolean; + description + "Indicates if the path is eligible for forwarding as per evpn mass + withdraw procedures as defined in RFC 7432"; + } + uses oc-if:interface-ref-common; + } + } + } + } + + grouping l2ni-l2rib-common-next-hop-group-state { + description "L2RIB Common Next Hop Group Attributes Operational State Data Grouping"; + + container next-hop-groups { + description "Surrounding container for groups of L2RIB next-hops."; + list next-hop-group { + key "id"; + description + "An individual set of next-hops grouped into a common group. + Each entry within an L2RIB can optionally point to a + next-hop-group."; + + leaf id { + type leafref { + path "../state/id"; + } + description + "A reference to a unique identifier for the next-hop-group."; + } + container state { + description "State container for common next-hop-group attributes"; + config false; + leaf id { + type uint64; + description + "A unique identifier for the next-hop-group. This index is not + expected to be consistent across reboots, or reprogramming of + the next-hop-group. When updating a next-hop-group, if the group + is removed by the system or assigned an alternate identifier, the + system should send telemetry notifications deleting the previous + identifier. If the identifier of the next-hop-group is changed, + all L2RIB entries that reference it must also be updated."; + } + leaf esi { + type oc-evpn-types:esi; + description "Ethernet Segment Identifier (ESI)"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + leaf type { + type enumeration { + enum ESI { + description + "Per ESI pathlist next-hop-group used for evpn mass withdraw procedures as defined in RFC 7432"; + } + enum ESI_EVI { + description + "Per ESI,EVI pathlist next-hop-group used for evpn aliasing procedures as defined in RFC 7432"; + } + enum BASE_ECMP { + description + "Base ECMP next-hop-group used in absence of evpn aliasing"; + } + } + description "Type of next-hop-group"; + } + } + container next-hops { + description + "Surrounding container for the list of next-hops within the next-hop-group."; + list next-hop { + key "index"; + description + "An individual next-hop within the next-hop-group. Each next-hop is a + reference to an entry within the next-hop list."; + + leaf index { + type leafref { + path "../state/index"; + } + description + "A reference to the index for the next-hop within the the next-hop-group."; + } + container state { + description + "Operational state parameters related to a next-hop within the next-hop-group."; + config false; + leaf index { + type leafref { + path "../../../../../../next-hops/next-hop/index"; + } + description + "A reference to the identifier for the next-hop to which the entry in the + next-hop group corresponds."; + } + } + } + } + + } + } + } + + grouping l2ni-l2rib-mac-table-producer-state { + description "L2RIB MAC Table Operational State Data Grouping"; + + leaf derived-from-mac-ip { + type boolean; + description "Derived from BGP MAC-IP route-type 2"; + } + + leaf directly-received { + type boolean; + description "BGP learned MAC route-type 2"; + } + } } diff --git a/release/models/network-instance/openconfig-network-instance-l3.yang b/release/models/network-instance/openconfig-network-instance-l3.yang index 742f9002f..c8381416c 100644 --- a/release/models/network-instance/openconfig-network-instance-l3.yang +++ b/release/models/network-instance/openconfig-network-instance-l3.yang @@ -23,7 +23,19 @@ module openconfig-network-instance-l3 { Layer 3 network instance configuration and operational state parameters."; - oc-ext:openconfig-version "0.11.1"; + oc-ext:openconfig-version "2.0.0"; + + revision "2022-11-08" { + description + "Removal of top-level enabled-address-families leaf-list"; + reference "2.0.0"; + } + + revision "2022-09-15" { + description + "Reflect implementation status by releasing 1.0.0."; + reference "1.0.0"; + } revision "2018-11-21" { description @@ -121,21 +133,6 @@ module openconfig-network-instance-l3 { } - grouping l3ni-instance-common-config { - description - "Configuration parameters that are common to L3 network - instances other than the default instance"; - - leaf-list enabled-address-families { - type identityref { - base octypes:ADDRESS_FAMILY; - } - description - "The address families that are to be enabled for this - network instance."; - } - } - grouping l3ni-route-limit-structural { description "Configuration and state for the maximum number of routes diff --git a/release/models/network-instance/openconfig-network-instance-policy.yang b/release/models/network-instance/openconfig-network-instance-policy.yang index a2897dcbd..d72e8f008 100644 --- a/release/models/network-instance/openconfig-network-instance-policy.yang +++ b/release/models/network-instance/openconfig-network-instance-policy.yang @@ -25,9 +25,16 @@ module openconfig-network-instance-policy { actions) for the network instance model. These statements are generally added to the routing policy model."; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "0.1.2"; - revision "2018-11-21" { + revision "2023-07-25" { + description + "Expand description of + match-protocol-instance/protocol-name."; + reference "0.1.2"; + } + +revision "2018-11-21" { description "Add OpenConfig module metadata extensions."; reference "0.1.1"; @@ -64,7 +71,11 @@ module openconfig-network-instance-policy { type string; description "The name of the protocol instance to match - on in the local network instance"; + on in the local network instance. The string + must match one of /network-instances/ + network-instance/protocols/ + protocol/identifier in the local network + instance."; } } diff --git a/release/models/network-instance/openconfig-network-instance.yang b/release/models/network-instance/openconfig-network-instance.yang index 0dabfc1e3..574caa1ab 100644 --- a/release/models/network-instance/openconfig-network-instance.yang +++ b/release/models/network-instance/openconfig-network-instance.yang @@ -8,8 +8,8 @@ module openconfig-network-instance { prefix "oc-netinst"; // import some basic types - import ietf-yang-types { prefix "yang"; } - import ietf-inet-types { prefix "inet"; } + import openconfig-yang-types { prefix "oc-yang"; } + import openconfig-inet-types { prefix "oc-inet"; } import openconfig-network-instance-types { prefix "oc-ni-types"; } import openconfig-policy-types { prefix "oc-pol-types"; } import openconfig-routing-policy { prefix "oc-rpol"; } @@ -29,6 +29,7 @@ module openconfig-network-instance { import openconfig-pim { prefix "oc-pim"; } import openconfig-igmp { prefix "oc-igmp"; } import openconfig-evpn { prefix "oc-evpn"; } + import openconfig-pcep { prefix "oc-pcep"; } // include submodules include openconfig-network-instance-l2; @@ -47,7 +48,147 @@ module openconfig-network-instance { virtual switch instance (VSI). Mixed Layer 2 and Layer 3 instances are also supported."; - oc-ext:openconfig-version "0.16.1"; + oc-ext:openconfig-version "4.4.1"; + + revision "2024-02-27" { + description + "Clarify that tables are created only by the system and not + users."; + reference "4.4.1"; + } + + revision "2024-02-27" { + description + "Clarify metric to be used for route redistribution when + disable-metric-propagation is set to true."; + reference "4.4.0"; + } + + revision "2023-12-13" { + description + "Expand when statement for connection-points endpoints"; + reference "4.3.0"; + } + + revision "2023-11-03" { + description + "Add reference URL for Route Redistribution rules"; + reference "4.2.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "4.2.1"; + } + + revision "2023-09-07" { + description + "Add L2RIB Per Producer Next-Hop Capability"; + reference "4.2.0"; + } + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "4.1.1"; + } + + revision "2023-07-12" { + description + "Moved ethernet-segments to top-level + container."; + reference "4.1.0"; + } + + revision "2023-04-25" { + description + "Clarify use of interface-ref."; + reference "4.0.3"; + } + + revision "2023-03-15" { + description + "Clarify that tables are to be deleted by the + network operating system"; + reference "4.0.2"; + } + + revision "2023-02-07" { + description + "Add prefixes to identity values in when statements"; + reference "4.0.1"; + } + + revision "2022-12-21" { + description + "Removal of global per network-instance MTU"; + reference "4.0.0"; + } + + revision "2022-12-21" { + description + "Removal of interface list unique statement"; + reference "3.1.0"; + } + + revision "2022-12-20" { + description + "Removal of top-level enabled-address-families leaf-list"; + reference "3.0.0"; + } + + revision "2022-11-18" { + description + "Enforce network-instance type as mandatory, removal of top-level + enabled leaf, migrate IETF types to OpenConfig types"; + reference "2.0.0"; + } + + revision "2022-09-15" { + description + "Add fallback-vrf option."; + reference "1.4.0"; + } + + revision "2022-07-04" { + description + "Add PCEP protocol to network-instance"; + reference "1.3.0"; + } + + revision "2022-06-21" { + description + "Add prefix to qualification netinst-ref."; + reference "1.2.0"; + } + + revision "2022-04-20" { + description + "Add support for l2rib state data"; + reference "1.1.0"; + } + + revision "2022-04-19" { + description + "Description updates for DEFAULT_INSTANCE implementation + guidance and default value/guidance for protocol instances"; + reference "1.0.0"; + } + + revision "2022-04-19" { + description + "Fix some broken xpath references in when statements."; + reference "0.16.3"; + } + + revision "2021-11-17" { + description + "Add prefix to qualification prefix to when statements + at identifier level."; + reference "0.16.2"; + } revision "2021-07-22" { description @@ -221,7 +362,8 @@ module openconfig-network-instance { typedef network-instance-ref { type leafref { - path "/network-instances/network-instance/config/name"; + path "/oc-netinst:network-instances/oc-netinst:network-instance/" + + "oc-netinst:config/oc-netinst:name"; } description "A re-usable type that can be referenced within other @@ -241,7 +383,12 @@ module openconfig-network-instance { key "name"; description - "Network instances configured on the local system"; + "Network instances configured on the local system + + IPv4 and IPv6 forwarding are enabled by default within an L3 + network-instance and subsequently, routes can be populated + into the network-instance using protocols that enable IPv4 and + IPv6 configuration without explicitly enabling these."; leaf name { type leafref { @@ -251,24 +398,11 @@ module openconfig-network-instance { "A unique name identifying the network instance"; } - uses l2ni-instance { - when "./config/type = 'oc-ni-types:L2VSI' - or ./config/type = 'oc-ni-types:L2P2P' - or ./config/type = 'oc-ni-types:L2L3' - or ./config/type = 'oc-ni-types:DEFAULT_INSTANCE'" { - description - "Layer 2 configuration parameters included when - a network instance is a Layer 2 instance or a - combined L2L3 instance"; - } - } - container config { description "Configuration parameters relating to a network instance"; uses network-instance-config; - uses network-instance-type-dependent-config; } @@ -278,13 +412,24 @@ module openconfig-network-instance { "Operational state parameters relating to a network instance"; uses network-instance-config; - uses network-instance-type-dependent-config; uses network-instance-state; } + uses l2ni-instance { + when "./config/type = 'oc-ni-types:L2VSI' + or ./config/type = 'oc-ni-types:L2P2P' + or ./config/type = 'oc-ni-types:L2L3' + or ./config/type = 'oc-ni-types:DEFAULT_INSTANCE'" { + description + "Layer 2 configuration parameters included when + a network instance is a Layer 2 instance or a + combined L2L3 instance"; + } + } + container evpn { - when "./config/type = 'oc-ni-types:L2VSI' - or ./config/type = 'oc-ni-types:L3VRF'" { + when "../config/type = 'oc-ni-types:L2VSI' + or ../config/type = 'oc-ni-types:L3VRF'" { description "EVPN container should be included for L2 and L3 NIs"; } @@ -292,7 +437,6 @@ module openconfig-network-instance { "Configuration of parameters for EVPN related bridge domains (MAC VRFs) and layer3 VRFs (IP VRFs)"; uses oc-evpn:evpn-config-top; - uses oc-evpn:evpn-ethernet-segment-top; } container encapsulation { @@ -313,8 +457,8 @@ module openconfig-network-instance { uses encapsulation-config; uses l2ni-encapsulation-config { - when "./config/type = 'oc-ni-types:L2VSI' or ./config/type = 'oc-ni-types:L2P2P' - or ./config/type = 'oc-ni-types:L2L3'" { + when "../../config/type = 'oc-ni-types:L2VSI' or ../../config/type = 'oc-ni-types:L2P2P' + or ../../config/type = 'oc-ni-types:L2L3'" { description "Only allow L2 encapsulations to be set when the instance is of a type that supports @@ -331,8 +475,8 @@ module openconfig-network-instance { uses encapsulation-config; uses l2ni-encapsulation-config { - when "./config/type = 'oc-ni-types:L2VSI' or ./config/type = 'oc-ni-types:L2P2P' - or ./config/type = 'oc-ni-types:L2L3'" { + when "../../config/type = 'oc-ni-types:L2VSI' or ../../config/type = 'oc-ni-types:L2P2P' + or ../../config/type = 'oc-ni-types:L2L3'" { description "Only allow L2 encapsulations to be set when the instance is of a type that supports @@ -369,6 +513,10 @@ module openconfig-network-instance { for the connection are available for the destination protocol to advertise, or match within its policies."; + reference + "Route Redistribution in OpenConfig Network Instance: + https://github.com/openconfig/public/blob/master/doc/network_instance_redistribution.md#interconnection-of-protocol-ribs"; + leaf src-protocol { type leafref { path "../config/src-protocol"; @@ -419,10 +567,14 @@ module openconfig-network-instance { list interface { key "id"; - unique "config/interface config/subinterface"; description - "An interface associated with the network instance"; + "An interface associated with the network instance. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf id { type leafref { @@ -453,7 +605,7 @@ module openconfig-network-instance { } uses oc-ni-l3:l3ni-route-limit-structural { - when "./config/type = 'L3VRF' or ./config/type = 'L2L3'" { + when "./config/type = 'oc-ni-types:L3VRF' or ./config/type = 'oc-ni-types:L2L3'" { description "Layer 3 VRF or L2/L3 instances can have route limits applied. This is not supported for the default instance."; @@ -463,7 +615,8 @@ module openconfig-network-instance { container tables { description "The routing tables that are managed by this network - instance"; + instance. Tables are created and removed by the system. + Users do not create tables."; list table { key "protocol address-family"; @@ -486,7 +639,12 @@ module openconfig-network-instance { this list when the relevant protocol context is enabled. i.e., when a BGP instance is created with IPv4 and IPv6 address families enabled, the protocol=BGP, - address-family=IPv4 table is created by the system."; + address-family=IPv4 table is created by the system. The + removal of the table should not require additional or + explicit configurations. + + Users cannot create or delete tables. Instead a user may + configure table-connections which reference these tables."; leaf protocol { type leafref { @@ -565,7 +723,8 @@ module openconfig-network-instance { container endpoints { when "../../../config/type = 'oc-ni-types:L2P2P' " + - "or ../../../config/type = 'oc-ni-types:L2VSI'" { + "or ../../../config/type = 'oc-ni-types:L2VSI'" + + "or ../../../config/type = 'oc-ni-types:DEFAULT_INSTANCE'" { description "Configuration parameters to associate interfaces into a common group for use in Layer 2 network @@ -584,7 +743,7 @@ module openconfig-network-instance { connection points that can be used for this connection point). The active endpoint is selected based on the precedence that it is configured - with"; + with."; leaf endpoint-id { type leafref { @@ -601,6 +760,7 @@ module openconfig-network-instance { endpoint"; uses instance-endpoint-config; } + container state { config false; description @@ -611,7 +771,7 @@ module openconfig-network-instance { } container local { - when "../config/type = 'LOCAL'" { + when "../config/type = 'oc-ni-types:LOCAL'" { description "Only include the local configuration when the endpoint is specified to be local to @@ -639,7 +799,7 @@ module openconfig-network-instance { } container remote { - when "../config/type = 'REMOTE'" { + when "../config/type = 'oc-ni-types:REMOTE'" { description "Only include the remote configuration when the endpoint is specified to be remote to @@ -666,15 +826,10 @@ module openconfig-network-instance { } } container vxlan { - when "../config/type = 'VXLAN'" { - description - "Only include the vxlan configuration when - the endpoint is specified to be vxlan"; - } - description - "Configuration and operational state parameters - relating to a VXLAN tunnel end-point interface"; - uses oc-evpn:evpn-overlays-grp-top; + description + "Configuration and operational state parameters + relating to a VXLAN tunnel end-point interface"; + uses oc-evpn:evpn-overlays-grp-top; } } } @@ -754,7 +909,7 @@ module openconfig-network-instance { } uses oc-loc-rt:local-static-top { - when "./config/identifier = 'STATIC'" { + when "./config/identifier = 'oc-pol-types:STATIC'" { description "Include static route parameters only when the protocol is set to static"; @@ -765,7 +920,7 @@ module openconfig-network-instance { } uses oc-loc-rt:local-aggregate-top { - when "./config/identifier = 'LOCAL_AGGREGATE'" { + when "./config/identifier = 'oc-pol-types:LOCAL_AGGREGATE'" { description "Include aggregate route parameters only when the protocol is set to aggregate"; @@ -776,7 +931,7 @@ module openconfig-network-instance { } uses oc-bgp:bgp-top { - when "./config/identifier = 'BGP'" { + when "./config/identifier = 'oc-pol-types:BGP'" { description "Include BGP parameters only when the protocol is of type BGP"; @@ -787,7 +942,7 @@ module openconfig-network-instance { } uses oc-ospfv2:ospfv2-top { - when "./config/identifier = 'OSPF'" { + when "./config/identifier = 'oc-pol-types:OSPF'" { description "Include OSPFv2 parameters only when the protocol is of type OSPFv2"; @@ -795,7 +950,7 @@ module openconfig-network-instance { } uses oc-isis:isis-top { - when "./config/identifier = 'ISIS'" { + when "./config/identifier = 'oc-pol-types:ISIS'" { description "Include IS-IS configuration when the protocol is of type IS-IS"; @@ -806,7 +961,7 @@ module openconfig-network-instance { } uses oc-pim:pim-top { - when "./config/identifier = 'PIM'" { + when "./config/identifier = 'oc-pol-types:PIM'" { description "Include PIM configuration when the protocol is of type PIM"; @@ -817,7 +972,7 @@ module openconfig-network-instance { } uses oc-igmp:igmp-top { - when "./config/identifier = 'IGMP'" { + when "./config/identifier = 'oc-pol-types:IGMP'" { description "Include IGMP configuration when the protocol is of type IGMP"; @@ -827,35 +982,22 @@ module openconfig-network-instance { Group Management Protocol (IGMP)."; } + uses oc-pcep:pcep-top { + when "./config/identifier = 'oc-pol-types:PCEP'" { + description + "Include PCEP configuration when the protocol is of type + PCEP"; + } + description + "Configuration and state parameters relating to the Path + Computation Element Protocol (PCEP)."; + } } } } } } - grouping network-instance-type-dependent-config { - description - "Type dependent network instance configuration"; - - uses oc-ni-l3:l3ni-instance-common-config { - when "./type = 'oc-ni-types:L3VRF' or ./type = 'oc-ni-types:L2L3'" { - description - "Layer 3 VRF configuration parameters included when a - network instance is a L3VRF or combined L2L3 instance"; - } - } - - uses l2ni-instance-common-config { - when "./type = 'oc-ni-types:L2VSI' or ./type = 'oc-ni-types:L2P2P'" + - " or ./type = 'oc-ni-types:L2L3'" { - description - "Layer 2 configuration parameters included when - a network instance is a Layer 2 instance or a - combined L2L3 instance"; - } - } - } - grouping instance-endpoint-config { description "Configuration data relating to an forwarding-instance @@ -891,7 +1033,7 @@ module openconfig-network-instance { "Configuration parameters relating to an endpoint that is local to the current system"; - uses oc-if:interface-ref-common; + uses oc-if:interface-ref-common; leaf site-id { type uint16; @@ -924,7 +1066,7 @@ module openconfig-network-instance { "Configuration parameters relating to an endpoint that is remote from the local system"; leaf remote-system { - type inet:ip-address; + type oc-inet:ip-address; description "The IP address of the device which hosts the remote end-point"; @@ -1004,7 +1146,7 @@ module openconfig-network-instance { with the network instance"; leaf id { - type string; + type oc-if:interface-id; description "A unique identifier for this interface - this is expressed as a free-text string"; @@ -1113,11 +1255,12 @@ module openconfig-network-instance { - IS-IS metric may be reflected in BGP MED (and vice versa) - OSPF metric may be reflected in the BGP MED (and vice versa) When this leaf is set to true, this reflection behaviour MUST be - disabled, and rather the metric must be set to the default value, - or explicitly set by policy."; + disabled, and rather the metric must be set to '0' or explicitly + set by policy."; } uses oc-rpol:apply-policy-import-config; + uses oc-rpol:default-policy-import-config; } grouping network-instance-config { @@ -1128,30 +1271,28 @@ module openconfig-network-instance { leaf name { type string; description - "An operator-assigned unique name for the forwarding - instance"; + "An operator-assigned unique name for the network instance. + If the operator does not designate a name for the instance of + type 'DEFAULT_INSTANCE' (e.g. config), the implementation + should use the name of 'DEFAULT' (e.g. state)."; } leaf type { type identityref { base "oc-ni-types:NETWORK_INSTANCE_TYPE"; } + mandatory true; description "The type of network instance. The value of this leaf indicates the type of forwarding entries that should be - supported by this network instance. Signalling protocols - also use the network instance type to infer the type of - service they advertise; for example MPLS signalling - for an L2VSI network instance would infer a VPLS service - whereas a type of L2PTP would infer a VPWS (pseudo-wire) - service"; - } - - leaf enabled { - type boolean; - description - "Whether the network instance should be configured to be - active on the network element"; + supported by this network instance. Signalling protocols also + use the network instance type to infer the type of service + they advertise; for example MPLS signalling for an L2VSI + network instance would infer a VPLS service whereas a type of + L2PTP would infer a VPWS (pseudo-wire) service. + + An implementation must support only a single network-instance + of type 'DEFAULT_INSTANCE'."; } leaf description { @@ -1162,7 +1303,7 @@ module openconfig-network-instance { } leaf router-id { - type yang:dotted-quad; + type oc-yang:dotted-quad; description "A identifier for the local network instance - typically used within associated routing protocols or signalling @@ -1175,6 +1316,17 @@ module openconfig-network-instance { "The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP."; } + + leaf fallback-network-instance { + type network-instance-ref; + description + "When this leaf is populated, the specified network instance + should be used as a fallback instance when a route cannot + be resolved in the local network-instance. + This configuration is only valid when specified in a non-default + instance which must be a L3 capable VRF (i.e., L2L3, or L3VRF)."; + when "../type = 'oc-ni-types:L3VRF'"; + } } grouping network-instance-state { @@ -1197,8 +1349,16 @@ module openconfig-network-instance { leaf name { type string; + default "DEFAULT"; description - "A unique name for the protocol instance"; + "A unique name for the protocol instance. + + If the operator does not designate a name for the protocol + instance (e.g. config), the implementation should use the + name of 'DEFAULT' (e.g. state). In addition, for + implementations that support single protocol instances, the + default value is recommended for consistency and uniqueness + per protocol instance."; } leaf enabled { diff --git a/release/models/network-instance/openconfig-programming-errors.yang b/release/models/network-instance/openconfig-programming-errors.yang new file mode 100644 index 000000000..5dafcc105 --- /dev/null +++ b/release/models/network-instance/openconfig-programming-errors.yang @@ -0,0 +1,226 @@ +module openconfig-programming-errors { + prefix "oc-pgrmerrs"; + + namespace "http://openconfig.net/yang/programming-errors"; + + import openconfig-extensions { prefix "oc-ext"; } + import openconfig-inet-types { prefix "oc-inet"; } + import openconfig-network-instance { prefix "oc-ni"; } + import openconfig-platform { prefix "oc-platform"; } + import openconfig-types { prefix "oc-types"; } + import openconfig-yang-types { prefix "oc-yang"; } + + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides detailed information about the hardware programming + state of various types of routes within a particular network instance. + It can be used to track where there are routing hardware programming errors + on a device."; + + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2022-10-11" { + description + "Initial revision."; + reference "0.1.0"; + } + + grouping ip-routes-common-config { + description + "IP routes hardware programming error common configuration parameters"; + + leaf enabled { + type boolean; + description + "This leaf indicates whether IP routes hardware programming error tracking + is enabled or not"; + } + } + + grouping programming-errors-top { + description + "Top-level grouping for AFT hardware programming errors in OpenConfig."; + + container programming-errors { + description + "Detailed information about the AFT hardware programming state of various types of + routes within a particular network instance. It can be used to track where there + are AFT hardware programming errors on a device."; + + container ip-routes { + description + "The IP AFT/routes hardware programming status within the network-instance. + IP Route programming reports are divided into a set of sub-categories: + - failed programming -- A prefix which is not present in the AFT state is + attempted to be added into the hardware but failed. Traffic destined for + this prefix will not be matched. + - stale programming -- A prefix is already in the AFT is requested to + be updated but failed. Traffic destined for this prefix will be + forwarded to the old next-hop. AFT telemetry should continue to + reflect the old next-hop for the prefix. + - drop programming - these routes are explicitly programmed into hardware + to point to a destination that discards packets. + + Lifecycle of entries/prefixes in the above 3 containers is tied to AFT + telemetry data. When the route gets removed from AFT telemetry data + corresponding entry/prefix will be deleted from above containers as well"; + + container config { + description + "IP route hardware programming errors Configuration parameters"; + + uses ip-routes-common-config; + } + + container state { + config false; + description + "IP route hardware programming errors State parameters"; + + leaf total-errors { + type oc-yang:counter64; + description + "Total number of IP route hardware programming errors encountered"; + } + + uses ip-routes-common-config; + } + + container failed-routes { + config false; + description + "Surrounding container for the list of routes that failed hardware + programming."; + + list failed { + key "prefix"; + + description + "A prefix that was attempted to the programmed into hardware, but the + programming operation failed."; + + leaf prefix { + type leafref { + path "../state/prefix"; + } + description + "Reference to the prefix that keys the failed list."; + } + + container state { + description + "Operational state parameters relating to a failed programming + operation."; + uses route-state-common; + } + } + } + + container stale-routes { + config false; + description + "Surrounding container for the list of routes that are currently in + a stale state."; + + list stale { + key "prefix"; + + description + "A prefix that is currently installed in hardware, but a subsequent + operation to update its programming failed - such that the entry in + hardware is stale."; + + leaf prefix { + type leafref { + path "../state/prefix"; + } + description + "Reference to the prefix that keys the stale list."; + } + + container state { + description + "Operational state parameters relating to a stale route."; + uses route-state-common; + } + } + } + + container drop-routes { + config false; + description + "Surrounding container for the list of routes that are currently in + a drop state."; + + list drop { + key "prefix"; + + description + "A prefix that is currently installed in hardware but with an explicit + instruction that it should discard packets that are destined towards + it."; + + leaf prefix { + type leafref { + path "../state/prefix"; + } + description + "Reference to the prefix that keys the drop list."; + } + + container state { + description + "Operational state parameters relating to a drop route."; + uses route-state-common; + } + } + } + } + } + } + + grouping route-state-common { + description + "Common parameters that correspond to a particular route type."; + + leaf prefix { + type oc-inet:ip-prefix; + description + "The IPv4 or IPv6 prefix that the route state corresponds to."; + } + + leaf time { + type oc-types:timeticks64; + description + "Represents the time the hardware route programming state change was + detected by the monitoring subsystem expressed as nanoseconds since + the Unix epoch."; + } + + leaf-list dest-component { + type leafref { + path "/oc-platform:components/oc-platform:component/oc-platform:name"; + } + description + "The destination component for the route hardware programming"; + } + } + + augment "/oc-ni:network-instances/oc-ni:network-instance" { + description + "Augment the network-instance model with the hardware programming + errors container."; + + uses programming-errors-top; + } +} diff --git a/release/models/openconfig-extensions.yang b/release/models/openconfig-extensions.yang index c5e24ba22..2e0fd9f07 100644 --- a/release/models/openconfig-extensions.yang +++ b/release/models/openconfig-extensions.yang @@ -18,6 +18,14 @@ module openconfig-extensions { "This module provides extensions to the YANG language to allow OpenConfig specific functionality and meta-data to be defined."; + oc-ext:openconfig-version "0.5.1"; + + revision "2022-10-05" { + description + "Add missing version statement."; + reference "0.5.1"; + } + revision "2020-06-16" { description "Add extension for POSIX pattern statements."; diff --git a/release/models/openflow/openconfig-openflow-types.yang b/release/models/openflow/openconfig-openflow-types.yang index 4db4675ba..b61e542c5 100644 --- a/release/models/openflow/openconfig-openflow-types.yang +++ b/release/models/openflow/openconfig-openflow-types.yang @@ -18,7 +18,17 @@ module openconfig-openflow-types { "This module defines types related to the Openflow configuration and operational state model."; - oc-ext:openconfig-version "0.1.3"; + oc-ext:openconfig-version "0.2.0"; + + revision "2022-05-24" { + description + "Remove module extension oc-ext:regexp-posix by making pattern regexes + conform to RFC6020/7950. + + Types impacted: + - datapath-id"; + reference "0.2.0"; + } revision "2020-06-30" { description @@ -45,7 +55,6 @@ module openconfig-openflow-types { } // OpenConfig specific extensions for module metadata. - oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -97,7 +106,7 @@ module openconfig-openflow-types { typedef datapath-id { type string { - pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}$'; + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}'; oc-ext:posix-pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}$'; } description diff --git a/release/models/optical-transport/.spec.yml b/release/models/optical-transport/.spec.yml index 672c664a9..bff97f857 100644 --- a/release/models/optical-transport/.spec.yml +++ b/release/models/optical-transport/.spec.yml @@ -25,10 +25,14 @@ - yang/optical-transport/openconfig-transport-line-common.yang - yang/optical-transport/openconfig-wavelength-router.yang - yang/optical-transport/openconfig-channel-monitor.yang + build: + - yang/optical-transport/openconfig-wavelength-router.yang + run-ci: true +- name: openconfig-transport-line-connectivity + docs: - yang/optical-transport/openconfig-transport-line-connectivity.yang build: - yang/optical-transport/openconfig-transport-line-connectivity.yang - - yang/optical-transport/openconfig-wavelength-router.yang run-ci: true - name: openconfig-transport-line-protection docs: @@ -45,6 +49,8 @@ - yang/optical-transport/openconfig-optical-attenuator.yang run-ci: true - name: openconfig-channel-monitor + docs: + - yang/optical-transport/openconfig-channel-monitor.yang build: - yang/optical-transport/openconfig-channel-monitor.yang run-ci: true diff --git a/release/models/optical-transport/openconfig-channel-monitor.yang b/release/models/optical-transport/openconfig-channel-monitor.yang index fff223b55..3623681c6 100644 --- a/release/models/optical-transport/openconfig-channel-monitor.yang +++ b/release/models/optical-transport/openconfig-channel-monitor.yang @@ -26,7 +26,13 @@ module openconfig-channel-monitor { channel monitor (OCM) for optical transport line system elements such as wavelength routers (ROADMs) and amplifiers."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.5.0"; + + revision "2024-04-04" { + description + "Add new leaf media-channel target-power."; + reference "0.5.0"; + } revision "2019-10-24" { description @@ -168,8 +174,16 @@ module openconfig-channel-monitor { description "Average measured optical power over the specified spectrum"; } - } + leaf target-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "Target optical power over the specified spectrum"; + } + } grouping media-channel-spectrum-power-top { description diff --git a/release/models/optical-transport/openconfig-optical-attenuator.yang b/release/models/optical-transport/openconfig-optical-attenuator.yang index 94b3d71bf..cffe56a5a 100644 --- a/release/models/optical-transport/openconfig-optical-attenuator.yang +++ b/release/models/optical-transport/openconfig-optical-attenuator.yang @@ -24,7 +24,13 @@ module openconfig-optical-attenuator { for variable optical attenuators, deployed as part of a transport line system."; - oc-ext:openconfig-version "0.1.0"; + oc-ext:openconfig-version "0.2.0"; + + revision "2024-07-10" { + description + "Adding SYSTEM_CONTROLLED mode with accompanying leaves"; + reference "0.2.0"; + } revision "2019-07-19" { description @@ -62,6 +68,12 @@ module openconfig-optical-attenuator { "Constant attenuation mode"; } + identity SYSTEM_CONTROLLED { + base OPTICAL_ATTENUATOR_MODE; + description + "System controls the attenuation value."; + } + // grouping statements @@ -112,6 +124,28 @@ module openconfig-optical-attenuator { maintain constant output power. When false, the attenuator is set max attenuation or blocked."; } + + leaf max-output-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The max power level allowed on the output of attenuator. This leaf + is optional when in SYSTEM_CONTROLLED mode."; + } + + leaf max-output-power-threshold { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "If the system-derived-target-output-power is equal to or greater than + 'max-output-power + max-output-power-threshold', a device alarm will + be raised within /system/alarms. This leaf is only relevant when + in SYSTEM_CONTROLLED mode."; + } } grouping optical-attenuator-state { @@ -150,6 +184,15 @@ module openconfig-optical-attenuator { port. This leaf is only valid for ports of type EGRESS."; } + leaf system-derived-target-output-power { + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The target output power as determined by the device. + This leaf is only relevant when in SYSTEM_CONTROLLED mode."; + } container actual-attenuation { description diff --git a/release/models/optical-transport/openconfig-terminal-device.yang b/release/models/optical-transport/openconfig-terminal-device.yang index 4c77457ef..8001cfb60 100644 --- a/release/models/optical-transport/openconfig-terminal-device.yang +++ b/release/models/optical-transport/openconfig-terminal-device.yang @@ -77,7 +77,29 @@ module openconfig-terminal-device { ports per linecard, separate linecards for client and line ports, etc.)."; - oc-ext:openconfig-version "1.8.0"; + oc-ext:openconfig-version "1.9.2"; + + revision "2024-06-12" { + description + "Add a state leaf to optical channels to reference their logical + channel assignment."; + reference "1.9.2"; + } + + revision "2023-12-13" { + description + "Add reference to the terminal-device-properties-guide.md doc for + operational-mode."; + reference "1.9.1"; + } + + revision "2021-07-29" { + description + "Add several coherent performance monitors to optical channel. + Re-group and add PHY-related performance monitors to optical + channel and logical channel."; + reference "1.9.0"; + } revision "2021-02-23" { description @@ -245,6 +267,13 @@ module openconfig-terminal-device { uses oc-eth:ethernet-interface-state-counters; uses terminal-ethernet-protocol-state-counters; + uses terminal-phy-protocol-stats { + description + "When 400ZR/ZR+ transceivers are plugged in switches or routers, + this grouping will be attached to logical channel with Ethernet + protocol framing, in order to involve host-side fec-related + error performances."; + } } grouping terminal-ethernet-protocol-state-counters { @@ -261,7 +290,7 @@ module openconfig-terminal-device { "The number of received bit interleaved parity (BIP) errors at the physical coding sublayer (PCS). If the interface consists of multiple lanes, this will be the sum of all - errors on the lane"; + errors on the lane"; } leaf in-pcs-errored-seconds { @@ -547,12 +576,6 @@ module openconfig-terminal-device { reference "ITU-T Rec. G.826"; } - leaf fec-uncorrectable-blocks { - type yang:counter64; - description - "The number of blocks that were uncorrectable by the FEC"; - } - leaf fec-uncorrectable-words { type yang:counter64; description @@ -578,10 +601,17 @@ module openconfig-terminal-device { } } - grouping terminal-otn-protocol-multi-stats { + grouping terminal-phy-protocol-stats { description - "Multi-value statistics containers for logical channels using - OTN framing (e.g., max, min, avg, instant)"; + "Counters and multi-value statistics for FEC-related error + performance"; + + leaf fec-uncorrectable-blocks { + type yang:counter64; + description + "The number of blocks or frames that were uncorrectable by + the FEC"; + } container pre-fec-ber { description @@ -656,7 +686,11 @@ module openconfig-terminal-device { "Remote defect indication (RDI) message received"; } uses terminal-otn-protocol-counter-stats; - uses terminal-otn-protocol-multi-stats; + uses terminal-phy-protocol-stats { + description + "This grouping may be used when the logical-channel-type + is 'PROT_OTN."; + } } grouping terminal-otn-protocol-top { @@ -1269,9 +1303,10 @@ module openconfig-terminal-device { // Ideally, this leaf should be a leafref to the supported // operational modes, but YANG 1.0 does not allow a r/w // leaf to be a leafref to a r/o leaf. + reference + "https://github.com/openconfig/public/blob/master/doc/terminal-device-properties-guide.md"; } - leaf line-port { type leafref { path "/oc-platform:components/oc-platform:component/" + @@ -1297,6 +1332,18 @@ module openconfig-terminal-device { to the same value across related optical channels."; } + leaf logical-channel-assignment { + type leafref { + path "/oc-opt-term:terminal-device/oc-opt-term:logical-channels" + + "/oc-opt-term:channel/oc-opt-term:index"; + } + description + "Reference to the logical channel that is directly assigned + to this optical channel if it is assigned to a logical channel. + The logical channel must also reference this optical channel at + logical-channel-assignments/assignment/state/optical-channel"; + } + uses oc-transceiver:optical-power-state; container chromatic-dispersion { @@ -1346,6 +1393,152 @@ module openconfig-terminal-device { uses oc-types:avg-min-max-instant-stats-precision2-dB; } + + container modulator-bias-xi { + description + "The bias on in-phase path and Polarization X of + the coherent modulator. This is represented as a percentage + with 2 decimal precision. This term is defined by OIF + Implementation Agreement for Coherent CMIS. Values include + the instantaneous, average, minimum, and maximum statistics. + If avg/min/max statistics are not supported, the target is + expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + + container modulator-bias-xq { + description + "The bias on quadrature path and Polarization X of + the coherent modulator. This is represented as a percentage + with 2 decimal precision. This term is defined by OIF + Implementation Agreement for Coherent CMIS. Values include + the instantaneous, average, minimum, and maximum statistics. + If avg/min/max statistics are not supported, the target is + expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + + container modulator-bias-yi { + description + "The bias on in-phase path and Polarization Y of + the coherent modulator. This is represented as a percentage + with 2 decimal precision. This term is defined by OIF + Implementation Agreement for Coherent CMIS. Values include + the instantaneous, average, minimum, and maximum statistics. + If avg/min/max statistics are not supported, the target is + expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + + container modulator-bias-yq { + description + "The bias on quadrature path and Polarization Y of + the coherent modulator. This is represented as a percentage + with 2 decimal precision. This term is defined by OIF + Implementation Agreement for Coherent CMIS. Values include + the instantaneous, average, minimum, and maximum statistics. + If avg/min/max statistics are not supported, the target is + expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + + container modulator-bias-x-phase { + description + "The X-Phase bias of the coherent modulator. This is + represented as a percentage with 2 decimal precision. This + term is defined by OIF Implementation Agreement for + Coherent CMIS. Values include the instantaneous, average, + minimum, and maximum statistics. If avg/min/max statistics + are not supported, the target is expected to just supply + the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + + container modulator-bias-y-phase { + description + "The Y-Phase bias of the coherent modulator. This is + represented as a percentage with 2 decimal precision. This + term is defined by OIF Implementation Agreement for + Coherent CMIS. Values include the instantaneous, average, + minimum, and maximum statistics. If avg/min/max statistics + are not supported, the target is expected to just supply + the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + + container osnr { + description + "Optical signal to noise ratio at 12.5GHz noise bandwidth + in dB with two decimal precision. Values include the + instantaneous, average, minimum, and maximum statistics. + If avg/min/max statistics are not supported, the target + is expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-types:avg-min-max-instant-stats-precision2-dB; + } + + container carrier-frequency-offset { + description + "Carrier frequency offset in MHz with 1 decimal precision. + Values include the instantaneous, average, minimum, and + maximum statistics. If avg/min/max statistics are not supported, + the target is expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision1-mhz; + } + + container sop-roc { + description + "State-of-polarization rate-of-change (SOP-ROC) in krad/s with 1 + decimal precision. This term is defined by OIF Implementation + Agreement for Coherent CMIS. Values include the instantaneous, + average, minimum, and maximum statistics. If avg/min/max + statistics are not supported, the target is expected to just + supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-opt-types:avg-min-max-instant-stats-precision1-krads; + } + + container modulation-error-ratio { + description + "Modulation error ratio in dB with two decimal precision. Values + include the instantaneous, average, minimum, and maximum statistics. + If avg/min/max statistics are not supported, the target is + expected to just supply the instant value."; + + reference "IA OIF-C-CMIS-01.1 Table 7"; + + uses oc-types:avg-min-max-instant-stats-precision2-dB; + } + + uses terminal-phy-protocol-stats { + description + "When there is no OTN framing e.g. 400ZR, this grouping will be used."; + } } grouping terminal-optical-channel-top { diff --git a/release/models/optical-transport/openconfig-transport-types.yang b/release/models/optical-transport/openconfig-transport-types.yang index 549d50a26..7c3c6a481 100644 --- a/release/models/optical-transport/openconfig-transport-types.yang +++ b/release/models/optical-transport/openconfig-transport-types.yang @@ -22,7 +22,98 @@ module openconfig-transport-types { "This module contains general type definitions and identities for optical transport models."; - oc-ext:openconfig-version "0.14.0"; + oc-ext:openconfig-version "1.0.0"; + + revision "2024-07-24" { + description + "Corrected description for FACILITY and TERMINAL loopback-mode-type + enums."; + reference "1.0.0"; + } + + revision "2024-06-28" { + description + "Add ETH_25GBASE_LR and ETH_25GBASE_SR PMD types."; + reference "0.25.0"; + } + + revision "2024-05-13" { + description + "Fix the QSFP56_DD description as it is meant to be generic."; + reference "0.24.1"; + } + + revision "2024-03-20" { + description + "FlexO support, 800G trib protocol, and OSFP + description update for 800G."; + reference "0.24.0"; + } + + revision "2024-03-12" { + description + "Add TRIBUTARY_RATE_CLASS_TYPE's up to 3200G to support + mating of two 1600G line rates."; + reference "0.23.0"; + } + + revision "2024-01-17" { + description + "Update loopback-mode types."; + reference "0.22.0"; + } + + revision "2024-01-16" { + description + "Added form factors QSFP28_DD and CSFP. + Added new PMDs: ETH_100GBASE_ER4L (MSA 100GBASE-ER4 Lite), + ETH_1GBASE_LX10. + Added References for 100GBASE-CR4 and 40GGBASE-CR4 for DACs"; + reference "0.21.0"; + } + + revision "2023-08-03" { + description + "Add QSFP56 and QSFP56_DD form factor identities and + deprecated QSFP56_DD_TYPE1 and QSFP56_DD_TYPE2 form factor identities."; + reference "0.20.0"; + } + + revision "2023-07-24" { + description + "Add SFP_DD and DSFP form factor identities."; + reference "0.19.0"; + } + + revision "2023-02-08" { + description + "Add ETH_100GBASE_DR PMD type"; + reference "0.18.1"; + } + + revision "2022-12-05" { + description + "Fix trailing whitespace"; + reference "0.17.1"; + } + + revision "2022-10-18" { + description + "Add ETH_400GMSA_PSM4 PMD type"; + reference "0.17.0"; + } + + revision "2022-09-26" { + description + "Add SFP28 and SFP56 form factor identities."; + reference "0.16.0"; + } + + revision "2021-07-29" { + description + "Add several avg-min-max-instant-stats groupings"; + reference "0.15.0"; + } revision "2021-03-22" { description @@ -138,15 +229,41 @@ module openconfig-transport-types { } enum FACILITY { description - "A loopback which directs traffic normally transmitted - on the port back to the device as if received on the same - port from an external source."; + "A port external loopback at ASIC level. The loopback which + directs traffic received from an external source on the port + back out the transmit side of the same port. Note this mode is + used when external loopback does NOT specify MAC or PHY"; } enum TERMINAL { description - "A loopback which directs traffic received from an external - source on the port back out the transmit side of the same - port."; + "A port internal loopback at ASIC level. The loopback directs + traffic normally transmitted on the port back to the device as + if received on the same port from an external source. Note this + mode is used when internal loopback does NOT specify MAC or PHY."; + } + enum ASIC_PHY_LOCAL { + description + "A port internal loopback at PHY module. The loopback directs + traffic normally transmitted on the port back to the device as + if received on the same port from an external source."; + } + enum ASIC_PHY_REMOTE { + description + "A port external loopback at PHY module. The loopback which + directs traffic received from an external source on the port + back out the transmit side of the same port."; + } + enum ASIC_MAC_LOCAL { + description + "A port internal loopback at MAC module. The loopback directs + traffic normally transmitted on the port back to the device as + if received on the same port from an external source."; + } + enum ASIC_MAC_REMOTE { + description + "A port external loopback at MAC module. The loopback which + directs traffic received from an external source on the port + back out the transmit side of the same port."; } } default NONE; @@ -434,6 +551,160 @@ module openconfig-transport-types { uses oc-types:min-max-time; } + grouping avg-min-max-instant-stats-precision1-mhz { + description + "Common grouping for recording frequency values in MHz with + 1 decimal precision. Values include the instantaneous, average, + minimum, and maximum statistics. Statistics are computed and + reported based on a moving time interval (e.g., the last 30s). + If supported by the device, the time interval over which the + statistics are computed, and the times at which the minimum and + maximum values occurred, are also reported."; + + leaf instant { + type decimal64 { + fraction-digits 1; + } + units MHz; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 1; + } + units MHz; + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 1; + } + units MHz; + description + "The minimum value of the statistic over the time interval."; + } + + leaf max { + type decimal64 { + fraction-digits 1; + } + units MHz; + description + "The maximum value of the statistic over the time interval."; + } + + uses oc-types:stat-interval-state; + uses oc-types:min-max-time; + } + + grouping avg-min-max-instant-stats-precision1-krads { + description + "Common grouping for recording kiloradian per second (krad/s) values + with 1 decimal precision. Values include the instantaneous, + average, minimum, and maximum statistics. Statistics are computed + and reported based on a moving time interval (e.g., the last 30s). + If supported by the device, the time interval over which the + statistics are computed, and the times at which the minimum and + maximum values occurred, are also reported."; + + leaf instant { + type decimal64 { + fraction-digits 1; + } + units "krad/s"; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 1; + } + units "krad/s"; + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 1; + } + units "krad/s"; + description + "The minimum value of the statistic over the time interval."; + } + + leaf max { + type decimal64 { + fraction-digits 1; + } + units "krad/s"; + description + "The maximum value of the statistic over the time interval."; + } + + uses oc-types:stat-interval-state; + uses oc-types:min-max-time; + } + + grouping avg-min-max-instant-stats-precision2-pct { + description + "Common grouping for percentage statistics with 2 decimal precision. + Values include the instantaneous, average, minimum, and maximum + statistics. Statistics are computed and reported based on a moving + time interval (e.g., the last 30s). If supported by the device, + the time interval over which the statistics are computed, and the + times at which the minimum and maximum values occurred, are also + reported."; + + leaf instant { + type decimal64 { + fraction-digits 2; + } + units percentage; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 2; + } + units percentage; + description + "The arithmetic mean value of the statistic over the + time interval."; + } + + leaf min { + type decimal64 { + fraction-digits 2; + } + units percentage; + description + "The minimum value of the statistic over the time interval."; + } + + leaf max { + type decimal64 { + fraction-digits 2; + } + units percentage; + description + "The maximum value of the statistic over the time interval."; + } + + uses oc-types:stat-interval-state; + uses oc-types:min-max-time; + } + + // identity statements identity TRIBUTARY_PROTOCOL_TYPE { @@ -563,6 +834,11 @@ module openconfig-transport-types { description "400G Ethernet protocol"; } + identity PROT_800GE { + base TRIBUTARY_PROTOCOL_TYPE; + description "800G Ethernet protocol"; + } + identity PROT_OTSIG { base TRIBUTARY_PROTOCOL_TYPE; description "Optical tributary signal group protocol"; @@ -573,6 +849,12 @@ module openconfig-transport-types { description "ODU Flex with CBR protocol"; } + identity PROT_FLEXO { + base TRIBUTARY_PROTOCOL_TYPE; + description + "FlexO protocol as defined in ITU-T G.709.1 and ITU-T G.709.3"; + } + identity PROT_ODUFLEX_GFP { base TRIBUTARY_PROTOCOL_TYPE; description "ODU Flex with GFP protocol"; @@ -634,8 +916,32 @@ module openconfig-transport-types { channels"; } + identity QSFP28_DD { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "QSFP-DD with electrical interfaces consisting of 8 lanes that operate at up to + 25 Gbps with NRZ modulation"; + reference "http://qsfp-dd.com"; + } + + identity QSFP56 { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "QSFP pluggable optic with support for up to 4x56G physical + channels"; + } + + identity QSFP56_DD { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "QSFP-DD quad small form factor pluggable double density + optic providing an 8 lane electrical interface"; + reference "http://qsfp-dd.com"; + } + identity QSFP56_DD_TYPE1 { base TRANSCEIVER_FORM_FACTOR_TYPE; + status deprecated; description "QSFP DD pluggable optic with support for up to 8x56G physical channels. Type 1 uses eight optical and electrical signals."; @@ -643,6 +949,7 @@ module openconfig-transport-types { identity QSFP56_DD_TYPE2 { base TRANSCEIVER_FORM_FACTOR_TYPE; + status deprecated; description "QSFP DD pluggable optic with support for up to 4x112G physical channels. Type 2 uses four optical and eight electrical @@ -669,6 +976,46 @@ module openconfig-transport-types { up to 16 Gb/s signals, including 10 GbE and OTU2"; } + identity CSFP { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "Compact Small form-factor pluggable transceiver. It is a version + of SFP with the same mechanical form factor allowing two independent + bidirectional channels per port."; + } + + + + identity SFP28 { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "Small form-factor pluggable transceiver supporting up to + 25 Gb/s signal"; + } + + identity SFP56 { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "Small form-factor pluggable transceiver supporting up to + 50 Gb/s signal"; + } + + identity SFP_DD { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "SFP-DD electrical interfaces will employ 2 lanes that operate up to + 25 Gbps NRZ modulation or 56 Gbps PAM4 modulation, providing + solutions up to 50 Gbps or 112 Gbps PAM4 aggregate"; + reference "http://sfp-dd.com"; + } + + identity DSFP { + base TRANSCEIVER_FORM_FACTOR_TYPE; + description + "A transceiver implementing the DSFP Transceiver specification"; + reference "https://dsfpmsa.org/"; + } + identity XFP { base TRANSCEIVER_FORM_FACTOR_TYPE; description @@ -687,7 +1034,7 @@ module openconfig-transport-types { base TRANSCEIVER_FORM_FACTOR_TYPE; description "Octal small form factor pluggable transceiver supporting - 400 Gb/s."; + 400 Gb/s or 800 Gb/s."; } identity NON_PLUGGABLE { @@ -744,6 +1091,12 @@ module openconfig-transport-types { "Ethernet compliance codes (PMD) supported by transceivers"; } + identity ETH_1000BASE_LX10 { + base ETHERNET_PMD_TYPE; + description "Ethernet compliance code: ETH_1000BASE_LX10"; + reference "802.3ah-2004(CL59)"; + } + identity ETH_10GBASE_LRM { base ETHERNET_PMD_TYPE; description "Ethernet compliance code: 10GBASE_LRM"; @@ -769,9 +1122,24 @@ module openconfig-transport-types { description "Ethernet compliance code: 10GBASE_SR"; } + identity ETH_25GBASE_LR { + base ETHERNET_PMD_TYPE; + description "Ethernet compliance code: 25GBASE_LR"; + reference "IEEE 802.3cc-2022 (CL114)"; + } + + identity ETH_25GBASE_SR { + base ETHERNET_PMD_TYPE; + description "Ethernet compliance code: 25GBASE_SR"; + reference "IEEE 802.3by-2022 (CL112)"; + } + identity ETH_40GBASE_CR4 { base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 40GBASE_CR4"; + description "Ethernet compliance code: 40GBASE_CR4. + This PMD is used in Direct Attach Cables (DAC) + and Active Optical Cables (AOC)"; + reference "IEEE 802.3ba 40GBASE-CR4"; } identity ETH_40GBASE_SR4 { @@ -829,6 +1197,11 @@ module openconfig-transport-types { description "Ethernet compliance code: 100GBASE_LR4"; } + identity ETH_100GBASE_ER4L { + base ETHERNET_PMD_TYPE; + description "Ethernet compliance code: 100GBASE_ER4L"; + } + identity ETH_100GBASE_ER4 { base ETHERNET_PMD_TYPE; description "Ethernet compliance code: 100GBASE_ER4"; @@ -851,7 +1224,10 @@ module openconfig-transport-types { identity ETH_100GBASE_CR4 { base ETHERNET_PMD_TYPE; - description "Ethernet compliance code: 100GBASE_CR4"; + description "Ethernet compliance code: 100GBASE_CR4. + This PMD is used in Direct Attach Cables (DAC) + and Active Optical Cables (AOC)"; + reference "IEEE 802.3bj 100GBASE-CR4"; } identity ETH_100GBASE_FR { @@ -859,6 +1235,11 @@ module openconfig-transport-types { description "Ethernet compliance code: 100GBASE_FR"; } + identity ETH_100GBASE_DR { + base ETHERNET_PMD_TYPE; + description "Ethernet compliance code: 100GBASE_DR"; + } + identity ETH_400GBASE_ZR { base ETHERNET_PMD_TYPE; description "Ethernet compliance code: 400GBASE_ZR"; @@ -884,6 +1265,11 @@ module openconfig-transport-types { description "Ethernet compliance code: 400GBASE_DR4"; } + identity ETH_400GMSA_PSM4 { + base ETHERNET_PMD_TYPE; + description "Ethernet compliance code: 400GMSA_PSM4"; + } + identity ETH_UNDEFINED { base ETHERNET_PMD_TYPE; description "Ethernet compliance code: undefined"; @@ -1163,6 +1549,198 @@ module openconfig-transport-types { "1600G tributary signal rate"; } + identity TRIB_RATE_1650G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1650G tributary signal rate"; + } + + identity TRIB_RATE_1700G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1700G tributary signal rate"; + } + + identity TRIB_RATE_1750G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1750G tributary signal rate"; + } + + identity TRIB_RATE_1800G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1800G tributary signal rate"; + } + + identity TRIB_RATE_1850G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1850G tributary signal rate"; + } + + identity TRIB_RATE_1900G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1900G tributary signal rate"; + } + + identity TRIB_RATE_1950G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "1950G tributary signal rate"; + } + + identity TRIB_RATE_2000G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2000G tributary signal rate"; + } + + identity TRIB_RATE_2050G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2050G tributary signal rate"; + } + + identity TRIB_RATE_2100G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2100G tributary signal rate"; + } + + identity TRIB_RATE_2150G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2150G tributary signal rate"; + } + + identity TRIB_RATE_2200G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2200G tributary signal rate"; + } + + identity TRIB_RATE_2250G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2250G tributary signal rate"; + } + + identity TRIB_RATE_2300G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2300G tributary signal rate"; + } + + identity TRIB_RATE_2350G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2350G tributary signal rate"; + } + + identity TRIB_RATE_2400G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2400G tributary signal rate"; + } + + identity TRIB_RATE_2450G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2450G tributary signal rate"; + } + + identity TRIB_RATE_2500G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2500G tributary signal rate"; + } + + identity TRIB_RATE_2550G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2550G tributary signal rate"; + } + + identity TRIB_RATE_2600G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2600G tributary signal rate"; + } + + identity TRIB_RATE_2650G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2650G tributary signal rate"; + } + + identity TRIB_RATE_2700G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2700G tributary signal rate"; + } + + identity TRIB_RATE_2750G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2750G tributary signal rate"; + } + + identity TRIB_RATE_2800G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2800G tributary signal rate"; + } + + identity TRIB_RATE_2850G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2850G tributary signal rate"; + } + + identity TRIB_RATE_2900G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2900G tributary signal rate"; + } + + identity TRIB_RATE_2950G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "2950G tributary signal rate"; + } + + identity TRIB_RATE_3000G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "3000G tributary signal rate"; + } + + identity TRIB_RATE_3050G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "3050G tributary signal rate"; + } + + identity TRIB_RATE_3100G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "3100G tributary signal rate"; + } + + identity TRIB_RATE_3150G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "3150G tributary signal rate"; + } + + identity TRIB_RATE_3200G { + base TRIBUTARY_RATE_CLASS_TYPE; + description + "3200G tributary signal rate"; + } + identity LOGICAL_ELEMENT_PROTOCOL_TYPE { description "Type of protocol framing used on the logical channel or diff --git a/release/models/optical-transport/openconfig-wavelength-router.yang b/release/models/optical-transport/openconfig-wavelength-router.yang index eded5e217..2684521ee 100644 --- a/release/models/optical-transport/openconfig-wavelength-router.yang +++ b/release/models/optical-transport/openconfig-wavelength-router.yang @@ -41,7 +41,13 @@ module openconfig-wavelength-router { target spectrum power profile over the full spectrum instead of individual media channels."; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2024-04-08" { + description + "Add attenuation-control-range to media channel config"; + reference "1.2.0"; + } revision "2021-07-26" { description @@ -168,6 +174,29 @@ module openconfig-wavelength-router { within the order of minutes"; } + // identity statements + identity ATTENUATION_CONTROL_RANGE { + description + "The definition for different types of modes to specify + attenuation control range settings on a media channel"; + } + + identity CONTROL_RANGE_FULL { + base ATTENUATION_CONTROL_RANGE; + description + "Media channel power compensation range is not constrained, + and is limited by available WSS dynamic range. Operator does not + explicitly set the undershoot and overshoot compensation range"; + } + + identity CONTROL_RANGE_LIMITED { + base ATTENUATION_CONTROL_RANGE; + description + "Media channel undershoot and overshoot compensation ranges + are defined by max-undershoot-compensation and + max-overshoot-compensation"; + } + identity ASE_CONTROL_MODE { description "The definition for different types of ASE control modes @@ -554,6 +583,19 @@ module openconfig-wavelength-router { is configured"; } + leaf media-channel-injection-offset { + type decimal64 { + fraction-digits 2; + } + units dB; + description + "Defines the optical power offset value relative to the + ASE injection threshold at which point ASE should be removed + and the media-channel should be injected. Requires + ase-injection-delta or ase-injection-threshold to be + configured"; + } + leaf attenuation-control-mode { type identityref { base ATTENUATION_CONTROL_MODE; @@ -563,6 +605,46 @@ module openconfig-wavelength-router { The control mode defines the behavior of how the attenuation across a media channel is set"; } + + leaf attenuation-control-range { + type identityref { + base ATTENUATION_CONTROL_RANGE; + } + description + "Sets the attenuation control range for the media channel. + The control range defines the amount of media channel + undershoot and overshoot compensation that will be applied + when performing power targeting to meet the defined output + port spectrum power profile"; + } + + leaf max-undershoot-compensation { + type decimal64 { + fraction-digits 2; + } + when "../attenuation-control-range = 'CONTROL_RANGE_LIMITED'"; + units dB; + description + "Defines the maximum allowable WSS attenuation adjustment + the system will use to compensate a channel with input power + lower than the defined target power at the input. This value + is measured relative to the baseline WSS attenuation + established for an individual media-channel"; + } + + leaf max-overshoot-compensation { + type decimal64 { + fraction-digits 2; + } + when "../attenuation-control-range = 'CONTROL_RANGE_LIMITED'"; + units dB; + description + "Defines the maximum allowable WSS attenuation adjustment + the system will use to compensate a channel with input power + higher than the defined target power at the input. This + value is measured relative to the baseline WSS attenuation + established for an individual media-channel"; + } } grouping media-channel-state { diff --git a/release/models/ospf/openconfig-ospfv2-area-interface.yang b/release/models/ospf/openconfig-ospfv2-area-interface.yang index fc0975a5d..7fa65cee0 100644 --- a/release/models/ospf/openconfig-ospfv2-area-interface.yang +++ b/release/models/ospf/openconfig-ospfv2-area-interface.yang @@ -25,7 +25,56 @@ submodule openconfig-ospfv2-area-interface { "This submodule provides OSPFv2 configuration and operational state parameters that are specific to the area context"; - oc-ext:openconfig-version "0.3.0"; + oc-ext:openconfig-version "0.5.2"; + + revision "2024-06-17" { + description + "Correct ROUTER_INFORMATION_LSA to ROUTER_INFORMATION."; + reference "0.5.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "0.5.1"; + } + + revision "2023-08-25" { + description + "Add leaf metric to lsdb-summary-lsa-state."; + reference "0.5.0"; + } + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.3"; + } + + revision "2023-07-05" { + description + "Fix typo in experimental-te leaf description."; + reference "0.4.2"; + } + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.1"; + } + + revision "2022-02-10" { + description + "Fix spelling error in retransmission-queue-length leaf."; + reference "0.4.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "0.3.1"; + } revision "2021-03-17" { description @@ -86,7 +135,7 @@ submodule openconfig-ospfv2-area-interface { "Configuration parameters for an OSPF interface"; leaf id { - type string; + type oc-if:interface-id; description "An operator-specified string utilised to uniquely reference this interface"; @@ -286,7 +335,7 @@ submodule openconfig-ospfv2-area-interface { neighbor has been through"; } - leaf retranmission-queue-length { + leaf retransmission-queue-length { type uint32; description "The number of LSAs that are currently in the queue to be @@ -340,7 +389,12 @@ submodule openconfig-ospfv2-area-interface { key "id"; description - "List of interfaces which are enabled within this area"; + "List of interfaces which are enabled within this area. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf id { type leafref { diff --git a/release/models/ospf/openconfig-ospfv2-area.yang b/release/models/ospf/openconfig-ospfv2-area.yang index 241cfd155..f65f58979 100644 --- a/release/models/ospf/openconfig-ospfv2-area.yang +++ b/release/models/ospf/openconfig-ospfv2-area.yang @@ -23,7 +23,62 @@ submodule openconfig-ospfv2-area { "This submodule provides OSPFv2 configuration and operational state parameters that are specific to the area context"; - oc-ext:openconfig-version "0.2.2"; + oc-ext:openconfig-version "0.5.2"; + + revision "2024-06-17" { + description + "Correct ROUTER_INFORMATION_LSA to ROUTER_INFORMATION."; + reference "0.5.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "0.5.1"; + } + + revision "2023-08-25" { + description + "Add leaf metric to lsdb-summary-lsa-state."; + reference "0.5.0"; +} + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.3"; + } + + revision "2023-07-05" { + description + "Fix typo in experimental-te leaf description."; + reference "0.4.2"; + } + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.1"; + } + + revision "2022-02-10" { + description + "Fix spelling error in retransmission-queue-length leaf."; + reference "0.4.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "0.3.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "0.3.0"; + } revision "2019-11-28" { description diff --git a/release/models/ospf/openconfig-ospfv2-common.yang b/release/models/ospf/openconfig-ospfv2-common.yang index e9a1e7e12..34f9c3b23 100644 --- a/release/models/ospf/openconfig-ospfv2-common.yang +++ b/release/models/ospf/openconfig-ospfv2-common.yang @@ -17,7 +17,62 @@ submodule openconfig-ospfv2-common { "This submodule provides OSPFv2 configuration and operational state parameters that are shared across multiple contexts"; - oc-ext:openconfig-version "0.2.2"; + oc-ext:openconfig-version "0.5.2"; + + revision "2024-06-17" { + description + "Correct ROUTER_INFORMATION_LSA to ROUTER_INFORMATION."; + reference "0.5.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "0.5.1"; + } + + revision "2023-08-25" { + description + "Add leaf metric to lsdb-summary-lsa-state."; + reference "0.5.0"; +} + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.3"; + } + + revision "2023-07-05" { + description + "Fix typo in experimental-te leaf description."; + reference "0.4.2"; + } + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.1"; + } + + revision "2022-02-10" { + description + "Fix spelling error in retransmission-queue-length leaf."; + reference "0.4.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "0.3.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "0.3.0"; + } revision "2019-11-28" { description diff --git a/release/models/ospf/openconfig-ospfv2-global.yang b/release/models/ospf/openconfig-ospfv2-global.yang index 660f4a31a..96504073c 100644 --- a/release/models/ospf/openconfig-ospfv2-global.yang +++ b/release/models/ospf/openconfig-ospfv2-global.yang @@ -23,7 +23,62 @@ submodule openconfig-ospfv2-global { "This submodule provides OSPFv2 configuration and operational state parameters that are global to a particular OSPF instance"; - oc-ext:openconfig-version "0.2.2"; + oc-ext:openconfig-version "0.5.2"; + + revision "2024-06-17" { + description + "Correct ROUTER_INFORMATION_LSA to ROUTER_INFORMATION."; + reference "0.5.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "0.5.1"; + } + + revision "2023-08-25" { + description + "Add leaf metric to lsdb-summary-lsa-state."; + reference "0.5.0"; + } + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.3"; + } + + revision "2023-07-05" { + description + "Fix typo in experimental-te leaf description."; + reference "0.4.2"; + } + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.1"; + } + + revision "2022-02-10" { + description + "Fix spelling error in retransmission-queue-length leaf."; + reference "0.4.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "0.3.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "0.3.0"; + } revision "2019-11-28" { description @@ -275,6 +330,7 @@ submodule openconfig-ospfv2-global { } uses oc-rpol:apply-policy-import-config; + uses oc-rpol:default-policy-import-config; } grouping ospfv2-global-max-metric-config { diff --git a/release/models/ospf/openconfig-ospfv2-lsdb.yang b/release/models/ospf/openconfig-ospfv2-lsdb.yang index c51de0665..113d31630 100644 --- a/release/models/ospf/openconfig-ospfv2-lsdb.yang +++ b/release/models/ospf/openconfig-ospfv2-lsdb.yang @@ -22,7 +22,61 @@ submodule openconfig-ospfv2-lsdb { "An OpenConfig model for the Open Shortest Path First (OSPF) version 2 link-state database (LSDB)"; - oc-ext:openconfig-version "0.2.2"; + oc-ext:openconfig-version "0.5.2"; + + revision "2024-06-17" { + description + "Correct ROUTER_INFORMATION_LSA to ROUTER_INFORMATION."; + reference "0.5.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "0.5.1"; + } + + revision "2023-08-25" { + description + "Add leaf metric to lsdb-summary-lsa-state."; + reference "0.5.0"; +} + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.3"; + } + + revision "2023-07-05" { + description + "Fix typo in experimental-te leaf description."; + reference "0.4.2"; + } + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.1"; + } + + revision "2022-02-10" { + description + "Fix spelling error in retransmission-queue-length leaf."; + reference "0.4.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "0.3.1"; + } + + revision "2021-03-17" { + description + "Add bfd support without augmentation."; + reference "0.3.0"; + } revision "2019-11-28" { description @@ -494,7 +548,7 @@ submodule openconfig-ospfv2-lsdb { } container traffic-engineering { - when "../state/type = 'TRAFFIC_ENGINEERING'" { + when "../state/type = 'oc-ospf-types:TRAFFIC_ENGINEERING'" { description "Include the traffic-engineering information when the Opaque LSA being described is a Traffic Engineering @@ -520,7 +574,7 @@ submodule openconfig-ospfv2-lsdb { uses ospfv2-lsdb-common-unknown-tlv-structure; container router-address { - when "../state/type = 'TE_ROUTER_ADDRESS'" { + when "../state/type = 'oc-ospf-types:TE_ROUTER_ADDRESS'" { description "Include the router address container only when the type of the TLV is Router Address"; @@ -537,7 +591,7 @@ submodule openconfig-ospfv2-lsdb { } container link { - when "../state/type = 'TE_ROUTER_LINK'" { + when "../state/type = 'oc-ospf-types:TE_ROUTER_LINK'" { description "Include the link container only when the type of the TLV describes a traffic engineering link"; @@ -629,7 +683,7 @@ submodule openconfig-ospfv2-lsdb { } container node-attribute { - when "../state/type = 'TE_NODE_ATTRIBUTE'" { + when "../state/type = 'oc-ospf-types:TE_NODE_ATTRIBUTE'" { description "Include the node-attribute container only when the type of the TLV describes a node attribute"; @@ -670,7 +724,7 @@ submodule openconfig-ospfv2-lsdb { } // traffic-engineering container grace-lsa { - when "../state/type = 'GRACE_LSA'" { + when "../state/type = 'oc-ospf-types:GRACE_LSA'" { description "Include the grace-lsa container when the opaque LSA is specified to be of that type."; @@ -701,7 +755,7 @@ submodule openconfig-ospfv2-lsdb { } // grace LSA container router-information { - when "../state/type = 'ROUTER_INFORMATION_LSA'" { + when "../state/type = 'oc-ospf-types:ROUTER_INFORMATION'" { description "Include the router-information container when the opaque LSA type is specified to be an RI LSA"; @@ -729,7 +783,7 @@ submodule openconfig-ospfv2-lsdb { uses ospfv2-lsdb-common-unknown-tlv-structure; container informational-capabilities { - when "../state/type = 'RI_INFORMATIONAL_CAPABILITIES'" { + when "../state/type = 'oc-ospf-types:RI_INFORMATIONAL_CAPABILITIES'" { description "Include the informational capabilities specification when the TLV of the RI LSA is specified to be of this type"; @@ -749,7 +803,7 @@ submodule openconfig-ospfv2-lsdb { } container node-administrative-tags { - when "../state/type = 'RI_NODE_ADMIN_TAG'" { + when "../state/type = 'oc-ospf-types:RI_NODE_ADMIN_TAG'" { description "Include the node administrative tags specification when the TLV of the RI LSA is specified to be of this type"; @@ -768,7 +822,7 @@ submodule openconfig-ospfv2-lsdb { } container segment-routing-algorithm { - when "../state/type = 'RI_SR_ALGORITHM'" { + when "../state/type = 'oc-ospf-types:RI_SR_ALGORITHM'" { description "Include the segment routing algorithm specific parameters when the TLV of the RI LSA is specified to be of this type"; @@ -786,7 +840,7 @@ submodule openconfig-ospfv2-lsdb { } container segment-routing-sid-label-range { - when "../state/type = 'RI_SR_SID_LABEL_RANGE'" { + when "../state/type = 'oc-ospf-types:RI_SR_SID_LABEL_RANGE'" { description "Include the segment routing SID/Label range TLV specific state when the TLV of the RI LSA is specified to be of this type"; @@ -833,7 +887,7 @@ submodule openconfig-ospfv2-lsdb { } // router-information container extended-prefix { - when "../state/type = 'OSPFV2_EXTENDED_PREFIX'" { + when "../state/type = 'oc-ospf-types:OSPFV2_EXTENDED_PREFIX'" { description "Include the extended-prefix container when the opaque LSA type is specified to be an extended prefix LSA"; @@ -868,7 +922,7 @@ submodule openconfig-ospfv2-lsdb { } container extended-prefix-range { - when "../state/type = 'EXTENDED_PREFIX_RANGE'" { + when "../state/type = 'oc-ospf-types:EXTENDED_PREFIX_RANGE'" { description "Include the prefix range sub-TLV when the type of the sub-TLV is specified as such"; @@ -887,7 +941,7 @@ submodule openconfig-ospfv2-lsdb { } container prefix-sid { - when "../state/type = 'PREFIX_SID'" { + when "../state/type = 'oc-ospf-types:PREFIX_SID'" { description "Include parameters relating to the Prefix SID when the type of the sub-TLV is indicated as such"; @@ -906,7 +960,7 @@ submodule openconfig-ospfv2-lsdb { } // prefix-sid container sid-label-binding { - when "../state/type = 'SID_LABEL_BINDING'" { + when "../state/type = 'oc-ospf-types:SID_LABEL_BINDING'" { description "Include parameters relating to the SID/Label binding sub-TLV only when the type is indicated as such"; @@ -940,7 +994,7 @@ submodule openconfig-ospfv2-lsdb { } container sid-label-binding { - when "../state/type = 'SID_LABEL_BINDING'" { + when "../state/type = 'oc-ospf-types:SID_LABEL_BINDING'" { description "Include the SID/Label Binding sub-TLV parameters only when the type is indicated as such"; @@ -959,7 +1013,7 @@ submodule openconfig-ospfv2-lsdb { } // sid-label-binding container ero-metric { - when "../state/type = 'ERO_METRIC'" { + when "../state/type = 'oc-ospf-types:ERO_METRIC'" { description "Include the ERO Metric sub-TLV parameters only when the type is indicated as such"; @@ -978,7 +1032,7 @@ submodule openconfig-ospfv2-lsdb { } // ero-metric container ero-path { - when "../state/type = 'ERO_PATH'" { + when "../state/type = 'oc-ospf-types:ERO_PATH'" { description "Include the ERO Path sub-TLV parameters only when the type is indicated as such"; @@ -1005,7 +1059,7 @@ submodule openconfig-ospfv2-lsdb { } container ipv4-segment { - when "../state/type = 'IPV4_SEGMENT'" { + when "../state/type = 'oc-ospf-types:IPV4_SEGMENT'" { description "Include the IPv4 segment only when the type is indicated as such"; @@ -1022,7 +1076,7 @@ submodule openconfig-ospfv2-lsdb { } // ipv4-segment container unnumbered-hop { - when "../state/type = 'UNNUMBERED_INTERFACE_SEGMENT'" { + when "../state/type = 'oc-ospf-types:UNNUMBERED_INTERFACE_SEGMENT'" { description "Include the unnumbered segment only when the type is indicated as such"; @@ -1082,7 +1136,7 @@ submodule openconfig-ospfv2-lsdb { uses ospfv2-lsdb-common-unknown-tlv-structure; container adjacency-sid { - when "../state/type = 'ADJACENCY_SID'" { + when "../state/type = 'oc-ospf-types:ADJACENCY_SID'" { description "Include the Adjacency SID parameters only when the type of the sub-TLV is indicated as such"; @@ -1182,6 +1236,13 @@ submodule openconfig-ospfv2-lsdb { "The mask of the network described by the Summary LSA represented as a CIDR mask."; } + + leaf metric { + type oc-ospf-types:ospf-metric; + description + "The cost of utilising the summary link specified independent of TOS."; + } + } grouping ospfv2-lsdb-asexternal-lsa-common-parameters { @@ -1430,7 +1491,7 @@ submodule openconfig-ospfv2-lsdb { } leaf-list local-ip-address { - when "../type = 'TE_LINK_LOCAL_IP'" { + when "../type = 'oc-ospf-types:TE_LINK_LOCAL_IP'" { description "Include the local IP address field only when the sub-TLV type was a local IP address"; @@ -1443,7 +1504,7 @@ submodule openconfig-ospfv2-lsdb { } leaf-list remote-ip-address { - when "../type = 'TE_LINK_REMOTE_IP'" { + when "../type = 'oc-ospf-types:TE_LINK_REMOTE_IP'" { description "Include the remote IP address field only when the sub-TLV type was a remote IP address"; @@ -1456,7 +1517,7 @@ submodule openconfig-ospfv2-lsdb { } leaf metric { - when "../type = 'TE_LINK_METRIC'" { + when "../type = 'oc-ospf-types:TE_LINK_METRIC'" { description "Include the traffic engineering metric only when the sub-TLV type is a TE metric"; @@ -1470,7 +1531,7 @@ submodule openconfig-ospfv2-lsdb { } leaf maximum-bandwidth { - when "../type = 'TE_LINK_MAXIMUM_BANDWIDTH'" { + when "../type = 'oc-ospf-types:TE_LINK_MAXIMUM_BANDWIDTH'" { description "Include the traffic engineering metric only when the sub-TLV type is the maximum bandwidth"; @@ -1485,7 +1546,7 @@ submodule openconfig-ospfv2-lsdb { } leaf maximum-reservable-bandwidth { - when "../type = 'TE_LINK_MAXIUMUM_RESERVABLE_BANDWIDTH'" { + when "../type = 'oc-ospf-types:TE_LINK_MAXIUMUM_RESERVABLE_BANDWIDTH'" { description "Include the maximum reservable bandwidth field only when the sub-TLV type is the maximum reservable bandwidth"; @@ -1572,7 +1633,7 @@ submodule openconfig-ospfv2-lsdb { } leaf-list local-ipv4-addresses { - when "../type = 'NODE_IPV4_LOCAL_ADDRESS'" { + when "../type = 'oc-ospf-types:NODE_IPV4_LOCAL_ADDRESS'" { description "Include the local IPv4 addresses when the type of the sub-TLV indicates that this is the contained data"; @@ -1584,7 +1645,7 @@ submodule openconfig-ospfv2-lsdb { } leaf-list local-ipv6-addresses { - when "../type = 'NODE_LOCAL_IPV6_ADDRESS'" { + when "../type = 'oc-ospf-types:NODE_LOCAL_IPV6_ADDRESS'" { description "Include the local IPv6 addresses when the type of the sub-TLV indicfates that this is the contained data"; @@ -1623,7 +1684,7 @@ submodule openconfig-ospfv2-lsdb { } leaf period { - when "../type = 'GRACE_PERIOD'" { + when "../type = 'oc-ospf-types:GRACE_PERIOD'" { description "Include the period specification when the sub-TLV type is indicated to be of this type"; @@ -1639,7 +1700,7 @@ submodule openconfig-ospfv2-lsdb { } leaf reason { - when "../type = 'GRACE_RESTART_REASON'" { + when "../type = 'oc-ospf-types:GRACE_RESTART_REASON'" { description "Include the restart reason when the sub-TLV type specifies this is included"; @@ -1677,7 +1738,7 @@ submodule openconfig-ospfv2-lsdb { } leaf ip-interface-address { - when "../type = 'GRACE_IP_INTERFACE_ADDRESS'" { + when "../type = 'oc-ospf-types:GRACE_IP_INTERFACE_ADDRESS'" { description "Include the interface address when the sub-TLV type specifies that it is included"; @@ -1762,7 +1823,7 @@ submodule openconfig-ospfv2-lsdb { type boolean; default false; description - "When this leaf is set to ture, the advertising system supports the + "When this leaf is set to true, the advertising system supports the experimental extensions to OSPF for TE described in RFC4973"; reference "RFC4973"; } @@ -2319,7 +2380,7 @@ submodule openconfig-ospfv2-lsdb { } uses ospfv2-lsdb-router-lsa-structure { - when "../../state/type = 'ROUTER_LSA'" { + when "../../state/type = 'oc-ospf-types:ROUTER_LSA'" { description "Include the router LSA hierarchy solely when that LSA type is being described"; @@ -2327,7 +2388,7 @@ submodule openconfig-ospfv2-lsdb { } uses ospfv2-lsdb-network-lsa-structure { - when "../../state/type = 'NETWORK_LSA'" { + when "../../state/type = 'oc-ospf-types:NETWORK_LSA'" { description "Include the network LSA hierarchy solely when that LSA type is being described"; @@ -2337,8 +2398,8 @@ submodule openconfig-ospfv2-lsdb { uses ospfv2-lsdb-summary-lsa-structure { // rjs TODO: check this syntax when "../../state/type = " + - "'SUMMARY_IP_NETWORK_LSA' or " + - "../../state/type = 'SUMMARY_ASBR_LSA'" { + "'oc-ospf-types:SUMMARY_IP_NETWORK_LSA' or " + + "../../state/type = 'oc-ospf-types:SUMMARY_ASBR_LSA'" { description "Include the summary LSA hierarchy solely when that LSA type is being described"; @@ -2346,7 +2407,7 @@ submodule openconfig-ospfv2-lsdb { } uses ospfv2-lsdb-asexternal-lsa-structure { - when "../../state/type = 'AS_EXTERNAL_LSA'" { + when "../../state/type = 'oc-ospf-types:AS_EXTERNAL_LSA'" { description "Include the AS external LSA hierarchy solely when that LSA type is being described"; @@ -2354,7 +2415,7 @@ submodule openconfig-ospfv2-lsdb { } uses ospfv2-lsdb-nssa-external-lsa-structure { - when "../../state/type = 'NSSA_AS_EXTERNAL_LSA'" { + when "../../state/type = 'oc-ospf-types:NSSA_AS_EXTERNAL_LSA'" { description "Include the NSSA External LSA hierarchy solely when that LSA type is being described"; @@ -2362,9 +2423,9 @@ submodule openconfig-ospfv2-lsdb { } uses ospfv2-lsdb-opaque-lsa-structure { - when "../../state/type = 'OSPFV2_LINK_SCOPE_OPAQUE_LSA' - or ../../state/type = 'OSPFV2_AREA_SCOPE_OPAQUE_LSA' - or ../../state/type = 'OSPFV2_AS_SCOPE_OPAQUE_LSA'" { + when "../../state/type = 'oc-ospf-types:OSPFV2_LINK_SCOPE_OPAQUE_LSA' + or ../../state/type = 'oc-ospf-types:OSPFV2_AREA_SCOPE_OPAQUE_LSA' + or ../../state/type = 'oc-ospf-types:OSPFV2_AS_SCOPE_OPAQUE_LSA'" { description "Include the Opaque LSA structure when type of entry being described in an opaque LSA"; diff --git a/release/models/ospf/openconfig-ospfv2.yang b/release/models/ospf/openconfig-ospfv2.yang index e760e9958..f909bdd85 100644 --- a/release/models/ospf/openconfig-ospfv2.yang +++ b/release/models/ospf/openconfig-ospfv2.yang @@ -34,12 +34,61 @@ module openconfig-ospfv2 { "An OpenConfig model for Open Shortest Path First (OSPF) version 2"; - oc-ext:openconfig-version "0.2.3"; + oc-ext:openconfig-version "0.5.2"; + + revision "2024-06-17" { + description + "Correct ROUTER_INFORMATION_LSA to ROUTER_INFORMATION."; + reference "0.5.2"; + } + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "0.5.1"; + } + + revision "2023-08-25" { + description + "Add leaf metric to lsdb-summary-lsa-state."; + reference "0.5.0"; + } + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.3"; + } + + revision "2023-07-05" { + description + "Fix typo in experimental-te leaf description."; + reference "0.4.2"; + } + + revision "2023-03-06" { + description + "Clarify use of interface-ref."; + reference "0.4.1"; + } + + revision "2022-02-10" { + description + "Fix spelling error in retransmission-queue-length leaf."; + reference "0.4.0"; + } + + revision "2021-07-28" { + description + "Add prefix to qualify when statements."; + reference "0.3.1"; + } revision "2021-03-17" { description "Add bfd support without augmentation."; - reference "0.2.3"; + reference "0.3.0"; } revision "2019-11-28" { diff --git a/release/models/p4rt/openconfig-p4rt.yang b/release/models/p4rt/openconfig-p4rt.yang index 4152cfe07..cc17fa66a 100644 --- a/release/models/p4rt/openconfig-p4rt.yang +++ b/release/models/p4rt/openconfig-p4rt.yang @@ -23,10 +23,29 @@ module openconfig-p4rt { the P4RT service, or allow it to be used alongside other OpenConfig data models. - The P4RT protocol specification is linkde from https://p4.org/specs/ + The P4RT protocol specification is linked from https://p4.org/specs/ under the P4Runtime heading."; - oc-ext:openconfig-version "0.2.0"; + oc-ext:openconfig-version "1.0.0"; + + revision 2023-12-13 { + description + "Remove unused chassis id"; + reference "1.0.0"; + } + + revision 2022-08-19 { + description + "Add chassis grouping and chassis-id"; + reference "0.4.0"; + } + + revision 2022-06-08 { + description + "Add valid range for interface identifier and update node + descriptions per P4 Runtime Specification."; + reference "0.3.0"; + } revision 2021-07-20 { description @@ -40,32 +59,85 @@ module openconfig-p4rt { reference "0.1.0"; } + // extension statements + + // feature statements + + // identity statements + identity P4RT { base "oc-grpc:GRPC_SERVICE"; description "P4RT: P4 Runtime (P4RT) Service."; } + // grouping statements + grouping p4rt-interface-config { description "Interface-specific configuration that is applicable to devices that are running the P4RT service."; leaf id { - type uint32; + type uint32 { + range 1..4294967039; + } + description + "The numeric identifier (SDN Port) used by the controller to + address the interface. This ID is assigned by an + external-to-the-device entity (e.g., an SDN management system) + to establish an externally deterministic numeric reference for + the interface. The programming entity must ensure that the ID is + unique within the required context. + + Note that this identifier is used only when a numeric reference + to the interface is required, it does not replace the unique + name assigned to the interface. + + Ranges: + + 0x00000000: Unspecified/Invalid + 0x00000001: Minimum Port Value + 0xFFFFFEFF: Maximum Port Value + + Reserved: 0xFFFFFFF0 - 0xFFFFFFFF + 0xFFFFFFFA: Recirculate + 0xFFFFFFFD: CPU + "; + reference + "P4 Runtime Specification v1.3.0 + https://p4.org/p4-spec/p4runtime/main/P4Runtime-Spec.html#sec-translation-of-port-numbers"; + } + } + + grouping p4rt-ic-config { + description + "Integrated-circuit specific configuration that is applicable to devices + that are running the P4RT service."; + + leaf node-id { + type uint64; description - "The numeric identifier used by the controller to address the interface. - This ID is assigned by an external-to-the-device entity (e.g., an SDN - management system) to establish an externally deterministic numeric - reference for the interface. The programming entity must ensure that - the ID is unique within the required context. - - Note that this identifier is used only when a numeric reference to the - interface is required, it does not replace the unique name assigned to - the interface."; + "The numeric ID (device_id) used by the controller to address + the integrated circuit, which may be referred to as a 'device', + 'node' or 'target' by the P4RT specification. + + Each switching ASIC (i.e., node) is addressed by the external + entity based on its numeric identifier. + + The node ID is specified in addition to the string identifier + assigned to the integrated circuit within the + /components/component list."; } + reference + "P4 Runtime Specification v1.3.0 + https://p4.org/p4-spec/p4runtime/main/P4Runtime-Spec.html#sec-write-rpc"; } + // data definition statements + + // augment statements + augment "/oc-if:interfaces/oc-if:interface/oc-if:config" { description "Add interface-specific intended configuration for P4RT."; @@ -80,26 +152,6 @@ module openconfig-p4rt { uses p4rt-interface-config; } - grouping p4rt-ic-config { - description - "Integrated-circuit specific configuration that is applicable to devices - that are running the P4RT service."; - - leaf node-id { - type uint64; - description - "The numeric ID used by the controller to address the integrated circuit, - which may be referred to as a 'device', 'node' or 'target' by the P4RT - specification. - - Each switching ASIC (i.e., node) is addressed by the external entity - based on its numeric identifier. - - The node ID is specified in addition to the string identifier assigned to - the integrated circuit within the /components/component list."; - } - } - augment "/oc-platform:components/oc-platform:component/" + "oc-platform:integrated-circuit/oc-platform:config" { description @@ -117,4 +169,9 @@ module openconfig-p4rt { uses p4rt-ic-config; } + } + + // rpc statements + + // notification statements diff --git a/release/models/pcep/.spec.yml b/release/models/pcep/.spec.yml new file mode 100644 index 000000000..5e6b9bf34 --- /dev/null +++ b/release/models/pcep/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-pcep + docs: + - yang/pcep/openconfig-pcep.yang + build: + - yang/pcep/openconfig-pcep.yang + run-ci: true diff --git a/release/models/pcep/openconfig-pcep.yang b/release/models/pcep/openconfig-pcep.yang new file mode 100644 index 000000000..a6d3c3b0a --- /dev/null +++ b/release/models/pcep/openconfig-pcep.yang @@ -0,0 +1,386 @@ +module openconfig-pcep { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/pcep"; + + prefix "oc-pcep"; + + // import some basic types + import openconfig-extensions { prefix "oc-ext";} + import openconfig-inet-types { prefix "oc-inet";} + import openconfig-types { prefix "oc-types";} + import openconfig-keychain { prefix "oc-keychain";} + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines configuration and operational state data + relating to Path Computation Element Protocol (PCEP) for communications + between a network element (router) acting as PCC and a PCE server, + according to RFC4655 definitions: + + -PCC: Path Computation Client; any client application requesting a + path computation to be performed by a Path Computation Element. + + -PCE: Path Computation Element; an entity (component, application, or + network node) that is capable of computing a network path or route + based on a network graph and applying computational constraints. + + Also according to RFC4655, a PCE can be either stateful or + stateless. In the former case, there is a strict synchronization + between the PCE and not only the network states (in term of + topology and resource information), but also the set of computed + paths and reserved resources in use in the network. Conversely, + stateless PCEs do not have to remember any computed path and each + set of request(s) is processed independently of each other. For + example, stateless PCEs may compute paths based on current TED + information, which could be out of sync with actual network state + given other recent PCE-computed paths changes. + + On the other hand, RFC8051 defines for Stateful PCE two modes of + operation: + + -Passive Stateful PCE: a PCE that uses LSP state information + learned from PCCs to optimize path computations. It does not + actively update LSP state. A PCC maintains synchronization with + the PCE. + + -Active Stateful PCE: a PCE that may issue recommendations to + the network. For example, an Active Stateful PCE may use the + Delegation mechanism to update. + + LSP parameters in those PCCs that delegate control over their LSPs to + the PCE."; + + oc-ext:openconfig-version "0.1.1"; + + revision "2023-04-25" { + description + "Add clarifying comments on use of interface-ref."; + reference "0.1.1"; + } + + revision "2022-02-11" { + description + "Initial revision."; + reference "0.1.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:regexp-posix; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + // typedef statements + + typedef pce-mode-type { + type enumeration { + enum STATELESS { + description + "PCEP peer announce Stateless capability"; + } + enum STATEFUL_PASSIVE { + description + "PCEP peer announce Stateful Passive capability"; + } + enum STATEFUL_ACTIVE { + description + "PCEP peer announce Stateless Active"; + } + } + description + "The type of PCEP capability supported which is advertised in the + Open message when a PCEP session is established. It could be: + + - Stateless PCEs: A PCE that do not have to remember any + computed path and each set of request(s) is processed + independently of each other(RFC4655). + + - Passive Stateful PCE: a PCE that uses LSP state information + learned from PCCs to optimize path computations, but it does + not actively update LSP state(RFC8051). - Active Stateful + PCE: a PCE that may issue recommendations to the network by + using the Delegation mechanism to update LSP parameters in + those PCCs that delegate control over their LSPs to the PCE + (RFC8051)."; + reference + "RFC8051: Applicability of a Stateful Path Computation Element (PCE)"; + } + + typedef lsp-control-type { + type enumeration { + enum PCE_DELEGATED { + description + "PCC (Router) delegates control over LSP path to PCE (stateful active)"; + } + enum PCC_CONTROLLED { + description + "PCC (Router) don't allow or revoke control over LSP path to + PCE (stateless)"; + } + enum PCC_REPORT_ONLY { + description + "PCC (Router) only inform to a PCE whenever the state of an LSP changes, + but without delegating control (stateful passive)"; + } + } + description + "The LSP path can be delegated to PCE, locally controled by PCC + or only report information state to the PCE."; + reference + "RFC8231: Path Computation Element Communication Protocol (PCEP)"; + } + + grouping pcep-servers-top { + description + "Configuration and state data for establishing a PCEP session with PCE servers."; + + container path-computation-servers { + description + "Defines PCE server parameters."; + + list path-computation-server { + key "pce-server-address"; + + description + "Configuration and state information for communication with a PCE server."; + + leaf pce-server-address { + type leafref { + path "../config/pce-server-address"; + } + description + "IPv4 address of PCE server."; + } + + container config { + description + "PCE server configuration."; + + uses pce-server-config; + } + + container state { + config false; + description + "PCE server state."; + + uses pce-server-config; + } + + uses pcep-timers-top; + uses pcep-authentication-top; + } + } + } + + grouping pce-server-config { + description + "Configuration data for establishing a PCEP session with pce servers."; + + leaf pce-server-address { + type oc-inet:ip-address; + description + "The destination IP address of the PCE server for PCEP service. + Specify multiple entries in the path-computation-server-list to provide redundancy. + When multiple candidate servers are specified for a single client, + they are prioritized according to preference."; + } + + leaf id { + type string; + description + "A unique name for the PCE server."; + } + + leaf port { + type oc-inet:port-number; + default 4189; + description + "The destination TCP port used for PCEP service in the PCE server."; + } + + leaf source-address { + type oc-inet:ip-address; + description + "The source IP address used by PCC(Router) to establish PCEP session."; + } + + leaf pce-type { + type pce-mode-type; + description + "The type of PCEP capability supported which is advertised in the Open + message when a PCEP session is established."; + } + + leaf preference { + type uint8; + description + "When multiple PCE servers are specified, the candidate PCE server + with the highest preference is selected to calculate paths. + The greater or lower the value, the higher the preference could + dependon vendor implementation. If no preference value is set, indicate + the lowest preference or no preference at all."; + } + + leaf report-local-lsp { + type boolean; + default false; + description + "Specifies whether the PCC (Router) will advertise LSP existence and state + for LSPs that are not controlled by any PCE (for example, LSPs that are + statically configured at the PCC) but without delegating them."; + } + + leaf pce-initiated-capability { + type boolean; + default false; + description + "Indicates to PCE that PCC (Router) supports PCE-initiated LSP paths instantiation. + A PCE can initiate LSPs only for PCCs that advertised this capability."; + } + + leaf sr-support { + type boolean; + default false; + description + "Indicates to PCE that PCC (Router) supports Segment-Routing + to set up LSP paths in addition to RSVP-TE."; + } + } + + grouping pcep-timers-top { + description + "Configuration and state data for timers applicable + to a established PCEP session with PCE server."; + + container timers { + description + "This container defines PCEP timers."; + + container config { + description + "This container defines PCEP timers configuration."; + + uses pcep-timers-config; + } + + container state { + config false; + description + "This container defines state information for PCEP timers."; + + uses pcep-timers-config; + } + } + } + + grouping pcep-timers-config { + description + "Defines timers that applies to a PCEP session."; + + leaf keepalive { + type uint8; + units seconds; + default 30; + description + "Interval for sending keepalive messages over PCE session."; + } + + leaf dead-timer { + type uint8; + units seconds; + default 120; + description + "Interval after which PCE session is declared dead."; + } + + leaf redelegation-timeout-interval { + type uint16; + units seconds; + description + "When a PCEP session is terminated, the period of time a PCC waits + before revoking LSP delegation and attempting to redelegate LSPs + associated with the terminated PCEP session to an alternate PCE."; + } + + leaf state-timeout-interval { + type uint16; + units seconds; + description + "When a PCEP session is terminated, the period of time a PCC waits + before before flushing LSP state associated with that PCEP session + and reverting to operator-defined default parameters or behaviors."; + } + } + + grouping pcep-authentication-top { + description + "Grouping containing PCEP authentication attributes"; + + container authentication { + description + "Global PCEP authentication"; + container config { + description + "Configuration of PCEP authentication attributes"; + uses pcep-authentication-config; + } + container state { + config false; + description + "PCEP authentication state."; + uses pcep-authentication-config; + } + } + } + + grouping pcep-authentication-config { + description + "PCEP authentication parameters container."; + leaf enable { + type boolean; + default false; + description + "Enables PCEP authentication on the node."; + } + + leaf authentication-key { + type oc-types:routing-password; + description + "Password (key) used for securing a PCEP session using + TCP-MD5 authentication"; + reference + "RFC1321: The MD5 Message-Digest Algorithm. + RFC5440: PCEP Specification"; + } + + leaf keychain { + type oc-keychain:keychain-ref; + description + "Reference to a predefined keychain that should be used to secure + PCEP session"; + } +} + + grouping pcep-top { + description + "Top-level grouping for PCEP configuration."; + + container pcep { + description + "Top-level PCEP configuration and operational state."; + + uses pcep-servers-top; + } + } + +} diff --git a/release/models/platform/.spec.yml b/release/models/platform/.spec.yml index 82922ead0..8dfd9472c 100644 --- a/release/models/platform/.spec.yml +++ b/release/models/platform/.spec.yml @@ -1,6 +1,7 @@ - name: openconfig-platform docs: - yang/platform/openconfig-platform.yang + - yang/platform/openconfig-platform-common.yang - yang/platform/openconfig-platform-types.yang - yang/platform/openconfig-platform-transceiver.yang - yang/platform/openconfig-platform-linecard.yang @@ -10,10 +11,19 @@ - yang/platform/openconfig-platform-cpu.yang - yang/platform/openconfig-platform-ext.yang - yang/platform/openconfig-platform-software.yang + - yang/platform/openconfig-platform-storage.yang + - yang/platform/openconfig-platform-fabric.yang - yang/platform/openconfig-platform-pipeline-counters.yang - yang/platform/openconfig-platform-integrated-circuit.yang + - yang/platform/openconfig-platform-controller-card.yang + - yang/platform/openconfig-platform-healthz.yang + - yang/p4rt/openconfig-p4rt.yang + - yang/system/openconfig-alarms.yang + - yang/optical-transport/openconfig-terminal-device.yang + - yang/optical-transport/openconfig-transport-line-common.yang build: - yang/platform/openconfig-platform.yang + - yang/platform/openconfig-platform-common.yang - yang/platform/openconfig-platform-transceiver.yang - yang/platform/openconfig-platform-linecard.yang - yang/platform/openconfig-platform-port.yang @@ -22,6 +32,14 @@ - yang/platform/openconfig-platform-ext.yang - yang/platform/openconfig-platform-cpu.yang - yang/platform/openconfig-platform-software.yang + - yang/platform/openconfig-platform-storage.yang + - yang/platform/openconfig-platform-fabric.yang - yang/platform/openconfig-platform-pipeline-counters.yang - yang/platform/openconfig-platform-integrated-circuit.yang + - yang/platform/openconfig-platform-controller-card.yang + - yang/platform/openconfig-platform-healthz.yang + - yang/p4rt/openconfig-p4rt.yang + - yang/system/openconfig-alarms.yang + - yang/optical-transport/openconfig-terminal-device.yang + - yang/optical-transport/openconfig-transport-line-common.yang run-ci: true diff --git a/release/models/platform/openconfig-platform-common.yang b/release/models/platform/openconfig-platform-common.yang new file mode 100644 index 000000000..b0fcb1757 --- /dev/null +++ b/release/models/platform/openconfig-platform-common.yang @@ -0,0 +1,287 @@ +submodule openconfig-platform-common { + + yang-version "1"; + + belongs-to openconfig-platform { + prefix "oc-platform"; + } + + import openconfig-platform-types { prefix oc-platform-types; } + import openconfig-extensions { prefix oc-ext; } + import openconfig-types { prefix oc-types; } + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This modules contains common groupings that are used in multiple + components within the platform module."; + + oc-ext:openconfig-version "0.30.0"; + + revision "2024-10-13" { + description + "Add storage state io-errors."; + reference "0.30.0"; + } + + revision "2024-10-13" { + description + "Deprecate component id leaf"; + reference "0.29.0"; + } + + revision "2024-08-08" { + description + "Update description of model-name leaf."; + reference "0.28.0"; + } + + revision "2024-05-29" { + description + "Change install-position from leaf-ref to string."; + reference "0.27.0"; + } + + revision "2024-04-12" { + description + "Add install-position, install-component and deprecate location and + slot-id."; + reference "0.26.0"; + } + + revision "2024-01-30" { + description + "Updated description for component-power-type"; + reference "0.25.0"; + } + + revision "2023-11-28" { + description + "Add model-name"; + reference "0.24.0"; + } + + revision "2023-02-13" { + description + "Refactor resource utilization threshold config into a separate grouping. + Update 'utilization resource' to 'resource utilization'."; + reference "0.23.0"; + } + + revision "2022-12-20" { + description + "Add threshold and threshold-exceeded for resource usage."; + reference "0.22.0"; + } + + revision "2022-12-19" { + description + "Update last-high-watermark timestamp documentation."; + reference "0.21.1"; + } + + revision "2022-09-26" { + description + "Add state data for base-mac-address."; + reference "0.21.0"; + } + + revision "2022-08-31" { + description + "Add new state data for component CLEI code."; + reference "0.20.0"; + } + + revision "2022-07-28" { + description + "Add grouping for component power management"; + reference "0.19.0"; + } + + revision "2022-07-11" { + description + "Add switchover ready"; + reference "0.18.0"; + } + + revision "2022-06-10" { + description + "Specify units and epoch for switchover and reboot times."; + reference "0.17.0"; + } + + revision "2022-04-21" { + description + "Add platform utilization."; + reference "0.16.0"; + } + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + // grouping statements + + grouping platform-resource-utilization-top { + description + "Top level grouping of platform resource utilization."; + + container utilization { + description + "Resource utilization of the component."; + + container resources { + description + "Enclosing container for the resources in this component."; + + list resource { + key "name"; + description + "List of resources, keyed by resource name."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "References the resource name."; + } + + container config { + description + "Configuration data for each resource."; + + uses platform-resource-utilization-config; + } + + container state { + config false; + description + "Operational state data for each resource."; + + uses platform-resource-utilization-config; + uses platform-resource-utilization-state; + } + } + } + } + } + + grouping resource-utilization-threshold-common { + description + "Common threshold configuration model for resource utilization."; + leaf used-threshold-upper { + type oc-types:percentage; + description + "The used percentage value (used / (used + free) * 100) that + when crossed will set utilization-threshold-exceeded to 'true'."; + } + + leaf used-threshold-upper-clear { + type oc-types:percentage; + description + "The used percentage value (used / (used + free) * 100) that when + crossed will set utilization-threshold-exceeded to 'false'."; + } + } + + grouping platform-resource-utilization-config { + description + "Configuration data for resource utilization."; + + leaf name { + type string; + description + "Resource name within the component."; + } + + uses resource-utilization-threshold-common; + } + + grouping platform-resource-utilization-state { + description + "Operational state data for resource utilization."; + + leaf used { + type uint64; + description + "Number of entries currently in use for the resource."; + } + + leaf committed { + type uint64; + description + "Number of entries currently reserved for this resource. This is only + relevant to tables which allocate a block of resource for a given + feature."; + } + + leaf free { + type uint64; + description + "Number of entries available to use."; + } + + leaf max-limit { + type uint64; + description + "Maximum number of entries available for the resource. The value + is the theoretical maximum resource utilization possible."; + } + + leaf high-watermark { + type uint64; + description + "A watermark of highest number of entries used for this resource."; + } + + leaf last-high-watermark { + type oc-types:timeticks64; + description + "The timestamp when the high-watermark was last updated. The value + is the timestamp in nanoseconds relative to the Unix Epoch + (Jan 1, 1970 00:00:00 UTC)."; + } + + leaf used-threshold-upper-exceeded { + type boolean; + description + "This value is set to true when the used percentage value + (used / (used + free) * 100) has crossed the used-threshold-upper for this + resource and false when the used percentage value has crossed the configured + used-threshold-upper-clear value for this resource."; + } + } + + grouping component-power-management { + description + "Common grouping for managing component power"; + + leaf power-admin-state { + type oc-platform-types:component-power-type; + default POWER_ENABLED; + description + "When set to POWER_DISABLED, the component should be shut down by removing + electrical power. This is intended to be used to prevent the component + from becoming active even after a reboot of the system. A component + (if controller-card) may not honor power-admin-state depending on rules + defined in the description of the component config container."; + } + } + + // data definition statements + + // augment statements + + // rpc statements + + // notification statements +} diff --git a/release/models/platform/openconfig-platform-controller-card.yang b/release/models/platform/openconfig-platform-controller-card.yang new file mode 100644 index 000000000..4ed5156c7 --- /dev/null +++ b/release/models/platform/openconfig-platform-controller-card.yang @@ -0,0 +1,93 @@ +module openconfig-platform-controller-card { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/platform/controller-card"; + + prefix "oc-ctrl-card"; + + import openconfig-platform { prefix oc-platform; } + import openconfig-extensions { prefix oc-ext; } + + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines data related to CONTROLLER_CARD components in + the openconfig-platform model"; + + oc-ext:openconfig-version "0.2.0"; + + revision "2024-04-10" { + description + "Added details on power-admin-state leaf"; + reference "0.2.0"; + } + + revision "2022-07-28" { + description + "Initial revision"; + reference "0.1.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + // grouping statements + + grouping controller-card-config { + description + "Configuration data for controller card components"; + + uses oc-platform:component-power-management; + } + + // data definition statements + + // augment statements + + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:controller-card/oc-platform:config" { + description + "Configuration data for controller card components. + A controller-card can be configured for persistent powered-off + mode using the config/power-admin-state leaf. The reference + path below defines rules for such a configuration."; + + reference + "Rules around power-off configuration in controller-cards: + https://github.com/openconfig/public/blob/master/doc/controller-card_poweroff.md"; + + uses controller-card-config; + } + + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:controller-card/oc-platform:state" { + description + "Adding controller card data to physical inventory. This subtree + is only valid when the type of the component is CONTROLLER_CARD."; + + uses controller-card-config; + } + + // rpc statements + + // notification statements + +} + diff --git a/release/models/platform/openconfig-platform-fabric.yang b/release/models/platform/openconfig-platform-fabric.yang new file mode 100644 index 000000000..95d106cf6 --- /dev/null +++ b/release/models/platform/openconfig-platform-fabric.yang @@ -0,0 +1,81 @@ +module openconfig-platform-fabric { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/platform/fabric"; + + prefix "oc-fabric"; + + import openconfig-platform { prefix oc-platform; } + import openconfig-extensions { prefix oc-ext; } + + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines data related to FABRIC components in + the openconfig-platform model"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2022-07-28" { + description + "Initial revision"; + reference "0.1.0"; + } + + // OpenConfig specific extensions for module metadata. + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + // extension statements + + // feature statements + + // identity statements + + // typedef statements + + // grouping statements + + grouping fabric-config { + description + "Configuration data for fabric components"; + + uses oc-platform:component-power-management; + } + + // data definition statements + + // augment statements + + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:fabric/oc-platform:config" { + description + "Adding fabric data to physical inventory. This subtree + is only valid when the type of the component is FABRIC."; + + uses fabric-config; + } + + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:fabric/oc-platform:state" { + description + "Adding fabric data to physical inventory. This subtree + is only valid when the type of the component is FABRIC."; + + uses fabric-config; + } + + // rpc statements + + // notification statements + +} + diff --git a/release/models/platform/openconfig-platform-healthz.yang b/release/models/platform/openconfig-platform-healthz.yang new file mode 100644 index 000000000..11e44d36a --- /dev/null +++ b/release/models/platform/openconfig-platform-healthz.yang @@ -0,0 +1,137 @@ +module openconfig-platform-healthz { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/platform/healthz"; + + prefix "oc-platform-healthz"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-types { prefix oc-types; } + import openconfig-platform { prefix oc-platform; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This model defines health-related variables for components + within the openconfig-platform model (which defines the + the /components hierarchy). It is designed to be used in + conjunction with the gNOI Healthz service (see + https://github.com/openconfig/gnoi/blob/main/healthz/README.md). + + The health variables included in this model are streamed via + telemetry interfaces, where gNOI.Healthz is used to retrieve + further diagnostic and debugging informaton from a network + device."; + + oc-ext:openconfig-version "0.1.1"; + + revision "2023-04-11" { + description + "Clarification for healthz state transition and unhealthy-count leaf"; + reference "0.1.1"; + } + + revision "2023-01-23" { + description + "Initial healthz variable revision"; + reference "0.1.0"; + } + + + grouping platform-health-top { + description + "Grouping containing health-related parameters."; + + container healthz { + description + "The health of the component. The paramaters within this + container indicate the status of the component beyond whether + it is operationally up or down. When a signal is received + that a component is in an unhealthy state the gNOI.Healthz + service can be used to retrieve further diagnostic information + relating to the component. + + The contents of this directory relate only to the specific + component that it is associated with. In the case that child + components become unhealthy and this causes a parent component + to be unhealthy, the new unhealthy status should be reported at + both components, such that an interested system can take the + relevant actions (e.g., retrieve the Healthz output, or + apply mitigation actions)."; + reference + "https://github.com/openconfig/gnoi/tree/main/healthz"; + + container state { + config false; + description + "Operational state parameters relating to component health."; + uses platform-health-state; + } + } + } + + grouping platform-health-state { + description + "Operational state parameters relating to a platform component's + health."; + + leaf status { + type enumeration { + enum UNSPECIFIED { + description + "The component's health status has not yet been checked + by the system."; + } + + enum HEALTHY { + description + "The component is in a HEALTHY state, and is operating + within the expected parameters."; + } + + enum UNHEALTHY { + description + "The component is in a unhealthy state, it is not + performing the function expected of it."; + } + } + description + "The status of the component, indicating its current health."; + oc-ext:telemetry-on-change; + } + + leaf last-unhealthy { + type oc-types:timeticks64; + description + "The time at which the component as last observed to be unhealthy + represented as nanoseconds since the Unix epoch. Unhealthy is defined + as the component being in a state other than HEALTHY."; + oc-ext:telemetry-on-change; + } + + leaf unhealthy-count { + type uint64; + description + "The number of status checks that have determined this component + to be in an unhealthy state. This counter should be incremented + when the component transitions from the HEALTHY to any other + state such that the value reflects the number of times the + component has become unhealthy."; + oc-ext:telemetry-on-change; + } + } + + augment "/oc-platform:components/oc-platform:component" { + description + "Augment healthz information into the /components/component hierarchy."; + + uses platform-health-top; + } +} diff --git a/release/models/platform/openconfig-platform-integrated-circuit.yang b/release/models/platform/openconfig-platform-integrated-circuit.yang index 6d9f567dd..67fec321b 100644 --- a/release/models/platform/openconfig-platform-integrated-circuit.yang +++ b/release/models/platform/openconfig-platform-integrated-circuit.yang @@ -7,7 +7,6 @@ module openconfig-platform-integrated-circuit { import openconfig-platform { prefix oc-platform; } import openconfig-extensions { prefix oc-ext; } - import openconfig-types { prefix oc-types; } organization "OpenConfig working group"; contact @@ -20,7 +19,13 @@ module openconfig-platform-integrated-circuit { These components are generically forwarding NPUs or ASICs within the system for which configuration or state is applicable."; - oc-ext:openconfig-version "0.3.0"; + oc-ext:openconfig-version "0.3.1"; + + revision "2022-04-20" { + description + "Remove unused import"; + reference "0.3.1"; + } revision "2021-08-09" { description diff --git a/release/models/platform/openconfig-platform-linecard.yang b/release/models/platform/openconfig-platform-linecard.yang index 8a4e9b3c8..d0429b640 100644 --- a/release/models/platform/openconfig-platform-linecard.yang +++ b/release/models/platform/openconfig-platform-linecard.yang @@ -8,7 +8,6 @@ module openconfig-platform-linecard { prefix "oc-linecard"; import openconfig-platform { prefix oc-platform; } - import openconfig-platform-types { prefix oc-platform-types; } import openconfig-extensions { prefix oc-ext; } @@ -23,7 +22,33 @@ module openconfig-platform-linecard { "This module defines data related to LINECARD components in the openconfig-platform model"; - oc-ext:openconfig-version "0.1.2"; +oc-ext:openconfig-version "1.2.0"; + + revision "2024-04-12" { + description + "Add install-position, install-component and deprecate location and + slot-id."; + reference "1.2.0"; + } + + revision "2023-02-13" { + description + "Renamed platform-utilization-top to platform-resource-utilization-top."; + reference "1.1.0"; + } + + revision "2022-07-28" { + description + "Remove leaf power-admin-state and use a common definition + instead."; + reference "1.0.0"; + } + + revision "2022-04-21" { + description + "Add platform utilization to linecard."; + reference "0.2.0"; + } revision "2020-05-10" { description @@ -63,12 +88,7 @@ module openconfig-platform-linecard { description "Configuration data for linecard components"; - leaf power-admin-state { - type oc-platform-types:component-power-type; - default POWER_ENABLED; - description - "Enable or disable power to the linecard"; - } + uses oc-platform:component-power-management; } grouping linecard-state { @@ -76,10 +96,15 @@ module openconfig-platform-linecard { "Operational state data for linecard components"; leaf slot-id { + status deprecated; type string; description "Identifier for the slot or chassis position in which the - linecard is installed"; + linecard is installed. + + This leaf is deprecated and will be replaced by install-position + and install-component leaves in a future major revision of this + model."; } } @@ -108,6 +133,7 @@ module openconfig-platform-linecard { uses linecard-config; uses linecard-state; } + uses oc-platform:platform-resource-utilization-top; } } diff --git a/release/models/platform/openconfig-platform-pipeline-counters.yang b/release/models/platform/openconfig-platform-pipeline-counters.yang index d9c7e4189..9a28d28c2 100644 --- a/release/models/platform/openconfig-platform-pipeline-counters.yang +++ b/release/models/platform/openconfig-platform-pipeline-counters.yang @@ -65,10 +65,53 @@ module openconfig-platform-pipeline-counters { 5 blocks, is to have the abililty to receive all drop counters from all 5 blocks, for example, with one request."; - oc-ext:openconfig-version "0.1.0"; + oc-ext:openconfig-version "0.5.1"; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; + revision "2023-10-08" { + description + "More detail description of pipe-line aggregated drop counters"; + reference "0.5.1"; + } + + revision "2023-09-26" { + description + "Add no-route aggregate drop counter."; + reference "0.5.0"; + } + + revision "2023-02-03" { + description + "Add vendor-specific control-plane traffic queue counters"; + reference "0.4.0"; + } + + revision "2022-12-01" { + description + "Add uRPF aggregate drop counter."; + reference "0.3.1"; + } + + revision "2022-11-09" { + description + "Add container for vendor specific drop counters."; + reference "0.3.0"; + } + + revision "2022-01-19" { + description + "Fixed typo for aggregate field."; + reference "0.2.1"; + } + + revision "2021-10-16" { + description + "Update pipeline error counters to allow for multiple errors + per block."; + reference "0.2.0"; + } + revision "2020-07-31" { description "Initial revision of platform pipeline counters."; @@ -81,10 +124,10 @@ module openconfig-platform-pipeline-counters { counters."; container pipeline-counters { + config false; description "Top-level container for the packet, drop, and error counters for the five NPU sub-blocks."; - config false; container packet { description "IC packet counters for all five NPU sub-blocks."; @@ -165,6 +208,14 @@ module openconfig-platform-pipeline-counters { container drop { description "IC drop counters for all five NPU sub-blocks."; + container state { + description + "State container for IC drop counters"; + + uses pipeline-drop-packet-state; + } + + container interface-block { description "The IC interface subsystem connects the IC to the external PHY or @@ -235,6 +286,8 @@ module openconfig-platform-pipeline-counters { uses pipeline-drop-packet-host-interface-block-state; } } + + uses pipeline-vendor-drop-packets; } container errors { @@ -245,14 +298,26 @@ module openconfig-platform-pipeline-counters { "The IC interface subsystem connects the IC to the external PHY or MAC."; - // We do not need a 'config' container here since there is no configurable state for a particular - // entity. - - container state { + list interface-block-error { + key "name"; description - "Errors corresponding to the interface subsystem of the IC."; - - uses pipeline-errors-packet-interface-block-state; + "An individual error within the interface block. Each error counter + is uniquely identified by the name of the error."; + + leaf name { + type leafref { + path "../state/name"; + } + description + "Reference to the name of the error being described."; + } + + container state { + description + "Errors corresponding to the interface subsystem of the IC."; + + uses pipeline-errors-packet-interface-block-state; + } } } @@ -261,11 +326,26 @@ module openconfig-platform-pipeline-counters { "The IC lookup subsystem perform the next hop lookup of the packet and other forwarding features such as firewall filters."; - container state { + list lookup-block-error { + key "name"; description - "Errors corresponding to the lookup subsystem of the IC."; - - uses pipeline-errors-packet-lookup-block-state; + "An individual error within the lookup block. Each error counter + is uniquely identified by the name of the error."; + + leaf name { + type leafref { + path "../state/name"; + } + description + "Reference to the name of the error being described."; + } + + container state { + description + "Errors corresponding to the lookup subsystem of the IC."; + + uses pipeline-errors-packet-lookup-block-state; + } } } @@ -274,11 +354,26 @@ module openconfig-platform-pipeline-counters { "The IC queueing subsystem buffers the packet while processing it and queues the packet for delivery to the next stage"; - container state { + list queueing-block-error { + key "name"; description - "Errors corresponding to the queueing subsystem of the IC."; - - uses pipeline-errors-packet-queueing-block-state; + "An individual error within the queueing block. Each error counter + is uniquely identified by the name of the error."; + + leaf name { + type leafref { + path "../state/name"; + } + description + "Reference to the name of the error being described."; + } + + container state { + description + "Errors corresponding to the queueing subsystem of the IC."; + + uses pipeline-errors-packet-queueing-block-state; + } } } @@ -287,11 +382,26 @@ module openconfig-platform-pipeline-counters { "The IC fabric block subsystem connects the IC to the external systems fabric subsystem"; - container state { + list fabric-block-error { + key "name"; description - "Errors corresponding to the fabric subsystem of the IC."; - - uses pipeline-errors-packet-fabric-block-state; + "An individual error within the fabric block. Each error counter + is uniquely identified by the name of the error."; + + leaf name { + type leafref { + path "../state/name"; + } + description + "Reference to the name of the error being described."; + } + + container state { + description + "Errors corresponding to the fabric subsystem of the IC."; + + uses pipeline-errors-packet-fabric-block-state; + } } } @@ -300,14 +410,32 @@ module openconfig-platform-pipeline-counters { "The IC host interface block subsystem connects the IC to the external systems host or control subsystem"; - container state { + list host-interface-error { + key "name"; description - "Errors corresponding to the host interface subsystem of the IC."; - - uses pipeline-errors-packet-host-interface-block-state; + "An individual error within the host interface block. Each error + counter is uniquely identified by the name of the error."; + + leaf name { + type leafref { + path "../state/name"; + } + description + "Reference to the name of the error being described."; + } + + container state { + description + "Errors corresponding to the host interface subsystem of + the IC."; + + uses pipeline-errors-packet-host-interface-block-state; + } } } } + + uses pipeline-control-plane-top; } } @@ -342,7 +470,6 @@ module openconfig-platform-pipeline-counters { "Outgoing bytes towards the line interfaces or fabric from the integrated-circuit interface subsystem block."; } - } grouping pipeline-counters-common-high-low-packets { @@ -444,7 +571,7 @@ module openconfig-platform-pipeline-counters { "Amount of used firewall or ACL memory counter measured in entries. The number of used entries must include the entries that are 'allocated but free' if the memory reaping algorithm makes - these entries practically unusable"; + these entries practically unusable."; } leaf acl-memory-total-bytes { @@ -714,7 +841,7 @@ module openconfig-platform-pipeline-counters { due to DF bit."; } - leaf lookup-aggregte { + leaf lookup-aggregate { type oc-yang:counter64; description "Packets dropped due to aggregate lookup drop counters - this counter @@ -819,25 +946,26 @@ module openconfig-platform-pipeline-counters { description "A common set of error counters that apply to multiple error sections."; - leaf error-name { + leaf name { type string; description "Name of the interrupt, hardware error, or software error in the NPU."; } - leaf error-count { + leaf count { type uint64; description - "Number of all the errors."; + "Total count of errors of this type."; } - leaf error-threshold { + leaf threshold { type uint64; description - "Number of errors before recovery action."; + "Number of errors before a recovery action is automatically + taken by the system."; } - leaf error-action { + leaf-list action { type enumeration { enum LOG { description @@ -869,11 +997,22 @@ module openconfig-platform-pipeline-counters { } } description - "Error action taken - log, linecard reboot, linecard offline, NPU - reset, NPU offline, gather diagnostic data, raise an alarm."; + "Error actions that are taken by the system - log, linecard reboot, + linecard offline, NPU reset, NPU offline, gather diagnostic data, + raise an alarm."; + } + + leaf active { + type boolean; + default false; + description + "The error is currently in an active state. When the system detects + that the specified threshold is exceeded, this value should be set to + true."; + oc-ext:telemetry-on-change; } - leaf error-level { + leaf level { type enumeration { enum FATAL { description @@ -894,8 +1033,9 @@ module openconfig-platform-pipeline-counters { } } description - "Identify the severity of the error - Fatal, Major, Minor, or - Informational."; + "The severity of the error that is being recorded by the system. This + value can be used by a consumer to determine the action when this error + is recorded."; } } @@ -949,6 +1089,328 @@ module openconfig-platform-pipeline-counters { } + grouping pipeline-drop-packet-state { + description + "Grouping of pipeline drop packet state."; + + leaf adverse-aggregate { + type oc-yang:counter64; + description + "This captures the aggregation of all counters where the switch is + unexpectedly dropping packets. Occurrence of these drops on a stable + (no recent hardware or config changes) and otherwise healthy + switch needs further investigation. + This leaf counts packet discarded as result of corrupted + programming state in an INTEGRATED_CIRCUIT or corrupted data + structures of packet descriptors. + + Note: corrupted packets received on ingress interfaces should be counted + in `/interfaces/interface/state/counters/in-errors` and NOT counted as + adverse-aggregate. This is because incoming corrupted packets are NOT + a signal of adverse state of an INTEGRATED_CIRCUIT but rather of an + entity adjacent to the Interface, such as a cable or transceiver). Therefore + such drops SHOULD NOT be counted as adverse-aggregate to preserve + a clean signal of INTEGRATED_CIRCUIT adverse state."; + } + + leaf congestion-aggregate { + type oc-yang:counter64; + description + "This tracks the aggregation of all counters where the expected + conditions of packet drops due to internal congestion in some block of + the hardware that may not be visible in through other congestion + indicators like interface discards or queue drop counters. + + This leaf counts packet discarded as result of exceeding + performance limits of an INTEGRATED_CIRCUT, when it processes + non-corrupted packets using legitimate, non-corrupted programming + state of the INTEGRATED_CIRCUIT. + + The typical example is overloading given IC with higher packet rate (pps) + then given chip can handle. For example, let's assume chip X can process + 3.6Bpps of incoming traffic and 2000 Mpps. However if average incoming + packet size is 150B, at full ingress rate this become 3000Mpps. Hence + 1/3 of packets would be cropped and should be counted against + congestion-aggregate. + + Another example is the case when some INTEGRATED_CIRCUIT internal data bus is + too narrow/slow for handling traffic. For example let's assume chip X needs to send + 3Tbps of traffic to an external buffer memory which has only 2Tbps access I/O. In + this case packets would be discarded, because of congestion of memory I/O bus + which is part of the INTEGRATED_CIRCUIT. Depending on the design of the + INTEGRATED_CIRCUIT, packets could be discarded even if interface queues are + not full, hence this scenario is NOT treated as QoS queue tail-drops nor WRED drops. + + Yet another example is the case where extremely large and long + ACL/filter requires more cycles to process than the INTEGRATED_CIRCUIT + has budgeted. "; + } + + leaf packet-processing-aggregate { + type oc-yang:counter64; + description + "This aggregation of counters represents the conditions in which + packets are dropped due to legitimate forwarding decisions (ACL drops, + No Route etc.) + This counter counts packet discarded as result of processing + non-corrupted packet against legitimate, non-corrupted state + of INTEGRATED_CIRCUIT program (FIB content, ACL content, rate-limiting token-buckets) + which mandate packet drop. The examples of this class of discard are: + - dropping packets which destination address to no match any FIB entry + - dropping packets which destination address matches FIB entry pointing + to discard next-hop (e.g. route to null0) + - dropping packts due to ACL/packet filter decission + - dropping packets due to its TTL = 1 + - dropping packets due to its size exceeds egress interface MTU and + packet can't be fragmented (IPv6 or do not fragment bit is set) + - dropping packets due to uRPF rules (note: packet is counted here and + in separate, urpf-aggregate counter simultaneously) + - etc + + Note:The INTEGRATED_CIRCUIT is doing exactly what it is programmed + to do, and the packet is parsable. + "; + } + + leaf urpf-aggregate { + type oc-yang:counter64; + description + "This aggregation of counters represents the conditions in which + packets are dropped due to failing uRPF lookup check. This counter + and the packet-processing-aggregate counter should be incremented + for each uRPF packet drop. + This counter counts packet discarded as result of Unicast Reverse + Path Forwarding verification."; + reference + "RFC2827: Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing + RFC3704: Ingress Filtering for Multihomed Networks"; + } + + leaf no-route { + type oc-yang:counter64; + description + "This aggregation of counters represents the conditions in which + packets are dropped due to no FIB entry for this ipv4 or ipv6 lookup. + + This counter and the packet-processing-aggregate counter should be + incremented for each no-route packet drop."; + } + + } + + grouping pipeline-vendor-drop-packets { + description + "Grouping for vendor specific drop packets"; + + container vendor { + description + "Counters within these containers are defined and augmented by vendors. + As each ASIC and vendor has different implementation and internal + parts where packets may be dropped at any point in time. Providing + specific hardware counters provides better visibility into traffic drop. + + The recommended usage of this container is to create an augment at + .../pipeline-counter/drop/vendor that contains additional vendor/platform + specific containers. + + e.g. + augment /components/component/integrated-circuit/pipeline-counter/drop/vendor { + container { + container { + uses pipeline-vendor-drop-containers; + } + } + }"; + + reference + "https://github.com/openconfig/public/tree/master/doc/vendor_counter_guide.md"; + } + } + + grouping pipeline-vendor-drop-containers { + description + "A utility grouping for vendors to insert when augmenting the vendor + drop counters container .../pipeline-counter/drop/vendor. + + Counters that cannot differentiate between adverse, congestion, and + packet-processing should still be exposed as a vendor-specific, + packet-processing counter."; + + reference + "https://github.com/openconfig/public/tree/master/doc/vendor_counter_guide.md"; + + container adverse { + description + "These counters capture where the switch is unexpectedly dropping + packets. Occurrence of these drops on a stable (no recent hardware + or config changes) and otherwise healthy switch needs further + investigation. + + The sum of all counters under this container should match the value in + .../pipeline-counters/drop/state/adverse-aggregate"; + + container state { + description + "State container for vendor specific adverse counters."; + } + } + + container congestion { + description + "These counters track expected conditions of packet drops due to + internal congestion in some block of the hardware that may not be + visible in through other congestion indicators like interface + discards or queue drop counters. + + The sum of all counters under this container should match the value in + .../pipeline-counters/drop/state/congestion-aggregate"; + + container state { + description + "State container for vendor specific congestion counters."; + } + } + + container packet-processing { + description + "These counters represent the conditions in which packets are dropped + due to legitimate forwarding decisions (ACL drops, No Route etc.) + + The sum of all counters under this container should match the value in + .../pipeline-counters/drop/state/packet-processing-aggregate"; + + container state { + description + "State container for vendor specific packet processing counters."; + } + } + } + + grouping control-plane-traffic-counters-state { + description + "Control plane traffic counter state grouping."; + + leaf queued-aggregate { + type oc-yang:counter64; + description + "This captures the aggregation of all counters where the switch has enqueued + traffic related to the control-plane."; + } + + leaf queued-bytes-aggregate { + type oc-yang:counter64; + description + "This captures the aggregation of all counters in bytes where the switch has + enqueued traffic related to the control-plane."; + } + + leaf dropped-aggregate { + type oc-yang:counter64; + description + "This captures the aggregation of all counters where the switch has dropped + traffic related to the control-plane."; + } + + leaf dropped-bytes-aggregate { + type oc-yang:counter64; + description + "This captures the aggregation of all counters in bytes where the switch has + dropped traffic related to the control-plane."; + } + } + + grouping control-plane-traffic-vendor-counters { + description + "A utility grouping for vendors to use when augmenting the vendor-specific + control-plane traffic container."; + + leaf queued { + type oc-yang:counter64; + description + "This counter counts the number of packets enqueued. + + This counter should contribute to the total aggregate of + .../pipeline-counters/control-plane-traffic/state/queued-aggregate."; + } + + leaf queued-bytes { + type oc-yang:counter64; + description + "This counter counts the number of bytes enqueued. + + This counter should contribute to the total aggregate of + .../pipeline-counters/control-plane-traffic/state/queued-bytes-aggregate."; + } + + leaf dropped { + type oc-yang:counter64; + description + "This counter counts the number of packets dropped. + + This counter should contribute to the total aggregate of + .../pipeline-counters/control-plane-traffic/state/dropped-aggregate."; + } + + leaf dropped-bytes { + type oc-yang:counter64; + description + "This counter counts the number of bytes dropped. + + This counter should contribute to the total aggregate of + .../pipeline-counters/control-plane-traffic/state/dropped-bytes-aggregate."; + } + } + + grouping pipeline-control-plane-top { + description + "Top-level structural grouping for control-plane traffic counters."; + + container control-plane-traffic { + description + "Counters that are related to traffic destined to the control-plane."; + + container state { + config false; + description + "State container for control-plane traffic counters."; + + uses control-plane-traffic-counters-state; + } + + container vendor { + description + "Counters within these containers are defined and augmented by vendors. + As each ASIC and vendor has different implementation and internal + parts where packets may be dropped at any point in time. Providing + vendor-specific counters provides better visibility into control-plane traffic. + + The recommended usage of this container is to create an augment at + .../pipeline-counter/control-plane-traffic/vendor that contains additional + vendor/platform specific containers. + + e.g. + augment /components/component/integrated-circuit/pipeline-counter/control-plane-traffic/vendor { + container { + container { + container state { + leaf counter-a { + uses control-plane-traffic-vendor-counters; + } + + leaf counter-b { + uses control-plane-traffic-vendor-counters; + } + } + } + } + }"; + + reference + "https://github.com/openconfig/public/tree/master/doc/vendor_counter_guide.md"; + } + } + } + augment "/oc-platform:components/oc-platform:component/oc-platform:integrated-circuit" { description "Add operational state data that corresponds to sub-blocks of an integrated diff --git a/release/models/platform/openconfig-platform-port.yang b/release/models/platform/openconfig-platform-port.yang index b78bf7903..effb85bb7 100644 --- a/release/models/platform/openconfig-platform-port.yang +++ b/release/models/platform/openconfig-platform-port.yang @@ -24,7 +24,20 @@ module openconfig-platform-port { "This module defines data related to PORT components in the openconfig-platform model"; - oc-ext:openconfig-version "0.4.2"; + oc-ext:openconfig-version "1.0.1"; + + revision "2023-03-22" { + description + "Clarify use of the interface-ref type."; + reference "1.0.1"; + } + + revision "2023-01-19" { + description + "Add clarification of the definition of a physical channel, and + example configurations."; + reference "1.0.0"; + } revision "2021-10-01" { description @@ -129,7 +142,10 @@ module openconfig-platform-port { to the interfaces in this breakout group. This leaf need not be set if there is only one breakout group where all the interfaces are of equal speed and have equal number - of physical channels"; + of physical channels. + + The physical channels referred to by this leaf are + electrical channels towards the transceiver."; } } @@ -154,24 +170,94 @@ module openconfig-platform-port { interfaces of different speeds and different number of physical channels, it can breakout a 400G OSFP port with 8 physical channels (with support for 25G NRZ, 50G PAM4 - and 100G PAM4) in the following configuration: - - 100G + 100G + 200G -> 1 interface with 2 physical channels - and 1 interface with 4 physical channels and 1 interface with + and 100G PAM4) into mixed speed interfaces. Particularly, to + break out into two 100G ports with different modulation, and a 200G + port, a user must configure 1 interface with 2 physical channels + 1 interface with 4 physical channels and 1 interface with 2 physical channels. With this configuration the interface in 1st breakout group would use 50G PAM4 modulation, interface in 2nd breakout group would use 25G NRZ modulation and the interface in 3rd breakout group would use 100G PAM4 modulation This configuration would result in 3 entries in the breakout - groups list. + groups list. The example configuration for this case is shown below: + + { + \"groups\": { + \"group\": [ + { + \"config\": { + \"breakout-speed\": \"SPEED_100GB\", + \"index\": 0, + \"num-breakouts\": 1, + \"num-physical-channels\": 2 + }, + \"index\": 0 + }, + { + \"config\": { + \"breakout-speed\": \"SPEED_100GB\", + \"index\": 1, + \"num-breakouts\": 1, + \"num-physical-channels\": 4 + }, + \"index\": 1 + }, + { + \"config\": { + \"breakout-speed\": \"SPEED_200GB\", + \"index\": 2, + \"num-breakouts\": 1, + \"num-physical-channels\": 2 + }, + \"index\": 2 + } + ] + } + } When a device does not have the capability to break a port into interfaces of different speeds and different number of - physical channels, it would breakout a 400G OSFP port with - 8 physical channels in the following configuration: + physical channels, in order to breakout a 400G OSFP port with + 8 physical channels into 50G breakout ports it would use 8 interfaces + with 1 physical channel each. This would result in 1 entry in the + breakout groups list. The example configuration for this case is + shown below: + + { + \"groups\": { + \"group\": [ + { + \"config\": { + \"breakout-speed\": \"SPEED_50GB\", + \"index\": 0, + \"num-breakouts\": 8, + \"num-physical-channels\": 1 + }, + \"index\": 0 + } + ] + } + } - 50G -> 8 interfaces with 1 physical channel each, this would - result in 1 entry in the breakout groups list."; + Similarly, if a 400G-DR4 interface (8 electrical channels at 50Gbps) + is to be broken out into 4 100Gbps ports, the following configuration + is used: + + { + \"groups\": { + \"group\": [ + { + \"config\": { + \"breakout-speed\": \"SPEED_100GB\", + \"index\": 0, + \"num-breakouts\": 4, + \"num-physical-channels\": 2 + }, + \"index\": 0 + } + ] + } + }"; list group { key "index"; diff --git a/release/models/platform/openconfig-platform-storage.yang b/release/models/platform/openconfig-platform-storage.yang new file mode 100644 index 000000000..230d03e07 --- /dev/null +++ b/release/models/platform/openconfig-platform-storage.yang @@ -0,0 +1,164 @@ +module openconfig-platform-storage { + +yang-version "1"; + +// namespace +namespace "http://openconfig.net/yang/platform/storage"; + +prefix "oc-storage"; + +import openconfig-platform { + prefix oc-platform; +} +import openconfig-extensions { + prefix oc-ext; +} +import openconfig-yang-types { + prefix oc-yang; +} + +// meta +organization + "OpenConfig working group"; + +contact + "OpenConfig working group + www.openconfig.net"; + +description + "This module defines data related to STORAGE components in the + OpenConfig platform model. + + Portions of this code were derived from the following copyright holders. + References to each copyright holder are mentioned where related content + is used. + + NVM Express Base Specification Revision 2.0a + https://nvmexpress.org/wp-content/uploads/NVMe-NVM-Express-2.0a-2021.07.26-Ratified.pdf + (c) Copyright 2007 to 2021 NVM Express, Inc. ALL RIGHTS RESERVED. + This NVM Express Base Specification, revision 2.0a is proprietary to the + NVM Express, Inc. (also referred to as “Company”) and/or its successors + and assigns. + + S.M.A.R.T. Attribute: Reallocated Sectors Count | Knowledge Base + http://kb.acronis.com."; + +oc-ext:openconfig-version "0.1.0"; + +revision "2024-08-26" { + description + "Initial revision."; + reference + "0.1.0"; +} + +// OpenConfig specific extensions for module metadata. +oc-ext:regexp-posix; +oc-ext:catalog-organization "openconfig"; +oc-ext:origin "openconfig"; + +// identity statements +// typedef statements +// grouping statements + grouping storage-counters-state { + description + "Operational state for storage component statistics. These leaves + are derived from a list of commonly supported S.M.A.R.T. counters. + Note that while common, these attributes may not be supported by + all storage device vendors and media types."; + + leaf soft-read-error-rate { + type oc-yang:counter64; + description + "Uncorrected read errors reported to the operating system. SMART ID + 201."; + reference + "S.M.A.R.T. Attribute: Soft Read Error Rate / Off Track Errors (Maxtor) + | Knowledge Base. kb.acronis.com."; + } + + leaf reallocated-sectors { + type oc-yang:counter64; + description + "Count of reallocated sectors. The raw value represents a count of + the bad sectors that have been found and remapped. SMART ID 5."; + reference + "S.M.A.R.T. Attribute: Reallocated Sectors Count | Knowledge Base - + kb.acronis.com"; + } + + leaf end-to-end-error { + type oc-yang:counter64; + description + "Count of parity errors which occur in the data path to the media. + SMART ID 184."; + reference + "Acronis Drive Monitor: Disk Health Calculation Knowledge Base - + kb.acronis.com"; + } + + leaf offline-uncorrectable-sectors-count { + type oc-yang:counter64; + description + "The total count of uncorrectable errors when reading/writing a + sector. SMART ID 198."; + reference + "Acronis Drive Monitor: Disk Health Calculation Knowledge Base - + kb.acronis.com"; + } + + leaf life-left { + type uint8; + description + "Indicates the approximate SSD life left, in terms of program/erase + cycles or available reserved blocks. A normalized value of 100 + represents a new drive, with a threshold value at 10 indicating a need + for replacement. A value of 0 may mean that the drive is operating in + read-only mode to allow data recovery. SMART ID 231."; + reference + "SMART attribute details, + https://media.kingston.com/support/downloads/MKP_306_SMART_attribute.pdf"; + } + + leaf percentage-used { + type uint8; + description + "Contains a vendor specific estimate of the percentage of NVM + subsystem life used based on the actual usage and the manufacturer’s + prediction of NVM life. A value of 100 indicates that the estimated + endurance of the NVM in the NVM subsystem has been consumed, but may + not indicate an NVM subsystem failure. The value is allowed to exceed + 100. Percentages greater than 254 shall be represented as 255."; + reference + "NVM Express Base Specification Revision 2.0a + https://nvmexpress.org/wp-content/uploads/NVMe-NVM-Express-2.0a-2021.07.26-Ratified.pdf"; + } + } + grouping storage-state { + description + "Storage component state. These counters are derived from the + linux kernel block layer statistics in /sys/block//stat. + Implementations which do not use the linux kernel to access + storage should provide equivalent counters."; + reference + "https://www.kernel.org/doc/Documentation/block/stat.txt"; + + container counters { + description + "A collection of storage specific statistics entitites."; + + uses storage-counters-state; + } + } + + // data definition statements + // augment statements + augment "/oc-platform:components/oc-platform:component/" + + "oc-platform:storage/oc-platform:state" { + description + "Adding storage data to component model"; + + uses storage-state; + } +} + diff --git a/release/models/platform/openconfig-platform-transceiver.yang b/release/models/platform/openconfig-platform-transceiver.yang index 344f8e9b4..81a6e7031 100644 --- a/release/models/platform/openconfig-platform-transceiver.yang +++ b/release/models/platform/openconfig-platform-transceiver.yang @@ -17,6 +17,7 @@ module openconfig-platform-transceiver { import openconfig-types { prefix oc-types; } import openconfig-extensions { prefix oc-ext; } import openconfig-yang-types { prefix oc-yang; } + import openconfig-alarm-types { prefix oc-alarm-types; } // meta @@ -65,7 +66,49 @@ module openconfig-platform-transceiver { specify a physical-channel within a TRANSCEIVER component (i.e. gray optic) that it is associated with."; - oc-ext:openconfig-version "0.8.0"; + oc-ext:openconfig-version "0.14.0"; + +revision "2023-08-30" { + description + "Clarify transceiver module threshold for input-power."; + reference "0.14.0"; + } + +revision "2023-08-30" { + description + "Add transceiver module temperature thresholds"; + reference "0.13.0"; + } + + revision "2023-06-27" { + description + "Add tx bias and voltage thresholds"; + reference "0.12.0"; + } + + revision "2023-05-03" { + description + "Increase max length of vendor-rev to 4."; + reference "0.11.0"; + } + + revision "2023-02-10" { + description + "Fixing linting issues."; + reference "0.10.1"; + } + + revision "2023-01-12" { + description + "Add laser power and temperature thresholds"; + reference "0.10.0"; + } + + revision "2021-07-29" { + description + "Add several media-lane-based VDM defined by CMIS to physical channel"; + reference "0.9.0"; + } revision "2021-02-23" { description @@ -288,6 +331,59 @@ module openconfig-platform-transceiver { channel component and the module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this grouping will NOT be used."; + leaf laser-age { + type oc-types:percentage; + description + "Laser age (0% at beginning of life, 100% end of life) in integer + percentage. This term is defined by Common Management Interface + Specification (CMIS)."; + + reference "QSFP-DD CMIS 5.0 Table 8-122"; + } + + container laser-temperature { + description + "Laser temperature for the cooled laser in degrees Celsius with 1 + decimal precision. This term is defined by Common Management + Interface Specification (CMIS). Values include the instantaneous, + average, minimum, and maximum statistics. If avg/min/max statistics + are not supported, the target is expected to just supply the + instant value."; + + reference "QSFP-DD CMIS 5.0 Table 8-122"; + + uses oc-platform-types:avg-min-max-instant-stats-precision1-celsius; + } + + container target-frequency-deviation { + description + "The difference in MHz with 1 decimal precision between the target + center frequency and the actual current center frequency . This term + is defined by Common Management Interface Specification (CMIS) and + referred to as laser frequency error or laser ferquency deviation. + Values include the instantaneous, average, minimum, and maximum + statistics. If avg/min/max statistics are not supported, the target + is expected to just supply the instant value."; + + reference "QSFP-DD CMIS 5.0 Section Table 8-122"; + + uses oc-opt-types:avg-min-max-instant-stats-precision1-mhz; + } + + container tec-current { + description + "The amount of current flowing to the TC of a cooled laser in percentage + with 2 decimal precision. This term is defined by Common Management + Interface Specification (CMIS). Values include the instantaneous, + average, minimum, and maximum statistics. If avg/min/max statistics + are not supported, the target is expected to just supply the instant + value."; + + reference "QSFP-DD CMIS 5.0 Table 8-122"; + + uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; + } + uses physical-channel-state-extended { when "../../../state/module-functional-type = 'oc-opt-types:TYPE_STANDARD_OPTIC'" { description @@ -354,6 +450,44 @@ module openconfig-platform-transceiver { } } + grouping transceiver-threshold-top { + description + "Top-level grouping for transceiver alarm thresholds for + various sensors."; + + container thresholds { + description + "Enclosing container for transceiver alarm thresholds."; + + list threshold { + key "severity"; + config false; + description + "List of transceiver alarm thresholds, indexed by + alarm severity."; + + leaf severity { + type leafref { + path "../state/severity"; + } + config false; + description + "The severity applied to the group of thresholds. + An implementation's highest severity threshold + should be mapped to OpenConfig's `CRITICAL` + severity level."; + } + + container state { + config false; + description + "Operational alarm thresholds for the transceiver."; + + uses transceiver-threshold-state; + } + } + } + } grouping port-transceiver-config { description @@ -491,10 +625,10 @@ module openconfig-platform-transceiver { leaf vendor-rev { type string { - length 1..2; + length 1..4; } description - "Transceiver vendor's revision number. 2-octet field that + "Transceiver vendor's revision number. Field of 1 to 4 octets that contains ASCII characters, left-aligned and padded on the right with ASCII spaces (20h)"; } @@ -614,9 +748,151 @@ module openconfig-platform-transceiver { uses oc-opt-types:avg-min-max-instant-stats-precision18-ber; } + container supply-voltage { + description + "Supply voltage to the transceiver in volts with 2 decimal + precision. Values include the instantaneous, average, minimum, + and maximum statistics. If avg/min/max statistics are not + supported, the target is expected to just supply the instant + value."; + + uses oc-platform-types:avg-min-max-instant-stats-precision2-volts; + } + uses optical-power-state; } + grouping transceiver-threshold-state { + description + "Grouping for all alarm threshold configs for a particular + severity level."; + leaf severity { + type identityref { + base oc-alarm-types:OPENCONFIG_ALARM_SEVERITY; + } + description + "The type of alarm to which the thresholds apply."; + } + leaf laser-temperature-upper { + type decimal64 { + fraction-digits 1; + } + units celsius; + description + "The upper temperature threshold for the laser temperature sensor. + This leaf value is compared to the instant value of + laser-temperature."; + } + leaf laser-temperature-lower { + type decimal64 { + fraction-digits 1; + } + units celsius; + description + "The lower temperature threshold for the laser temperature sensor. + This leaf value is compared to the instant value of + laser-temperature."; + } + leaf output-power-upper{ + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The upper power threshold for the laser output power. This threshold + applies to every physical-channel on the transceiver and does not + apply to the aggregate transceiver optical-output-power. This leaf + value is compared to the instant value of optical-output-power."; + } + leaf output-power-lower{ + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The lower power threshold for the laser output power. This threshold + applies to every physical-channel on the transceiver and does not + apply to the aggregate transceiver optical-output-power. This leaf + value is compared to the instant value of optical-output-power."; + } + leaf input-power-upper{ + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The upper power threshold for the laser input power. This threshold + applies to every physical-channel on the transceiver and does not + apply to the aggregate transceiver optical-input-power. This leaf + value is compared to the instant value of optical-input-power."; + } + leaf input-power-lower{ + type decimal64 { + fraction-digits 2; + } + units dBm; + description + "The lower power threshold for the laser input power. This threshold + applies to every physical-channel on the transceiver and does not + apply to the aggregate transceiver optical-input-power. This leaf + value is compared to the instant value of optical-input-power."; + } + leaf laser-bias-current-upper{ + description + "The upper threshold for the laser bias current. This leaf value is + compared to the instant value of last-bias-current."; + type decimal64 { + fraction-digits 2; + } + units mA; + } + leaf laser-bias-current-lower{ + description + "The lower threshold for the laser bias current. This leaf value is + compared to the instant value of last-bias-current."; + type decimal64 { + fraction-digits 2; + } + units mA; + } + leaf supply-voltage-upper{ + description + "The upper threshold for the transceiver supply voltage. This leaf + value is compared to the instant value of supply-voltage."; + type decimal64 { + fraction-digits 2; + } + units volts; + } + leaf supply-voltage-lower{ + description + "The lower threshold for the transceiver supply voltage. This leaf + value is compared to the instant value of supply-voltage."; + type decimal64 { + fraction-digits 2; + } + units volts; + } + leaf module-temperature-lower { + type decimal64 { + fraction-digits 1; + } + units celsius; + description + "The lower temperature threshold for the transceiver module. This + leaf value is compared to the instant value of module-temperature."; + } + leaf module-temperature-upper { + type decimal64 { + fraction-digits 1; + } + units celsius; + description + "The upper temperature threshold for the transceiver module. This + leaf value is compared to the instant value of module-temperature."; + } + } + grouping port-transceiver-top { description "Top-level grouping for client port transceiver data"; @@ -645,6 +921,7 @@ module openconfig-platform-transceiver { // physical channels are associated with a transceiver // component uses physical-channel-top; + uses transceiver-threshold-top; } } diff --git a/release/models/platform/openconfig-platform-types.yang b/release/models/platform/openconfig-platform-types.yang index aa7f697a1..88b0ef521 100644 --- a/release/models/platform/openconfig-platform-types.yang +++ b/release/models/platform/openconfig-platform-types.yang @@ -22,7 +22,50 @@ module openconfig-platform-types { "This module defines data types (e.g., YANG identities) to support the OpenConfig component inventory model."; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.8.0"; + + + revision "2024-04-30" { + description + "Add FAN_TRAY"; + reference "1.8.0"; + } + + revision "2024-01-30" { + description + "Add component-last-poweroff-reason grouping"; + reference "1.7.0"; + } + + revision "2023-06-27" { + description + "Add WIFI_ACCESS_POINT"; + reference "1.6.0"; + } + + revision "2022-07-28" { + description + "Add grouping for component power management"; + reference "1.5.0"; + } + + revision "2022-03-27" { + description + "Add identity for BIOS"; + reference "1.4.0"; + } + + revision "2022-02-02" { + description + "Add support for component reboot and switchover."; + reference "1.3.0"; + } + + revision "2021-07-29" { + description + "Add several avg-min-max-instant-stats groupings"; + reference "1.2.0"; + } revision "2021-01-18" { description @@ -136,6 +179,111 @@ module openconfig-platform-types { uses oc-types:min-max-time; } + grouping avg-min-max-instant-stats-precision2-volts { + description + "Common grouping for recording voltage values in + volts with 2 decimal precision. Values include the + instantaneous, average, minimum, and maximum statistics. + If supported by the device, the time interval over which + the statistics are computed, and the times at which the + minimum and maximum values occurred, are also reported."; + + leaf instant { + type decimal64 { + fraction-digits 2; + } + units volts; + description + "The instantaneous value of the statistic."; + } + + leaf avg { + type decimal64 { + fraction-digits 2; + } + units volts; + description + "The arithmetic mean value of the statistic over the + sampling period."; + } + + leaf min { + type decimal64 { + fraction-digits 2; + } + units volts; + description + "The minimum value of the statistic over the sampling + period"; + } + + leaf max { + type decimal64 { + fraction-digits 2; + } + units volts; + description + "The maximum value of the statistic over the sampling + period"; + } + + uses oc-types:stat-interval-state; + uses oc-types:min-max-time; + } + + grouping component-last-poweroff-reason { + description + "Common grouping for recording the reason of a component's + power-off state"; + + leaf trigger { + type component-last-poweroff-reason-trigger; + description + "Records the generic triggers for the last poweroff + event. Component power-off can be triggered + in various ways, + - USER_INITIATED + - SYSTEM_INITIATED + - POWER_FAILURE + This field is not updated during reboots; those are + tracked in the 'last-reboot-reason' leaf."; + } + + leaf details { + type string; + description + "Provides a detailed reason for component power-off. + For system-initiated power-offs, this field can include + specific causes (e.g., critical errors resulting in a + controller-card bootloop)."; + } + } + + grouping component-redundant-role-switchover-reason { + description + "Common grouping for recording the reason of a component's + redundant role switchover. For example two supervisors in + a device, one as primary the other as secondary, switchover + can happen in different scenarios, e.g. user requested, + system error, priority contention, etc."; + + leaf trigger { + type component-redundant-role-switchover-reason-trigger; + description + "Records the generic triggers, e.g. user or system + initiated the switchover."; + } + + leaf details { + type string; + description + "Records detailed description of why the switchover happens. + For example, when system initiated the switchover, this leaf + can be used to record the specific reason, e.g. due to critical + errors of the routing daemon in the primary role."; + } + } + // identity statements identity OPENCONFIG_HARDWARE_COMPONENT { description @@ -185,6 +333,12 @@ module openconfig-platform-types { "Cooling fan, or could be some other heat-reduction component"; } + identity FAN_TRAY { + base OPENCONFIG_HARDWARE_COMPONENT; + description + "Contains multiple fans that work in unison to cool the router components."; + } + identity SENSOR { base OPENCONFIG_HARDWARE_COMPONENT; description @@ -244,6 +398,13 @@ module openconfig-platform-types { chip, etc.)"; } + identity WIFI_ACCESS_POINT { + base OPENCONFIG_HARDWARE_COMPONENT; + description + "A device that attaches to a an Ethernet network and creates a wireless + local area network"; + } + identity OPERATING_SYSTEM { base OPENCONFIG_SOFTWARE_COMPONENT; description @@ -263,6 +424,13 @@ module openconfig-platform-types { item"; } + identity BIOS { + base OPENCONFIG_SOFTWARE_COMPONENT; + description + "Legacy BIOS or UEFI firmware interface responsible for + initializing hardware components and first stage boot loader."; + } + identity BOOT_LOADER { base OPENCONFIG_SOFTWARE_COMPONENT; description @@ -360,4 +528,81 @@ module openconfig-platform-types { "A generic type reflecting whether a hardware component is powered on or off"; } + + identity COMPONENT_REBOOT_REASON { + description + "Base entity for component reboot reasons."; + } + + identity REBOOT_USER_INITIATED { + base COMPONENT_REBOOT_REASON; + description + "User initiated the reboot of the componenent."; + } + + identity REBOOT_POWER_FAILURE { + base COMPONENT_REBOOT_REASON; + description + "The component reboots due to power failure."; + } + + identity REBOOT_CRITICAL_ERROR { + base COMPONENT_REBOOT_REASON; + description + "The component reboots due to critical errors."; + } + + typedef component-redundant-role { + type enumeration { + enum PRIMARY { + description + "Component is acting the primary role."; + } + enum SECONDARY { + description + "Component is acting the secondary role."; + } + } + description + "A generic type reflecting the component's redundanty role. + For example, a device might have dual supervisors components + for redundant purpose, with one being the primary and the + other secondary."; + } + + typedef component-redundant-role-switchover-reason-trigger { + type enumeration { + enum USER_INITIATED { + description + "User initiated the switchover, e.g. via command line."; + } + enum SYSTEM_INITIATED { + description + "The system initiated the switchover, e.g. due to + critical errors in the component of the primar role."; + } + } + description + "Records how the role switchover is triggered."; + } + + typedef component-last-poweroff-reason-trigger { + type enumeration { + enum USER_INITIATED { + description + "User initiated the power-off, e.g. via command line."; + } + enum SYSTEM_INITIATED { + description + "The system initiated the power-off, e.g. due to + critical errors in the component of the primary role."; + } + enum POWER_FAILURE { + description + "The last power-off was due to power failure."; + } + } + description + "Records how the last power-off was triggered."; + } } diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index b0b287397..742c3e8af 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -11,7 +11,9 @@ module openconfig-platform { import openconfig-extensions { prefix oc-ext; } import openconfig-alarm-types { prefix oc-alarm-types; } import openconfig-yang-types { prefix oc-yang; } + import openconfig-types { prefix oc-types; } + include openconfig-platform-common; // meta organization "OpenConfig working group"; @@ -63,7 +65,112 @@ module openconfig-platform { (presence or absence of a component) and state (physical attributes or status)."; - oc-ext:openconfig-version "0.14.0"; + oc-ext:openconfig-version "0.30.0"; + + revision "2024-10-13" { + description + "Add storage state io-errors."; + reference "0.30.0"; + } + + revision "2024-10-13" { + description + "Deprecate component id leaf"; + reference "0.29.0"; + } + + revision "2024-08-08" { + description + "Update description of model-name leaf."; + reference "0.28.0"; + } + + revision "2024-05-29" { + description + "Change install-position from leaf-ref to string."; + reference "0.27.0"; + } + + revision "2024-04-12" { + description + "Add install-position, install-component and deprecate location and + slot-id."; + reference "0.26.0"; + } + + revision "2024-01-30" { + description + "Updated description for component-power-type"; + reference "0.25.0"; + } + + revision "2023-11-28" { + description + "Add model-name"; + reference "0.24.0"; + } + + revision "2023-02-13" { + description + "Refactor resource utilization threshold config into a separate grouping. + Update 'utilization resource' to 'resource utilization'."; + reference "0.23.0"; + } + + revision "2022-12-20" { + description + "Add threshold and threshold-exceeded for resource usage."; + reference "0.22.0"; + } + + revision "2022-12-19" { + description + "Update last-high-watermark timestamp documentation."; + reference "0.21.1"; + } + + revision "2022-09-26" { + description + "Add state data for base-mac-address."; + reference "0.21.0"; + } + + revision "2022-08-31" { + description + "Add new state data for component CLEI code."; + reference "0.20.0"; + } + + revision "2022-07-28" { + description + "Add container for controller card component"; + reference "0.19.0"; + } + + revision "2022-07-11" { + description + "Add switchover ready"; + reference "0.18.0"; + } + + revision "2022-06-10" { + description + "Specify units and epoch for switchover and reboot times."; + reference "0.17.0"; + } + + revision "2022-04-21" { + description + "Add platform utilization."; + reference "0.16.0"; + } + + revision "2022-02-02" { + description + "Add new state data for component reboot and + switchover."; + reference "0.15.0"; + } revision "2021-08-13" { description @@ -326,6 +433,7 @@ module openconfig-platform { leaf id { type string; + status deprecated; description "Unique identifier assigned by the system for the component"; @@ -333,12 +441,61 @@ module openconfig-platform { leaf location { type string; + status deprecated; description "System-supplied description of the location of the component within the system. This could be a bay position, slot number, socket location, etc. For component types that have an explicit slot-id attribute, such as linecards, the - system should populate the more specific slot-id."; + system should populate the more specific slot-id. + + This leaf is deprecated and replaced by install-position and + install-component."; + } + + leaf install-position { + type string; + description + "System-supplied index to a position where this component is + installed. The position may be referred in device documenation + as a port, slot, bay, socket, etc. This string must only + indicate the name of the position, and not any indication of + the name of the parent component within the system. Instead, + parent component name should be present in the 'parent' leaf. + + Typically the install-position is a number, but it is observed + that some devices may use letters or alphanumerics. The + position name should be the same name used to physically + identify the position in documentation or printed on the + device. + + Any component which is removable is expected to have + an install-position and an install-component which points to + an ancestor component where the connection occurs. + + For component types that have an explicit slot-id attribute, + such as LINECARD, the system should populate slot-id, + install-position and install-component. This will facilitate a + transition to deprecate slot-id."; + } + + leaf install-component { + type leafref { + path "../name"; + } + description + "This leaf contains the name of the ancestor component which + contains the 'install-position'. This creates a distinct + mapping between a removable component and the target component + it is installed into. Note there may be zero or more + intermediate components between the removable component and + the install-component. + + For example, consider the component tree + PORT ['eth1/2']-> INTEGRATED_CIRCUIT ['npu1']-> LINECARD ['lc1']. + The PORT has an install-position of '2' and install-component named + 'lc1'. The intermediate INTEGRATED-CIRCUIT component is not + present in either install-position or install-component leaves."; } leaf description { @@ -399,6 +556,24 @@ module openconfig-platform { (field replaceable unit)"; } + leaf model-name { + when "../removable = 'true' or ../type = 'oc-platform-types:CHASSIS'"; + mandatory true; + type string; + description + "Model name that would be found in a catalog of stock keeping + units (SKU) and should be the orderable name of the + component."; + } + + leaf clei-code { + type string; + description + "Common Language Equipment Identifier (CLEI) code of the + component. This should be present in particular if the + component is also an FRU (field replaceable unit)"; + } + leaf removable { type boolean; description @@ -436,6 +611,98 @@ module openconfig-platform { corresponding subcomponent reference from the parent component."; } + + leaf redundant-role { + type oc-platform-types:component-redundant-role; + description + "For components that have redundant roles (e.g. two + supervisors in a device, one as primary the other as secondary), + this reports the role of the component."; + } + + container last-poweroff-reason { + description + "Records last power-off reason for a component."; + + uses oc-platform-types:component-last-poweroff-reason; + } + + leaf last-poweroff-time { + type oc-types:timeticks64; + units "nanoseconds"; + description + "This records the last time a component was directly powered + down. The value is a Unix Epoch timestamp (nanoseconds since + Jan 1, 1970 00:00:00 UTC). Component power-off can be: + - USER_INITIATED + - SYSTEM_INITIATED + - POWER_FAILURE + This field is not updated during reboots; those are tracked + in the 'last-reboot-time' leaf."; + } + + container last-switchover-reason { + description + "For components that have redundant roles (e.g. two + supervisors in a device, one as primary the other as secondary), + this reports the reason of the last change of the + component's role."; + + uses oc-platform-types:component-redundant-role-switchover-reason; + } + + leaf last-switchover-time { + type oc-types:timeticks64; + units "nanoseconds"; + description + "For components that have redundant roles (e.g. two + supervisors in a device, one as primary the other as + secondary), this reports the time of the last change of + the component's role. The value is the timestamp in + nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + + } + + leaf last-reboot-reason { + type identityref { + base oc-platform-types:COMPONENT_REBOOT_REASON; + } + description + "This reports the reason of the last reboot of the component."; + } + + leaf last-reboot-time { + type oc-types:timeticks64; + units "nanoseconds"; + description + "This reports the time of the last reboot of the component. The + value is the timestamp in nanoseconds relative to the Unix Epoch + (Jan 1, 1970 00:00:00 UTC). This timer is not updated during + power shutdowns; those are tracked in 'last-poweroff-time' leaf."; + } + + leaf switchover-ready { + type boolean; + description + "For components that have redundant roles, this reports a value + that indicates if the component is ready to support failover. + + The components with a redundant-role should reflect the overall + system's switchover status. For example, two supervisors in a + device, one as primary and the other as secondary, should both + report the same value."; + } + + leaf base-mac-address { + type oc-yang:mac-address; + description + "This is a MAC address representing the root or primary MAC + address for a component. Components such as CHASSIS and + CONTROLLER_CARD are expected to provide a base-mac-address. The + base mac-address for CHASSIS and a PRIMARY CONTROLLER_CARD may + contain the same value."; + } + } grouping platform-component-temp-alarm-state { @@ -786,6 +1053,8 @@ module openconfig-platform { description "Operational state data for chassis components"; } + + uses platform-resource-utilization-top; } // TODO(aashaikh): linecard container is already defined in @@ -940,6 +1209,8 @@ module openconfig-platform { description "Operational state data for chip components"; } + + uses platform-resource-utilization-top; } container backplane { @@ -974,6 +1245,23 @@ module openconfig-platform { "Operational state data for software module components"; } } + + container controller-card { + description + "Data for controller card components, i.e., for components + with type=CONTROLLER_CARD"; + + container config { + description + "Configuration data for controller card components."; + } + + container state { + config false; + description + "Operational state data for controller card components"; + } + } } grouping platform-component-top { diff --git a/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang b/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang index 9c6a972d5..3329d9550 100644 --- a/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang +++ b/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang @@ -21,7 +21,25 @@ submodule openconfig-pf-forwarding-policies { "This submodule contains configuration and operational state relating to the definition of policy-forwarding policies."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.6.1"; + + revision "2023-04-25" { + description + "Clarify use of interface-ref."; + reference "0.6.1"; + } + + revision "2023-03-27" { + description + "Add support for decap in one NI and further actions in other NIs."; + reference "0.6.0"; + } + + revision "2022-01-25" { + description + "Add GUE and MPLS-in-UDP decapsulation actions."; + reference "0.5.0"; + } revision "2021-08-06" { description @@ -258,6 +276,65 @@ submodule openconfig-pf-forwarding-policies { according to the IP destination)."; } + leaf decap-network-instance { + type leafref { + // this must be an absolute reference to allow another NI + // to be referenced. + path "/network-instances/network-instance/config/name"; + } + description + "This leaf is mutually exclusive with ../network-instance. + This leaf should be used along with + ../decap-fallback-network-instance and ../post-decap-network-instance. + This leaf is normally used with NIs (network instances) that are + populated by SDN controllers (e.g. via gRIBI), where we want: + - The decapsulation decision to be controlled by the + controllers. + - The new header after decapsulation is to be looked up in + another NI, and the NI is chosen by fields (e.g. source IP, + DSCP, etc) that are not used for route resolution. + When this leaf is set, packets matching the match criteria for + the forwarding rule should be looked up in the specified NI. + It is expected that the NI should only contain routes that have + next hop action as decapsulation. + - If there is a match, the packet should be decapsulated. + The route lookup on the new header should happen in the + ../post-decap-network-instance. + - If there is no match, the packet should be looked up in the + NI set by ../decap-fallback-network-instance."; + } + + leaf decap-fallback-network-instance { + type leafref { + // this must be an absolute reference to allow another NI + // to be referenced. + path "/network-instances/network-instance/config/name"; + } + description + "This leaf has to be set when ../decap-network-instance is set. + When this leaf is set, the specified NI should be used as a + fallback instance for lookup when + ../decap-network-instance produces no match for the packet. + NI specified by this leaf might contain different mixed next hop + actions (e.g. next hop IP, decapsulation, redirect to another NI, + etc)."; + } + + leaf post-decap-network-instance { + type leafref { + // this must be an absolute reference to allow another NI + // to be referenced. + path "/network-instances/network-instance/config/name"; + } + description + "This leaf can only be set when ../decap-network-instance is set. + When this leaf is set, the specified NI should be used for lookup + on the new header after ../decap-network-instance does decap for + the matched packet. NI specified by this leaf might contain different + mixed next hop actions (e.g. next hop IP, decapsulation, + redirect to another NI, etc)."; + } + leaf network-instance { type leafref { // this must be an absolute reference to allow another NI to be @@ -265,7 +342,8 @@ submodule openconfig-pf-forwarding-policies { path "/network-instances/network-instance/config/name"; } description - "When this leaf is set, packets matching the match criteria + "This leaf is mutually exclusive with ../decap-network-instance. + When this leaf is set, packets matching the match criteria for the forwarding rule should be looked up in the network-instance that is referenced rather than the network-instance with which the interface is associated. @@ -300,6 +378,26 @@ submodule openconfig-pf-forwarding-policies { should be forwarded to the next-hop IP address, bypassing any lookup on the local system."; } + + leaf decapsulate-mpls-in-udp { + type boolean; + default false; + description + "When this leaf is set to true, the local system should remove + the UDP header from the packet matching the rule. + Following the decapsulation it should subsequently forward the + encapsulated packet according to the underlying MPLS label."; + } + + leaf decapsulate-gue { + type boolean; + default false; + description + "When this leaf is set to true, the local system should remove + the Generic UDP Encapsulation (GUE) header from the packet matching + the rule. Following the decapsulation it should subsequently forward the + encapsulated packet according to the underlying IPv4 or IPv6 header."; + } } grouping pf-forwarding-policy-action-encapsulate-gre { diff --git a/release/models/policy-forwarding/openconfig-pf-interfaces.yang b/release/models/policy-forwarding/openconfig-pf-interfaces.yang index 0bd5aa2a1..705e7f795 100644 --- a/release/models/policy-forwarding/openconfig-pf-interfaces.yang +++ b/release/models/policy-forwarding/openconfig-pf-interfaces.yang @@ -19,7 +19,25 @@ submodule openconfig-pf-interfaces { "This submodule contains groupings related to the association between interfaces and policy forwarding rules."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.6.1"; + + revision "2023-04-25" { + description + "Clarify use of interface-ref."; + reference "0.6.1"; + } + + revision "2023-03-27" { + description + "Add support for decap in one NI and further actions in other NIs."; + reference "0.6.0"; + } + + revision "2022-01-25" { + description + "Add GUE and MPLS-in-UDP decapsulation actions."; + reference "0.5.0"; + } revision "2021-08-06" { description @@ -76,7 +94,12 @@ submodule openconfig-pf-interfaces { description "Configuration and operationals state relating to the relationship between interfaces and policy-based forwarding - rules."; + rules. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { @@ -145,9 +168,12 @@ submodule openconfig-pf-interfaces { path "../../../../policies/policy/config/policy-id"; } description - "Apply the specific VRF selection policy on the interface. The referenced policy - MUST be of type VRF_SELECTION_POLICY. The VRF selection policy may coexist with - a policy-forwarding policy. + "Apply the specific VRF selection policy on the interface. + The referenced Interface must be resolved using the Interface + and Sub-interface leaves. + + The referenced policy MUST be of the type VRF_SELECTION_POLICY. + The VRF selection policy may coexist with a policy-forwarding policy. The policy specified in this leaf is used to specifically choose the L3VRF network instance that is used for specific input criteria of packets."; diff --git a/release/models/policy-forwarding/openconfig-pf-path-groups.yang b/release/models/policy-forwarding/openconfig-pf-path-groups.yang index f8cad6029..c1c9283cb 100644 --- a/release/models/policy-forwarding/openconfig-pf-path-groups.yang +++ b/release/models/policy-forwarding/openconfig-pf-path-groups.yang @@ -18,7 +18,24 @@ submodule openconfig-pf-path-groups { forwarding entities together to be used as policy forwarding targets."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.6.1"; + + revision "2023-04-25" { + description + "Clarify use of interface-ref."; + reference "0.6.1"; + } + + revision "2023-03-27" { + description + "Add support for decap in one NI and further actions in other NIs."; + reference "0.6.0"; + } + revision "2022-01-25" { + description + "Add GUE and MPLS-in-UDP decapsulation actions."; + reference "0.5.0"; + } revision "2021-08-06" { description diff --git a/release/models/policy-forwarding/openconfig-policy-forwarding.yang b/release/models/policy-forwarding/openconfig-policy-forwarding.yang index 476387502..c6d37209a 100644 --- a/release/models/policy-forwarding/openconfig-policy-forwarding.yang +++ b/release/models/policy-forwarding/openconfig-policy-forwarding.yang @@ -81,7 +81,25 @@ module openconfig-policy-forwarding { The forwarding action of the corresponding policy is set to PATH_GROUP and references the configured group of LSPs."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.6.1"; + + revision "2023-04-25" { + description + "Clarify use of interface-ref."; + reference "0.6.1"; + } + + revision "2023-03-27" { + description + "Add support for decap in one NI and further actions in other NIs."; + reference "0.6.0"; + } + + revision "2022-01-25" { + description + "Add GUE and MPLS-in-UDP decapsulation actions."; + reference "0.5.0"; + } revision "2021-08-06" { description diff --git a/release/models/policy/openconfig-policy-types.yang b/release/models/policy/openconfig-policy-types.yang index 46efef7f4..dea5bf0fa 100644 --- a/release/models/policy/openconfig-policy-types.yang +++ b/release/models/policy/openconfig-policy-types.yang @@ -10,6 +10,7 @@ module openconfig-policy-types { // import some basic types import ietf-yang-types { prefix yang; } import openconfig-extensions { prefix oc-ext; } + import openconfig-yang-types { prefix oc-yang; } // meta organization @@ -24,7 +25,31 @@ module openconfig-policy-types { policy. It can be imported by modules that contain protocol- specific policy conditions and actions."; - oc-ext:openconfig-version "3.1.1"; + oc-ext:openconfig-version "3.3.0"; + + revision "2024-05-14" { + description + "Add hex-string-prefixed to typedef tag-type."; + reference "3.3.0"; + } + +revision "2022-11-08" { + description + "Add INSTALL_PROTOCOL_TYPE local."; + reference "3.2.3"; + } + + revision "2022-02-11" { + description + "Add PCEP to INSTALL_PROTOCOL_TYPES identity"; + reference "3.2.2"; + } + + revision "2021-12-10" { + description + "Add INSTALL_PROTOCOL_TYPE gRIBI."; + reference "3.2.1"; + } revision "2018-11-21" { description @@ -147,14 +172,18 @@ module openconfig-policy-types { type union { type uint32; type yang:hex-string; + type oc-yang:hex-string-prefixed { + length "3..18"; + } } - description "type for expressing route tags on a local system, - including IS-IS and OSPF; may be expressed as either decimal or - hexidecimal integer"; + description + "Type for expressing route tags on a local system, including IS-IS + and OSPF; This may be expressed as either decimal or hexidecimal + integer."; reference - "RFC 2178 OSPF Version 2 + "RFC 2178 OSPF Version 2 specifies a 32 bit value RFC 5130 A Policy Control Mechanism in IS-IS Using - Administrative Tags"; + Administrative Tags specifies 32 bit and 64 bit values."; } identity INSTALL_PROTOCOL_TYPE { @@ -228,4 +257,41 @@ module openconfig-policy-types { reference "RFC 3376"; } + + identity GRIBI { + base INSTALL_PROTOCOL_TYPE; + description "gRPC Routing Information Base Interface"; + } + + identity PCEP { + base INSTALL_PROTOCOL_TYPE; + description + "Path Computation Element Communication Protocol"; + reference + "RFC 5440"; + } + + identity LOCAL { + base INSTALL_PROTOCOL_TYPE; + description + "A local route. + + Local routes define a route for the one specific IP + address configured on the router interface. They are + created in association with directly connected routes. + Local routes must end with a /32 in the case of ipv4 + or /128 for ipv6. + For example, when configuring an interface with the ip + address + + 10.244.136.79/31 + + the derived DIRECTLY_CONNECTED route is + + 10.244.136.78/31 + + and the derived LOCAL route is + + 10.244.136.79/32."; + } } diff --git a/release/models/policy/openconfig-routing-policy.yang b/release/models/policy/openconfig-routing-policy.yang index 0ed2f9392..8a61d8be0 100644 --- a/release/models/policy/openconfig-routing-policy.yang +++ b/release/models/policy/openconfig-routing-policy.yang @@ -52,9 +52,14 @@ module openconfig-routing-policy { corresponding individual policy statements in order. When a condition statement in a policy statement is satisfied, the corresponding action statement is executed. If the action - statement has either accept-route or reject-route actions, policy - evaluation of the current policy definition stops, and no further - policy definitions in the chain are evaluated. + statement has a final disposition configured as policy result, either + accept-route or reject-route, evaluation of the current policy definition + stops, and no further policy statements are evaluated. In case there is a + policy chain, no further policy definitions in the chain are evaluated. + + If the action statement has the NEXT_STATEMENT policy result, all the + defined actions are executed and policy evaluation proceeds to the next + statement. The NEXT_STATEMENT is the default policy result action. If the condition is not satisfied, then evaluation proceeds to the next policy statement. If none of the policy statement @@ -75,9 +80,44 @@ module openconfig-routing-policy { policy. Similarly, a reject-route action returns false. If the subroutine returns true, the calling policy continues to evaluate the remaining conditions (using a modified route if the - subroutine performed any changes to the route)."; + subroutine performed any changes to the route). + + If a routing protocol is defined and the related + apply-policy/default-(import|export)-policy leaf is not set, the + default value for the default-(import|export)-policy leaf must be + applied. See RFC6020 7.6.1 which applies to this model."; + + oc-ext:openconfig-version "3.4.2"; + + revision "2023-11-01" { + description + "Refactor apply policy to separate default policy in it's own common + set of groupings"; + reference "3.4.2"; + } - oc-ext:openconfig-version "3.2.2"; + revision "2023-10-24" { + description + "Clarify the use of default-(import|export)-policy when no policy + is applied to a protocol."; + reference "3.4.1"; + } + + revision "2023-10-11" { + description + "Add NEXT_STATEMENT policy-result-type enum value."; + reference "3.4.0"; + } + + revision "2022-05-24" { + description + "Remove module extension oc-ext:regexp-posix by making pattern regexes + conform to RFC6020/7950. + + Types impacted: + - masklength-range"; + reference "3.3.0"; + } revision "2020-08-18" { description @@ -126,7 +166,6 @@ module openconfig-routing-policy { } // OpenConfig specific extensions for module metadata. - oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -153,12 +192,19 @@ module openconfig-routing-policy { typedef policy-result-type { type enumeration { enum ACCEPT_ROUTE { - description "Policy accepts the route"; + description "Policy accepts the route and evaluation of the + current policy definition stops."; } enum REJECT_ROUTE { - description "Policy rejects the route"; + description "Policy rejects the route and evaluation of the + current policy definition stops."; + } + enum NEXT_STATEMENT { + description "Any modifications of the route are preserved and the evaluation of the policy will continue to the + next statement."; } } + default NEXT_STATEMENT; description "Type used to specify route disposition in a policy chain"; @@ -273,7 +319,7 @@ module openconfig-routing-policy { leaf masklength-range { type string { - pattern '^(([0-9]+\.\.[0-9]+)|exact)$'; + pattern '(([0-9]+\.\.[0-9]+)|exact)'; oc-ext:posix-pattern '^(([0-9]+\.\.[0-9]+)|exact)$'; } description @@ -1172,6 +1218,11 @@ module openconfig-routing-policy { for the current peer group, neighbor, address family, etc."; } + } + + grouping default-policy-import-config { + description + "Configuration data for default import policy"; leaf default-import-policy { type default-policy-type; @@ -1180,7 +1231,6 @@ module openconfig-routing-policy { "explicitly set a default policy if no policy definition in the import policy chain is satisfied."; } - } grouping apply-policy-export-config { @@ -1202,6 +1252,11 @@ module openconfig-routing-policy { for the current peer group, neighbor, address family, etc."; } + } + + grouping default-policy-export-config { + description + "Configuration data for default export policy"; leaf default-export-policy { type default-policy-type; @@ -1212,22 +1267,37 @@ module openconfig-routing-policy { } } - grouping apply-policy-config { description "Configuration data for routing policies"; uses apply-policy-import-config; uses apply-policy-export-config; - + uses default-policy-config; } + grouping default-policy-config { + description + "Configuration data for default routing policies"; + uses default-policy-import-config; + uses default-policy-export-config; + } grouping apply-policy-state { description "Operational state associated with routing policy"; + uses default-policy-state; + + //TODO: identify additional state data beyond the intended + //policy configuration. + } + + grouping default-policy-state { + description + "Operational state associated with routing policy"; + //TODO: identify additional state data beyond the intended //policy configuration. } @@ -1264,6 +1334,35 @@ module openconfig-routing-policy { } } + grouping default-policy-group { + description + "Top level container for default routing policy applications."; + + container apply-policy { + description + "Anchor point for routing policies in the model. + Import and export policies are with respect to the local + routing table, i.e., export (send) and import (receive), + depending on the context."; + + container config { + description + "Policy configuration data."; + + uses default-policy-config; + } + + container state { + config false; + description + "Operational state for routing policy"; + + uses default-policy-config; + uses default-policy-state; + } + } + } + uses routing-policy-top; } diff --git a/release/models/qos/openconfig-qos-elements.yang b/release/models/qos/openconfig-qos-elements.yang index 9af4d7b89..6aee18d72 100644 --- a/release/models/qos/openconfig-qos-elements.yang +++ b/release/models/qos/openconfig-qos-elements.yang @@ -35,7 +35,74 @@ submodule openconfig-qos-elements { packets for transmission, including policer and shaper functions"; - oc-ext:openconfig-version "0.3.0"; + oc-ext:openconfig-version "0.11.2"; + + revision "2023-10-13" { + description + "Fix revision statement date"; + reference "0.11.2"; + } + + revision "2023-10-08" { + description + "Clarification on WRED weight in case it is not present"; + reference "0.11.1"; + } + + revision "2023-09-15" { + description + "Add support for ECN counters"; + reference "0.11.0"; + } + + revision "2023-07-26" { + description + "Add buffer management parameters in time unts (microseconds). + Make profiles reusable across LAGs and PHY of different speed"; + reference "0.10.0"; + } + + revision "2023-04-25" { + description + "Clarify interface-ref usage."; + reference "0.9.1"; + } + + revision "2023-04-17" { + description + "Add support for relative RED min-threshold and max-threshold values."; + reference "0.9.0"; + } + + revision "2023-02-17" { + description + "Add queue identifier."; + reference "0.8.0"; + } + + revision "2023-02-08" { + description + "Remove incorrect output placement of interface-ref"; + reference "0.7.0"; + } + + revision "2023-01-28" { + description + "Split groupings in interfaces for better leaf reuse."; + reference "0.6.1"; + } + + revision "2022-09-13" { + description + "Add queue octet drop counter."; + reference "0.6.0"; + } + + revision "2021-08-28" { + description + "Revision updating memory management profile WRED and RED configuration."; + reference "0.5.0"; + } revision "2021-04-28" { description @@ -548,6 +615,12 @@ submodule openconfig-qos-elements { description "User-defined name of the queue"; } + leaf queue-id { + type uint8; + description + "An optional identifier which may be required by some hardware to map + the named queue to a hardware queue"; + } } grouping qos-queue-state { diff --git a/release/models/qos/openconfig-qos-interfaces.yang b/release/models/qos/openconfig-qos-interfaces.yang index 0c6db426b..c45c0974b 100644 --- a/release/models/qos/openconfig-qos-interfaces.yang +++ b/release/models/qos/openconfig-qos-interfaces.yang @@ -25,7 +25,74 @@ submodule openconfig-qos-interfaces { configuration and operational state associated with interfaces."; - oc-ext:openconfig-version "0.4.0"; + oc-ext:openconfig-version "0.11.2"; + + revision "2023-10-13" { + description + "Fix revision statement date"; + reference "0.11.2"; + } + + revision "2023-10-08" { + description + "Clarification on WRED weight in case it is not present"; + reference "0.11.1"; + } + + revision "2023-09-15" { + description + "Add support for ECN counters"; + reference "0.11.0"; + } + + revision "2023-07-26" { + description + "Add buffer management parameters in time unts (microseconds). + Make profiles reusable across LAGs and PHY of different speed"; + reference "0.10.0"; + } + + revision "2023-04-25" { + description + "Clarify interface-ref usage."; + reference "0.9.1"; + } + + revision "2023-04-17" { + description + "Add support for relative RED min-threshold and max-threshold values."; + reference "0.9.0"; + } + + revision "2023-02-17" { + description + "Add queue identifier."; + reference "0.8.0"; + } + + revision "2023-02-08" { + description + "Remove incorrect output placement of interface-ref"; + reference "0.7.0"; + } + + revision "2023-01-28" { + description + "Split groupings in interfaces for better leaf reuse."; + reference "0.6.1"; + } + + revision "2022-09-13" { + description + "Add queue octet drop counter."; + reference "0.6.0"; + } + + revision "2021-08-28" { + description + "Revision updating memory management profile WRED and RED configuration."; + reference "0.5.0"; + } revision "2021-04-28" { description @@ -89,6 +156,13 @@ submodule openconfig-qos-interfaces { "Reference to match terms in the classifier"; } + uses qos-interface-classifier-match-counters-state; + } + + grouping qos-interface-classifier-match-counters-state { + description + "Grouping for counters relating to QoS classifier match terms."; + leaf matched-packets { type oc-yang:counter64; description @@ -313,7 +387,53 @@ submodule openconfig-qos-interfaces { leaf dropped-pkts { type oc-yang:counter64; description - "Number of packets dropped by the queue due to overrun"; + "Number of packets dropped by the queue due to overrun, that is tail-drop + or AMQ (RED, WRED, etc) induced drops as indicated by the attached + queue-management-profile"; + } + + leaf dropped-octets { + type oc-yang:counter64; + description + "Number of octets dropped by the queue due to overrun, that is tail-drop + or AMQ (RED, WRED, etc) induced drops as indicated by the attached + queue-management-profile"; + } + + leaf ecn-marked-pkts { + type oc-yang:counter64; + description + "number of packets for which ECN codepoint has been changed from ECT to CE"; + } + + leaf ecn-marked-octets { + type oc-yang:counter64; + description + "Number of octets for which ECN codepoint has been changed from ECT to CE"; + } + + leaf ecn-selected-pkts { + type oc-yang:counter64; + description + "Number of packets selected by AQM + + For RED/WRED AQM this counter counts: + - all packets enqueued while queue utilization was greater then max-threshold + - packs enqueued while queue utilization was between min-threshold and max-threshold, with probability derived from RED/WRED slope + + Packets are counted regardless of its ECN codepoint"; + } + + leaf ecn-selected-octets { + type oc-yang:counter64; + description + "Number of octets of packets selected by AQM + + For RED/WRED AQM this counter counts: + - all octets enqueued while queue utilization was greater then max-threshold + - octets enqueued while queue utilization was between min-threshold and max-threshold, with probability derived from RED/WRED slope + + Octets are counted regardless of its ECN codepoint"; } } @@ -828,7 +948,7 @@ submodule openconfig-qos-interfaces { container output { description "Top-level container for QoS data related to the egress - interface"; + interface."; container config { description @@ -846,7 +966,6 @@ submodule openconfig-qos-interfaces { uses qos-interface-output-state; } - uses oc-if:interface-ref; uses qos-interface-classifier-top; uses qos-interface-queue-root-top; uses qos-interface-scheduler-top; @@ -865,7 +984,12 @@ submodule openconfig-qos-interfaces { list interface { key "interface-id"; description - "List of interfaces referenced by QoS entities."; + "List of interfaces referenced by QoS entities. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { diff --git a/release/models/qos/openconfig-qos-mem-mgmt.yang b/release/models/qos/openconfig-qos-mem-mgmt.yang index 63ca758fa..34c373d58 100644 --- a/release/models/qos/openconfig-qos-mem-mgmt.yang +++ b/release/models/qos/openconfig-qos-mem-mgmt.yang @@ -29,7 +29,68 @@ submodule openconfig-qos-mem-mgmt { per-queue basis, and determine how packets are marked/dropped within the queue instantiation."; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "0.11.2"; + + revision "2023-10-13" { + description + "Fix revision statement date"; + reference "0.11.2"; + } + + revision "2023-10-08" { + description + "Clarification on WRED weight in case it is not present"; + reference "0.11.1"; + } + + revision "2023-09-15" { + description + "Add support for ECN counters"; + reference "0.11.0"; + } + +revision "2023-07-26" { + description + "Add buffer management parameters in time unts (microseconds). + Make profiles reusable across LAGs and PHY of different speed"; + reference "0.10.0"; + } + + revision "2023-04-25" { + description + "Clarify interface-ref usage."; + reference "0.9.1"; + } + + revision "2023-04-17" { + description + "Add support for relative RED min-threshold and max-threshold values."; + reference "0.9.0"; + } + + revision "2023-02-17" { + description + "Add queue identifier."; + reference "0.8.0"; + } + + revision "2023-02-08" { + description + "Remove incorrect output placement of interface-ref"; + reference "0.7.0"; + } + + revision "2023-01-28" { + description + "Split groupings in interfaces for better leaf reuse."; + reference "0.6.1"; + } + + revision "2022-09-13" { + description + "Add queue octet drop counter."; + reference "0.6.0"; + } revision "2021-08-28" { description @@ -185,7 +246,20 @@ submodule openconfig-qos-mem-mgmt { units bytes; description "This is the dedicated buffer that is carved for the queue, this is the minimum - number of bytes reserved for this queue."; + number of bytes reserved for this queue. + This leaf is mutualy exclusive with dedicated-buffer-temporal leaf"; + } + + leaf dedicated-buffer-temporal { + type uint64; + units microseconds; + description + "This is the dedicated buffer that is carved for the queue. The the minimum + number of bytes reserved for this queue is calculated by multiplying by interface speed + queue is attached to and queues minimum, guarantaed transmit share (derived + form WRR schedulers weights). + This leaf shouldbot be used for strict priority scheduled queues. + This leaf is mutualy exclusive with dedicated-buffer leaf"; } leaf use-shared-buffer { @@ -210,7 +284,22 @@ submodule openconfig-qos-mem-mgmt { description "If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit is the maximum number of bytes that the queue is allowed to use from the shared - pool."; + pool. + This leaf is mutualy exclusive with static-shared-buffer-limit-temporal leaf."; + } + + leaf static-shared-buffer-limit-temporal { + type uint32; + units microseconds; + description + "If the shared-buffer-limit-type is STATIC, then static-shared-buffer-limit-temporal is + the maximum number of bytes that the queue is allowed to use from the shared + pool. + The the number of bytes is calculated by multiplying static-shared-buffer-limit-temporal + by interface speed the queue is attached to and queues minimum, guarantaed transmit share + (derived form WRR schedulers weights). + This leaf shouldbot be used for strict priority scheduled queues. + This leaf is mutualy exclusive with static-shared-buffer-limit leaf."; } leaf dynamic-limit-scaling-factor { @@ -247,18 +336,40 @@ submodule openconfig-qos-mem-mgmt { type uint64; units bytes; description - "The mininum threshold parameter for a RED-managed queue. When the - average queue length is less than minth, all packets are admitted - to the queue."; + "The mininum threshold parameter for a RED-managed queue in bytes. + When the average queue length is less than minth, all packets are admitted + to the queue. Mututally exclusive with min-threshold-percent and + max-threshold-percent."; } leaf max-threshold { type uint64; units bytes; description - "The maximum threshold parameter for a RED-managed queue. When the - average queue length exceeds the maxth value, all packets are - dropped (or marked if ECN is enabled)."; + "The maximum threshold parameter for a RED-managed queue in bytes. + When the average queue length exceeds the maxth value, all packets are + dropped (or marked if ECN is enabled). Mutually exclusive with + min-threshold-percent and max-threshold-percent."; + } + + leaf min-threshold-percent { + type uint64; + units oc-types:percentage; + description + "The mininum threshold parameter for a RED-managed queue in percent. + When the average queue length is less than minth, all packets are + admitted to the queue. Mutually exclusive with min-threshold and + max-threshold."; + } + + leaf max-threshold-percent { + type uint64; + units oc-types:percentage; + description + "The maximum threshold parameter for a RED-managed queue in percent. + When the average queue length exceeds the maxth value, all packets + are dropped (or marked if ECN is enabled). Mutually exclusive with + min-threshold and max-threshold."; } leaf enable-ecn { @@ -304,7 +415,10 @@ submodule openconfig-qos-mem-mgmt { The previous average is more important for high values of n. Peaks and lows in queue size are smoothed by a high value. For low values - of n, the average queue size is close to the current queue size."; + of n, the average queue size is close to the current queue size. + + When this leaf is not present, implementation default value is + applied."; } leaf max-drop-probability-percent { diff --git a/release/models/qos/openconfig-qos.yang b/release/models/qos/openconfig-qos.yang index 9f9b5f498..9feb9b3ba 100644 --- a/release/models/qos/openconfig-qos.yang +++ b/release/models/qos/openconfig-qos.yang @@ -27,7 +27,68 @@ module openconfig-qos { "This module defines configuration and operational state data related to network quality-of-service."; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "0.11.2"; + + revision "2023-10-13" { + description + "Fix revision statement date"; + reference "0.11.2"; + } + + revision "2023-10-08" { + description + "Clarification on WRED weight in case it is not present"; + reference "0.11.1"; + } + + revision "2023-09-15" { + description + "Add support for ECN counters"; + reference "0.11.0"; + } + +revision "2023-07-26" { + description + "Add buffer management parameters in time unts (microseconds). + Make profiles reusable across LAGs and PHY of different speed"; + reference "0.10.0"; + } + + revision "2023-04-25" { + description + "Clarify interface-ref usage."; + reference "0.9.1"; + } + + revision "2023-04-17" { + description + "Add support for relative RED min-threshold and max-threshold values."; + reference "0.9.0"; + } + + revision "2023-02-17" { + description + "Add queue identifier."; + reference "0.8.0"; + } + + revision "2023-02-08" { + description + "Remove incorrect output placement of interface-ref"; + reference "0.7.0"; + } + + revision "2023-01-28" { + description + "Split groupings in interfaces for better leaf reuse."; + reference "0.6.1"; + } + + revision "2022-09-13" { + description + "Add queue octet drop counter."; + reference "0.6.0"; + } revision "2021-08-28" { description diff --git a/release/models/relay-agent/openconfig-relay-agent.yang b/release/models/relay-agent/openconfig-relay-agent.yang index f2f6181aa..22889af66 100644 --- a/release/models/relay-agent/openconfig-relay-agent.yang +++ b/release/models/relay-agent/openconfig-relay-agent.yang @@ -27,7 +27,13 @@ module openconfig-relay-agent { packets. The supports both DHCP and DHCPv6 and device-wide and per-interface settings."; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "0.1.2"; + + revision "2023-02-06" { + description + "Clarify usage of interface-ref."; + reference "0.1.2"; + } revision "2018-11-21" { description @@ -87,7 +93,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -164,7 +169,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -282,7 +286,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -312,7 +315,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -377,7 +379,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -422,7 +423,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -678,7 +678,12 @@ module openconfig-relay-agent { key "id"; description "List of interfaces on which the relay agent is - configured."; + configured. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf id { type leafref { @@ -696,7 +701,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -766,7 +770,12 @@ module openconfig-relay-agent { key "id"; description "List of interfaces on which the relay agent is - configured."; + configured. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf id { type leafref { @@ -784,7 +793,6 @@ module openconfig-relay-agent { } container state { - config false; description @@ -822,4 +830,4 @@ module openconfig-relay-agent { // augment statements -} \ No newline at end of file +} diff --git a/release/models/rib/openconfig-rib-bgp-attributes.yang b/release/models/rib/openconfig-rib-bgp-attributes.yang index e0be6cf64..3dbb0cc40 100644 --- a/release/models/rib/openconfig-rib-bgp-attributes.yang +++ b/release/models/rib/openconfig-rib-bgp-attributes.yang @@ -24,7 +24,25 @@ submodule openconfig-rib-bgp-attributes { attributes for use in BGP RIB tables."; - oc-ext:openconfig-version "0.7.0"; + oc-ext:openconfig-version "0.9.0"; + + revision "2022-12-20" { + description + "Convert as-segment and as4-segment to keyed lists."; + reference "0.9.0"; + } + + revision "2022-06-06" { + description + "Revert IETF types in favor of oc-inet types"; + reference "0.8.1"; + } + + revision "2021-06-21" { + description + "Add L2VPN-EVPN BGP RIB Support"; + reference "0.8.0"; + } revision "2019-10-15" { description @@ -69,6 +87,16 @@ submodule openconfig-rib-bgp-attributes { description "Data for representing BGP AS-PATH attribute"; + leaf index { + type uint32; + description + "A unique ordering index starting from 0 identifying the position of + the AS-PATH segment in the list of segments. + + The index MUST start from 0 and end at (length-1), where length is the + number of segments in the list of AS-PATH segments."; + } + leaf type { type oc-bgpt:as-path-segment-type; description @@ -87,6 +115,7 @@ submodule openconfig-rib-bgp-attributes { "Top-level grouping for AS-PATH attribute data"; container as-path { + oc-ext:telemetry-atomic; description "Enclosing container for the list of AS path segments. @@ -105,8 +134,19 @@ submodule openconfig-rib-bgp-attributes { RFC 5065 - Autonomous System Confederations for BGP"; list as-segment { + key "index"; + description - "Unkeyed list of AS PATH segments"; + "List of AS-PATH segments"; + + leaf index { + type leafref { + path "../state/index"; + } + description + "Reference to the unique ordering index starting from 0 identifying + the position of the AS-PATH segment in the list of segments."; + } container state { config false; @@ -124,6 +164,7 @@ submodule openconfig-rib-bgp-attributes { "Top-level grouping for AS4-PATH attribute data"; container as4-path { + oc-ext:telemetry-atomic; description "This is the path encoded with 4-octet AS numbers in the optional transitive AS4_PATH attribute. @@ -136,13 +177,24 @@ submodule openconfig-rib-bgp-attributes { "RFC 6793 - BGP Support for Four-octet AS Number Space"; list as4-segment { + key "index"; + description - "Unkeyed list of AS PATH segments"; + "List of AS4-PATH segments"; + + leaf index { + type leafref { + path "../state/index"; + } + description + "Reference to the unique ordering index starting from 0 identifying + the position of the AS4-PATH segment in the list of segments."; + } container state { config false; description - "Opstate data for AS-PATH segments"; + "Opstate data for AS4-PATH segments"; uses bgp-as-path-attr-state; } diff --git a/release/models/rib/openconfig-rib-bgp-shared-attributes.yang b/release/models/rib/openconfig-rib-bgp-shared-attributes.yang index 27df103ff..80b20c718 100644 --- a/release/models/rib/openconfig-rib-bgp-shared-attributes.yang +++ b/release/models/rib/openconfig-rib-bgp-shared-attributes.yang @@ -21,7 +21,25 @@ submodule openconfig-rib-bgp-shared-attributes { "This submodule contains structural data definitions for attribute sets shared across routes."; - oc-ext:openconfig-version "0.7.0"; + oc-ext:openconfig-version "0.9.0"; + + revision "2022-12-20" { + description + "Convert as-segment and as4-segment to keyed lists."; + reference "0.9.0"; + } + + revision "2022-06-06" { + description + "Revert IETF types in favor of oc-inet types"; + reference "0.8.1"; + } + + revision "2021-06-21" { + description + "Add L2VPN-EVPN BGP RIB Support"; + reference "0.8.0"; + } revision "2019-10-15" { description diff --git a/release/models/rib/openconfig-rib-bgp-table-attributes.yang b/release/models/rib/openconfig-rib-bgp-table-attributes.yang index ec1c73890..b2164e56a 100644 --- a/release/models/rib/openconfig-rib-bgp-table-attributes.yang +++ b/release/models/rib/openconfig-rib-bgp-table-attributes.yang @@ -21,7 +21,31 @@ submodule openconfig-rib-bgp-table-attributes { "This submodule contains common data definitions for data related to a RIB entry, or RIB table."; - oc-ext:openconfig-version "0.6.0"; + oc-ext:openconfig-version "0.9.0"; + + revision "2022-12-20" { + description + "Convert as-segment and as4-segment to keyed lists."; + reference "0.9.0"; + } + + revision "2022-06-06" { + description + "Revert IETF types in favor of oc-inet types"; + reference "0.8.1"; + } + + revision "2021-06-21" { + description + "Add L2VPN-EVPN BGP RIB Support"; + reference "0.8.0"; + } + + revision "2019-10-15" { + description + "Change imported segment-routing module."; + reference "0.7.0"; + } revision "2019-04-25" { description @@ -134,4 +158,4 @@ submodule openconfig-rib-bgp-table-attributes { } -} \ No newline at end of file +} diff --git a/release/models/rib/openconfig-rib-bgp-tables.yang b/release/models/rib/openconfig-rib-bgp-tables.yang index 4d9875b67..268c9cd20 100644 --- a/release/models/rib/openconfig-rib-bgp-tables.yang +++ b/release/models/rib/openconfig-rib-bgp-tables.yang @@ -7,9 +7,14 @@ submodule openconfig-rib-bgp-tables { // import some basic types import openconfig-inet-types { prefix oc-inet; } + import openconfig-yang-types { prefix oc-yang; } import openconfig-extensions { prefix oc-ext; } import openconfig-policy-types { prefix oc-pol-types; } + import openconfig-network-instance-types { prefix oc-ni-types; } + import openconfig-evpn-types { prefix oc-evpn-types; } + import openconfig-bgp-types { prefix oc-bgpt; } + include openconfig-rib-bgp-attributes; include openconfig-rib-bgp-shared-attributes; include openconfig-rib-bgp-table-attributes; @@ -25,7 +30,25 @@ submodule openconfig-rib-bgp-tables { "This submodule contains structural data definitions for BGP routing tables."; - oc-ext:openconfig-version "0.7.0"; + oc-ext:openconfig-version "0.9.0"; + + revision "2022-12-20" { + description + "Convert as-segment and as4-segment to keyed lists."; + reference "0.9.0"; + } + + revision "2022-06-06" { + description + "Revert IETF types in favor of oc-inet types"; + reference "0.8.1"; + } + + revision "2021-06-21" { + description + "Add L2VPN-EVPN BGP RIB Support"; + reference "0.8.0"; + } revision "2019-10-15" { description @@ -311,6 +334,826 @@ submodule openconfig-rib-bgp-tables { } } + grouping l2vpn-evpn-loc-rib-top { + description + "Top-level grouping for L2VPN EVPN routing tables"; + + container loc-rib { + config false; + description + "Container for the L2VPN EVPN BGP LOC-RIB data"; + + uses bgp-common-table-attrs-top; + + container routes { + description + "Enclosing container for list of routes in the routing + table."; + + list route-distinguisher { + description "List of route distinguishers"; + key "route-distinguisher"; + + leaf route-distinguisher { + type leafref { + path "../state/route-distinguisher"; + } + description + "An EVPN instance requires a Route Distinguisher (RD) that is + unique per MAC-VRF"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + container state { + description "Top level container for L2VPN EVPN RDs"; + leaf route-distinguisher { + type oc-ni-types:route-distinguisher; + description + "Route Distinguisher for all supported EVPN route types"; + } + } + uses bgp-evpn-type-one-state; + uses bgp-evpn-type-two-state; + uses bgp-evpn-type-three-state; + uses bgp-evpn-type-four-state; + uses bgp-evpn-type-five-state; + } + } + } + } + + grouping bgp-loc-rib-l2vpn-evpn-attr-refs { + description + "Definitions of common references to attribute sets for + multiple AFI-SAFIs for LOC-RIB tables"; + + leaf attr-index { + type leafref { + path "../../../../../../../../../../../../attr-sets/attr-set/" + + "state/index"; + } + description + "Reference to the common attribute group for the + route"; + } + + leaf community-index { + type leafref { + path "../../../../../../../../../../../../communities/community/" + + "state/index"; + } + description + "Reference to the community attribute for the route"; + } + + leaf ext-community-index { + type leafref { + path "../../../../../../../../../../../../ext-communities/" + + "ext-community/state/index"; + } + description + "Reference to the extended community attribute for the + route"; + } + } + + grouping bgp-evpn-route-path-common-state { + description + "Grouping for BGP L2VPN EVPN route-type common path state information"; + + container paths { + description "List of BGP path attributes for this route"; + + list path { + description "List of paths"; + key "peer-ip peer-path-id source-route-distinguisher source-address-family"; + + uses bgp-evpn-route-path-lefref-common; + + container state { + description "BGP path attributes for this route"; + + uses bgp-evpn-route-path-keys-common; + uses bgp-evpn-route-path-attributes-common; + } + + uses bgp-unknown-attr-top; + + } + } + } + + grouping bgp-evpn-route-path-type2-state { + description + "Grouping for BGP L2VPN EVPN route-type path state information for + route type 2"; + + container paths { + description "List of BGP path attributes for this route"; + + list path { + description "List of paths"; + key "peer-ip peer-path-id source-route-distinguisher source-address-family"; + + uses bgp-evpn-route-path-lefref-common; + + container state { + description "BGP path attributes for this route"; + + uses bgp-evpn-route-path-keys-common; + + leaf esi { + type oc-evpn-types:esi; + description + "The Ethernet Segment Identifier (ESI) identifying the ethernet + segment for this route"; + } + + uses bgp-evpn-route-path-attributes-common; + } + + uses bgp-unknown-attr-top; + + } + } + } + + grouping bgp-evpn-route-path-type5-state { + description + "Grouping for BGP L2VPN EVPN route-type path state information for + route type 5"; + + container paths { + description "List of BGP path attributes for this route"; + + list path { + description "List of paths"; + key "peer-ip peer-path-id source-route-distinguisher source-address-family"; + + uses bgp-evpn-route-path-lefref-common; + + container state { + description "BGP path attributes for this route"; + + leaf esi { + type oc-evpn-types:esi; + description + "The Ethernet Segment Identifier (ESI) identifying the ethernet + segment for this route"; + } + + leaf gateway-ip-address { + type oc-inet:ip-prefix; + description + "The gateway-ip-address for the route"; + } + + uses bgp-evpn-route-path-keys-common; + uses bgp-evpn-route-path-attributes-common; + } + + uses bgp-unknown-attr-top; + + } + } + } + + grouping bgp-evpn-route-path-lefref-common { + description "Common BGP L2VPN EVPN Path Leaf References"; + + leaf peer-ip { + type leafref { + path "../state/peer-ip"; + } + description "The source peer ip address of the imported route"; + } + + leaf peer-path-id { + type leafref { + path "../state/peer-path-id"; + } + description "The source peer path id of the imported route"; + } + + leaf source-route-distinguisher { + type leafref { + path "../state/source-route-distinguisher"; + } + description + "The source route distinguisher is the remote RD source of the + imported route"; + } + + leaf source-address-family { + type leafref { + path "../state/source-address-family"; + } + description "The source address-family of the imported route"; + } + } + + grouping bgp-evpn-route-path-keys-common { + description "Common BGP L2VPN EVPN Path Keys"; + + leaf peer-ip { + type oc-inet:ip-address; + description + "The source peer ip address of the imported route"; + } + + leaf peer-path-id { + type uint32; + description "The source peer path id of the imported route"; + } + + leaf source-route-distinguisher { + type oc-ni-types:route-distinguisher; + description + "The source route distinguisher is the remote RD source of the + imported route"; + } + + leaf source-address-family { + type identityref { + base oc-bgpt:AFI_SAFI_TYPE; + } + description "The source address-family of the imported route"; + } + } + + grouping bgp-evpn-route-path-attributes-common { + description "Common BGP L2VPN EVPN Path Attributes"; + + leaf-list advertised-to-peer { + type oc-inet:ip-address; + description "List of peers to which this path is advertised"; + } + + leaf label { + type string; + description + "MPLS Label field used for route attributes"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf label2 { + type string; + description "MPLS Label2 field used for route attributes"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf bestpath { + type boolean; + description + "BGP can receive multiple paths to the same destination. This + parameter indicates that this path is the bestpath to install + in the IP routing table and use for traffic forwarding"; + } + + leaf multipath { + type boolean; + description + "BGP can use multiple paths to reach a destination allowing + BGP to load-balance traffic. This parameter indicates that this + path is marked as multipath"; + } + + leaf backup { + type boolean; + description "BGP path marked as a backup path"; + } + + uses bgp-common-route-annotations-state; + uses bgp-loc-rib-l2vpn-evpn-attr-refs; + } + + grouping bgp-evpn-type-one-key-refs { + description + "Key references to support operational state structure for + BGP EVPN Ethernet Auto-discovery routes. + + For the purpose of BGP route key processing, only the Ethernet Segment + Identifier and Ethernet Tag ID are considered to be part of the prefix in + the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + + leaf esi { + type leafref { + path "../state/esi"; + } + description + "The Ethernet Segment Identifier (ESI) is a unique non-zero + identifier that identifies an Ethernet segment"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf ethernet-tag { + type leafref { + path "../state/ethernet-tag"; + } + description + "The Ethernet tag identifies a particular broadcast domain. An EVPN + instance consists of one or more broadcast domains"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + } + + grouping bgp-evpn-type-one-state { + description "Grouping for BGP EVPN Ethernet Auto-discovery routes"; + container type-one-ethernet-auto-discovery { + description "Top level container BGP EVPN Ethernet Auto-discovery routes"; + list type-one-route { + key "esi ethernet-tag"; + description + "List of BGP EVPN Ethernet Auto-discovery routes + + For the purpose of BGP route key processing, only the Ethernet Segment + Identifier and Ethernet Tag ID are considered to be part of the prefix in + the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + uses bgp-evpn-type-one-key-refs; + + container state { + description + "Operational state data for BGP EVPN Ethernet Auto-discovery route + entries in the BGP LOC-RIB"; + + leaf esi { + type oc-evpn-types:esi; + description + "The Ethernet Segment Identifier (ESI) identifying the ethernet + segment for this route"; + } + + leaf ethernet-tag { + type oc-evpn-types:ethernet-tag; + description + "The Ethernet tag identifying the broadcast domain for this + route"; + } + + uses bgp-loc-rib-attr-state; + uses bgp-loc-rib-route-annotations-state; + } + + uses bgp-evpn-route-path-common-state; + } + } + } + + grouping bgp-evpn-type-two-key-refs { + description + "Key references to support operational state structure for + MAC_IP Advertisement routes. + + For the purpose of BGP route key processing, only the Ethernet Tag ID, + MAC Address Length, MAC Address, IP Address Length, and IP Address fields + are considered to be part of the prefix in the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + leaf ethernet-tag { + type leafref { + path "../state/ethernet-tag"; + } + description + "The Ethernet tag identifies a particular broadcast domain. An EVPN + instance consists of one or more broadcast domains"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf mac-address { + type leafref { + path "../state/mac-address"; + } + description + "The PEs forward packets that they receive based on the destination + MAC address"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf mac-length { + type leafref { + path "../state/mac-length"; + } + description + "The MAC Address Length for the MAC address defined in mac-address"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf ip-prefix { + type leafref { + path "../state/ip-prefix"; + } + description + "The IPv4 or IPv6 address carried in a MAC_IP Advertisement route"; + } + + leaf ip-length { + type leafref { + path "../state/ip-length"; + } + description + "The IPv4 or IPv6 address prefix length for the address defined in + ip-prefix"; + } + } + + grouping bgp-evpn-type-two-state { + description "Grouping for MAC_IP Advertisement L2VPN EVPN routes"; + container type-two-mac-ip-advertisement { + description + "Top level container for MAC_IP Advertisement L2VPN EVPN routes"; + list type-two-route { + key "ethernet-tag mac-address mac-length ip-prefix ip-length"; + description + "List of MAC_IP Advertisement L2VPN EVPN routes + + For the purpose of BGP route key processing, only the Ethernet Tag ID, + MAC Address Length, MAC Address, IP Address Length, and IP Address fields + are considered to be part of the prefix in the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + uses bgp-evpn-type-two-key-refs; + + container state { + description + "Operational state data MAC_IP Advertisement L2VPN EVPN route + entries in the BGP LOC-RIB"; + + leaf ethernet-tag { + type oc-evpn-types:ethernet-tag; + description + "The Ethernet tag identifying the broadcast domain for this + route"; + } + + leaf mac-address { + type oc-yang:mac-address; + description + "The MAC address that is learned on a PE from a CE that is + connected to it or learned from other PEs"; + } + + leaf mac-length { + type uint32; + description + "The MAC address length for the mac-address"; + } + + leaf ip-prefix { + type oc-inet:ip-prefix; + description + "The IP address for end-host reachability information"; + } + + leaf ip-length { + type uint32; + description + "The ip-prefix length for the IP address specified by ip-prefix"; + } + + uses bgp-loc-rib-attr-state; + uses bgp-loc-rib-route-annotations-state; + } + + uses bgp-evpn-route-path-type2-state; + } + } + } + + grouping bgp-evpn-type-three-key-refs { + description + "Key references to support operational state structure for Inclusive + Multicast Ethernet Tag routes. + + For the purpose of BGP route key processing, only the Ethernet Tag ID, + IP Address Length, and Originating Router's IP Address fields are + considered to be part of the prefix in the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + leaf ethernet-tag { + type leafref { + path "../state/ethernet-tag"; + } + description + "The Ethernet tag identifies a particular broadcast domain. An EVPN + instance consists of one or more broadcast domains"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf originating-router-ip { + type leafref { + path "../state/originating-router-ip"; + } + description + "Reference to the originating-router-ip list key"; + } + + leaf originator-ip-length { + type leafref { + path "../state/originator-ip-length"; + } + description + "Reference to the originating router ip length list key"; + } + } + + grouping bgp-evpn-type-three-state { + description + "Grouping for Inclusive Multicast Ethernet Tag L2VPN EVPN routes"; + container type-three-inclusive-multicast-ethernet-tag { + description + "Top level container for Inclusive Multicast Ethernet Tag L2VPN EVPN + routes"; + + list type-three-route { + key "ethernet-tag originating-router-ip originator-ip-length"; + description + "List of Inclusive Multicast Ethernet Tag L2VPN EVPN routes + + For the purpose of BGP route key processing, only the Ethernet Tag ID, + IP Address Length, and Originating Router's IP Address fields are + considered to be part of the prefix in the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + uses bgp-evpn-type-three-key-refs; + + container state { + description + "Operational state data for Inclusive Multicast Ethernet Tag L2VPN + EVPN entries in the BGP LOC-RIB"; + + leaf ethernet-tag { + type oc-evpn-types:ethernet-tag; + description + "The Ethernet tag identifying the broadcast domain for this + route"; + } + + leaf originating-router-ip { + type oc-inet:ip-prefix; + description + "The Originating Router's IP Address"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf originator-ip-length { + type uint32; + description + "The ip-prefix length for the route"; + } + + uses bgp-loc-rib-attr-state; + uses bgp-loc-rib-route-annotations-state; + } + + uses bgp-evpn-route-path-common-state; + } + } + } + + grouping bgp-evpn-type-four-key-refs { + description + "Key references to support operational state structure for Ethernet + Segment routes. + + For the purpose of BGP route key processing, only the Ethernet Segment ID, + IP Address Length, and Originating Router's IP Address fields are + considered to be part of the prefix in the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + leaf esi { + type leafref { + path "../state/esi"; + } + description + "The Ethernet Segment Identifier (ESI) is a unique non-zero + identifier that identifies an Ethernet segment"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf originating-router-ip { + type leafref { + path "../state/originating-router-ip"; + } + description + "Reference to the ip-prefix list key"; + } + + leaf originator-ip-length { + type leafref { + path "../state/originator-ip-length"; + } + description + "Reference to the ip-length list key"; + } + } + + grouping bgp-evpn-type-four-state { + description "Grouping for Ethernet Segment L2VPN EVPN routes"; + container type-four-ethernet-segment { + description "Top level container for Ethernet Segment L2VPN EVPN routes"; + + list type-four-route { + key "esi originating-router-ip originator-ip-length"; + description + "List of Ethernet Segment L2VPN EVPN routes + + For the purpose of BGP route key processing, only the Ethernet Segment ID, + IP Address Length, and Originating Router's IP Address fields are + considered to be part of the prefix in the NLRI"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + + uses bgp-evpn-type-four-key-refs; + + container state { + description + "Operational state data for Ethernet Segment L2VPN EVPN route + entries in the BGP LOC-RIB"; + + leaf esi { + type oc-evpn-types:esi; + description + "The Ethernet Segment Identifier (ESI) identifying the ethernet + segment for this route"; + } + + leaf originating-router-ip { + type oc-inet:ip-prefix; + description + "The originating router ip"; + } + + leaf originator-ip-length { + type uint32; + description + "The originating router ip length"; + } + + uses bgp-loc-rib-attr-state; + uses bgp-loc-rib-route-annotations-state; + + } + + uses bgp-evpn-route-path-common-state; + } + } + } + + grouping bgp-evpn-type-five-key-refs { + description + "Key references to support operational state structure for IP Prefix + Advertisement routes. + + For the purpose of BGP route key processing, only The RD, Ethernet Tag ID, + IP prefix length, and IP prefix are part of the route key used by BGP to + compare routes"; + reference "RFC9136: IP Prefix Advertisement in Ethernet VPN (EVPN)"; + + leaf ethernet-tag { + type leafref { + path "../state/ethernet-tag"; + } + description + "The Ethernet tag identifies a particular broadcast domain. An EVPN + instance consists of one or more broadcast domains"; + reference "RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + leaf ip-prefix-length { + type leafref { + path "../state/ip-prefix-length"; + } + description + "Reference to the ip-prefix-length list key"; + } + + leaf ip-prefix { + type leafref { + path "../state/ip-prefix"; + } + description + "Reference to the ip-prefix list key"; + } + } + + grouping bgp-evpn-type-five-state { + description "Grouping for IP Prefix Advertisement L2VPN EVPN routes"; + container type-five-ip-prefix { + description + "Top level container for IP Prefix Advertisement L2VPN EVPN routes"; + list type-five-route { + key "ethernet-tag ip-prefix-length ip-prefix"; + description + "List of IP Prefix Advertisement L2VPN EVPN routes + + For the purpose of BGP route key processing, only The RD, Ethernet Tag ID, + IP prefix length, and IP prefix are part of the route key used by BGP to + compare routes"; + reference "RFC9136: IP Prefix Advertisement in Ethernet VPN (EVPN)"; + + uses bgp-evpn-type-five-key-refs; + + container state { + description + "Operational state data for IP Prefix Advertisement L2VPN EVPN + route entries in the BGP LOC-RIB"; + + leaf ethernet-tag { + type oc-evpn-types:ethernet-tag; + description + "The Ethernet tag identifying the broadcast domain for this + route"; + } + + leaf ip-prefix-length { + type string; + description + "The ip-prefix length for the route"; + } + + leaf ip-prefix { + type oc-inet:ip-prefix; + description + "The ip-prefix for the route"; + } + + uses bgp-loc-rib-attr-state; + uses bgp-loc-rib-route-annotations-state; + } + + uses bgp-evpn-route-path-type5-state; + } + } + } + + grouping l2vpn-evpn-adj-rib-top { + description + "Top-level grouping for L2VPN-EVPN Adj-RIB table"; + + container neighbors { + config false; + description + "Enclosing container for neighbor list"; + + list neighbor { + key "neighbor-address"; + description + "List of neighbors (peers) of the local BGP speaker"; + + leaf neighbor-address { + type leafref { + path "../state/neighbor-address"; + } + description + "Reference to the list key"; + } + + container state { + description + "Operational state for each neighbor BGP Adj-RIB"; + + leaf neighbor-address { + type oc-inet:ip-address; + description + "IP address of the BGP neighbor or peer"; + } + } + + container adj-rib-in-pre { + description + "Per-neighbor table containing the NLRI updates + received from the neighbor before any local input + policy rules or filters have been applied. This can + be considered the 'raw' updates from the neighbor."; + } + + container adj-rib-in-post { + description + "Per-neighbor table containing the paths received from + the neighbor that are eligible for best-path selection + after local input policy rules have been applied."; + } + + container adj-rib-out-pre { + description + "Per-neighbor table containing paths eligble for + sending (advertising) to the neighbor before output + policy rules have been applied"; + } + + container adj-rib-out-post { + description + "Per-neighbor table containing paths eligble for + sending (advertising) to the neighbor after output + policy rules have been applied"; + } + } + } + } + grouping bgp-adj-rib-key-refs { description "Key references to support operational state structure for diff --git a/release/models/rib/openconfig-rib-bgp.yang b/release/models/rib/openconfig-rib-bgp.yang index 8920fcf18..8e93838e0 100644 --- a/release/models/rib/openconfig-rib-bgp.yang +++ b/release/models/rib/openconfig-rib-bgp.yang @@ -67,7 +67,25 @@ module openconfig-rib-bgp { eligible for sending (advertising) to the neighbor after output policy rules have been applied."; - oc-ext:openconfig-version "0.7.0"; + oc-ext:openconfig-version "0.9.0"; + + revision "2022-12-20" { + description + "Convert as-segment and as4-segment to keyed lists."; + reference "0.9.0"; + } + + revision "2022-06-06" { + description + "Revert IETF types in favor of oc-inet types"; + reference "0.8.1"; + } + + revision "2021-06-21" { + description + "Add L2VPN-EVPN BGP RIB Support"; + reference "0.8.0"; + } revision "2019-10-15" { description @@ -222,6 +240,19 @@ module openconfig-rib-bgp { uses ipvX-srte-policy-locrib-top; uses ipvX-srte-policy-adjrib-top; } + + container l2vpn-evpn { + when "../afi-safi-name = 'oc-bgpt:L2VPN_EVPN'" { + description + "Include this container for l2vpn evpn route-types"; + } + description + "Routing tables for l2vpn evpn -- active when the + afi-safi name is l2vpn-evpn"; + + uses l2vpn-evpn-loc-rib-top; + uses l2vpn-evpn-adj-rib-top; + } } } } diff --git a/release/models/sampling/.spec.yml b/release/models/sampling/.spec.yml index c861a3d96..d299fbc2b 100644 --- a/release/models/sampling/.spec.yml +++ b/release/models/sampling/.spec.yml @@ -1,6 +1,8 @@ - name: openconfig-sampling docs: + - yang/sampling/openconfig-sampling.yang - yang/sampling/openconfig-sampling-sflow.yang build: + - yang/sampling/openconfig-sampling.yang - yang/sampling/openconfig-sampling-sflow.yang run-ci: true diff --git a/release/models/sampling/openconfig-sampling-sflow.yang b/release/models/sampling/openconfig-sampling-sflow.yang index 761f8b4a4..e7d078d37 100644 --- a/release/models/sampling/openconfig-sampling-sflow.yang +++ b/release/models/sampling/openconfig-sampling-sflow.yang @@ -13,6 +13,7 @@ module openconfig-sampling-sflow { import openconfig-interfaces { prefix oc-if; } import openconfig-yang-types { prefix oc-yang; } import openconfig-network-instance { prefix oc-netinst; } + import openconfig-sampling { prefix oc-sampling; } // meta @@ -29,7 +30,14 @@ module openconfig-sampling-sflow { RFC 3176 - InMon Corporation's sFlow: A Method for Monitoring Traffic in Switched and Routed Networks"; - oc-ext:openconfig-version "0.1.0"; + revision "2022-06-21" { + description + "Add agent-id/source-address for IPv4/IPv6; add polling-interval; + add global dscp marking for generated packets; moved sampling-rate + to ingress/egress; moved top-level sampling container to separate + module;"; + reference "1.0.0"; + } revision "2020-06-26" { description @@ -37,6 +45,7 @@ module openconfig-sampling-sflow { reference "0.1.0"; } + oc-ext:openconfig-version "1.0.0"; grouping sflow-interfaces-config { description @@ -58,15 +67,8 @@ module openconfig-sampling-sflow { for a specific interface."; } - leaf sampling-rate { - type uint32; - description - "If sFlow is enabled on the interface, this leaf may be - used to override the global sampling rate for a specific - interface. The sampling rate semantics are the same as the - system-wide leaf."; - } - + uses sflow-polling-interval-config; + uses sflow-sampling-rate-config; } grouping sflow-interfaces-state { @@ -129,7 +131,7 @@ module openconfig-sampling-sflow { leaf address { type oc-inet:ip-address; description - "IP address of the sFlow collector."; + "IPv4/IPv6 address of the sFlow collector."; } leaf port { @@ -139,6 +141,13 @@ module openconfig-sampling-sflow { "UDP port number for the sFlow collector."; } + leaf source-address { + type oc-inet:ip-address; + description + "Sets the source IPv4/IPv6 address for sFlow datagrams sent + to sFlow collectors."; + } + leaf network-instance { type oc-netinst:network-instance-ref; description @@ -211,6 +220,49 @@ module openconfig-sampling-sflow { } } + grouping sflow-sampling-rate-config { + description + "Configuration data for sFlow sample rates"; + + leaf ingress-sampling-rate { + type uint32; + description + "Sets the ingress packet sampling rate. The rate is expressed + as an integer N, where the intended sampling rate is 1/N + packets. An implementation may implement the sampling rate as + a statistical average, rather than a strict periodic sampling. + + The allowable sampling rate range is generally a property of + the system, e.g., determined by the capability of the + hardware."; + } + + leaf egress-sampling-rate { + type uint32; + description + "Sets the egress packet sampling rate. The rate is expressed + as an integer N, where the intended sampling rate is 1/N + packets. An implementation may implement the sampling rate as + a statistical average, rather than a strict periodic sampling. + + The allowable sampling rate range is generally a property of + the system, e.g., determined by the capability of the + hardware."; + } + } + + grouping sflow-polling-interval-config { + description + "Configuration data for sFlow polling intervals"; + + leaf polling-interval { + type uint16; + units seconds; + description + "Sets the traffic sampling polling interval."; + } + } + grouping sflow-global-config { description "Configuration data for global sflow"; @@ -222,25 +274,29 @@ module openconfig-sampling-sflow { "Enables or disables sFlow sampling for the device."; } - leaf source-address { - type oc-inet:ip-address; + leaf agent-id-ipv4 { + type oc-inet:ipv4-address; description - "Sets the source IP address for sFlow datagrams sent to - sFlow collectors."; + "Sets the agent identifier for IPv4 PDUs."; + reference + "RFC 3176 - InMon Corporation's sFlow: A Method for + Monitoring Traffic in Switched and Routed Networks"; } - leaf sampling-rate { - type uint32; + leaf agent-id-ipv6 { + type oc-inet:ipv6-address; description - "Sets the global packet sampling rate. The rate is - is expressed as an integer N, where the intended sampling - rate is 1/N packets. An implementation may implement the - sampling rate as a statistical average, rather than a strict - periodic sampling. - - The allowable sampling rate range is generally a - property of the system, e.g., determined by the - capability of the hardware."; + "Sets the agent identifier for IPv6 PDUs."; + reference + "RFC 3176 - InMon Corporation's sFlow: A Method for + Monitoring Traffic in Switched and Routed Networks"; + } + + leaf dscp { + type oc-inet:dscp; + description + "DSCP marking of packets generated by the sFlow subsystem + on the network device."; } leaf sample-size { @@ -254,6 +310,9 @@ module openconfig-sampling-sflow { "RFC 3176 - InMon Corporation's sFlow: A Method for Monitoring Traffic in Switched and Routed Networks"; } + + uses sflow-polling-interval-config; + uses sflow-sampling-rate-config; } grouping sflow-global-state { @@ -292,21 +351,11 @@ module openconfig-sampling-sflow { } } - grouping sampling-top { + augment "/oc-sampling:sampling" { description - "Top-level grouping for traffic sampling data."; + "Add sFlow configuration/state to the openconfig-sampling model."; - container sampling { - description - "Top-level container for data related to traffic sampling - protocols."; - - uses sflow-global-top; - } + uses sflow-global-top; } - // data definition statements - - uses sampling-top; - } diff --git a/release/models/sampling/openconfig-sampling.yang b/release/models/sampling/openconfig-sampling.yang new file mode 100644 index 000000000..d72f6646f --- /dev/null +++ b/release/models/sampling/openconfig-sampling.yang @@ -0,0 +1,44 @@ +module openconfig-sampling { + yang-version "1"; + namespace "http://openconfig.net/yang/sampling"; + prefix "oc-sampling"; + + import openconfig-extensions { + prefix oc-ext; + } + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines top-level configuration and operational + state data related to traffic sampling. + + For modularity purposes, the top-level sampling container provides + a natural attachment point for implementations such as sFlow, IPFix, + NETFLOW"; + + revision 2022-06-21 { + description + "Initial revision"; + reference "0.1.0"; + } + + oc-ext:openconfig-version "0.1.0"; + + grouping sampling-top { + description + "Top level sampling containers"; + + container sampling { + description + "Top-level container for sampling-related configuration and + operational state data"; + } + } + + uses sampling-top; +} diff --git a/release/models/segment-routing/openconfig-segment-routing.yang b/release/models/segment-routing/openconfig-segment-routing.yang index ebb931048..a687f0bfb 100644 --- a/release/models/segment-routing/openconfig-segment-routing.yang +++ b/release/models/segment-routing/openconfig-segment-routing.yang @@ -14,6 +14,7 @@ module openconfig-segment-routing { import ietf-yang-types { prefix "yang"; } import openconfig-segment-routing-types { prefix "oc-srt"; } import openconfig-srte-policy { prefix "oc-srte"; } + import openconfig-isis-types { prefix "oc-isis-types"; } // meta organization "OpenConfig working group"; @@ -35,7 +36,25 @@ module openconfig-segment-routing { - SR SID advertisements - instantiated within the relevant IGP. - SR-specific counters - instantied within the relevant dataplane."; - oc-ext:openconfig-version "0.3.1"; + oc-ext:openconfig-version "0.4.1"; + + revision "2023-08-09" { + description + "Update interface key to use interface-id type"; + reference "0.4.1"; + } + + revision "2023-05-24" { + description + "Add flex-algo model"; + reference "0.4.0"; + } + + revision "2023-02-06" { + description + "Clarify use of interface-ref."; + reference "0.3.2"; + } revision "2021-07-28" { description @@ -332,7 +351,12 @@ module openconfig-segment-routing { description "Parameters and MPLS-specific configuration relating to Segment - Routing on an interface."; + Routing on an interface. + + The interface referenced is based on the interface and + subinterface leaves within the interface-ref container - + which reference an entry in the /interfaces/interface list - + and should not rely on the value of the list key."; leaf interface-id { type leafref { @@ -431,7 +455,7 @@ module openconfig-segment-routing { "MPLS-specific Segment Routing configuration for an interface"; leaf interface-id { - type string; + type oc-if:interface-id; description "A unique identifier for the interface."; } @@ -545,6 +569,36 @@ module openconfig-segment-routing { } } + grouping flex-algo-binding-attributes { + description + "Attributes for Flexible Algorithm bindings"; + leaf flex-algo-id { + type uint8 { + range "128..255"; + } + description + "Flexible Algorithm identifier"; + } + leaf isis-level { + type oc-isis-types:level-type; + default "LEVEL_1_2"; + description + "IS-IS Level associated with this Flex Algorithm"; + } + leaf advertised { + type boolean; + default "false"; + description + "Indicates if the Flex Algorithm definition is advertised by this node"; + } + leaf participate { + type boolean; + default "false"; + description + "Indicates if the node participates in this Flex Algorithm"; + } + } + grouping sr-igp-top { description "Per-instance configuration and state parameters for Segment Routing @@ -568,6 +622,34 @@ module openconfig-segment-routing { IGP instance."; uses sr-igp-config; } + + container flex-algorithm-bindings { + description + "Flex Algorithm bindings"; + list flex-algorithm-binding { + key "flex-algo-id"; + description + "Flex Algorithm binding"; + leaf flex-algo-id { + type leafref { + path "../config/flex-algo-id"; + } + description + "Flex Algorithm identifier used by IGP"; + } + container config { + description + "Attributes of a FAD binding"; + uses flex-algo-binding-attributes; + } + container state { + config false; + description + "Attributes of a FAD binding"; + uses flex-algo-binding-attributes; + } + } + } } } @@ -676,6 +758,32 @@ module openconfig-segment-routing { } } + grouping sr-igp-interface-flex-algo-prefix-sid-config { + description + "Configuration parameters relating to an IGP prefix SID advertisement for + Flexible Algorithms"; + leaf prefix { + type inet:ip-prefix; + description + "The IP prefix for which the IGP prefix SID should be advertised. The + value specified is a local prefix on the interface which is advertised + into the IGP."; + } + leaf flex-algo-id { + type uint8 { + range "128..255"; + } + description + "Flexible Algorithm identifier for the prefix segment."; + } + leaf sid-id { + type oc-srt:sr-sid-type; + description + "The Segment Identifier to be used when advertising the IGP Prefix SID for + the Flexible Algorithm."; + } + } + grouping sr-igp-interface-top { description "Per-interface configuration and operational state relating to an @@ -725,6 +833,50 @@ module openconfig-segment-routing { } } + container flex-algo-prefix-sids { + description + "Configuration and operational state parameters relating to segment + routing flexible algorithm for an interface within the IGP."; + + list flex-algo-prefix-sid { + key "prefix flex-algo-id"; + + description + "IGP prefix segments allocated for Flexible Algorithms"; + + leaf prefix { + type leafref { + path "../config/prefix"; + } + description + "Reference to the prefix for which Flexible Algorithm Prefix SID is to be + advertised."; + } + + leaf flex-algo-id { + type leafref { + path "../config/flex-algo-id"; + } + description + "Reference to the Flexible Algorithm for which Flexible Algorithm Prefix + SID is to be advertised."; + } + + container config { + description + "Configuration parameters for the IGP Flexible Algorithm Prefix SID."; + uses sr-igp-interface-flex-algo-prefix-sid-config; + } + + container state { + config false; + description + "Operational state parameters for the IGP Flexible Algorithm Prefix SID."; + uses sr-igp-interface-flex-algo-prefix-sid-config; + } + } + } + container adjacency-sids { description "Configuration and operational state parameters relating to diff --git a/release/models/stp/.spec.yml b/release/models/stp/.spec.yml index c84de41dd..6b516c023 100644 --- a/release/models/stp/.spec.yml +++ b/release/models/stp/.spec.yml @@ -1,4 +1,4 @@ -- name: openconfig-stp +- name: openconfig-spanning-tree docs: - yang/stp/openconfig-spanning-tree-types.yang - yang/stp/openconfig-spanning-tree.yang diff --git a/release/models/system/.spec.yml b/release/models/system/.spec.yml index 3a8c0b185..92061e9bf 100644 --- a/release/models/system/.spec.yml +++ b/release/models/system/.spec.yml @@ -1,22 +1,46 @@ - name: openconfig-system docs: - - yang/system/openconfig-aaa-types.yang - - yang/system/openconfig-alarm-types.yang - - yang/system/openconfig-system.yang - - yang/system/openconfig-system-terminal.yang - - yang/system/openconfig-system-logging.yang - - yang/system/openconfig-procmon.yang + - yang/openflow/openconfig-openflow.yang - yang/system/openconfig-aaa.yang - - yang/system/openconfig-aaa-tacacs.yang - yang/system/openconfig-aaa-radius.yang + - yang/system/openconfig-aaa-tacacs.yang + - yang/system/openconfig-aaa-types.yang - yang/system/openconfig-alarms.yang - - yang/system/openconfig-messages.yang + - yang/system/openconfig-alarm-types.yang + - yang/system/openconfig-hashing.yang - yang/system/openconfig-license.yang + - yang/system/openconfig-procmon.yang + - yang/system/openconfig-system.yang + - yang/system/openconfig-system-bootz.yang + - yang/system/openconfig-system-controlplane.yang + - yang/system/openconfig-system-grpc.yang + - yang/system/openconfig-system-logging.yang + - yang/system/openconfig-system-terminal.yang + - yang/system/openconfig-system-utilization.yang + - yang/gnsi/openconfig-gnsi-acctz.yang + - yang/gnsi/openconfig-gnsi-authz.yang + - yang/gnsi/openconfig-gnsi-certz.yang + - yang/gnsi/openconfig-gnsi-credentialz.yang + - yang/gnsi/openconfig-gnsi-pathz.yang build: - yang/system/openconfig-system.yang + - yang/system/openconfig-system-utilization.yang run-ci: true - name: openconfig-system-ext build: - yang/system/openconfig-system.yang + - yang/system/openconfig-system-bootz.yang + - yang/system/openconfig-system-controlplane.yang - yang/system/openconfig-system-grpc.yang run-ci: true +- name: openconfig-messages + docs: + - yang/system/openconfig-messages.yang + build: + - yang/system/openconfig-messages.yang +- name: openconfig-hashing + docs: + - yang/system/openconfig-hashing.yang + build: + - yang/system/openconfig-hashing.yang + run-ci: true diff --git a/release/models/system/openconfig-aaa-radius.yang b/release/models/system/openconfig-aaa-radius.yang index 34449292a..7b1930df8 100644 --- a/release/models/system/openconfig-aaa-radius.yang +++ b/release/models/system/openconfig-aaa-radius.yang @@ -26,7 +26,13 @@ submodule openconfig-aaa-radius { related to the RADIUS protocol for authentication, authorization, and accounting."; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "1.0.0"; + + revision "2022-07-29" { + description + "Update user role to be mandatory."; + reference "1.0.0"; + } revision "2020-07-30" { description diff --git a/release/models/system/openconfig-aaa-tacacs.yang b/release/models/system/openconfig-aaa-tacacs.yang index 1b8bf88e8..d96bc0f07 100644 --- a/release/models/system/openconfig-aaa-tacacs.yang +++ b/release/models/system/openconfig-aaa-tacacs.yang @@ -25,7 +25,13 @@ submodule openconfig-aaa-tacacs { related to the TACACS+ protocol for authentication, authorization, and accounting."; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "1.0.0"; + + revision "2022-07-29" { + description + "Update user role to be mandatory."; + reference "1.0.0"; + } revision "2020-07-30" { description diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index d7c529c09..274c97e81 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -32,7 +32,13 @@ module openconfig-aaa { Portions of this model reuse data definitions or structure from RFC 7317 - A YANG Data Model for System Management"; - oc-ext:openconfig-version "0.5.0"; + oc-ext:openconfig-version "1.0.0"; + + revision "2022-07-29" { + description + "Update user role to be mandatory."; + reference "1.0.0"; + } revision "2020-07-30" { description @@ -396,10 +402,11 @@ module openconfig-aaa { base oc-aaa-types:SYSTEM_DEFINED_ROLES; } } + mandatory true; description - "Role assigned to the user. The role may be supplied - as a string or a role defined by the SYSTEM_DEFINED_ROLES - identity."; + "Role assigned to the user. The role must be supplied + as a role defined by the SYSTEM_DEFINED_ROLES + identity or a string that matches a user defined role."; } } diff --git a/release/models/system/openconfig-hashing.yang b/release/models/system/openconfig-hashing.yang new file mode 100644 index 000000000..e4480b22a --- /dev/null +++ b/release/models/system/openconfig-hashing.yang @@ -0,0 +1,366 @@ +module openconfig-hashing { + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/hashing"; + + prefix "oc-hashing"; + + // import some basic types + import openconfig-extensions { prefix oc-ext; } + import openconfig-system {prefix oc-sys;} + import openconfig-interfaces {prefix oc-intf;} + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "Model for managing hashing policies that would be referenced by the + interfaces model."; + + + oc-ext:openconfig-version "0.1.0"; + + revision "2023-08-08" { + description "Initial hashing model."; + reference "0.1.0"; + } + + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + grouping hashing-inputs { + description + "Top level container for inputs to be used for hashing policies."; + + leaf ingress-interface { + type boolean; + description + "Include the ingress subinterface identified in the + calculation of the hash."; + } + leaf ip-protocol-type { + type boolean; + description + "Include the IP protocol type in the calculation of the hash."; + } + } + + grouping ipv4-ipv6-inputs-top { + description + "The top level container for ipv4 and ipv6 header + fields used for the hash computation."; + + leaf src-addr { + type boolean; + description + "Use the source address in the calculation of the hash."; + } + + leaf dst-addr { + type boolean; + description + "Use the destination address in the calculation of the hash."; + } + + leaf src-port { + type boolean; + description + "Use the source port from the transport header in the calculation + of the hash."; + } + + leaf dst-port { + type boolean; + description + "Use the destination port from the transport header in the + calculation of the hash."; + } + } + + grouping ipv6-inputs-top { + description + "The top level container specifially for ipv6 header + fields used for the hash computation."; + + leaf flow-label { + type boolean; + description + "Use the flow label in the IPv6 header + to calculate the hash."; + } + } + + grouping hashing-policy-config { + description + "Configuration data for hashing policies."; + + leaf name { + type string; + description + "The name of the hashing policy. + When a configured user-controlled policy is created by the + system, it is instantiated with the same name in the + /system/hashing-policies/hashing-policy/name list."; + } + + leaf seed { + type uint64; + description + "The seed used to initialize the hash algorithm"; + } + + leaf algorithm { + type string; + description + "The name of hash algorithm. This algorithm MUST + be a supported algorithm"; + } + } + + grouping hashing-policy-top { + description + "Top level grouping for hashing configuration and operational state + data."; + + container hashing-policies { + description + "Top level container for hashing, including configuration and + state data."; + + list hashing-policy { + key "name"; + + description + "The list of named policies to be used on the device."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "References the name of the hashing policy."; + } + container config { + description + "Configurable items at the global hash policy level."; + + uses hashing-policy-config; + } + container state { + config false; + description + "Operational state data at the global hash policy + level."; + + uses hashing-policy-config; + } + + container hash-field-modes { + description + "Container for specifying inputs to be used when + calculating the hash."; + + container config { + description + "Configurable items at the hashing inputs level."; + uses hashing-inputs; + } + container state { + config false; + description + "Operational state data at the hashing + inputs level."; + uses hashing-inputs; + } + + container ipv4 { + description + "The IPv4 fields that should be used to + compute the hash."; + container config { + description + "Configurable data at the hashing + inputs level for IPv4."; + uses ipv4-ipv6-inputs-top; + } + + container state { + config false; + description + "Operational state data at the hashing + inputs level for IPv4."; + uses ipv4-ipv6-inputs-top; + } + } + + container ipv6 { + description + "The IPv6 fields that should be used to + compute the hash."; + + container config { + description + "Configurable data at the hashing + inputs level for IPv6."; + + uses ipv4-ipv6-inputs-top; + uses ipv6-inputs-top; + } + + container state { + config false; + description + "Operational state data at the hashing + inputs level for IPv6."; + + uses ipv4-ipv6-inputs-top; + uses ipv6-inputs-top; + } + } + } + } + } + } + + grouping supported-algorithms-state { + description + "Top-level container for the supported algorithms."; + leaf name { + type string; + description + "Name of the supported algorithm."; + } + leaf description { + type string; + description + "Description of the supported algorithm."; + } + } + grouping supported-algorithms-top { + description + "Top-level container of the supported algorithms for supported + algorithms. The list of algorithms are expected to be defined by + the target device."; + container algorithms { + description + "Container for vendor supported hashing algorithms."; + uses vendor-hashing-algorithms; + } + } + + grouping hashing-algo-top { + description + "Top level container of the supported algorithms for supported + algorithms."; + container hashing-algorithms { + config false; + description + "Container of the supported algorithms for supported + algorithms."; + list hashing-algorithm { + key "name"; + + description + "List of the supported algorithms for supported + algorithms."; + + leaf name { + type leafref { + path ../state/name; + } + description + "Reference to the supported algorithm list key."; + } + + container state { + description + "Operational data for the supported algorithm."; + config false; + + leaf name { + type string; + description + "Name of the supported algorithm."; + } + + leaf description { + type string; + description + "Description of the supported algorithm."; + } + } + } + } + } + + grouping vendor-hashing-algorithms { + description + "Supported hashing algorithms per vender."; + container vendor { + description + "Specify the vendor. Each vendor should have its own set of + supported algorithms. For each supported algorithm, a name + and a description should be defined. An implementation must + augment this model using the schema described in the + vendor_counter_guide reference. + + e.g. + augment /system/hashing/vendor { + container { + container { + uses hashing-algo-top; + } + } + }"; + reference + "https://github.com/openconfig/public/tree/master/doc/vendor_counter_guide.md"; + } + } + + grouping hashing-top { + description + "Top-level container for Hashing algorithms and hashing policies"; + container hashing { + description + "Container for Hashing algorithms and hashing policies"; + uses supported-algorithms-top; + uses hashing-policy-top; + } + } + + augment "/oc-sys:system" { + description + "Augment for Hashing algorithms and hashing policies"; + + uses hashing-top; + } + + augment "/oc-intf:interfaces/oc-intf:interface/oc-intf:config" { + description + "Augment for configuration data hashing policy on the interface."; + leaf hashing-policy { + type leafref { + path "/oc-sys:system/hashing/hashing-policies/hashing-policy/name"; + } + description "The configuration data hashing policy to be used when + hashing packets coming in on the interface."; + } + } + + augment "/oc-intf:interfaces/oc-intf:interface/oc-intf:state" { + description + "Augment for operational data hashing policy on the iinterface."; + leaf hashing-policy { + type leafref { + path "/oc-sys:system/hashing/hashing-policies/hashing-policy/name"; + } + description "The operational data hashing policy to be used when + hashing packets coming in on the interface."; + } + } +} \ No newline at end of file diff --git a/release/models/system/openconfig-messages.yang b/release/models/system/openconfig-messages.yang index 894704479..bfed7afd2 100644 --- a/release/models/system/openconfig-messages.yang +++ b/release/models/system/openconfig-messages.yang @@ -32,12 +32,18 @@ module openconfig-messages { /yang/system/openconfig-system.yang model, rather it provies the Operator with an alternative method of consuming messages."; - oc-ext:openconfig-version "0.0.1"; + oc-ext:openconfig-version "0.1.0"; + + revision 2024-07-15 { + description + "Remove unused top-level messages container."; + reference "0.1.0"; + } revision "2018-08-13" { - description - "Initial draft."; - reference "0.0.1"; + description + "Initial draft."; + reference "0.0.1"; } // identity statements @@ -217,5 +223,4 @@ module openconfig-messages { uses debug-messages-top; } } - uses messages-top; } diff --git a/release/models/system/openconfig-system-bootz.yang b/release/models/system/openconfig-system-bootz.yang new file mode 100644 index 000000000..58bba83c1 --- /dev/null +++ b/release/models/system/openconfig-system-bootz.yang @@ -0,0 +1,115 @@ +module openconfig-system-bootz { + yang-version "1"; + + namespace "http://openconfig.net/yang/system-bootz"; + prefix "oc-sys-bootz"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { prefix oc-sys; } + import openconfig-types { prefix oc-types; } + import openconfig-yang-types { prefix oc-yang; } + + organization + "OpenConfig working group"; + contact + "www.openconfig.net"; + + description + "This module adds configuration and operational state relating to bootz + service running on a network device."; + + + oc-ext:openconfig-version "1.0.0"; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + revision "2023-06-16" { + description + "Creation of bootz state paths needed for the service."; + reference "1.0.0"; + } + + grouping bootz-service-structural { + description + "Structural grouping for bootz service that can be enabled on + the system."; + + container bootz { + description + "Bootz protocol container for management of bootz protocol state."; + + container state { + config false; + description + "Operational state relating to the bootz service."; + uses bootz-state; + } + } + } + + grouping bootz-state { + description + "State parameters required to monitor bootz service."; + + leaf checksum { + type string; + default ""; + description + "The current checksum of the bootz protocol buffer. + + This value should refect the current sha-512 of the bootz + protocol buffer message BootstrapDataSigned. The protocol + buffer serialization must be done by tag value for each field + in the bootz protocol buffer. This will produce a + determintistic marshalled value which can be + checksummed."; + } + + leaf error-count { + type oc-yang:counter64; + description + "Total count of all bootz errors."; + } + + leaf status { + type enumeration { + enum BOOTZ_UNSPECIFIED; + enum BOOTZ_SENT; + enum BOOTZ_RECEIVED; + enum BOOTZ_CONFIGURATION_APPLIED; + enum BOOTZ_OK; + enum BOOTZ_OV_INVALID; + enum BOOTZ_OS_UPGRADE_IN_PROGRESS; + enum BOOTZ_OS_UPGRADE_COMPLETE; + enum BOOTZ_OS_INVALID_IMAGE; + enum BOOTZ_CONFIGURATION_INVALID; + } + description + "The status of the bootz service. + + The general sequence for the flow would be: + BOOTZ_UNSPECIFIED <- system initial state + BOOTZ_SENT <- bootz request sent + BOOTZ_RECEIVED <- bootz response received + BOOTZ_OS_UPGRADE_IN_PROGRESS <- (if needed) + BOOTZ_OS_UPGRADE_COMPLETE <- (if needed) + BOOTZ_CONFIGURATION_APPLIED <- bootz configuration applied + BOOTZ_OK <- bootz process successful + + If any error is encounter an error ENUM will be returned."; + } + + leaf last-boot-attempt { + type oc-types:timeticks64; + description + "The timestamp of the last bootz attempt."; + } + } + + augment "/oc-sys:system" { + description + "Add bootz service configuration to the openconfig-system model."; + + uses bootz-service-structural; + } +} diff --git a/release/models/system/openconfig-system-controlplane.yang b/release/models/system/openconfig-system-controlplane.yang new file mode 100644 index 000000000..c0adfd006 --- /dev/null +++ b/release/models/system/openconfig-system-controlplane.yang @@ -0,0 +1,374 @@ +module openconfig-system-controlplane { + yang-version "1"; + + namespace "http://openconfig.net/yang/system-controlplane"; + prefix "oc-sys-copp"; + + import openconfig-extensions { + prefix oc-ext; + } + import openconfig-system { + prefix oc-sys; + } + import openconfig-acl { + prefix oc-acl; + } + import openconfig-qos { + prefix oc-qos; + } + + organization + "OpenConfig working group"; + contact + "www.openconfig.net"; + + description + "This module adds configuration and operational state relating to + policies for traffic destined to the system's control-plane. + Particularly, it allows for mechanisms to: + - apply an ACL that forwards or drops traffic towards the control-plane. + - classify traffic that is destined to the control-plane according to + a QoS classifier. + - schedule traffic that has been forwarded towards the control-plane, + to allow for policies such as rate limits to be applied. + The configured policies apply generically to all control-planes that + exist within the system, and should be mapped to the internal interfaces + via which packets are forwarded to control-plane modules. + When a packet is received at an input interface - it is classified into a + forwarding group which drains to a specific queue. If this input mapping + is sufficient, the CPU-facing interface uses the specified scheduler + to determine how to drain queues. If more granular remapping is required + (e.g., to classify control-plane traffic more granularly), a user specifies + an alternate classifier that is used to reclassify traffic into + a new set of forwarding-groups (and hence queues) that can subsequently + be scheduled by the specified scheduler. + The specified control-plane ACL is applied to traffic received by the + control-plane of the system."; + + oc-ext:openconfig-version "0.2.0"; + oc-ext:catalog-organization "openconfig"; + oc-ext:origin "openconfig"; + + revision "2023-03-03" { + description + "Add missing state container to ACL."; + reference "0.2.0"; + } + + revision "2021-08-02" { + description + "Initial revision."; + reference "0.1.0"; + } + + grouping system-controlplane-top { + description + "Top-level structural grouping for control-plane traffic policies."; + + container control-plane-traffic { + description + "Policies and configuration relating to the traffic destined towards + the system control-plane."; + + container ingress { + description + "Control-plane traffic parameters relating to ingress traffic. + This refers to traffic that is being received by the system's + control plane from external-to-the-controlplane sources."; + + uses system-controlplane-acl-common-top; + + container qos { + description + "Configuration and operational state relating to QoS policies + that are applied to control-plane traffic."; + + container classifier { + description + "Configuration and state parameters relating to the QoS + classifier that is applied to control plane traffic. A QoS + classifier - defined in /qos/classifiers specifies how traffic + is mapped to QoS queues. The classifier specified in this + container and corresponding state allows for traffic towards + the control-plane to be classified."; + + container config { + description + "Configuration parameters relating to QoS classifier + applied to match control plane traffic."; + uses system-controlplane-qos-classifier-config; + } + + container state { + config false; + description + "Operational state parameters relating to the QoS classifier + applied to match control plane traffic."; + uses system-controlplane-qos-classifier-config; + } + + container terms { + config false; + description + "Operational state and counters relating to the classifier + applied to control-plane traffic."; + + list term { + key "id"; + + description + "A list of the terms within the QoS classifier being + applied for control-plane traffic. Each term has + corresponding operational state parameters."; + + leaf id { + type leafref { + path "../state/id"; + } + description + "Reference to the identifier for the classifier term."; + } + + container state { + config false; + description + "Operational state parameters relating to a term within + the applied control-plane classifier"; + + uses system-controlplane-qos-classifier-term-state; + uses oc-qos:qos-interface-classifier-match-counters-state; + } + } + } + } + + container scheduler-policy { + description + "Configuration and operational state relating to the QoS + scheduler policy that is applied to control-plane traffic. + The scheduler policy determines how traffic, classified by + the specified control-plane classifier is rate-limited towards + the control-plane. The scheduler policy is defined in + /qos/scheduler-policies."; + + container config { + description + "Configuration parameters relating to the scheduler-policy + that is to be applied control-plane traffic."; + + uses system-controlplane-qos-scheduler-config; + } + + container state { + config false; + description + "Operational state parameters relating to the scheduler policy + applied to the control-plane traffic."; + + uses system-controlplane-qos-scheduler-config; + } + + container scheduler-statistics { + config false; + description + "Operational state and counters relating to the + scheduler-policy applied to control plane traffic."; + + list scheduler { + key "sequence"; + description + "List of the schedulers that are part of the scheduler-policy + specified."; + + leaf sequence { + type leafref { + path "../state/sequence"; + } + description + "Reference to the sequence ID for the scheduler."; + } + + container state { + description + "Operational state parameters relating to the scheduler + policy."; + + uses system-controlplane-qos-scheduler-seq-state; + } + } + } + } + } + } + + container egress { + description + "Control-plane traffic parameters relating to egress traffic. + This refers to traffic that is sent by the system's control + plane to external-to-the-controlplane destinations."; + + uses system-controlplane-acl-common-top; + } + } + } + + grouping system-controlplane-acl-common-top { + description + "Common structural grouping for ACL configuration and state for + control plane traffic."; + + container acl { + description + "Configuration and operational state parameters relating to the + access control list applied to control-plane traffic."; + + list acl-set { + key "set-name type"; + + description + "List of the ACL that is to be applied in the specific ingress + or egress context. The key of the list specifies the type of + traffic to be matched, along with a reference to an ACL + configured in the OpenConfig ACL model within the /acl hierarchy."; + + leaf set-name { + type leafref { + path "../config/set-name"; + } + description + "Reference to the name of the ACL-set to be applied."; + } + + leaf type { + type leafref { + path "../config/type"; + } + description + "Reference to the type of the ACL-set to be applied."; + } + + container config { + description + "Configuration parameters relating to the ACL to be applied."; + + uses system-controlplane-common-acl-config; + } + + container state { + config false; + description + "Operational state parameters relating to the ACL to be applied."; + uses system-controlplane-common-acl-config; + } + + uses oc-acl:interface-acl-entries-top; + } + } + } + + grouping system-controlplane-common-acl-config { + description + "Grouping for ACL parameters relating to the system control-plane."; + + leaf set-name { + type leafref { + path "/oc-acl:acl/oc-acl:acl-sets/oc-acl:acl-set/" + + "oc-acl:config/oc-acl:name"; + } + description + "Reference to the ACL to be applied to traffic + in the specified context (ingress or egress)."; + } + + leaf type { + type leafref { + path "/oc-acl:acl/oc-acl:acl-sets/oc-acl:acl-set" + + "[oc-acl:name=current()/../set-name]" + + "/oc-acl:config/oc-acl:type"; + } + description + "Reference to the ACL set type applied to traffic + in the specified context (ingress or egress)."; + } + } + + grouping system-controlplane-qos-classifier-config { + description + "Grouping for configuration parameters relating to QoS classifiers + for the system control-plane."; + + leaf name { + type leafref { + path "/oc-qos:qos/oc-qos:classifiers/oc-qos:classifier/" + + "oc-qos:config/oc-qos:name"; + } + description + "Reference to a classifier that is used to classify traffic + destined to the control-plane of the system. + This classifier determines how packets that match each terms + are classified into forwarding groups, and subsequently into + queues to be forwarded."; + } + } + + grouping system-controlplane-qos-classifier-term-state { + description + "Grouping for control-plane traffic specific leaves required for + each configuration term."; + + leaf id { + // Current location /system/control-plane/ingress/qos/classifier/ + // terms/term/state/id + type leafref { + path "/oc-qos:qos/oc-qos:classifiers/" + + "oc-qos:classifier[oc-qos:name=current()/../../../../config/name]" + + "/oc-qos:terms/oc-qos:term/oc-qos:config/oc-qos:id"; + } + description + "Reference to a term identifier within the configured control-plane + classifier."; + } + } + + grouping system-controlplane-qos-scheduler-config { + description + "Grouping for configuration parameters relating to the QoS scheduler + policy for control-plane traffic."; + + leaf name { + type leafref { + path "/oc-qos:qos/oc-qos:scheduler-policies/oc-qos:scheduler-policy/" + + "oc-qos:config/oc-qos:name"; + } + description + "Reference to a scheduler policy that determines rate limits, or + shaping of packets towards the control-plane."; + } + } + + grouping system-controlplane-qos-scheduler-seq-state { + description + "Grouping for operational state parameters relating to indivual + schedulers within the applied scheduler policy."; + + leaf sequence { + type leafref { + path "/oc-qos:qos/oc-qos:scheduler-policies/oc-qos:scheduler-policy" + + "[oc-qos:name=current()/../../../../config/name]" + + "/oc-qos:schedulers/oc-qos:scheduler/oc-qos:config/" + + "oc-qos:sequence"; + } + description + "Reference to a scheduler within the configured scheduler policy."; + } + + uses oc-qos:qos-scheduler-common-state; + } + + augment "/oc-sys:system" { + description + "Add control-plane configuration and state to the system model."; + + uses system-controlplane-top; + } +} diff --git a/release/models/system/openconfig-system-grpc.yang b/release/models/system/openconfig-system-grpc.yang index 093e1fa13..6560806c1 100644 --- a/release/models/system/openconfig-system-grpc.yang +++ b/release/models/system/openconfig-system-grpc.yang @@ -8,6 +8,7 @@ module openconfig-system-grpc { import openconfig-system { prefix oc-sys; } import openconfig-inet-types { prefix oc-inet; } import openconfig-network-instance { prefix oc-ni; } + import openconfig-yang-types { prefix oc-yang; } organization "OpenConfig working group"; @@ -22,10 +23,23 @@ module openconfig-system-grpc { to be included in the list."; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "1.1.0"; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; + revision "2024-05-29" { + description + "Add support for gRPC connections."; + reference "1.1.0"; + } + + revision "2022-04-19" { + description + "Description and default value updates for grpc-server + implementation guidance."; + reference "1.0.0"; + } + revision "2021-06-16" { description "Remove trailing whitespace"; @@ -90,6 +104,7 @@ module openconfig-system-grpc { "Operational state relating to the gRPC service."; uses grpc-server-config; } + uses connections-top; } } } @@ -101,9 +116,16 @@ module openconfig-system-grpc { leaf name { type string; + default "DEFAULT"; description "The name of the gRPC server instance that is running on - the local system."; + the local system. + + If the operator does not designate a name for the protocol + instance (e.g. config), the implementation should use the + name of 'DEFAULT' (e.g. state). In addition, for + implementations that support a single gRPC server instance, + the default value is recommended for consistency."; } leaf-list services { @@ -186,6 +208,99 @@ module openconfig-system-grpc { } } + grouping grpc-counters { + description + "Top-level container for gRPC counters."; + container counters { + description + "Operational data for gRPC counters."; + uses grpc-counters-top; + } + } + + grouping grpc-counters-top { + description + "Top-level container of operational data for gRPC counters."; + + leaf bytes-sent { + type oc-yang:counter64; + description + "The total number of bytes sent to the client."; + } + + leaf packets-sent { + type oc-yang:counter64; + description + "The total number of packets sent to the client."; + } + + leaf data-send-error { + type oc-yang:counter64; + description + "A count of errors the gRPC server encountered when + sending data to a grpc client."; + } + } + + grouping grpc-server-connections-state { + description + "Operational data for gRPC server connections."; + + leaf address { + type oc-inet:ip-address; + description + "IPv4/IPv6 address of the gRPC server connection."; + } + + leaf port { + type oc-inet:port-number; + description + "TCP/UDP port number for the gRPC server connection."; + } + } + + grouping connections-top { + description + "Top-level grouping for data related to gRPC connections."; + + container connections { + config false; + description + "Enclosing container for list of gRPC connections."; + + list connection { + key "address port"; + description + "List of gRPC connections"; + + leaf address { + type leafref { + path "../state/address"; + } + description + "Reference to address list key."; + } + + leaf port { + type leafref { + path "../state/port"; + } + description + "Reference to port list key."; + } + + container state { + config false; + description + "Operational state data for gRPC connections."; + + uses grpc-server-connections-state; + uses grpc-counters; + } + } + } + } + augment "/oc-sys:system" { description "Add gRPC service configuration to the openconfig-system model."; diff --git a/release/models/system/openconfig-system-logging.yang b/release/models/system/openconfig-system-logging.yang index 1602cb1c6..c7eaae8a5 100644 --- a/release/models/system/openconfig-system-logging.yang +++ b/release/models/system/openconfig-system-logging.yang @@ -10,7 +10,7 @@ module openconfig-system-logging { // import some basic types import openconfig-extensions { prefix oc-ext; } import openconfig-inet-types { prefix oc-inet; } - + import openconfig-network-instance { prefix oc-ni; } // meta organization "OpenConfig working group"; @@ -23,7 +23,31 @@ module openconfig-system-logging { "This module defines configuration and operational state data for common logging facilities on network systems."; - oc-ext:openconfig-version "0.3.1"; + oc-ext:openconfig-version "0.7.0"; + +revision "2024-08-20" { + description + "Adding tls support for syslog."; + reference "0.7.0"; + } + +revision "2023-07-20" { + description + "adding VTY and local files as logging destinations"; + reference "0.6.0"; + } + + revision "2023-05-04" { + description + "removing LOG_DESTINATION_TYPE identities"; + reference "0.5.0"; + } + + revision "2022-12-29" { + description + "Add network-instance for remote logging servers"; + reference "0.4.1"; + } revision "2018-11-21" { description @@ -220,35 +244,6 @@ module openconfig-system-logging { "IETF RFC 5424 - The Syslog Protocol"; } - identity LOG_DESTINATION_TYPE { - description - "Base identity for destination for logging messages"; - } - - identity DEST_CONSOLE { - base LOG_DESTINATION_TYPE; - description - "Directs log messages to the console"; - } - - identity DEST_BUFFER { - base LOG_DESTINATION_TYPE; - description - "Directs log messages to and in-memory circular buffer"; - } - - identity DEST_FILE { - base LOG_DESTINATION_TYPE; - description - "Directs log messages to a local file"; - } - - identity DEST_REMOTE { - base LOG_DESTINATION_TYPE; - description - "Directs log messages to a remote syslog server"; - } - // typedef statements typedef syslog-severity { @@ -371,12 +366,12 @@ module openconfig-system-logging { grouping logging-console-config { description - "Configuration data for console logging"; + "Configuration data for console and vty logging"; } grouping logging-console-state { description - "Operational state data for console logging"; + "Operational state data for console and vty logging"; } grouping logging-console-top { @@ -426,6 +421,13 @@ module openconfig-system-logging { "Source IP address for packets to the log server"; } + leaf network-instance { + type oc-ni:network-instance-ref; + description + "The network instance used to reach the log server. If no + instance is specified, DEFAULT_INSTANCE is used."; + } + leaf remote-port { type oc-inet:port-number; default 514; @@ -433,6 +435,22 @@ module openconfig-system-logging { "Sets the destination port number for syslog UDP messages to the server. The default for syslog is 514."; } + + leaf transport-security { + type boolean; + description + "Indicates if syslog transport layer security (TLS) is enabled."; + } + + leaf tls-profile-id { + type string; + description + "The ID of this syslog client's TLS profile. TLS profiles are managed + using the gNSI Certz service or other certificate management service + provided by the system."; + reference + "https://github.com/openconfig/gnsi/tree/main/certz"; + } } grouping logging-remote-state { @@ -446,7 +464,8 @@ module openconfig-system-logging { container remote-servers { description - "Enclosing container for the list of remote log servers"; + "Enclosing container for the list of remote log + servers"; list remote-server { key "host"; @@ -483,6 +502,154 @@ module openconfig-system-logging { } } + grouping logging-file-config { + description + "Configuration data for logfile"; + + leaf filename-prefix { + type string { + length 0..255; + } + description + "A name used for the file. It is expected that an + implementation may append timestamp, serial-number or + other identifier to the filename."; + } + + leaf path { + type string { + length 0..255; + } + description + "The fully specified path of the folder where the + logfile is stored. The path is implementation specific + and may include attributes such as a drive identifier."; + } + + leaf rotate { + type uint32; + default 0; + description + "Used for logfile rotation. + Log files are rotated the number of times defined by + this leaf. + The default value of 1 indicates that there will be one + rotation file and one active file. A 0 value indicates + old versions are removed rather than rotated."; + } + + leaf max-size { + type uint32; + default 1000; + description + "Used for logfile rotation. + Maximum size in Bytes, logfile may grow to. When logfile + reach this size it triggers log rotation. The log file need to + be save, closed, and new file open or future log storage. + If needed oldest logfile of same prefix shall be deleted to"; + } + + leaf max-open-time { + type uint32; + default 1440; + description + "Used for logfile rotation. + Maximum time, in minutes, the logfile can be open. When expires, + it triggers log rotation. + Actions are same ans when log file reaches its max-size. + it need to be closed, save, and new file open or future log + storage. If needed oldest logfile of same prefix shall be + deleted to "; + } + } + + grouping logging-file-state { + description + "Operational state data for logfile"; + leaf open-logfile { + type string{ + length 0..511; + } + description + "the currently active/open filename prepended by folder path + and including suffix appended to filename-prefix by system"; + } + } + + grouping logging-files-top { + description + "Top-level grouping for local log files"; + + container files { + description + "Enclosing container for the list of log files"; + + list file { + key "path filename-prefix"; + description + "List of logfiles"; + + leaf filename-prefix { + type leafref { + path "../config/filename-prefix"; + } + description + "Reference to the logfiles list key"; + } + + leaf path { + type leafref { + path "../config/path"; + } + description + "Reference to the logfiles list key"; + } + + container config { + description + "Configuration data for logfile"; + uses logging-file-config; + } + + container state { + config false; + description + "Operational state data for logfile servers"; + uses logging-file-config; + uses logging-file-state; + } + uses logging-selectors-top; + } + } + } + + grouping logging-vty-top { + description + "Top-level grouping for vty logging data"; + + container vty { + description + "Top-level container for data related to vty-based + logging (active sessions of ssh, telnet, etc )"; + + container config { + description + "Configuration data for vty logging"; + + uses logging-console-config; + } + + container state { + config false; + description + "Operational state data for console logging"; + uses logging-console-config; + uses logging-console-state; + } + uses logging-selectors-top; + } + } + grouping logging-top { description "Top-level grouping for logging data"; @@ -493,6 +660,9 @@ module openconfig-system-logging { uses logging-console-top; uses logging-remote-top; + uses logging-files-top; + uses logging-vty-top; + } } // data definition statements @@ -500,4 +670,4 @@ module openconfig-system-logging { // augment statements -} \ No newline at end of file +} diff --git a/release/models/system/openconfig-system-utilization.yang b/release/models/system/openconfig-system-utilization.yang new file mode 100644 index 000000000..08d1c8160 --- /dev/null +++ b/release/models/system/openconfig-system-utilization.yang @@ -0,0 +1,115 @@ +module openconfig-system-utilization { + yang-version "1"; + + namespace "http://openconfig.net/yang/system-utilization"; + prefix "oc-sys-util"; + + import openconfig-extensions { prefix oc-ext; } + import openconfig-system { prefix oc-sys; } + import openconfig-platform { prefix oc-platform; } + + organization + "OpenConfig working group"; + contact + "www.openconfig.net"; + + description + "This module adds configuration and operational state for + system wide resource utilization thresholds."; + + oc-ext:openconfig-version "0.1.0"; + + revision "2023-02-13" { + description + "Add system wide utilization thresholds."; + reference + "0.1.0"; + } + + grouping system-resource-utilization-config { + description + "Configuration data for resource utilization. The configuration added here should + apply across all of the components that matches the respective resource. + /components/component/*/utilization/resources/resource/name"; + + + leaf name { + type string; + description + "Resource name within the system."; + } + + uses oc-platform:resource-utilization-threshold-common; + } + + grouping system-resource-utilization-state { + description + "State data for resource utilization."; + + leaf-list active-component-list { + type leafref { + path "/oc-platform:components/oc-platform:component/oc-platform:config/oc-platform:name"; + } + + description + "List of references to each component which has this resource."; + } + } + + grouping system-resource-utilization-top { + description + "Top level grouping for system wide configuration of resources for + all components."; + + container "utilization" { + description + "System wide resource utilization configuration."; + + container "resources" { + description + "Enclosing container for the resources in the entire system. The system + resource names should be aggregated from the following collections: + + * /components/component/chassis/utilization/resources/resource + * /components/component/integrate-circuit/utilization/resources/resource + * /components/component/linecard/utilization/resources/resource."; + + list "resource" { + key "name"; + description + "The list of all resources across all platform components keyed by + resource name."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "References the resource name."; + } + + container "config" { + description + "Configuration data for resource utilization."; + uses system-resource-utilization-config; + } + + container "state" { + config false; + description + "Operational state data for resource utilization."; + + uses system-resource-utilization-config; + uses system-resource-utilization-state; + } + } + } + } + } + + augment "/oc-sys:system" { + description + "Add system resource utilization."; + uses system-resource-utilization-top; + } +} diff --git a/release/models/system/openconfig-system.yang b/release/models/system/openconfig-system.yang index 6ecb071fa..a7eb1be7f 100644 --- a/release/models/system/openconfig-system.yang +++ b/release/models/system/openconfig-system.yang @@ -20,6 +20,7 @@ module openconfig-system { import openconfig-alarms { prefix oc-alarms; } import openconfig-messages { prefix oc-messages; } import openconfig-license { prefix oc-license; } + import openconfig-network-instance { prefix oc-ni; } // meta organization "OpenConfig working group"; @@ -46,7 +47,81 @@ module openconfig-system { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "0.13.0"; + oc-ext:openconfig-version "2.3.0"; + + revision "2024-09-24" { + description + "Added mount-point type leaf to describe the type of file system."; + reference "2.3.0"; + } + + revision "2024-08-13" { + description + "Added additional auth key types"; + reference "2.2.0"; + } + + revision "2024-07-15" { + description + "Added auth key reference in ntp server configuration."; + reference "2.1.0"; + } + + revision "2023-12-20" { + description + "Change NTP offset, root-delay, and root-dispersion to int64 nanoseconds, + and update their descriptions for accuracy and clarity."; + reference "2.0.0"; + } + + revision "2023-10-26" { + description + "Add up-time leaf and promote module to version 1.0."; + reference "1.0.0"; + } + + revision "2023-06-16" { + description + "Reordered imports to be alphabetical."; + reference "0.17.1"; + } + + revision "2022-12-20" { + description + "Added network instance leaf to ntp client, and dropped + ntp-source-address from global to individual config. Removed ntp prefix."; + reference "0.17.0"; + } + + revision "2022-12-19" { + description + "Update last configuration timestamp documentation."; + reference "0.16.1"; + } + + revision "2022-09-28" { + description + "Add last configuration timestamp leaf."; + reference "0.16.0"; + } + + revision "2022-07-25" { + description + "Add system software version."; + reference "0.15.0"; + } + + revision "2022-07-20" { + description + "Added routing-mac system MAC address."; + reference "0.14.0"; + } + + revision "2022-07-12" { + description + "Modify ntp enabled description to reflect true and false case."; + reference "0.13.1"; + } revision "2021-07-20" { description @@ -170,6 +245,42 @@ module openconfig-system { "MD5 encryption method"; } + identity NTP_AUTH_SHA1 { + base NTP_AUTH_TYPE; + description + "SHA1 encryption method"; + } + + identity NTP_AUTH_SHA256 { + base NTP_AUTH_TYPE; + description + "SHA256 encryption method"; + } + + identity NTP_AUTH_SHA384 { + base NTP_AUTH_TYPE; + description + "SHA384 encryption method"; + } + + identity NTP_AUTH_SHA512 { + base NTP_AUTH_TYPE; + description + "SHA512 encryption method"; + } + + identity NTP_AUTH_AES_CBC_128 { + base NTP_AUTH_TYPE; + description + "AES-CBC-128 encryption method"; + } + + identity NTP_AUTH_AES_CBC_256 { + base NTP_AUTH_TYPE; + description + "AES-CBC-256 encryption method"; + } + // typedef statements typedef timezone-name-type { @@ -315,6 +426,14 @@ module openconfig-system { description "The amount of space currently in use on the filesystem."; } + + leaf type { + type string; + description + "A human readable string indicating the filesystem type used + for storage. Examples might include flash, hard disk, tmpfs/ramdisk + or remote/network based storage."; + } } grouping system-global-state { @@ -327,6 +446,14 @@ module openconfig-system { "The current system date and time."; } + leaf up-time { + type oc-types:timeticks64; + units "nanoseconds"; + description + "The amount of time since the network operating system was + initialized."; + } + leaf boot-time { type oc-types:timeticks64; units "nanoseconds"; @@ -335,6 +462,25 @@ module openconfig-system { restarted. The value is the timestamp in nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; } + + leaf software-version { + type string; + description + "Operating system version of the currently active controller + of the device. It is required that this value matches the + value of the state/software-version leaf in the component + of type OPERATING_SYSTEM."; + } + + leaf last-configuration-timestamp { + type oc-types:timeticks64; + units "nanoseconds"; + description + "Indicates the monotonically increasing timestamp at which the + last configuration change was made. This may may be through CLI, + gNMI or some other mechanism. The value is the timestamp in + nanoseconds relative to the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + } } grouping mount-points-top { @@ -652,6 +798,26 @@ module openconfig-system { "Indicates whether this server should be preferred or not."; } + + leaf network-instance { + type oc-ni:network-instance-ref; + description + "The network instance used to find this server."; + } + + leaf source-address { + type oc-inet:ip-address; + description + "Source address to use on outgoing NTP packets"; + } + + leaf key-id { + type leafref { + path "../../../../ntp-keys/ntp-key/key-id"; + } + description + "Reference to NTP authentication key for this server."; + } } grouping system-ntp-server-state { @@ -678,39 +844,35 @@ module openconfig-system { } leaf root-delay { - type uint32; - // TODO: reconsider units for these values -- the spec defines - // rootdelay and rootdisperson as 2 16-bit integers for seconds - // and fractional seconds, respectively. This gives a - // precision of ~15 us (2^-16). Using milliseconds here based - // on what implementations typically provide and likely lack - // of utility for less than millisecond precision with NTP - // time sync. - units "milliseconds"; - description - "The round-trip delay to the server, in milliseconds."; + type int64; + units "nanoseconds"; + description + "The total round-trip delay to the reference clock, in nanoseconds."; reference "RFC 5905 - Network Time Protocol Version 4: Protocol and - Algorithms Specification"; + Algorithms Specification, Section 7.3"; } leaf root-dispersion { - type uint64; - units "milliseconds"; + type int64; + units "nanoseconds"; description - "Dispersion (epsilon) represents the maximum error inherent - in the measurement"; + "The maximum error inherent in the measurement, accumulated over the + stratum levels from the reference clock."; reference "RFC 5905 - Network Time Protocol Version 4: Protocol and - Algorithms Specification"; + Algorithms Specification, Section 4"; } leaf offset { - type uint64; - units "milliseconds"; + type int64; + units "nanoseconds"; description "Estimate of the current time offset from the peer. This is - the time difference between the local and reference clock."; + the time difference of the peer's clock minus the local clock."; + reference + "RFC 5905 - Network Time Protocol Version 4: Protocol and + Algorithms Specification, Section 8"; } leaf poll-interval { @@ -847,17 +1009,11 @@ module openconfig-system { type boolean; default false; description - "Enables the NTP protocol and indicates that the system should + "Enables and disables the NTP protocol and indicates that the system should attempt to synchronize the system clock with an NTP server from the servers defined in the 'ntp/server' list."; } - leaf ntp-source-address { - type oc-inet:ip-address; - description - "Source address to use on outgoing NTP packets"; - } - leaf enable-ntp-auth { type boolean; default false; @@ -908,6 +1064,52 @@ module openconfig-system { } } + grouping system-routing-macaddr-config { + description + "Configuration data for system's routing MAC addresses."; + + leaf routing-mac { + type oc-yang:mac-address; + description + "Any packets destined to this MAC address must be sent through the + routing pipeline by the system. This MAC address is used to identify + routed packets in addition to any other MAC addresses that the system + may already have been using to perform routing. + + It is not expected that this MAC address will be used as the + source MAC address of any routed packet, as the source MAC address of + any packets generated by the system, or a MAC address used in ARP + response. This MAC address may not be allocated from the block of + MAC address that system owns. For instance, it's allocation could + be managed by an external controller."; + } + } + + grouping system-macaddr-top { + description + "Top-level grouping for configuration and state of system's MAC addresses."; + + container mac-address { + description + "Top-level container for system's MAC address configuration and state"; + + container config { + description + "Configuration data for routing MAC address."; + + uses system-routing-macaddr-config; + } + + container state { + config false; + description + "Operational state data for routing MAC address."; + + uses system-routing-macaddr-config; + } + } + } + grouping system-memory-config { description "Configuration data for system memory"; @@ -1146,19 +1348,20 @@ module openconfig-system { } uses mount-points-top; - uses system-clock-top; - uses system-dns-top; - uses system-ntp-top; - uses oc-sys-term:system-ssh-server-top; - uses oc-sys-term:system-telnet-server-top; - uses oc-log:logging-top; uses oc-aaa:aaa-top; - uses system-memory-top; - uses system-cpu-top; - uses oc-proc:procmon-processes-top; uses oc-alarms:alarms-top; + uses oc-log:logging-top; + uses oc-proc:procmon-processes-top; uses oc-messages:messages-top; uses oc-license:license-top; + uses oc-sys-term:system-ssh-server-top; + uses oc-sys-term:system-telnet-server-top; + uses system-clock-top; + uses system-cpu-top; + uses system-dns-top; + uses system-macaddr-top; + uses system-memory-top; + uses system-ntp-top; } } diff --git a/release/models/types/openconfig-inet-types.yang b/release/models/types/openconfig-inet-types.yang index 40ffd16f8..ff74c4287 100644 --- a/release/models/types/openconfig-inet-types.yang +++ b/release/models/types/openconfig-inet-types.yang @@ -31,7 +31,27 @@ module openconfig-inet-types { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "0.4.1"; + oc-ext:openconfig-version "0.7.0"; + + revision "2024-01-05" { + description + "Change ipv6-address-zoned typedef to conform to W3C standard + regex pattern."; + reference "0.7.0"; + } + + revision "2023-02-06" { + description + "Add ipv6-link-local and ipv6-address-type"; + reference "0.6.0"; + } + + revision "2021-08-17" { + description + "Add ip-address-zoned typedef as a union between ipv4-address-zoned + and ipv6-address-zoned types."; + reference "0.5.0"; + } revision "2021-07-14" { description @@ -185,7 +205,7 @@ module openconfig-inet-types { pattern // Must support compression through different lengths // therefore this regexp is complex. - '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + + '(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,7}:|' + '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' + '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' + @@ -194,7 +214,7 @@ module openconfig-inet-types { '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' + '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' + ':((:[0-9a-fA-F]{1,4}){1,7}|:)' + - ')(%[a-zA-Z0-9_]+)$'; + ')(%[a-zA-Z0-9_]+)'; oc-ext:posix-pattern // Must support compression through different lengths // therefore this regexp is complex. @@ -273,6 +293,16 @@ module openconfig-inet-types { "An IPv4 or IPv6 address with no prefix specified."; } + typedef ip-address-zoned { + type union { + type ipv4-address-zoned; + type ipv6-address-zoned; + } + description + "An IPv4 or IPv6 address with no prefix specified and an optional + zone index."; + } + typedef ip-prefix { type union { type ipv4-prefix; @@ -312,6 +342,26 @@ module openconfig-inet-types { RFC 4001: Textual Conventions for Internet Network Addresses"; } + typedef ipv6-address-type { + type enumeration { + enum GLOBAL_UNICAST { + description + "The IPv6 address is a global unicast address type and must be in + the format defined in RFC 4291 section 2.4."; + } + enum LINK_LOCAL_UNICAST { + description + "The IPv6 address is a Link-Local unicast address type and must be + in the format defined in RFC 4291 section 2.4."; + } + } + description + "The value represents the type of IPv6 address"; + reference + "RFC 4291: IP Version 6 Addressing Architecture + section 2.5"; + } + typedef domain-name { type string { length "1..253"; diff --git a/release/models/types/openconfig-types.yang b/release/models/types/openconfig-types.yang index 89e32d515..a146b9b76 100644 --- a/release/models/types/openconfig-types.yang +++ b/release/models/types/openconfig-types.yang @@ -21,7 +21,13 @@ module openconfig-types { are used across OpenConfig models. It can be imported by modules that make use of these types."; - oc-ext:openconfig-version "0.6.0"; + oc-ext:openconfig-version "1.0.0"; + + revision "2024-01-31" { + description + "Add posix-eregexp type and promote model to version 1.0.0."; + reference "1.0.0"; + } revision "2019-04-16" { description @@ -101,6 +107,14 @@ module openconfig-types { supported. An initial proposal is POSIX compatible."; } + typedef posix-eregexp { + type string; + description + "This is a string which represents an extended POSIX + regular expression."; + reference "IEEE Std 1003.1-2017"; + } + typedef timeticks64 { type uint64; units "nanoseconds"; diff --git a/release/models/types/openconfig-yang-types.yang b/release/models/types/openconfig-yang-types.yang index c978cd049..dbbf88a6d 100644 --- a/release/models/types/openconfig-yang-types.yang +++ b/release/models/types/openconfig-yang-types.yang @@ -32,7 +32,13 @@ module openconfig-yang-types { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "0.3.1"; + oc-ext:openconfig-version "1.0.0"; + + revision "2024-05-30" { + description + "Add hex-string-prefixed typedef"; + reference "1.0.0"; + } revision "2021-07-14" { description @@ -109,12 +115,26 @@ module openconfig-yang-types { } typedef hex-string { + status deprecated; type string { pattern '[0-9a-fA-F]*'; oc-ext:posix-pattern '^[0-9a-fA-F]*$'; } description - "A string consisting of a hexadecimal characters."; + "A string consisting of a hexadecimal characters. This leaf is + deprecated and will removed in a future version of this model. + The type hex-string-prefixed should be used instead."; + } + + typedef hex-string-prefixed { + type string { + pattern '(0x)([0-9a-fA-F]{2})*'; + oc-ext:posix-pattern '^(0x)([0-9a-fA-F]{2})*$'; + length "3..max"; + } + description + "A string encoding a hexadecimal number with a prefix of '0x' followed + by a list of bytes."; } typedef counter32 { diff --git a/release/models/vlan/openconfig-vlan-types.yang b/release/models/vlan/openconfig-vlan-types.yang index 2cb04c12a..09af39887 100644 --- a/release/models/vlan/openconfig-vlan-types.yang +++ b/release/models/vlan/openconfig-vlan-types.yang @@ -21,7 +21,19 @@ module openconfig-vlan-types { "This module defines configuration and state variables for VLANs, in addition to VLAN parameters associated with interfaces"; - oc-ext:openconfig-version "3.1.1"; + oc-ext:openconfig-version "3.2.0"; + + revision "2022-05-24" { + description + "Remove module extension oc-ext:regexp-posix by making pattern regexes + conform to RFC6020/7950. + + Types impacted: + - vlan-range + - qinq-id + - qinq-id-range"; + reference "3.2.0"; + } revision "2020-06-30" { description @@ -63,7 +75,6 @@ module openconfig-vlan-types { } // OpenConfig specific extensions for module metadata. - oc-ext:regexp-posix; oc-ext:catalog-organization "openconfig"; oc-ext:origin "openconfig"; @@ -128,10 +139,10 @@ module openconfig-vlan-types { typedef vlan-range { type string { // range specified as [lower]..[upper] - pattern '^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + + pattern '(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|' + '40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|' + - '[1-9])$'; + '[1-9])'; oc-ext:posix-pattern '^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|' + '40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|' + @@ -148,10 +159,10 @@ module openconfig-vlan-types { typedef qinq-id { type string { pattern - '^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + + '(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.' + '((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + - '[1-9][0-9]{1,2}|[1-9])|\*)$'; + '[1-9][0-9]{1,2}|[1-9])|\*)'; oc-ext:posix-pattern '^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.' + @@ -174,12 +185,12 @@ module openconfig-vlan-types { type string { // match cases where the range is specified as x..y.z pattern - '^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + + '(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.\.' + '(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.' + '((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + - '[1-9][0-9]{1,2}|[1-9])|\*)$'; + '[1-9][0-9]{1,2}|[1-9])|\*)'; oc-ext:posix-pattern '^(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.\.' + @@ -191,12 +202,12 @@ module openconfig-vlan-types { type string { // match cases where the range is specified as x.y..z pattern - '^(\*|(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + + '(\*|(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9]))\.' + '(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9])\.\.' + '(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + - '[1-9][0-9]{1,2}|[1-9])$'; + '[1-9][0-9]{1,2}|[1-9])'; oc-ext:posix-pattern '^(\*|(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|' + '[1-9][0-9]{1,2}|[1-9]))\.' + diff --git a/release/models/vlan/openconfig-vlan.yang b/release/models/vlan/openconfig-vlan.yang index 0b29cc0dd..905d48150 100644 --- a/release/models/vlan/openconfig-vlan.yang +++ b/release/models/vlan/openconfig-vlan.yang @@ -26,7 +26,13 @@ module openconfig-vlan { "This module defines configuration and state variables for VLANs, in addition to VLAN parameters associated with interfaces"; - oc-ext:openconfig-version "3.2.1"; + oc-ext:openconfig-version "3.2.2"; + + revision "2023-02-07" { + description + "Remove prefix from enums in when statements"; + reference "3.2.2"; + } revision "2021-07-28" { description @@ -176,7 +182,7 @@ module openconfig-vlan { } leaf native-vlan { - when "../interface-mode = 'oc-vlan-types:TRUNK'" { + when "../interface-mode = 'TRUNK'" { description "Native VLAN is valid for trunk mode interfaces"; } @@ -190,7 +196,7 @@ module openconfig-vlan { } leaf access-vlan { - when "../interface-mode = 'oc-vlan-types:ACCESS'" { + when "../interface-mode = 'ACCESS'" { description "Access VLAN assigned to the interfaces"; } @@ -200,7 +206,7 @@ module openconfig-vlan { } leaf-list trunk-vlans { - when "../interface-mode = 'oc-vlan-types:TRUNK'" { + when "../interface-mode = 'TRUNK'" { description "Allowed VLANs may be specified for trunk mode interfaces."; diff --git a/release/models/wifi/openconfig-access-points.yang b/release/models/wifi/openconfig-access-points.yang index 539bea63d..d773a59a5 100644 --- a/release/models/wifi/openconfig-access-points.yang +++ b/release/models/wifi/openconfig-access-points.yang @@ -27,7 +27,32 @@ module openconfig-access-points { "This module defines the top level WiFi Configurations for a list of Access Points."; - oc-ext:openconfig-version "0.3.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2023-06-26" { + description + "Update description for hostname"; + reference "1.2.0"; + } + + revision "2023-05-26" { + description + "Fix typos in descriptions."; + reference "1.1.1"; + } + + revision "2023-03-22" { + description + "Mirror /access-points/access-point/config/hostname in a state + container."; + reference "1.1.0"; + } + + revision "2021-08-02" { + description + "Update model version as it is in production."; + reference "1.0.0"; + } revision "2020-04-28" { description @@ -109,7 +134,7 @@ module openconfig-access-points { list ap-manager { key "id"; description - "Manager(s) this AP is assinged to, referenced by id."; + "Manager(s) this AP is assigned to, referenced by id."; leaf id { type leafref { @@ -149,7 +174,9 @@ module openconfig-access-points { "ap-manager:config/ap-manager:hostname"; } description - "Access Point FQDN."; + "Access Point FQDN. This leaf is only valid when the type of the + component is WIFI_ACCESS_POINT, and should be used instead of + /oc-sys:system/oc-sys:state/oc-sys:hostname."; } } @@ -183,6 +210,14 @@ module openconfig-access-points { uses access-points-common-config; } + container state { + config false; + description + "State items at the global, Access Point level."; + + uses access-points-common-config; + } + uses wifi-phy:radio-top; uses wifi-mac:ssid-top; uses oc-sys:system-top; @@ -192,12 +227,4 @@ module openconfig-access-points { } uses access-points-top; - // hostname is set using openconfig-wifi-aps model. - deviation /oc-sys:system/oc-sys:config/oc-sys:hostname { - deviate not-supported; - } - - deviation /oc-sys:system/oc-sys:state/oc-sys:hostname { - deviate not-supported; - } } diff --git a/release/models/wifi/openconfig-ap-interfaces.yang b/release/models/wifi/openconfig-ap-interfaces.yang index e162ca62d..49f7f0a00 100644 --- a/release/models/wifi/openconfig-ap-interfaces.yang +++ b/release/models/wifi/openconfig-ap-interfaces.yang @@ -32,11 +32,36 @@ module openconfig-ap-interfaces { "This module defines the configuration and state data for non-radio interfaces on WiFi Access Points."; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "1.3.0"; + + revision "2023-08-10" { + description + "Add container to make compatible with changes in + openconfig-interfaces"; + reference "1.3.0"; + } + + revision "2023-06-26" { + description + "Remove deviation for unnumbered interfaces"; + reference "1.2.0"; + } + + revision "2023-05-26" { + description + "Add full stop to all descriptions."; + reference "1.0.1"; + } + + revision "2021-08-02" { + description + "Update model version as it is in production."; + reference "1.0.0"; + } revision "2020-03-24" { description - "Update namespace based on new directory structure"; + "Update namespace based on new directory structure."; reference "0.1.1"; } @@ -49,7 +74,7 @@ module openconfig-ap-interfaces { grouping ap-interfaces-top { description "Top-level grouping for AP interface configuration and - operational state data"; + operational state data."; container interfaces { description @@ -67,13 +92,13 @@ module openconfig-ap-interfaces { path "../config/name"; } description - "References the name of the interface"; + "References the name of the interface."; } container config { description "Configurable items at the global, physical interface - level"; + level."; oc-ext:telemetry-on-change; uses oc-if:interface-phys-config; @@ -83,11 +108,19 @@ module openconfig-ap-interfaces { config false; description - "Operational state data at the global interface level"; + "Operational state data at the global interface level."; uses oc-if:interface-phys-config; uses oc-if:interface-common-state; - uses oc-if:interface-counters-state; + + container counters { + description + "A collection of interface specific statistics entitites which are + not common to subinterfaces."; + + uses oc-if:interface-common-counters-state; + uses oc-if:interface-counters-state; + } } } } @@ -97,7 +130,7 @@ module openconfig-ap-interfaces { augment "/oc-access-points:access-points/" + "oc-access-points:access-point" { description - "Adds interface configuration and state to access-points model"; + "Adds interface configuration and state to access-points model."; uses ap-interfaces-top; } @@ -107,7 +140,7 @@ module openconfig-ap-interfaces { "oc-ap-if:interface" { description "Adds ethernet interface configuration and state to - access-points model"; + access-points model."; uses oc-eth:ethernet-top; } @@ -116,7 +149,7 @@ module openconfig-ap-interfaces { "oc-access-points:access-point/oc-ap-if:interfaces/" + "oc-ap-if:interface/oc-ap-if:ethernet" { description - "Adds 802.1X settings to individual Ethernet interfaces"; + "Adds 802.1X settings to individual Ethernet interfaces."; uses oc-1x:dot1x-top; } @@ -135,7 +168,7 @@ module openconfig-ap-interfaces { "oc-ap-if:interface" { description "Adds subinterface configuration and state to - access-points model"; + access-points model."; uses oc-if:subinterfaces-top; } @@ -145,7 +178,7 @@ module openconfig-ap-interfaces { "oc-ap-if:interface/oc-ap-if:subinterfaces/oc-ap-if:subinterface" { description "IPv4 address family configuration for - interfaces"; + interfaces."; uses oc-ip:ipv4-top; } @@ -155,7 +188,7 @@ module openconfig-ap-interfaces { "oc-ap-if:interface/oc-ap-if:subinterfaces/oc-ap-if:subinterface" { description "IPv6 address family configuration for - interfaces"; + interfaces."; uses oc-ip:ipv6-top; } @@ -164,7 +197,7 @@ module openconfig-ap-interfaces { "oc-access-points:access-point/oc-ap-if:interfaces/" + "oc-ap-if:interface" { description - "Adds lag configuration and state to access-points model"; + "Adds lag configuration and state to access-points model."; uses oc-lag:aggregation-logical-top; } @@ -173,7 +206,7 @@ module openconfig-ap-interfaces { "oc-access-points:access-point/oc-ap-if:interfaces/" + "oc-ap-if:interface/oc-ap-if:ethernet" { description - "Adds poe configuration and state to access-points model"; + "Adds poe configuration and state to access-points model."; uses oc-poe:poe-ethernet-top; } @@ -200,39 +233,8 @@ module openconfig-ap-interfaces { "oc-access-points:access-point/oc-ap-if:interfaces/" + "oc-ap-if:interface" { description - "Adds tunnel configuration and state to access-points model"; + "Adds tunnel configuration and state to access-points model."; uses oc-tun:tunnel-top; } - // Deviation statements - // Unnumbered interfaces not supported on Access Points. - deviation "/oc-access-points:access-points/" + - "oc-access-points:access-point/" + - "oc-ap-if:interfaces/oc-ap-if:interface/" + - "oc-ap-if:subinterfaces/oc-ap-if:subinterface/oc-ap-if:ipv4/" + - "oc-ap-if:unnumbered" { - deviate not-supported; - } - - deviation "/oc-access-points:access-points/" + - "oc-access-points:access-point/" + - "oc-ap-if:interfaces/oc-ap-if:interface/" + - "oc-ap-if:subinterfaces/oc-ap-if:subinterface/oc-ap-if:ipv6/" + - "oc-ap-if:unnumbered" { - deviate not-supported; - } - - deviation "/oc-access-points:access-points/" + - "oc-access-points:access-point/" + - "oc-ap-if:interfaces/oc-ap-if:interface/" + - "oc-ap-if:tunnel/oc-ap-if:ipv4/oc-ap-if:unnumbered" { - deviate not-supported; - } - - deviation "/oc-access-points:access-points/" + - "oc-access-points:access-point/" + - "oc-ap-if:interfaces/oc-ap-if:interface/" + - "oc-ap-if:tunnel/oc-ap-if:ipv6/oc-ap-if:unnumbered" { - deviate not-supported; - } } diff --git a/release/models/wifi/openconfig-ap-manager.yang b/release/models/wifi/openconfig-ap-manager.yang index 28d89acb0..8d08c61a7 100644 --- a/release/models/wifi/openconfig-ap-manager.yang +++ b/release/models/wifi/openconfig-ap-manager.yang @@ -13,6 +13,7 @@ module openconfig-ap-manager { import openconfig-yang-types { prefix oc-yang; } import openconfig-inet-types { prefix oc-inet; } import openconfig-wifi-types { prefix oc-wifi; } + import openconfig-types { prefix oc-types; } // Meta organization "OpenConfig working group"; @@ -25,7 +26,43 @@ module openconfig-ap-manager { "This module defines the top level configuration and state data for a system which manages Access Points."; - oc-ext:openconfig-version "0.1.3"; + oc-ext:openconfig-version "1.3.1"; + + revision "2023-05-26" { + description + "Add full stop to all descriptions."; + reference "1.3.1"; + } + + revision "2023-01-17" { + description + "Replace uptime counter with up-time oc-types:timeticks64 timestamp. Sets + uptime leaf to deprecated."; + reference "1.3.0"; + } + + revision "2022-05-24" { + description + "Change pattern regexes to conform to RFC6020/7950. + + Leaf nodes impacted: + - country-code + + Fix previous incorrect revision date."; + reference "1.2.0"; + } + + revision "2022-03-24" { + description + "Update model to support operation in 6 GHz frequency."; + reference "1.1.0"; + } + + revision "2021-08-02" { + description + "Update model version as it is in production."; + reference "1.0.0"; + } revision "2020-06-30" { description @@ -36,7 +73,7 @@ module openconfig-ap-manager { revision "2020-03-24" { description - "Update namespace based on new directory structure"; + "Update namespace based on new directory structure."; reference "0.1.2"; } @@ -73,7 +110,7 @@ module openconfig-ap-manager { leaf country-code { type string { - pattern '^[A-Z]{2}$'; + pattern '[A-Z]{2}'; oc-ext:posix-pattern '^[A-Z]{2}$'; } description @@ -109,9 +146,19 @@ module openconfig-ap-manager { "The current operational state of the AP."; } + leaf up-time { + type oc-types:timeticks64; + units nanoseconds; + description + "Timestamp when this AP last changed its op-state to 'UP'. The value is + the timestamp in nanoseconds relative to the Unix Epoch (Jan 1, 1970 + 00:00:00 UTC)."; + } + leaf uptime { type uint32; units seconds; + status deprecated; description "Seconds this AP has been in the op-state of 'UP'."; } @@ -160,6 +207,12 @@ module openconfig-ap-manager { enum AF { description "Powered using 802.3af."; } + enum BT_TYPE3 { + description "Powered using 802.3bt Type 3."; + } + enum BT_TYPE4 { + description "Powered using 802.3bt Type 4."; + } enum PLUG { description "Powered using local source, not PoE."; } diff --git a/release/models/wifi/openconfig-wifi-mac.yang b/release/models/wifi/openconfig-wifi-mac.yang index b12667e85..b9c85f634 100644 --- a/release/models/wifi/openconfig-wifi-mac.yang +++ b/release/models/wifi/openconfig-wifi-mac.yang @@ -26,7 +26,51 @@ module openconfig-wifi-mac { description "Model for managing MAC layer configuration of Radio interfaces."; - oc-ext:openconfig-version "0.4.1"; + oc-ext:openconfig-version "1.3.3"; + + revision "2024-08-22" { + description "Fix XPath expression to avoid pyang error"; + reference "1.3.3"; + } + + revision "2024-08-07" { + description + "Add transition modes ENHANCED_OPEN_TRANSITION, WPA3_2_SAE_TRANSITION and + WPA3_2_ENTERPRISE_TRANSITION"; + reference "1.3.2"; + } + + revision "2023-05-26" { + description + "Adds clarity to various descriptions. Unit type for tx/rx phy-rate, + client frequency, etc."; + reference "1.3.1"; + } + + revision "2023-02-14" { + description + "Adds totals to retry metrics to calculate retry percentages."; + reference "1.3.0"; + } + + revision "2023-01-17" { + description + "Splits client phy-rate leaf into rx/tx phy-rate leaves. Marks phy-rate + as deprecated."; + reference "1.2.0"; + } + + revision "2022-03-24" { + description + "Update model to support operation in 6 GHz frequency."; + reference "1.1.0"; + } + + revision "2021-08-02" { + description + "Update tx/rx MCS rates, add AX as client connection mode."; + reference "1.0.0"; + } revision "2020-03-24" { description @@ -37,13 +81,13 @@ module openconfig-wifi-mac { revision "2018-12-19" { description "Frequency-specific data-rates, fix client connection-time, - fix client ipv6 addresses, remove mobility-domain."; + fix client IPv6 addresses, remove mobility-domain."; reference "0.4.0"; } revision "2018-07-16" { description - "Reorginize bssid-counters and add BSSID references. Add + "Reorganize bssid-counters and add BSSID references. Add vlan-list."; reference "0.3.0"; } @@ -57,7 +101,7 @@ module openconfig-wifi-mac { revision "2017-07-25" { description - "Initial revision"; + "Initial revision."; reference "0.1.0"; } @@ -111,7 +155,7 @@ module openconfig-wifi-mac { default "oc-wifi-types:FREQ_2_5_GHZ"; description "Operating frequency of this SSID. When none specified, the - default is dual-band."; + default is dual-band 2.4 and 5 GHz."; } leaf-list basic-data-rates-2g { @@ -145,6 +189,21 @@ module openconfig-wifi-mac { description "5GHz Supported data-rates for the SSID."; } + leaf-list basic-data-rates-6g { + type identityref { + base oc-wifi-types:DATA_RATE; + } + description + "6GHz Basic data-rates for the SSID."; + } + + leaf-list supported-data-rates-6g { + type identityref { + base oc-wifi-types:DATA_RATE; + } + description + "6GHz Supported data-rates for the SSID."; + } // MCS rates explicitly absent, as they are typically not pruned. leaf broadcast-filter { @@ -202,8 +261,40 @@ module openconfig-wifi-mac { description "WPA2-Enterprise with 802.1X authentication."; } + enum ENHANCED_OPEN { + description + "Open authentication with Opportunistic Wireless Encryption."; + } + enum ENHANCED_OPEN_TRANSITION { + description + "Open authentication with Opportunistic Wireless Encryption and + support for transition mode."; + } + enum WPA3_SAE { + description + "WPA3-SAE using Simultaneous Authentication of Equals (SAE)."; + } + enum WPA3_2_SAE_TRANSITION { + description + "WPA3-SAE using Simultaneous Authentication of Equals (SAE) and + WPA2-PSK AKMs."; + } + enum WPA3_ENTERPRISE { + description + "WPA3-Enterprise with 802.1X SHA-256 authentication key + management."; + } + enum WPA3_2_ENTERPRISE_TRANSITION { + description + "WPA3-Enterprise with 802.1X SHA-256 authentication key + management."; + } + enum WPA3_ENTERPRISE_192_BIT { + description + "WPA3-Enterprise with 802.1X SHA-384 authentication key + management."; + } } - default "OPEN"; description "The type of Layer2 authentication in use."; } @@ -217,17 +308,33 @@ module openconfig-wifi-mac { } description "The passphrase used on this WPA2-Personal SSID."; - } + } + + leaf wpa3-psk { + when "../opmode = 'WPA3_SAE' or + ../opmode = 'WPA3_2_SAE_TRANSITION'"; + type string { + length "8..63"; + } + description + "The passphrase used on this WPA3-SAE SSID."; + } leaf server-group { - when "../opmode = 'WPA2_ENTERPRISE' or ../opmode = - 'WPA2_PERSONAL'"; + when "../opmode = 'WPA2_ENTERPRISE' or + ../opmode = 'WPA2_PERSONAL' or + ../opmode = 'WPA3_ENTERPRISE' or + ../opmode = 'WPA3_2_ENTERPRISE_TRANSITION' or + ../opmode = 'WPA3_ENTERPRISE_192_BIT' or + ../opmode = 'WPA3_SAE' or + ../opmode = 'WPA3_2_SAE_TRANSITION'"; type string; description "Specifies the RADIUS server-group to be used, as defined in the openconfig-aaa.yang model. - Including WPA2_PERSONAL as it can be accompained by MAB."; + Including WPA2_PERSONAL and WPA3_SAE as they can be accompanied by + MAB."; } leaf dva { @@ -247,13 +354,13 @@ module openconfig-wifi-mac { leaf qbss-load { type boolean; description - "Advertisement of the QBSS Load Information ELement."; + "Advertisement of the QBSS Load Information Element."; } leaf advertise-apname { type boolean; description - "Advertise the AP hostname in Beacon and Probe Resp. frames."; + "Advertise the AP hostname in Beacon and Probe Response frames."; } leaf csa { @@ -288,6 +395,21 @@ module openconfig-wifi-mac { description "Enable/disable Opportunistic Key Caching."; } + + leaf mfp { + when "../opmode = 'WPA3_ENTERPRISE' or + ../opmode = 'WPA3_2_ENTERPRISE_TRANSITION' or + ../opmode = 'WPA3_ENTERPRISE_192_BIT' or + ../opmode = 'WPA3_SAE' or + ../opmode = 'WPA3_2_SAE_TRANSITION' or + ../opmode = 'ENHANCED_OPEN' or + ../opmode = 'ENHANCED_OPEN_TRANSITION' + "; + type boolean; + mandatory true; + description + "Management Frame Protection is required for WPA3 and OWE."; + } } grouping dot11v-config { @@ -334,7 +456,7 @@ module openconfig-wifi-mac { type uint16; description "Specify the mobility domain id (MDID) where PMK-R0 - distribution will occur. Specifically, which APs will recieve + distribution will occur. Specifically, which APs will receive PMK-R0 if using 802.11r (FT)."; } @@ -485,7 +607,7 @@ module openconfig-wifi-mac { path "../state/radio-id"; } description - "References the configured id of the radio"; + "References the configured id of the radio."; } container state { @@ -536,7 +658,7 @@ module openconfig-wifi-mac { leaf rx-bss-dot11-channel-utilization { type oc-types:percentage; description - "Recieve channel utilization percent caused by reception of + "receive channel utilization percent caused by reception of any 802.11 frame within this BSS."; } @@ -555,7 +677,7 @@ module openconfig-wifi-mac { container rx-data-dist { description "The distribution of Data frame sizes in bytes of - successfully recieved AMPDU, or MPDU for non-aggregated, + successfully received AMPDU, or MPDU for non-aggregated, frames. The distribution should characterize frame sizes starting at 64 bytes or less with the bin size doubling for each successive bin to a maximum of 1MB or larger, as @@ -766,6 +888,18 @@ module openconfig-wifi-mac { description "Rx Data frames at MCS 9."; } + + leaf mcs10 { + type oc-yang:counter64; + description + "Rx Data frames at MCS 10."; + } + + leaf mcs11 { + type oc-yang:counter64; + description + "Rx Data frames at MCS 11."; + } } leaf rx-retries { @@ -775,11 +909,24 @@ module openconfig-wifi-mac { within this BSS."; } + leaf rx-total-frames { + type oc-yang:counter64; + description + "Total number of received frames within this BSS."; + } + leaf rx-retries-data { type oc-yang:counter64; description - "Number of received QoS Data frames with the Retry bit set"; + "Number of received QoS Data frames with the Retry bit set."; } + + leaf rx-total-data { + type oc-yang:counter64; + description + "Number of received QoS Data frames."; + } + leaf rx-retries-subframe { type oc-yang:counter64; description @@ -787,10 +934,16 @@ module openconfig-wifi-mac { and require retransmission."; } + leaf rx-total-subframe { + type oc-yang:counter64; + description + "Total Aggregated MPDUs received."; + } + leaf rx-bytes-data { type oc-yang:counter64; description - "Bytes received from QoS Data frames"; + "Bytes received from QoS Data frames."; } // Tx Counters @@ -1026,19 +1179,43 @@ module openconfig-wifi-mac { description "Tx Data frames at MCS 9."; } + + leaf mcs10 { + type oc-yang:counter64; + description + "Tx Data frames at MCS 10."; + } + + leaf mcs11 { + type oc-yang:counter64; + description + "Tx Data frames at MCS 11."; + } } leaf tx-retries { type oc-yang:counter64; description - "Number of frames transmitted with the Retry bit set"; + "Number of frames transmitted with the Retry bit set."; + } + + leaf tx-total-frames { + type oc-yang:counter64; + description + "Number of frames transmitted."; } leaf tx-retries-data { type oc-yang:counter64; description "Number of transmitted QoS Data frames with the Retry bit - set"; + set."; + } + + leaf tx-total-data { + type oc-yang:counter64; + description + "Number of transmitted QoS Data frames."; } leaf tx-retries-subframe { @@ -1048,10 +1225,16 @@ module openconfig-wifi-mac { and require retransmission."; } + leaf tx-total-subframe { + type oc-yang:counter64; + description + "Aggregated MPDUs total frames transmitted."; + } + leaf tx-bytes-data { type oc-yang:counter64; description - "Bytes transmitted from QoS Data frames"; + "Bytes transmitted from QoS Data frames."; } // Total Counters leaf bss-channel-utilization { @@ -1097,11 +1280,23 @@ module openconfig-wifi-mac { "Rx retried frames from this client."; } + leaf rx-total { + type oc-yang:counter64; + description + "Rx frames from this client."; + } + leaf tx-retries { type oc-yang:counter64; description "Tx retried frames to this client."; } + + leaf tx-total { + type oc-yang:counter64; + description + "Tx frames to this client."; + } } } @@ -1134,7 +1329,7 @@ module openconfig-wifi-mac { type string; description "Username of Client; can be outer-identity (if PEAP), - CN of certificate (if EAP-TLS) etc."; + CN of certificate (if EAP-TLS), etc."; } leaf hostname { @@ -1244,7 +1439,7 @@ module openconfig-wifi-mac { type int8; description "The RSSI of this client in dBm. Expressed as negative - number"; + number."; } leaf snr { @@ -1261,10 +1456,23 @@ module openconfig-wifi-mac { leaf phy-rate { type uint16; + status deprecated; description "Last used PHY rate of connected client."; } + leaf rx-phy-rate { + type uint16; + description + "Last used PHY rate received from connected client in Mbps."; + } + + leaf tx-phy-rate { + type uint16; + description + "Last used PHY rate transmitted to connected client in Mbps."; + } + leaf connection-mode { type enumeration { enum A { @@ -1287,6 +1495,10 @@ module openconfig-wifi-mac { description "Client connected using 802.11ac."; } + enum AX { + description + "Client connected using 802.11ax."; + } } description "802.11 protocol used for the client's connection."; @@ -1295,8 +1507,8 @@ module openconfig-wifi-mac { leaf frequency { type uint8; description - "Frequency the client is utilizing. Typically, 2.4 or - 5[GHz]."; + "Frequency the client is utilizing. Typically, 2 for a client + connecting over 2.4GHz, 5 and 6 for 5/6GHz respectively."; } } } @@ -1488,30 +1700,30 @@ module openconfig-wifi-mac { grouping ssid-top { description - "Top-level grouping for ssid configuration and operational state + "Top-level grouping for SSID configuration and operational state data."; container ssids { description - "Top level container for ssids, including configuration + "Top level container for SSIDs, including configuration and state data."; list ssid { key "name"; description - "The list of named ssids on the APs."; + "The list of named SSIDs on the APs."; leaf name { type leafref { path "../config/name"; } description - "References the configured name of the ssid"; + "References the configured name of the SSID."; } container config { description - "Configurable items at the global, ssid level"; + "Configurable items at the global, SSID level"; uses ssid-common-config; } @@ -1519,7 +1731,7 @@ module openconfig-wifi-mac { container state { config false; description - "Operational state data at the ssid level"; + "Operational state data at the SSID level"; uses ssid-common-config; } diff --git a/release/models/wifi/openconfig-wifi-phy.yang b/release/models/wifi/openconfig-wifi-phy.yang index 96681cbb4..cf328248d 100644 --- a/release/models/wifi/openconfig-wifi-phy.yang +++ b/release/models/wifi/openconfig-wifi-phy.yang @@ -25,11 +25,53 @@ module openconfig-wifi-phy { description "Model for managing PHY layer configuration of Radio interfaces."; - oc-ext:openconfig-version "0.4.2"; + oc-ext:openconfig-version "1.2.4"; + + revision "2024-07-10" { + description + "Adding TRANSITION modes to PHY OPMODES"; + reference "1.2.4"; + } + + revision "2023-11-30" { + description + "Add allowed-max-eirp and allowed-max-txpower radio state leaves."; + reference "1.2.3"; + } + + revision "2023-05-26" { + description + "Minor cleanup in descriptions."; + reference "1.2.2"; + } + + revision "2023-04-25" { + description + "Update description for neighbor RSSI to specify as a negative number."; + reference "1.2.1"; + } + + revision "2022-09-16" { + description + "Adds obss-rx and clarifies language on rx-dot11-channel-utilization."; + reference "1.2.0"; + } + + revision "2022-03-24" { + description + "Update model to support operation in 6 GHz frequency."; + reference "1.1.0"; + } + + revision "2021-08-02" { + description + "Add BSS color to radio config and neighbor table."; + reference "1.0.0"; + } revision "2020-03-24" { description - "Update namespace based on new directory structure"; + "Update namespace based on new directory structure."; reference "0.4.2"; } @@ -116,7 +158,7 @@ module openconfig-wifi-phy { leaf channel { type uint8 { - range "1..165"; + range "1..233"; } description "Operating channel of this radio. If using channel-bonding @@ -132,6 +174,21 @@ module openconfig-wifi-phy { "Operating channel-width of this radio."; } + leaf bss-coloring { + type boolean; + default "true"; + description + "Utilize BSS coloring on this radio."; + } + + leaf bss-color-id { + type uint8 { + range "1..63"; + } + description + "Numerical identifier of the BSS."; + } + leaf dca { type boolean; default "true"; @@ -209,7 +266,7 @@ module openconfig-wifi-phy { type uint8; description "Sets the number of associated stations after which the radio - should not perform scanning"; + should not perform scanning."; } leaf scanning-defer-traffic { @@ -279,19 +336,20 @@ module openconfig-wifi-phy { Radio. The total channel utilization should include all time periods the AP spent actively receiving and transmitting 802.11 frames, and also include all time spent with clear - channel assessment (CCA) in a busy state"; + channel assessment (CCA) in a busy state."; } leaf rx-dot11-channel-utilization { type oc-types:percentage; description - "Received channel-utilization due to 802.11 frames"; + "Received channel-utilization due to any 802.11 frames, destined to this + radio or otherwise."; } leaf rx-noise-channel-utilization { type oc-types:percentage; description - "Received channel-utilization percentage due to Noise."; + "Received channel-utilization percentage due to noise."; } leaf tx-dot11-channel-utilization { @@ -299,6 +357,27 @@ module openconfig-wifi-phy { description "Transmit channel-utilization percentage."; } + + leaf allowed-max-eirp { + type uint8; + units dBm; + description + "Maximum allowed transmit eirp of this radio + antenna, of the current channel, in dBm."; + } + + leaf allowed-max-txpower { + type uint8; + units dBm; + description + "Maximum allowed transmit power of this radio, of the current channel, in dBm."; + } + + leaf obss-rx { + type oc-types:percentage; + description + "Received channel utilization due to 802.11 frames NOT destined to a + BSS on this AP ('Overlapping BSS')."; + } } grouping radio-counters-state { @@ -312,7 +391,7 @@ module openconfig-wifi-phy { leaf failed-fcs-frames { type oc-yang:counter64; description - "Number of frames that failed the FCS"; + "Number of frames that failed the FCS."; } // Tx Counters @@ -324,7 +403,6 @@ module openconfig-wifi-phy { } } - // neighbor BSSID | SSID | RSSI | Channel | Center Channel | Last-seen grouping neighbor-list-state { description "Operational state data relating to neighboring @@ -344,7 +422,7 @@ module openconfig-wifi-phy { leaf rssi { type int8; description - "The RSSI of this neighboring BSSID."; + "The RSSI of this neighboring BSSID, expressed as a negative number."; } leaf channel { @@ -363,6 +441,14 @@ module openconfig-wifi-phy { bonded channel."; } + leaf bss-color-id { + type uint8 { + range "1..63"; + } + description + "Numerical identifier of the BSS."; + } + leaf last-seen { type oc-types:timeticks64; units nanoseconds; @@ -400,6 +486,44 @@ module openconfig-wifi-phy { description "Any flavor of WEP encryption."; } + enum ENHANCED_OPEN { + description + "Open authentication with Opportunistic Wireless Encryption."; + } + enum ENHANCED_OPEN_TRANSITION { + description + "Open authentication with Opportunistic Wireless Encryption and + support for transition mode."; + } + enum WPA3_SAE { + description + "WPA3-SAE using Simultaneous Authentication of Equals (SAE)."; + } + enum WPA3_2_SAE_TRANSITION { + description + "WPA3-SAE using Simultaneous Authentication of Equals (SAE) and + WPA2-PSK AKMs."; + } + enum WPA3_ENTERPRISE { + description + "WPA3-Enterprise with 802.1X SHA-256 authentication key + management."; + } + enum WPA3_2_ENTERPRISE_TRANSITION { + description + "WPA3-Enterprise with 802.1X SHA-256 authentication key + management."; + } + enum WPA3_ENTERPRISE_192_BIT { + description + "WPA3-Enterprise with 802.1X SHA-384 authentication key + management."; + } + enum WPA3_ENTERPRISE_GCM_256_BIT { + description + "WPA3-Enterprise with 802.1X GCM256 authentication key + management."; + } } description "Operating mode of the BSS."; @@ -419,7 +543,7 @@ module openconfig-wifi-phy { key "bssid"; config false; description - "The mac address, or BSSID, of a neighbor, and + "The MAC address, or BSSID, of a neighbor, and their corresponding RSSI."; leaf bssid { @@ -427,7 +551,7 @@ module openconfig-wifi-phy { path "../state/bssid"; } config false; - description "Reference to neighbor bssid."; + description "Reference to neighbor BSSID."; } container state { @@ -474,7 +598,7 @@ module openconfig-wifi-phy { container config { description "Configurable items at the global, radio interface - level"; + level."; uses radio-common-config; } @@ -482,7 +606,7 @@ module openconfig-wifi-phy { container state { config false; description - "Operational state data at the global radio level"; + "Operational state data at the global radio level."; uses radio-common-config; uses radio-common-state; diff --git a/release/models/wifi/openconfig-wifi-types.yang b/release/models/wifi/openconfig-wifi-types.yang index cb58885f7..225cc2a76 100644 --- a/release/models/wifi/openconfig-wifi-types.yang +++ b/release/models/wifi/openconfig-wifi-types.yang @@ -22,30 +22,60 @@ module openconfig-wifi-types { that are used in the openconfig-wifi modules. It can be imported by any module to make use of these types."; - oc-ext:openconfig-version "0.1.2"; + oc-ext:openconfig-version "1.1.3"; + + revision "2024-04-25" { + description + "Adding INACTIVE client_state"; + reference "1.1.3"; + } + + revision "2023-09-01" { + description + "Adding FREQ_2_6_GHZ."; + reference "1.1.2"; + } + + revision "2022-05-26" { + description + "Fix typos in descriptions."; + reference "1.1.1"; + } + + revision "2022-03-24" { + description + "Update model to support operation in 6 GHz frequency."; + reference "1.1.0"; + } + + revision "2021-08-02" { + description + "Add OFDMA in client capabilities."; + reference "1.0.0"; + } revision "2020-05-19" { description - "Update namespace per new directory structure"; + "Update namespace per new directory structure."; reference "0.1.2"; } revision "2020-03-24" { description - "Update namespace and fix BETTER_CHANNEL enum"; + "Update namespace and fix BETTER_CHANNEL enum."; reference "0.1.1"; } revision "2017-07-25" { description - "Initial revision"; + "Initial revision."; reference "0.1.0"; } //typdef statements typedef channels-type { type uint8 { - range "1..14 | 36 | 40 | 44| 48 | 52 | 56 | 60 | 64 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | 128 | 132 | 136 | 140 | 144 | 149 | 153 | 157 | 161 | 165"; + range "1..14 | 17 | 21 | 25 | 29 | 33 | 36 | 37 | 40 | 41 | 44 | 45 | 48 | 49 | 52 | 53 | 56 | 57 | 60 | 61 | 64 | 65 | 69 | 73 | 77 | 81 | 85 | 89 | 93 | 97 | 100 | 101 | 104 | 105 | 108 | 109 | 112 | 113 | 116 | 117 | 120 | 121 | 124 | 125 | 128 | 129 | 132 | 133 | 136 | 137 | 140 | 141 | 144 | 145 | 149 | 153 | 157 | 161 | 165 | 169 | 173 | 177 | 181 | 185 | 189 | 193 | 197 | 201 | 205 | 209 | 213 | 217 | 221 | 225 | 229 | 233"; } description "Type to specify all the WiFi channels available for use. This is @@ -69,13 +99,13 @@ module openconfig-wifi-types { identity L2AUTH_REQD { base CLIENT_STATE; description - "Client has Assocated, but not L2 Authenticated (e.g. 802.1X)"; + "Client has Associated, but not L2 Authenticated (e.g. 802.1X)"; } identity L3AUTH_REQD { base CLIENT_STATE; description - "Client has Assocated, but not L3 Authenticated (e.g. Captive Portal)"; + "Client has Associated, but not L3 Authenticated (e.g. Captive Portal)."; } identity DHCP_REQD { @@ -112,14 +142,14 @@ module openconfig-wifi-types { identity DHCP_FAILURE { base CLIENT_STATE; description - "Client has Associated & Authenticated but has failed to recieve an IP + "Client has Associated & Authenticated but has failed to receive an IP address, utilizing DHCP."; } identity POWERSAVE { base CLIENT_STATE; description - "AP has recieved a PS frame, indicating the client is currently in a + "AP has received a PS frame, indicating the client is currently in a powersave state."; } @@ -130,6 +160,13 @@ module openconfig-wifi-types { (signature) mechanisms."; } + identity INACTIVE { + base CLIENT_STATE; + description + "Client is no longer active in the 802.11 state machine. Client data + remains in the client state, but client is no longer active on AP."; + } + identity AP_STATE { description "The Up/Down state of an AP."; } @@ -159,62 +196,62 @@ module openconfig-wifi-types { identity RATE_1MB { base DATA_RATE; - description "1 Mbps DSSS PHY"; + description "1 Mbps DSSS PHY."; } identity RATE_2MB { base DATA_RATE; - description "2 Mbps DSSS PHY"; + description "2 Mbps DSSS PHY."; } identity RATE_5.5MB { base DATA_RATE; - description "5.5 Mbps DSSS PHY"; + description "5.5 Mbps DSSS PHY."; } identity RATE_6MB { base DATA_RATE; - description "6 Mbps OFDM PHY"; + description "6 Mbps OFDM PHY."; } identity RATE_9MB { base DATA_RATE; - description "9 Mbps OFDM PHY"; + description "9 Mbps OFDM PHY."; } identity RATE_11MB { base DATA_RATE; - description "11 Mbps DSSS PHY"; + description "11 Mbps DSSS PHY."; } identity RATE_12MB { base DATA_RATE; - description "12 Mbps OFDM PHY"; + description "12 Mbps OFDM PHY."; } identity RATE_18MB { base DATA_RATE; - description "18 Mbps OFDM PHY"; + description "18 Mbps OFDM PHY."; } identity RATE_24MB { base DATA_RATE; - description "24 Mbps OFDM PHY"; + description "24 Mbps OFDM PHY."; } identity RATE_36MB { base DATA_RATE; - description "36 Mbps OFDM PHY"; + description "36 Mbps OFDM PHY."; } identity RATE_48MB { base DATA_RATE; - description "48 Mbps OFDM PHY"; + description "48 Mbps OFDM PHY."; } identity RATE_54MB { base DATA_RATE; - description "54 Mbps OFDM PHY"; + description "54 Mbps OFDM PHY."; } identity OPERATING_FREQUENCY { @@ -235,17 +272,36 @@ module openconfig-wifi-types { base OPERATING_FREQUENCY; description "The Radio or SSID will be dual-band; operating in - both 2.4 & 5GHz frequencies. + both 2.4 & 5GHz frequencies."; + } + + identity FREQ_6GHZ { + base OPERATING_FREQUENCY; + description "The Radio or SSID will operate at 6GHz only."; + } + + identity FREQ_5_6_GHZ { + base OPERATING_FREQUENCY; + description "The Radio or SSID will be dual-band; operating in both 5 & + 6GHz frequencies."; + } + + identity FREQ_2_5_6_GHZ { + base OPERATING_FREQUENCY; + description "The Radio or SSID will be tri-band; operating in 2.4, 5 and + 6GHz frequencies."; + } - Dual-band Radio typically refers to a Monitor-mode radio, hopping - between frequencies, dwelling for a configurable amount of time on - each frequency."; + identity FREQ_2_6_GHZ { + base OPERATING_FREQUENCY; + description "The Radio or SSID will be dual band; operating in 2.4 and + 6GHz frequencies."; } identity CLIENT_CAPABILITIES { description - "Client capabilities, as reported by Assoc. Req. or - Probe Req. frames."; + "Client capabilities, as reported by Association Request or + Probe Request frames."; } identity MU_BEAMFORMER { @@ -253,11 +309,16 @@ module openconfig-wifi-types { description "Whether this STA can MU-MIMO Beamform."; } - identity MU_BEAMFORMEE { + identity MU_BEAMFORMEE { base CLIENT_CAPABILITIES; description "Whether this STA can Rx MU-MIMO Beamformed frames."; } + identity OFDMA { + base CLIENT_CAPABILITIES; + description "Whether this STA can use OFDMA."; + } + identity DOT_11R { base CLIENT_CAPABILITIES; description @@ -269,8 +330,13 @@ module openconfig-wifi-types { base CLIENT_CAPABILITIES; description "Whether this STA supports 802.11v BSS Transition. Note, must - be enabled on BSS for this to be accurate; unless Probe Req. - are observied in addition to Assoc. Req."; + be enabled on BSS for this to be accurate; unless Probe Request + are observed in addition to Association Request."; + } + + identity MFP { + base CLIENT_CAPABILITIES; + description "Whether this STA can use Management Frame Protection."; } identity CHANGE_REASON_TYPE { @@ -281,20 +347,20 @@ module openconfig-wifi-types { identity DFS { base CHANGE_REASON_TYPE; description - "DFS hit occured."; + "DFS hit occurred."; } identity NOISE { base CHANGE_REASON_TYPE; description - "Excessive amounts of non-802.11 Noise occured."; + "Excessive amounts of non-802.11 Noise occurred."; } identity ERRORS { base CHANGE_REASON_TYPE; description "Excessive reception of frames which - failed the FCS occured."; + failed the FCS occurred."; } identity BETTER_CHANNEL {