From 472650ca03337d2cf21bc4e4b37be98727762f0c Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Mon, 25 Mar 2024 17:19:12 -0700 Subject: [PATCH 1/8] AAA server group change. Keep deprecated nodes --- .../models/system/openconfig-aaa-radius.yang | 1 + .../models/system/openconfig-aaa-tacacs.yang | 1 + release/models/system/openconfig-aaa.yang | 164 +++++++++++++++++- 3 files changed, 159 insertions(+), 7 deletions(-) diff --git a/release/models/system/openconfig-aaa-radius.yang b/release/models/system/openconfig-aaa-radius.yang index 7b1930df8..52ba5f55e 100644 --- a/release/models/system/openconfig-aaa-radius.yang +++ b/release/models/system/openconfig-aaa-radius.yang @@ -91,6 +91,7 @@ submodule openconfig-aaa-radius { leaf auth-port { type oc-inet:port-number; + status deprecated; default 1812; description "Port number for authentication requests"; diff --git a/release/models/system/openconfig-aaa-tacacs.yang b/release/models/system/openconfig-aaa-tacacs.yang index d96bc0f07..6efa2d56f 100644 --- a/release/models/system/openconfig-aaa-tacacs.yang +++ b/release/models/system/openconfig-aaa-tacacs.yang @@ -91,6 +91,7 @@ submodule openconfig-aaa-tacacs { leaf port { type oc-inet:port-number; + status deprecated; default 49; description "The port number on which to contact the TACACS server"; diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index 274c97e81..1949cbf91 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -12,6 +12,7 @@ module openconfig-aaa { import openconfig-inet-types { prefix oc-inet; } import openconfig-yang-types { prefix oc-yang; } import openconfig-aaa-types { prefix oc-aaa-types; } + import openconfig-network-instance { prefix "oc-ni"; } include openconfig-aaa-tacacs; include openconfig-aaa-radius; @@ -100,6 +101,7 @@ module openconfig-aaa { grouping aaa-servergroup-common-config { description "Configuration data for AAA server groups"; + status deprecated; leaf name { type string; @@ -120,6 +122,7 @@ module openconfig-aaa { grouping aaa-servergroup-common-state { description "Operational state data for AAA server groups"; + status deprecated; //TODO: add list of group members as opstate } @@ -127,6 +130,7 @@ module openconfig-aaa { grouping aaa-servergroup-common-top { description "Top-level grouping for AAA server groups"; + status deprecated; container server-groups { description @@ -151,7 +155,9 @@ module openconfig-aaa { description "Configuration data for each server group"; - uses aaa-servergroup-common-config; + uses aaa-servergroup-common-config { + status deprecated; + } } container state { @@ -160,16 +166,48 @@ module openconfig-aaa { description "Operational state data for each server group"; - uses aaa-servergroup-common-config; - uses aaa-servergroup-common-state; + uses aaa-servergroup-common-config { + status deprecated; + } + uses aaa-servergroup-common-state { + status deprecated; + } } - uses aaa-server-top; + uses aaa-server-top { + status deprecated; + } } } } grouping aaa-server-config { + description + "Common configuration data for AAA servers"; + status deprecated; + + leaf name { + type string; + description + "Name assigned to the server"; + } + + + leaf address { + type oc-inet:ip-address; + description "Address of the authentication server"; + } + + leaf timeout { + type uint16; + units seconds; + description + "Set the timeout in seconds on responses from the AAA + server"; + } + } + + grouping aaa-server-config-data { description "Common configuration data for AAA servers"; @@ -185,6 +223,24 @@ module openconfig-aaa { description "Address of the authentication server"; } + leaf port { + type oc-inet:port-number; + description "Port of the authentication server"; + } + + leaf network-instance { + type oc-ni:network-instance-ref; + description "Network-instance of the authentication server"; + } + + leaf type { + type identityref { + base oc-aaa-types:AAA_SERVER_TYPE; + } + description + "AAA server type"; + } + leaf timeout { type uint16; units seconds; @@ -192,8 +248,21 @@ module openconfig-aaa { "Set the timeout in seconds on responses from the AAA server"; } + + list server-group { + key "name"; + description + "List of the server groups this server belongs to"; + + leaf name { + type string; + description + "Server group name"; + } + } } + grouping aaa-server-state { description "Common operational state data for AAA servers"; @@ -251,9 +320,83 @@ module openconfig-aaa { } + grouping aaa-server-list-top { + description + "Top-level grouping for list of AAA servers"; + + container servers { + description + "Enclosing container the list of servers"; + + list server { + key "address port network-instance type"; + description + "List of AAA servers"; + + leaf address { + type leafref { + path "../config/address"; + } + description + "Reference to the configured address of the AAA server"; + } + + leaf port { + type leafref { + path "../config/port"; + } + description + "Reference to the configured port of the AAA server"; + } + + leaf network-instance { + type leafref { + path "../config/network-instance"; + } + description + "Reference to the configured network-instance of the AAA server"; + } + + leaf type { + type leafref { + path "../config/type"; + } + description + "AAA server type"; + } + + container config { + description + "Configuration data "; + + uses aaa-server-config-data; + } + + container state { + config false; + + description + "Operational state data "; + + uses aaa-server-config-data; + uses aaa-server-state; + } + + uses aaa-tacacs-server-top { + when "config/type = 'oc-aaa:TACACS'"; + } + + uses aaa-radius-server-top { + when "config/type = 'oc-aaa:RADIUS'"; + } + } + } + } + grouping aaa-server-top { description "Top-level grouping for list of AAA servers"; + status deprecated; container servers { description @@ -276,7 +419,9 @@ module openconfig-aaa { description "Configuration data "; - uses aaa-server-config; + uses aaa-server-config { + status deprecated; + } } container state { @@ -285,7 +430,9 @@ module openconfig-aaa { description "Operational state data "; - uses aaa-server-config; + uses aaa-server-config { + status deprecated; + } uses aaa-server-state; } @@ -834,7 +981,10 @@ module openconfig-aaa { uses aaa-authentication-top; uses aaa-authorization-top; uses aaa-accounting-top; - uses aaa-servergroup-common-top; + uses aaa-servergroup-common-top { + status deprecated; + } + uses aaa-server-list-top; } } From 1e5c075c1d31bab5dd4d3ffb5ba637b8ce92662e Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Mon, 22 Apr 2024 17:20:47 -0700 Subject: [PATCH 2/8] Add server ref to server group --- .../models/system/openconfig-aaa-radius.yang | 1 - .../models/system/openconfig-aaa-tacacs.yang | 1 - release/models/system/openconfig-aaa.yang | 38 ++++++++++++++----- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/release/models/system/openconfig-aaa-radius.yang b/release/models/system/openconfig-aaa-radius.yang index 52ba5f55e..7b1930df8 100644 --- a/release/models/system/openconfig-aaa-radius.yang +++ b/release/models/system/openconfig-aaa-radius.yang @@ -91,7 +91,6 @@ submodule openconfig-aaa-radius { leaf auth-port { type oc-inet:port-number; - status deprecated; default 1812; description "Port number for authentication requests"; diff --git a/release/models/system/openconfig-aaa-tacacs.yang b/release/models/system/openconfig-aaa-tacacs.yang index 6efa2d56f..d96bc0f07 100644 --- a/release/models/system/openconfig-aaa-tacacs.yang +++ b/release/models/system/openconfig-aaa-tacacs.yang @@ -91,7 +91,6 @@ submodule openconfig-aaa-tacacs { leaf port { type oc-inet:port-number; - status deprecated; default 49; description "The port number on which to contact the TACACS server"; diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index 1949cbf91..fae20cca1 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -101,7 +101,6 @@ module openconfig-aaa { grouping aaa-servergroup-common-config { description "Configuration data for AAA server groups"; - status deprecated; leaf name { type string; @@ -117,12 +116,39 @@ module openconfig-aaa { "AAA server type -- all servers in the group must be of this type"; } + + list servers { + key "address port network-instance type"; + + leaf address { + type leafref { + path "/system/aaa/servers/server/address"; + } + } + + leaf port { + type leafref { + path "deref(../address)/../port"; + } + } + + leaf network-instance { + type leafref { + path "deref(../port)/../network-instance"; + } + } + + leaf type { + type leafref { + path "deref(../network-instance)/../type"; + } + } + } } grouping aaa-servergroup-common-state { description "Operational state data for AAA server groups"; - status deprecated; //TODO: add list of group members as opstate } @@ -130,7 +156,6 @@ module openconfig-aaa { grouping aaa-servergroup-common-top { description "Top-level grouping for AAA server groups"; - status deprecated; container server-groups { description @@ -156,7 +181,6 @@ module openconfig-aaa { "Configuration data for each server group"; uses aaa-servergroup-common-config { - status deprecated; } } @@ -167,10 +191,8 @@ module openconfig-aaa { "Operational state data for each server group"; uses aaa-servergroup-common-config { - status deprecated; } uses aaa-servergroup-common-state { - status deprecated; } } @@ -981,10 +1003,8 @@ module openconfig-aaa { uses aaa-authentication-top; uses aaa-authorization-top; uses aaa-accounting-top; - uses aaa-servergroup-common-top { - status deprecated; - } uses aaa-server-list-top; + uses aaa-servergroup-common-top; } } From 182ffcde32767ada35fa7d786fe9f9d5d8bd84ac Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Mon, 22 Apr 2024 17:25:18 -0700 Subject: [PATCH 3/8] Format change --- release/models/system/openconfig-aaa.yang | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index fae20cca1..522262c01 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -180,8 +180,7 @@ module openconfig-aaa { description "Configuration data for each server group"; - uses aaa-servergroup-common-config { - } + uses aaa-servergroup-common-config; } container state { @@ -190,10 +189,8 @@ module openconfig-aaa { description "Operational state data for each server group"; - uses aaa-servergroup-common-config { - } - uses aaa-servergroup-common-state { - } + uses aaa-servergroup-common-config; + uses aaa-servergroup-common-state; } uses aaa-server-top { From 3ba7d95587584a8a3dfb2847a978812f1b390198 Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Thu, 2 May 2024 12:17:50 -0700 Subject: [PATCH 4/8] Create new group-member list for server refs under system-aaa-server-groups --- .../models/system/openconfig-aaa-radius.yang | 1 + .../models/system/openconfig-aaa-tacacs.yang | 1 + release/models/system/openconfig-aaa.yang | 135 +++++++++++++----- 3 files changed, 104 insertions(+), 33 deletions(-) diff --git a/release/models/system/openconfig-aaa-radius.yang b/release/models/system/openconfig-aaa-radius.yang index 7b1930df8..52ba5f55e 100644 --- a/release/models/system/openconfig-aaa-radius.yang +++ b/release/models/system/openconfig-aaa-radius.yang @@ -91,6 +91,7 @@ submodule openconfig-aaa-radius { leaf auth-port { type oc-inet:port-number; + status deprecated; default 1812; description "Port number for authentication requests"; diff --git a/release/models/system/openconfig-aaa-tacacs.yang b/release/models/system/openconfig-aaa-tacacs.yang index d96bc0f07..6efa2d56f 100644 --- a/release/models/system/openconfig-aaa-tacacs.yang +++ b/release/models/system/openconfig-aaa-tacacs.yang @@ -91,6 +91,7 @@ submodule openconfig-aaa-tacacs { leaf port { type oc-inet:port-number; + status deprecated; default 49; description "The port number on which to contact the TACACS server"; diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index 522262c01..6a6de1906 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -116,41 +116,120 @@ module openconfig-aaa { "AAA server type -- all servers in the group must be of this type"; } + } - list servers { - key "address port network-instance type"; + grouping aaa-servergroup-common-state { + description + "Operational state data for AAA server groups"; - leaf address { - type leafref { - path "/system/aaa/servers/server/address"; - } + //TODO: add list of group members as opstate + } + + grouping aaa-servergroup-member-config { + description + "Common configuration data for server group member"; + + leaf address { + type leafref { + path "../../../../../../servers/server/address"; } + description + "Reference to the configured address of the server group member"; + } - leaf port { - type leafref { - path "deref(../address)/../port"; - } + leaf port { + type leafref { + path "deref(../address)/../port"; } + description + "Reference to the configured port of the server group member"; + } - leaf network-instance { - type leafref { - path "deref(../port)/../network-instance"; - } + leaf network-instance { + type leafref { + path "deref(../port)/../network-instance"; } + description + "Reference to the configured network-instance of the server group member"; + } - leaf type { - type leafref { - path "deref(../network-instance)/../type"; - } + leaf type { + type leafref { + path "deref(../network-instance)/../type"; } + description + "Reference to the configured type of the server group member"; } } - grouping aaa-servergroup-common-state { + grouping aaa-servergroup-member-state { description - "Operational state data for AAA server groups"; + "Operational state data for server group member"; + } - //TODO: add list of group members as opstate + grouping aaa-servergroup-member-top { + description + "Top-level grouping for list of AAA servers"; + + container group-members { + description + "Enclosing container for server group members"; + + list group-member { + key "address port network-instance type"; + description + "List of server group members"; + + leaf address { + type leafref { + path "../config/address"; + } + description + "Reference to the configured address of the server group member"; + } + + leaf port { + type leafref { + path "../config/port"; + } + description + "Reference to the configured port of the server group member"; + } + + leaf network-instance { + type leafref { + path "../config/network-instance"; + } + description + "Reference to the configured network-instance of the server group member"; + } + + leaf type { + type leafref { + path "../config/type"; + } + description + "Reference to the configured type of the server group member"; + } + + container config { + description + "Configuration data "; + + uses aaa-servergroup-member-config; + } + + container state { + config false; + + description + "Operational state data "; + + uses aaa-servergroup-member-config; + uses aaa-servergroup-common-state; + } + } + } } grouping aaa-servergroup-common-top { @@ -193,6 +272,8 @@ module openconfig-aaa { uses aaa-servergroup-common-state; } + uses aaa-servergroup-member-top; + uses aaa-server-top { status deprecated; } @@ -267,18 +348,6 @@ module openconfig-aaa { "Set the timeout in seconds on responses from the AAA server"; } - - list server-group { - key "name"; - description - "List of the server groups this server belongs to"; - - leaf name { - type string; - description - "Server group name"; - } - } } From 63238310c1fa71905c7d130454e99b5b3a08bc69 Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Fri, 3 May 2024 15:20:19 -0700 Subject: [PATCH 5/8] Change version numbers and add revision descriptions --- release/models/system/openconfig-aaa-radius.yang | 8 +++++++- release/models/system/openconfig-aaa-tacacs.yang | 8 +++++++- release/models/system/openconfig-aaa.yang | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/release/models/system/openconfig-aaa-radius.yang b/release/models/system/openconfig-aaa-radius.yang index 52ba5f55e..e33e88b17 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 "1.0.0"; + oc-ext:openconfig-version "1.1.0"; + + revision "2024-05-03" { + description + "Deprecate auth-port and make the port a common key for aaa servers"; + reference "1.1.0"; + } revision "2022-07-29" { description diff --git a/release/models/system/openconfig-aaa-tacacs.yang b/release/models/system/openconfig-aaa-tacacs.yang index 6efa2d56f..5d25aafde 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 "1.0.0"; + oc-ext:openconfig-version "1.1.0"; + + revision "2024-05-03" { + description + "Deprecate port and make it a common key for aaa servers"; + reference "1.1.0"; + } revision "2022-07-29" { description diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index 6a6de1906..46abdf6c7 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -33,7 +33,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 "1.0.0"; + oc-ext:openconfig-version "1.1.0"; + + revision "2024-05-03" { + description + "Use reference of servers in server groups"; + reference "1.1.0"; + } revision "2022-07-29" { description From 363299d5d636982e25c70d0b4c9157257f478f59 Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Tue, 28 May 2024 11:27:14 -0700 Subject: [PATCH 6/8] Add name as the single key of a server and use that as the leafref for server group member --- release/models/system/openconfig-aaa.yang | 97 +++-------------------- 1 file changed, 12 insertions(+), 85 deletions(-) diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index 46abdf6c7..daa50504f 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -135,36 +135,12 @@ module openconfig-aaa { description "Common configuration data for server group member"; - leaf address { - type leafref { - path "../../../../../../servers/server/address"; - } - description - "Reference to the configured address of the server group member"; - } - - leaf port { - type leafref { - path "deref(../address)/../port"; - } - description - "Reference to the configured port of the server group member"; - } - - leaf network-instance { - type leafref { - path "deref(../port)/../network-instance"; - } - description - "Reference to the configured network-instance of the server group member"; - } - - leaf type { + leaf name { type leafref { - path "deref(../network-instance)/../type"; + path "../../../../../../servers/server/name"; } description - "Reference to the configured type of the server group member"; + "Reference to the name of the server group member"; } } @@ -182,40 +158,16 @@ module openconfig-aaa { "Enclosing container for server group members"; list group-member { - key "address port network-instance type"; + key "name"; description "List of server group members"; - leaf address { - type leafref { - path "../config/address"; - } - description - "Reference to the configured address of the server group member"; - } - - leaf port { - type leafref { - path "../config/port"; - } - description - "Reference to the configured port of the server group member"; - } - - leaf network-instance { - type leafref { - path "../config/network-instance"; - } - description - "Reference to the configured network-instance of the server group member"; - } - - leaf type { + leaf name { type leafref { - path "../config/type"; + path "../config/name"; } description - "Reference to the configured type of the server group member"; + "Reference to the name of the server group member"; } container config { @@ -323,7 +275,6 @@ module openconfig-aaa { "Name assigned to the server"; } - leaf address { type oc-inet:ip-address; description "Address of the authentication server"; @@ -423,42 +374,18 @@ module openconfig-aaa { "Enclosing container the list of servers"; list server { - key "address port network-instance type"; + key "name"; description "List of AAA servers"; - leaf address { - type leafref { - path "../config/address"; - } - description - "Reference to the configured address of the AAA server"; - } - - leaf port { - type leafref { - path "../config/port"; - } - description - "Reference to the configured port of the AAA server"; - } - - leaf network-instance { - type leafref { - path "../config/network-instance"; - } - description - "Reference to the configured network-instance of the AAA server"; - } - - leaf type { + leaf name { type leafref { - path "../config/type"; + path "../config/name"; } description - "AAA server type"; + "Reference to the configured name of the AAA server"; } - + container config { description "Configuration data "; From e8b899589abaa6ee1f60ce14600eea224f2d2c28 Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Wed, 29 May 2024 14:05:59 -0700 Subject: [PATCH 7/8] Add comment for the server leafref in server group --- release/models/system/openconfig-aaa.yang | 1 + 1 file changed, 1 insertion(+) diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index daa50504f..a2f6f85e7 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -137,6 +137,7 @@ module openconfig-aaa { leaf name { type leafref { + // Reference to /system/aaa/servers/server/name path "../../../../../../servers/server/name"; } description From b6c973548bc477e24a1970b2006244d8b6ce0fb2 Mon Sep 17 00:00:00 2001 From: Wenyi Cheng Date: Wed, 29 May 2024 17:43:14 -0700 Subject: [PATCH 8/8] Remove railing whitespace --- release/models/system/openconfig-aaa.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/system/openconfig-aaa.yang b/release/models/system/openconfig-aaa.yang index a2f6f85e7..0612a09da 100644 --- a/release/models/system/openconfig-aaa.yang +++ b/release/models/system/openconfig-aaa.yang @@ -386,7 +386,7 @@ module openconfig-aaa { description "Reference to the configured name of the AAA server"; } - + container config { description "Configuration data ";