From ac1c0b2cdbfd0926bbfc49f480ad3628dfde2e7d Mon Sep 17 00:00:00 2001 From: "Tarek Saad (tsaad)" Date: Fri, 26 Jan 2024 13:49:14 -0500 Subject: [PATCH] Addressed comments --- ietf-te-types.yang | 39 ++++++++++++++++++++++++++++++++++++ ietf-te.tree | 15 +++++++------- ietf-te.yang | 50 +++------------------------------------------- 3 files changed, 49 insertions(+), 55 deletions(-) diff --git a/ietf-te-types.yang b/ietf-te-types.yang index c96ffa0..a63d268 100644 --- a/ietf-te-types.yang +++ b/ietf-te-types.yang @@ -613,6 +613,16 @@ module ietf-te-types { path."; } + typedef te-gen-node-id { + type union { + type te-node-id; + type inet:ip-address; + type nw:node-id; + } + description + "Generic type that identifies a node in a TE topology."; + } + /* TE features */ feature p2mp-te { @@ -2643,6 +2653,35 @@ module ietf-te-types { * TE bandwidth groupings **/ + grouping te-generic-node-id { + description + "A reusable grouping for a TE generic node identifier."; + leaf id { + type te-gen-node-id; + description + "The identifier of the node. Can be represented as IP + address or dotted quad address or as an URI."; + } + leaf type { + type enumeration { + enum ip { + description + "IP address representation of the node identifier."; + } + enum te-id { + description + "TE identifier of the node"; + } + enum node-id { + description + "URI representation of the node identifier."; + } + } + description + "Type of node identifier representation."; + } + } + grouping te-bandwidth { description "This grouping defines the generic TE bandwidth. diff --git a/ietf-te.tree b/ietf-te.tree index 8f6ee82..be0570b 100644 --- a/ietf-te.tree +++ b/ietf-te.tree @@ -136,14 +136,11 @@ module: ietf-te +--ro output +--ro action-result? identityref - grouping te-generic-node-id: - +-- id? te-gen-node-id - +-- type? enumeration grouping path-common-properties: +-- name? string +-- path-computation-method? identityref +-- path-computation-server - | +---u te-generic-node-id + | +---u te-types:te-generic-node-id +-- compute-only? empty +-- use-path-computation? boolean +-- lockdown? empty @@ -205,13 +202,13 @@ module: ietf-te | +-- type? identityref | +-- id? uint16 | +-- source - | +---u te-generic-node-id + | +---u te-types:te-generic-node-id +-- association-object-extended* [association-key] +-- association-key? string +-- type? identityref +-- id? uint16 +-- source - | +---u te-generic-node-id + | +---u te-types:te-generic-node-id +-- global-source? uint32 +-- extended-id? yang:hex-string grouping tunnel-end-point: @@ -228,8 +225,7 @@ module: ietf-te +-- hierarchy +-- dependency-tunnels | +-- dependency-tunnel* [name] - | +-- name? - | | -> /te/tunnels/tunnel/name + | +-- name? tunnel-ref | +---u te-types:encoding-and-switching-type +-- hierarchical-link +-- enable? boolean @@ -237,8 +233,11 @@ module: ietf-te +-- local-te-node-id? te-types:te-node-id +-- local-link-tp-id? nt:tp-id +-- local-te-link-tp-id? te-types:te-tp-id + +-- remote-node-id? nw:node-id +-- remote-link-tp-id? nt:tp-id + +-- remote-te-link-tp-id? te-types:te-tp-id +-- remote-te-node-id? te-types:te-node-id + +--ro link-id? nt:link-id +-- network-id? nw:network-id +---u te-types:te-topology-identifier grouping path-constraints-common: diff --git a/ietf-te.yang b/ietf-te.yang index 368deed..61ca6c9 100644 --- a/ietf-te.yang +++ b/ietf-te.yang @@ -14,11 +14,6 @@ module ietf-te { "draft-ietf-teas-rfc8776-update: Common YANG Data Types for Traffic Engineering."; } - import ietf-inet-types { - prefix inet; - reference - "RFC6991: Common YANG Data Types."; - } import ietf-yang-types { prefix yang; reference @@ -105,49 +100,10 @@ module ietf-te { configured TE tunnel."; } - typedef te-gen-node-id { - type union { - type te-types:te-node-id; - type inet:ip-address; - type nw:node-id; - } - description - "Generic type that identifies a node in a TE topology."; - } - /** * TE tunnel generic groupings */ - grouping te-generic-node-id { - description - "A reusable grouping for a TE generic node identifier."; - leaf id { - type te-gen-node-id; - description - "The identifier of the node. Can be represented as IP - address or dotted quad address or as an URI."; - } - leaf type { - type enumeration { - enum ip { - description - "IP address representation of the node identifier."; - } - enum te-id { - description - "TE identifier of the node"; - } - enum node-id { - description - "URI representation of the node identifier."; - } - } - description - "Type of node identifier representation."; - } - } - grouping path-common-properties { description "Common path attributes."; @@ -173,7 +129,7 @@ module ietf-te { "The path-computation server when the path is externally queried."; } - uses te-generic-node-id; + uses te-types:te-generic-node-id; description "Address of the external path computation server."; @@ -562,7 +518,7 @@ module ietf-te { "RFC4872"; } container source { - uses te-generic-node-id; + uses te-types:te-generic-node-id; description "Association source."; reference @@ -600,7 +556,7 @@ module ietf-te { "RFC4872, RFC6780"; } container source { - uses te-generic-node-id; + uses te-types:te-generic-node-id; description "Association source."; reference