Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dplore authored Nov 28, 2023
2 parents e86f152 + 4e6c1bf commit 61107fe
Show file tree
Hide file tree
Showing 56 changed files with 1,721 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Install openconfig-ci CLI
run: |
go install github.com/openconfig/models-ci/openconfig-ci@c880ed2
go install github.com/openconfig/models-ci/openconfig-ci@05dd074
- name: Make sure all backward-incompatible changes are covered by version changes.
id: check
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 19 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,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 'v11.*' | sort -V | tail -1)
branch=$(git tag -l 'v13.*' | sort -V | tail -1)
git checkout $branch
volumes:
- name: 'ssh'
Expand Down Expand Up @@ -90,7 +90,6 @@ steps:
-skipped-validators=confd,yanglint
-extra-pyang-versions=2.2.1
-branch=$BRANCH_NAME
-compat-report=pyangbind
secretEnv: ['GITHUB_ACCESS_TOKEN']
env:
- 'GOPATH=/go'
Expand Down Expand Up @@ -230,6 +229,24 @@ steps:
waitFor: ['validator prep', 'go path creation', 'oc-pyang']
id: 'goyang-ygot'

############### 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']
id: 'ygnmi'

############### PYANG ###############
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
Expand Down
5 changes: 4 additions & 1 deletion doc/network_instance_redistribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions release/models/aft/.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 15 additions & 1 deletion release/models/aft/openconfig-aft-common.yang
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ submodule openconfig-aft-common {
"Submodule containing definitions of groupings that are re-used
across multiple contexts within the AFT model.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down Expand Up @@ -579,6 +585,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
Expand Down
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft-ethernet.yang
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ submodule openconfig-aft-ethernet {
"Submodule containing definitions of groupings for the abstract
forwarding tables for Ethernet.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft-ipv4.yang
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv4 {
"Submodule containing definitions of groupings for the abstract
forwarding tables for IPv4.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft-ipv6.yang
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv6 {
"Submodule containing definitions of groupings for the abstract
forwarding tables for IPv6.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft-mpls.yang
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ submodule openconfig-aft-mpls {
"Submodule containing definitions of groupings for the abstract
forwarding table for MPLS label forwarding.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft-pf.yang
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ submodule openconfig-aft-pf {
fields other than the destination address that is used in
other forwarding tables.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft-state-synced.yang
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ submodule openconfig-aft-state-synced {
"Submodule containing definitions of groupings for the state
synced signals corresponding to various abstract forwarding tables.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
120 changes: 120 additions & 0 deletions release/models/aft/openconfig-aft-summary.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
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-yang-types { prefix "oc-yang-types"; }
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.1.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 oc-yang-types:counter64;
}
}
}

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.";
}
}

}
8 changes: 7 additions & 1 deletion release/models/aft/openconfig-aft.yang
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ module openconfig-aft {
is referred to as an Abstract Forwarding Table (AFT), rather than
the FIB.";

oc-ext:openconfig-version "2.3.0";
oc-ext:openconfig-version "2.4.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
Expand Down
10 changes: 8 additions & 2 deletions release/models/bfd/openconfig-bfd.yang
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ module openconfig-bfd {
"An OpenConfig model of Bi-Directional Forwarding Detection (BFD)
configuration and operational state.";

oc-ext:openconfig-version "0.2.5";
oc-ext:openconfig-version "0.2.6";

revision "2023-08-09" {
description
"Update interface key to use interface-id type";
reference "0.2.6";
}

revision "2023-02-06" {
description
Expand Down Expand Up @@ -194,7 +200,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.";
}
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-common-multiprotocol.yang
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ submodule openconfig-bgp-common-multiprotocol {
for multiple protocols in BGP. The groupings are common across
multiple contexts.";

oc-ext:openconfig-version "9.4.1";
oc-ext:openconfig-version "9.5.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
Expand Down
8 changes: 7 additions & 1 deletion release/models/bgp/openconfig-bgp-common-structure.yang
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ 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 "9.4.1";
oc-ext:openconfig-version "9.5.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
Expand Down
Loading

0 comments on commit 61107fe

Please sign in to comment.