Skip to content

Commit

Permalink
Update the qualifications prefixes in the NI module - 1003 (openconfi…
Browse files Browse the repository at this point in the history
…g#1011)

 * (M) release/models/network-instance/openconfig-network-instance-l2.yang
 * (M) release/models/network-instance/openconfig-network-instance.yang
  - Make namespace prefixes fully qualified within the network-instance
    model.
  • Loading branch information
robshakir committed Oct 14, 2021
1 parent 4b58ef8 commit 7d8d7f4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ submodule openconfig-network-instance-l2 {
import openconfig-extensions { prefix "oc-ext"; }
import openconfig-interfaces { prefix "oc-if"; }
import ietf-yang-types { prefix "yang"; }
import ietf-inet-types { prefix "inet"; }
import openconfig-evpn-types { prefix oc-evpn-types; }
import openconfig-evpn { prefix "oc-evpn"; }

Expand All @@ -24,7 +23,13 @@ submodule openconfig-network-instance-l2 {
Layer 2 network instance configuration and operational state
parameters.";

oc-ext:openconfig-version "0.16.0";
oc-ext:openconfig-version "0.16.1";

revision "2021-07-22" {
description
"Remove unused imported models.";
reference "0.16.1";
}

revision "2021-06-11" {
description
Expand Down
44 changes: 25 additions & 19 deletions release/models/network-instance/openconfig-network-instance.yang
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ module openconfig-network-instance {
virtual switch instance (VSI). Mixed Layer 2 and Layer 3
instances are also supported.";

oc-ext:openconfig-version "0.16.0";
oc-ext:openconfig-version "0.16.1";

revision "2021-07-22" {
description
"Add prefix to qualify when statements";
reference "0.16.1";
}

revision "2021-06-11" {
description
Expand Down Expand Up @@ -246,10 +252,10 @@ module openconfig-network-instance {
}

uses l2ni-instance {
when "./config/type = 'L2VSI'
or ./config/type = 'L2P2P'
or ./config/type = 'L2L3'
or ./config/type = 'DEFAULT_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
Expand Down Expand Up @@ -277,8 +283,8 @@ module openconfig-network-instance {
}

container evpn {
when "./config/type = 'L2VSI'
or ./config/type = '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";
}
Expand All @@ -290,7 +296,7 @@ module openconfig-network-instance {
}

container encapsulation {
when "../config/type != 'DEFAULT_INSTANCE'" {
when "../config/type != 'oc-ni-types:DEFAULT_INSTANCE'" {
description
"Only allow the encapsulation of the instance to be
set when the instance is not the default instance";
Expand All @@ -307,8 +313,8 @@ module openconfig-network-instance {
uses encapsulation-config;

uses l2ni-encapsulation-config {
when "./config/type = 'L2VSI' or ./config/type = 'L2P2P'
or ./config/type = '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
Expand All @@ -325,8 +331,8 @@ module openconfig-network-instance {
uses encapsulation-config;

uses l2ni-encapsulation-config {
when "./config/type = 'L2VSI' or ./config/type = 'L2P2P'
or ./config/type = '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
Expand Down Expand Up @@ -558,8 +564,8 @@ module openconfig-network-instance {
}

container endpoints {
when "../../../config/type = 'L2P2P' " +
"or ../../../config/type = 'L2VSI'" {
when "../../../config/type = 'oc-ni-types:L2P2P' " +
"or ../../../config/type = 'oc-ni-types:L2VSI'" {
description
"Configuration parameters to associate interfaces
into a common group for use in Layer 2 network
Expand Down Expand Up @@ -676,15 +682,15 @@ module openconfig-network-instance {
}

uses oc-mpls:mpls-top {
when "./config/type = 'DEFAULT_INSTANCE'" {
when "./config/type = 'oc-ni-types:DEFAULT_INSTANCE'" {
description
"MPLS configuration is only valid within the default
network instance.";
}
}

uses oc-sr:sr-top {
when "./config/type = 'DEFAULT_INSTANCE'" {
when "./config/type = 'oc-ni-types:DEFAULT_INSTANCE'" {
description
"Segment routing configuration is only valid with the default
network instance.";
Expand Down Expand Up @@ -832,16 +838,16 @@ module openconfig-network-instance {
"Type dependent network instance configuration";

uses oc-ni-l3:l3ni-instance-common-config {
when "./type = 'L3VRF' or ./type = 'L2L3'" {
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 = 'L2VSI' or ./type = 'L2P2P'" +
" or ./type = 'L2L3'" {
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
Expand Down

0 comments on commit 7d8d7f4

Please sign in to comment.