From 1dfb64e023ee2c9550b8e4ab684ec68ac86bf882 Mon Sep 17 00:00:00 2001 From: Annamalai Date: Fri, 18 Oct 2024 15:28:22 -0700 Subject: [PATCH] add oam super node and refractor cfm + add state variables to pm profiles --- release/models/cfm/.spec.yml | 6 --- release/models/oam/.spec.yml | 9 ++++ .../{cfm => oam}/openconfig-cfm-types.yang | 2 +- .../openconfig-oam-cfm.yang} | 24 ++++----- release/models/oam/openconfig-oam.yang | 53 +++++++++++++++++++ 5 files changed, 75 insertions(+), 19 deletions(-) delete mode 100644 release/models/cfm/.spec.yml create mode 100644 release/models/oam/.spec.yml rename release/models/{cfm => oam}/openconfig-cfm-types.yang (99%) rename release/models/{cfm/openconfig-cfm.yang => oam/openconfig-oam-cfm.yang} (98%) create mode 100644 release/models/oam/openconfig-oam.yang diff --git a/release/models/cfm/.spec.yml b/release/models/cfm/.spec.yml deleted file mode 100644 index 8fbd088a6..000000000 --- a/release/models/cfm/.spec.yml +++ /dev/null @@ -1,6 +0,0 @@ -- name: openconfig-cfm - docs: - - yang/cfm/openconfig-cfm.yang - build: - - yang/cfm/openconfig-cfm.yang - run-ci: true diff --git a/release/models/oam/.spec.yml b/release/models/oam/.spec.yml new file mode 100644 index 000000000..c72f72b7f --- /dev/null +++ b/release/models/oam/.spec.yml @@ -0,0 +1,9 @@ +- name: openconfig-oam + docs: + - yang/oam/openconfig-oam.yang + - yang/oam/openconfig-cfm-types.yang + - yang/oam/openconfig-oam-cfm.yang + build: + - yang/oam/openconfig-oam.yang + - yang/oam/openconfig-oam-cfm.yang + run-ci: true diff --git a/release/models/cfm/openconfig-cfm-types.yang b/release/models/oam/openconfig-cfm-types.yang similarity index 99% rename from release/models/cfm/openconfig-cfm-types.yang rename to release/models/oam/openconfig-cfm-types.yang index 48a99d0e9..c27d77e9b 100644 --- a/release/models/cfm/openconfig-cfm-types.yang +++ b/release/models/oam/openconfig-cfm-types.yang @@ -3,7 +3,7 @@ module openconfig-cfm-types { yang-version "1"; // namespace - namespace "http://openconfig.net/yang/cfm-types"; + namespace "http://openconfig.net/yang/oam/cfm-types"; prefix "oc-cfm-types"; diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/oam/openconfig-oam-cfm.yang similarity index 98% rename from release/models/cfm/openconfig-cfm.yang rename to release/models/oam/openconfig-oam-cfm.yang index 76db35055..90fd63bf9 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/oam/openconfig-oam-cfm.yang @@ -1,16 +1,17 @@ -module openconfig-cfm { +module openconfig-oam-cfm { yang-version "1"; // namespace - namespace "http://openconfig.net/yang/cfm"; + namespace "http://openconfig.net/yang/oam/cfm"; - prefix "oc-cfm"; + prefix "oc-oam-cfm"; import openconfig-vlan-types { prefix oc-vlan-types; } import openconfig-interfaces { prefix oc-if; } import openconfig-extensions { prefix oc-ext; } import openconfig-yang-types { prefix oc-yang; } import openconfig-cfm-types { prefix oc-cfm-types; } + import openconfig-oam { prefix oc-oam; } // imports the module being augmented // google @@ -160,18 +161,12 @@ module openconfig-cfm { description "A unique profile name identifying the profile"; type string; } - } container state { description "Operational data for loss measurement."; config false; - - leaf "profile-name" { - type string; - description "Name of the measurement profile."; - } - + uses performance-measurement-config; uses performance-measurement-state; } } @@ -1258,7 +1253,7 @@ module openconfig-cfm { leaf packet-per-burst { type uint32; description - "if burst enabled. the leaf defines the number of packet per burst of probes. + "if burst enabled. The leaf defines the number of packet per burst of probes. packets-per-measurement-period / burst-interval"; } } @@ -1303,6 +1298,11 @@ module openconfig-cfm { } } - uses cfm-top; + // augment statements + augment "/oc-oam:oam" { + description + "Add cfm related state and config to oam"; + uses cfm-top; + } } \ No newline at end of file diff --git a/release/models/oam/openconfig-oam.yang b/release/models/oam/openconfig-oam.yang new file mode 100644 index 000000000..12a755874 --- /dev/null +++ b/release/models/oam/openconfig-oam.yang @@ -0,0 +1,53 @@ +module openconfig-oam { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/oam"; + + prefix "oc-oam"; + import openconfig-extensions { prefix oc-ext; } + + // google + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines a YANG data model for configuring and managing + EthernetOAM functions"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2024-09-11" { + description + "Initial revision"; + reference "0.1.0"; + } + + grouping oam-top{ + description + "top level grouping for configuration and operational state parameters relating + to Ethernet OAM"; + + container oam { + description + "Operational state and configuration parameters relating to + Ethernet OAM"; + + container config { + description + "Configuration parameters relating to Ethernet OAM"; + } + container state { + config false; + description + "Operational state parameters relating to Ethernet OAM"; + } + } + } + + uses oam-top; +} \ No newline at end of file