Skip to content

Commit

Permalink
Merge branch 'master' into dplore/mgmt-cpu-if-descr
Browse files Browse the repository at this point in the history
  • Loading branch information
dplore authored Aug 6, 2024
2 parents f1beee4 + 8dc427e commit 31b8562
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 14 deletions.
5 changes: 5 additions & 0 deletions regexp-tests/openconfig-network-instance-types-test.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down
13 changes: 13 additions & 0 deletions regexp-tests/openconfig-yang-types-test.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
17 changes: 13 additions & 4 deletions release/models/keychain/openconfig-keychain.yang
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ module openconfig-keychain {
which may be then referenced by other models such as routing protocol
management.";

oc-ext:openconfig-version "0.4.0";
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
Expand Down Expand Up @@ -194,13 +200,16 @@ module openconfig-keychain {

leaf key-id {
type union {
type oc-yang:hex-string {
length "1..64";
type oc-yang:hex-string-prefixed {
length "3..66";
}
type uint64;
}
description
"Identifier for the key within the keychain.";
"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 {
Expand Down
21 changes: 20 additions & 1 deletion release/models/optical-transport/openconfig-terminal-device.yang
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ module openconfig-terminal-device {
ports per linecard, separate linecards for client and line ports,
etc.).";

oc-ext:openconfig-version "1.9.1";
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
Expand Down Expand Up @@ -1325,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 {
Expand Down
25 changes: 18 additions & 7 deletions release/models/policy/openconfig-policy-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,9 +25,15 @@ module openconfig-policy-types {
policy. It can be imported by modules that contain protocol-
specific policy conditions and actions.";

oc-ext:openconfig-version "3.2.3";
oc-ext:openconfig-version "3.3.0";

revision "2022-11-08" {
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";
Expand Down Expand Up @@ -165,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 {
Expand Down
24 changes: 22 additions & 2 deletions release/models/types/openconfig-yang-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 31b8562

Please sign in to comment.