From f096a18c2624cb37f875b6c053523cddf86fd81a Mon Sep 17 00:00:00 2001 From: Annamalai Date: Tue, 17 Sep 2024 06:25:13 -0700 Subject: [PATCH 01/16] CFM version 1 --- release/models/cfm/.spec.yml | 6 + release/models/cfm/openconfig-cfm-types.yang | 391 +++++++ release/models/cfm/openconfig-cfm.yang | 1016 ++++++++++++++++++ 3 files changed, 1413 insertions(+) create mode 100644 release/models/cfm/.spec.yml create mode 100644 release/models/cfm/openconfig-cfm-types.yang create mode 100644 release/models/cfm/openconfig-cfm.yang diff --git a/release/models/cfm/.spec.yml b/release/models/cfm/.spec.yml new file mode 100644 index 000000000..8fbd088a6 --- /dev/null +++ b/release/models/cfm/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-cfm + docs: + - yang/cfm/openconfig-cfm.yang + build: + - yang/cfm/openconfig-cfm.yang + run-ci: true diff --git a/release/models/cfm/openconfig-cfm-types.yang b/release/models/cfm/openconfig-cfm-types.yang new file mode 100644 index 000000000..293e5f0e6 --- /dev/null +++ b/release/models/cfm/openconfig-cfm-types.yang @@ -0,0 +1,391 @@ +module openconfig-cfm-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/cfm-types"; + + prefix "oc-cfm-types"; + + // import some basic types + import ietf-yang-types { prefix yang; } + import openconfig-extensions { prefix oc-ext; } + + // google + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains general data definitions for use in CFM"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2024-09-11" { + description + "Initial revision"; + reference "0.1.0"; + } + +typedef name-key-type { + type string { + length "1..255"; + pattern '[0-9a-zA-Z\-_.]*'; + } + description + "String type with at least 1 and up to 255 of the specified + characters."; +} + +typedef config-error-type { + type enumeration { + enum CFM_LEAK { + description + "MA x is associated with a specific VID list, one or more of + the VIDs in MA x can pass through the Bridge Port, no Down MEP + is configured on any Bridge Port for MA x, and some other MA + y, at a higher MD Level than MA x, and associated with at + least one of the VID(s) also in MA x, does have a MEP + configured on the Bridge Port."; + } + enum CONFLICTING_VIDS { + description + "MA x is associated with a specific VID list, an Up MEP is + configured on MA x on the Bridge Port, and some other MA y, + associated with at least one of the VID(s) also in MA x, also + has an Up MEP configured on some Bridge Port."; + } + enum EXCESSIVE_LEVELS { + description + "The number of different MD Levels at which MIPs are to be + created on this port exceeds the Bridge's capabilities."; + } + enum OVERLAPPED_LEVELS { + description + "A MEP is created for one VID at one MD Level, but a MEP is + configured on another VID at that MD Level or higher, + exceeding the Bridge's capabilities."; + } + } + description + "While making the MIP creation evaluation described in 22.2.3, the + management entity can encounter errors in the configuration."; + } + + typedef mep-id-type { + description + "Maintenance association End Point Identifier, which is unique + over a given Maintenance Association."; + + type uint16 { + range "1..8191"; + } + } + + typedef remote-mep-state-type { + description + "Operational state of the remote MEP state machine. This state + machine monitors the reception of valid CCMs from a remote MEP + with a specific MEPID. It uses a timer that expires in 3.5 times + the length of time indicated by the MA's ccm-interval object."; + + type enumeration { + enum RMEP_IDLE { + value 1; + description + "Momentary state during reset."; + } + enum RMEP_START { + value 2; + description + "The timer has not expired since the state machine was reset, + and no valid CCM has yet been received."; + } + enum RMEP_FAILED { + value 3; + description + "The timer has expired, both since the state machine was + reset, and since a valid CCM was received."; + } + enum RMEP_OK { + value 4; + description + "The timer has not expired since a valid CCM was received."; + } + } + } + + typedef mep-defects-type { + type enumeration { + enum DEF_RDI_CCM { + value 1; + description + "A REMOTE MEP reported that RDI bit in its last CCM."; + } + enum DEF_MAC_STATUS { + value 2; + description + "Either some remote MEP is reporting its Interface Status TLV + as not isUp, or all remote MEPs are reporting a Port Status + TLV that contains some value other than psUp."; + } + enum DEF_REMOTE_CCM { + value 3; + description + "The MEP is not receiving valid CCMs from at least one of the + remote MEPs."; + } + enum DEF_ERROR_CCM { + value 4; + description + "The MEP has received at least one invalid CCM whose CCM + Interval has not yet timed out."; + } + enum DEF_XCON_CCM { + value 5; + description + "The MEP has received at last one CCM from either another MAID + or a lower MD level whose CCM Interval has not yet timed out."; + } + } + description + "A MEP can detect and report a number of defects, and multiple + defects can be present at the same time."; + } + + typedef fng-state-type { + type enumeration { + enum FNG_RESET { + value 1; + description + "No defect has been present since the MEP's fng-reset-time + timer expired, or since the state machine was last reset."; + } + enum FNG_DEFECT { + value 2; + description + "A defect is present, but not for a long enough time to be + reported."; + } + enum FNG_REPORT_DEFECT { + value 3; + description + "A momentary state during which the defect is reported by + sending a fault-alarm notification, if that action is enabled."; + } + enum FNG_DEFECT_REPORTED { + value 4; + description + "A defect is present, and some defect has been reported."; + } + enum FNG_DEFECT_CLEARING { + value 5; + description + "No defect is present, but the MEP's fng-reset-time timer has + not yet expired."; + } + } + description + "Indicates the different states of the MEP Fault Notification + Generator State Machine."; + } + + typedef operational-state-type { + + type enumeration { + enum ENABLED { + description + "The MEP is able to provide OAM capabilities and has been set to + active via the 'administrative-state' leaf."; + } + enum DISABLED { + description + "The MEP is not able to provide OAM capabilities, for example + because it has been disabled via the administrative-state leaf, + has detected an operational failure condition, or has failed an + internal test."; + } + enum UNKNOWN { + description + "The MEP is unable to report the operational state."; + } + } + description + "This attribute indicates the operational state (current capability) of + a MEP."; + reference + "[MEF7.1] 9.2.5"; + } + + typedef fault-alarm-type { + type enumeration { + enum ADDRESS { + value 1; + description + "Indicates that a Network address to which Fault Alarms are to + be transmitted should be used."; + } + enum NOT_TRANSMITTED { + value 2; + description + "Indicates that Fault alarms are not to be transmitted."; + } + } + description + "The Fault Alarm indicators."; + } + typedef interface-status-type { + + type enumeration { + enum NO_STATUS_TLV { + description "Indicates either that no CCM has been received or that + no interface status TLV was present in the last CCM received."; + } + enum UP { + description "The interface is ready to pass packets."; + } + enum DOWN { + description "The interface cannot pass packets."; + } + enum TESTING { + description "The interface is in some test mode."; + } + enum UNKNOWN { + description "The interface status cannot be determined for some reason."; + } + enum DORMANT { + description "The interface is not in a state to pass packets but is in + a pending state, waiting for some external event."; + } + enum NOT_PRESENT { + description "Some component of the interface is missing."; + } + enum LOWER_LAYER_DOWN { + description "The interface is down due to state of the lower layer + interfaces."; + } + } + description + "The set of values available from the Interface Status TLV in CCM PDUs + including the default no-status-tlv"; + reference + "[802.1q] 20.19.4, 12.14.7.6.3:g + IEEE8021-CFM-MIB.Dot1agCfmInterfaceStatus"; + } + + typedef port-status-type { + type enumeration { + enum NO_STATUS_TLV { + description "Indicates either that no CCM has been received or that + no port status TLV was present in the last CCM received."; + } + enum BLOCKED { + description "Ordinary data cannot pass freely through the port on + which the remote MEP resides. Value of enableRmepDefect + is equal to false."; + } + enum UP { + description "Ordinary data can pass freely through the port on which + the remote MEP resides. Value of enableRmepDefect is + equal to true."; + } + } + description + "The set of values available from the Port Status TLV in CCM PDUs + including the default no-status-tlv"; + reference + "[802.1q] 20.19.3, 12.14.7.6.3:f + IEEE8021-CFM-MIB.Dot1agCfmPortStatus"; + } + + typedef highest-defect-priority-type { + type enumeration { + enum NONE { + value 0; + description + "No defects since Fault Notification Generator state machine + reset."; + } + enum DEF_RDI_CCM { + value 1; + description + "The last CCM received by this MEP from some remote MEP + contained the RDI bit set."; + } + enum DEF_MAC_STATUS { + value 2; + description + "The last CCM received by this MEP from some remote MEP + indicating that the transmitting MEP's associated MAC is + reporting its status via the Port Status TLV or Interface + Status TLV."; + } + enum DEF_REMOTE_CCM { + value 3; + description + "This MEP is not receiving CCMs from some other MEP in its + configured list."; + } + enum DEF_ERROR_CCM { + value 4; + description + "This MEP is receiving invalid CCMs."; + } + enum DEF_XCON_CCM { + value 5; + description + "This MEP is receiving CCMs that could be from some other MA."; + } + } + description + "An enumerated value, equal to the contents of the variable + highestDefect (20.35.9 and Table 20-1), indicating the + highest-priority defect that has been present since the MEP Fault + Notification Generator State Machine was last in the FNG_RESET + state. The integer value assigned to the enum value determines the + priority. The higher value corresponds to the higher priority."; + } + typedef lowest-alarm-priority-type { + type enumeration { + enum ALL_DEF { + value 1; + description + "Includes def_rdi-ccm, def_mac_status, def_remote_ccm, + def_error_ccm, and def_xcon_ccm."; + } + enum MAC_REMOTE_ERROR_XCON { + value 2; + description + "Only includes def_mac_status, def_remote_ccm, def_error_ccm, + and def_xcon_ccm."; + } + enum REMOTE_ERROR_XCON { + value 3; + description + "Includes def_remote_ccm, def_error_ccm, and def_xcon_ccm."; + } + enum ERROR_XCON { + value 4; + description + "Includes def_error_ccm and def_xcon_ccm."; + } + enum XCON { + value 5; + description + "Only def_xcon_ccm"; + } + enum NO_XCON { + value 6; + description + "No defects def_xcon or lower are to be reported."; + } + } + description + "Specifies the lowest priority defect that is allowed to generate + a Fault Alarm (20.9.5). The to be reported defects are identified + per enum value."; + } +} \ No newline at end of file diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang new file mode 100644 index 000000000..8e3616123 --- /dev/null +++ b/release/models/cfm/openconfig-cfm.yang @@ -0,0 +1,1016 @@ +module openconfig-cfm { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/cfm"; + + prefix "oc-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; } + + + // google + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines a YANG data model for configuring and managing CFM + (Connectivity Fault Management) in a network device. The module includes + maintenance domains, associations, maintenance endpoints, + performance management policies and remote defect handling features"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2024-09-11" { + description + "Initial revision"; + reference "0.1.0"; + } + + grouping cfm-top { + description "Top-level grouping for CFM configuration and state"; + + container cfm { + description + "Container for CFM configuration, state and perfomance measurement policies"; + + container domains { + description "Collection of CFM maintenance domains on the local system"; + + list maintenance-domain { + key "md-id"; + description "Collection of CFM maintenance domains on the local system"; + + leaf md-id { + type leafref { + path "../config/md-id"; + } + description "A unique maintenance domain name identifying the domain"; + } + + container config { + description "Configuration data for a maintenance domain."; + uses cfm-domain-config; + } + + container state { + description "Operational data for a maintenance domain."; + config false; + uses cfm-domain-config; + } + + container maintenance-associations { + description "Collection of maintenance associations within a + maintenance domain.Provides configuration and operational data + for the Maintenance Associations. A Maintenance Association is a set + of MEPs, each configured with the same MAID and MD level, + established to verify the integrity of a single service + instance. A Maintenance Association can be thought of as a + full mesh of Maintenance Entities among a set of MEPs so + configured."; + + list maintenance-association { + key "ma-id"; + description "Collection of maintenance associations within a maintenance domain."; + + leaf ma-id { + description "Key of the Maintenance Association list of entries."; + type leafref { + path "../config/ma-id"; + } + } + + container config { + description "Configuration data for a maintenance association."; + uses maintenance-association-config; + } + + container state { + description "Operational data for a maintenance association."; + config false; + uses maintenance-association-config; + } // End MA State + + container mep-endpoints { + description "Container for full mesh MEPs under the maintenance association."; + + list mep-endpoint { + key "local-mep-id"; + description "collection of full mesh MEPs under the maintenance association."; + + leaf local-mep-id { + description "Local MEP identifier."; + type leafref { + path "../config/local-mep-id"; + } + } + + container config { + description "Configuration data for a MEP."; + uses mep-config; + } // end container config + + container state { + config false; + description " Operational tate data for a MEP."; + uses mep-config; + uses mep-oper-states; + } //end container mep state + + container rdi { + description "rdi config for a mep."; + container config { + description "rdi config for a mep."; + uses rdi-config; + } + + container state { + description "rdi state for a mep."; + config false; + uses rdi-config; + } + + } + + container link-loss-forwarding { + description "link loss forwarding config for a mep."; + container config { + description "link loss forwarding config for a mep."; + uses link-loss-forwarding-config; + } + + container state { + description "link loss forwarding state for a mep."; + config false; + uses link-loss-forwarding-config; + } + + } + + container remote-meps { + description "Remote meps associated to a local mep"; + + list remote-mep { + description "Remote meps associated to a local mep"; + key "id"; + + leaf id { + description "Remote mep id."; + type leafref{ + path "../config/id"; + } + } + + container config { + description "Configuration data for a remote mep."; + uses remote-mep-config; + } + + container state { + description "Operational data for a remote mep."; + config false; + uses remote-mep-config; + uses mep-oper-states; + } + + } // end list remote-mep + } // end container remote-meps + } // end list mep-endpoint + } // end container mep-enpoints + } // end MA list + } // end container MA + } // end list MD + } // end container domains + + container state { + description "Operational data for CFM."; + config false; + uses cfm-global-state; + } + + container loss-measurement-profiles { + description "This container includes configuration and state objects for the Frame Loss + Measurement function defined in [Y.1731] and [MEF SOAM PM IA]."; + + list loss-measurement-profile { + description "Loss measurement configuration and state."; + key "profile-name"; + + leaf "profile-name" { + description "A unique profile name identifying the profile"; + type leafref { + path "../config/profile-name"; + } + } + + container config { + description "Configuration data for loss measurement."; + uses performance-measurement-config; + } + + container state { + description "Operational data for loss measurement."; + config false; + uses performance-measurement-config; + uses performance-measurement-counters-state; + } + } + } + + container synthetic-loss-measurement-profiles { + description "synthetic-loss measurement configuration and state."; + + list synthetic-loss-measurement-profile { + description "synthetic-loss measurement configuration and state."; + key "profile-name"; + + leaf "profile-name" { + type leafref { + path "../config/profile-name"; + } + description "A unique profile name identifying the profile"; + } + + container config { + description "Configuration data for synthetic-loss measurement."; + uses performance-measurement-config; + } + + container state { + description "Operational data for synthetic-loss measurement."; + config false; + uses performance-measurement-config; + uses performance-measurement-counters-state; + } + } + } + + container delay-measurement-profiles { + description "delay-measurement measurement configuration and state."; + + list delay-measurement-profile { + description "delay-measurement configuration and state."; + key "profile-name"; + + leaf "profile-name" { + type leafref { + path "../config/profile-name"; + } + description "A unique profile name identifying the profile"; + } + + container config { + description "Configuration data for delay-measurement measurement."; + uses performance-measurement-config; + } + + container state { + description "Operational data for delay-measurement measurement."; + config false; + uses performance-measurement-config; + uses performance-measurement-counters-state; + } + } + } + } // End container cfm + } // End grouping cfm + + grouping maintenance-association-config { + description "Configuration for a maintenance association"; + + leaf ma-id { + type oc-cfm-types:name-key-type; + description "Key of the Maintenance Association list of entries."; + } + + leaf ma-name-type { + type enumeration { + enum PRIMARY_VID { + description + "Specifies the Primary VLAN ID."; + } + enum CHARACTER_STRING { + description + "RFC2579 DisplayString, except that the character + codes 0-31 (decimal) are not used."; + } + enum UINT16 { + description "2-octet integer/big endian."; + } + enum RFC2685_VPN_ID { + description "Specifies the RFC 2685 VPN ID."; + } + } + description + "Name type discriminator for the 'name' leaf."; + reference + "[802.1q] 12.14.5.3.2:b, Table 21-20 + IEEE8021-CFM-MIB.Dot1agCfmMaintAssocNameType"; + } + + + leaf primary-vid { + when "../ma-name-type = 'PRIMARY_VID'"; + mandatory true; + type oc-vlan-types:vlan-id; + description + "Primary VLAN ID. 12 bits represented in a 2-octet integer."; + } + + + leaf char-string { + when "../ma-name-type = 'CHARACTER_STRING'"; + mandatory true; + type string { + length "1..45"; + pattern "[ -~]*"; + } + description + "RFC2579 DisplayString, except that the character codes 0-31 + (decimal) are not used."; + } + + + leaf unsigned-int16 { + when "../ma-name-type = 'UINT16'"; + type uint16; + mandatory true; + description + "2-octet integer."; + } + + leaf vpn-oui { + when "../ma-name-type = 'RFC2685_VPN_ID'"; + type uint32 { + range "0..16777215"; + } + mandatory true; + description + "RFC2685 VPN ID. 3 octet VPN authority Organizationally + Unique Identifier followed by 4 octet VPN index identifying + VPN according to the OUI. 3 octet VPN authority + Organizationally Unique Identifier."; + } + + leaf vpn-index { + when "../ma-name-type = 'RFC2685_VPN_ID'"; + type uint32; + mandatory true; + description + "RFC2685 VPN ID. 3 octet VPN authority Organizationally + Unique Identifier followed by 4 octet VPN index identifying + VPN according to the OUI. + vpn-index is a 4 octet index identifying VPNaccording to the OUI."; + } + + + leaf ccm-interval { + description "CCM transmission interval."; + type enumeration { + enum "300MS" { + description "300 milli milliseconds interval."; } + enum "1S" { + description "1 second interval."; } + enum "10S" { + description "10 seconds interval."; } + } + } // end ccm-interval + + leaf loss-threshold { + type uint16; + description "number of consecutive loss frames to trigger a loss event."; + } // end loss-threshold + } // end grouping maintenance-association-config + + grouping remote-mep-config { + description "Configuration for remote MEPS"; + + leaf id { + type oc-cfm-types:mep-id-type; + description "Remote MEP IDs in full mesh."; + } + + leaf mac-address { + type oc-yang:mac-address; + description "Remote MEP IDs in full mesh."; + } + + leaf-list performance-measurement-profiles { + type string; + description "Performance Measurement profile names associated with the endpoints "; + } + } // end grouping + + grouping mep-oper-states { + description "Operational state of a MEP"; + + leaf oper-state { + type oc-cfm-types:operational-state-type; + description "Operational state of the MEP."; + } + + leaf interface-state { + type oc-cfm-types:interface-status-type; + description + "The state of the interface last reported by the local MEP in the TLV."; + reference + "[802.1q] 17.5"; + } + + leaf fng-state { + type oc-cfm-types:fng-state-type; + default "FNG_RESET"; + description + "The current state of the MEP Fault Notification Generator + state machine."; + reference + "Item f in 12.14.7.1.3, 20.35 of IEEE Std 802.1Q-2022"; + } + + leaf highest-priority-defect { + type oc-cfm-types:highest-defect-priority-type; + description + "The highest priority defect that has been present since + the MEPs Fault Notification Generator state machine was + last in the FNG_RESET state."; + reference + "Item n in 12.14.7.1.3, 20.35.9 of IEEE Std 802.1Q-2022"; + } + + leaf-list mep-defects { + type oc-cfm-types:mep-defects-type; + max-elements 4; + description + "Vector of boolean error conditions. + Multiple defects can be present at the same time."; + reference + "12.14.7.1.3 of IEEE Std 802.1Q-2022"; + } + + leaf present-rdi { + type boolean; + description + "A boolean value indicating the state of the RDI bit in CCMs + transmitted by this MEP. present-rdi is true if and only if one or more + of the variables someRMEPCCMdefect, someMACstatusDefect, errorCCMdefect, + or xconCCMdefect is true, and if the corresponding priority of that + variable, from mep-defects above, is greater than or equal to the + value of the variable lowestAlarmPri."; + } + + leaf-list config-errors-detected { + type oc-cfm-types:config-error-type; + max-elements 4; + description "Vector of enums of config error detected. i.e. [cfm-leak]"; + } + + leaf error-ccm-last-failure { + type binary { + length "1..128"; + } + description + "The last received CCM that triggered a def-error-ccm + fault."; + reference + "Itemt in 12.14.7.1.3, 20.21.2 of IEEE Std 802.1Q-2022"; + } + + leaf mep-ccm-sequence-errors { + type oc-yang:counter64; + mandatory true; + description + "The total number of out-of-sequence CCMs received from + all remote MEPs."; + reference + "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; + } + + leaf mep-ccms-sent { + type oc-yang:counter64; + mandatory true; + description + "Total number of CCMs transmitted by the local MEP"; + reference + "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + } + + } // end grouping mep-oper-states. + + grouping rmep-oper-states { + description "Operational state of a MEP"; + + leaf rmep-state { + type oc-cfm-types:remote-mep-state-type; + description + "The operational state of the remote MEP state machine"; + reference + "Item b in 12.14.7.6.3, 20.20 of IEEE Std 802.1Q-2022"; + } + + leaf rmep-failed-ok-time { + type oc-yang:counter32; + description + "The time (SysUpTime) at which the Remote MEP state + machine last entered either the RMEP_FAILED or RMEP_OK + state"; + reference + "Item c in 12.14.7.6.3 of IEEE Std 802.1Q-2022"; + } + leaf mac-address { + type oc-yang:mac-address; + description + "The MAC address of the remote MEP."; + reference + "Item d in 12.14.7.6.3, 20.19.7 of IEEE Std 802.1Q-2022"; + } + + leaf remote-defect-condition { + type boolean; + default false; + description + "State of the RDI bit in the last received CCM (true for + RDI=1), or false if none has been received.;"; + } + + leaf-list config-errors-detected { + type oc-cfm-types:config-error-type; + max-elements 4; + description "Vector of enums for config errors detected. i.e. [cfm-leak]"; + } + + leaf mep-ccm-sequence-errors { + type oc-yang:counter64; + mandatory true; + description + "The total number of out-of-sequence CCMs received from + the remote MEP."; + reference + "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; + } + + leaf ccms-sent { + type oc-yang:counter64; + mandatory true; + description + "Total number of CCMs transmitted towards the Remote MEP"; + reference + "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + } + + leaf interface-status-tlv { + type oc-cfm-types:interface-status-type; + description + "An enumerated value of the Interface status TLV sent in the last CCM + from the local MEP or the default value no-status-tlv + indicating no CCM has been sent or no Interface Status TLV has + been sent."; + reference + "[802.1q] 17.5"; + } + + leaf port-status-tlv { + type oc-cfm-types:port-status-type; + description + "The enumerated value from the Port Status TLV from the last + CCM received from the remote MEP."; + reference + "[802.1q] 12.14.7.6.3:f"; + } + + } // end grouping mep-oper-states. + + grouping mep-config { + description "Configuration for a MEP."; + + leaf ccm-enabled { + type boolean; + default "false"; + description + "Indicates whether the MEP can generate CCMs. If TRUE, the + MEP will generate CCM PDUs."; + reference + "Item g in 12.14.7.1.3, 20.10.1 of IEEE Std 802.1Q-2022"; + } + + leaf lowest-priority-defect { + type oc-cfm-types:lowest-alarm-priority-type; + default "MAC_REMOTE_ERROR_XCON"; + description + "The lowest priority defect that is allowed to generate + fault alarms."; + reference + "Item k in 12.14.7.1.3, 20.9.5 of IEEE Std 802.1Q-2022"; + } + + leaf fng-alarm-time { + type uint16 { + range "2500..10000"; + } + units "milliseconds"; + default "2500"; + description + "The time that defect must be present before a Fault Alarm + is issued."; + reference + "Item l in 12.14.7.1.3, 20.35.3 of IEEE Std 802.1Q-2022"; + } + + leaf fng-reset-time { + type uint16 { + range "2500..10000"; + } + units "milliseconds"; + default "10000"; + description + "The time that defects must be absent before resetting a + Fault Alarm."; + reference + "Item m in 12.14.7.1.3, 20.35.4 of IEEE Std 802.1Q-2022"; + } + + leaf local-mep-id { + type oc-cfm-types:mep-id-type; + description "The identifier of a Local MEP. Unique per given MA "; + } // end local-mep-id + + leaf interface { + type leafref { + path "/oc-if:interfaces/oc-if:interface/oc-if:name"; + } + description "Interface directly associated with the MEP id."; + } // end leaf interface + + leaf include-mep-port-status-in-tlv { + type boolean; + default true; + description + "Indicates whether a Port Status TLV is included in CCM frame + transmission. A value of 'true' indicates that the Port Status + TLV is to be included. A value of 'false' indicates that the + Port Status TLV is not to be included."; + reference + "[MEF7.1] 9.2.2"; + } + leaf include-mep-interface-status-in-tlv { + type boolean; + default true; + description + "Indicates whether a Interface Status TLV is included in CCM frame + transmission. A value of 'true' indicates that the Interface Status TLV + is to be included. A value of 'false' indicates that the Interface + Status TLV is not to be included."; + reference + "[MEF7.1] 9.2.2"; + } + + leaf direction { + description "The direction in which the MEP faces on the Bridge Port. + Example, up or down."; + type enumeration { + enum DOWN { + value 1; + description + "Down maintenance point, where CFM protocol messages are + dispatched away from the MAC Relay entity."; + } + enum UP { + value 2; + description + "Up maintenance point, where CFM protocol messages are + dispatched towards the MAC Relay entity."; + } + } + } + } + + grouping cfm-domain-config { + description "Config parameters relating to a CFM Maintenance Domain."; + + leaf md-id { + type oc-cfm-types:name-key-type; + description "The unique identifier for a Maintenance Domain."; + } + + leaf level { + description "Level of the maintenance domain."; + type uint8 { + range "0..7"; + } + reference + "3.123, Item b in 12.14.5.1.3 of IEEE Std 802.1Q-2022"; + } + + leaf md-name-type { + type enumeration { + enum NONE { + description + "No format specified."; + } + enum DOMAIN_NAME { + description + "Domain Name like string, globally unique text string + derived from a DNS name."; + } + enum MAC_ADDRESS_AND_UINT { + description + "MAC address + 2-octet (unsigned) integer."; + } + enum CHARACTER_STRING { + description + "RFC2579 DisplayString, except that the character + codes 0-31 (decimal) are not used."; + } + } + description + "Type discriminator for the value described in the md 'name' leaf."; + reference + " IEEE8021-CFM-MIB.Dot1agCfmMaintDomainNameType"; + } + + + leaf none { + when "../md-name-type = 'NONE'"; + type boolean; + description + "No format specified, usually because there is not a + Maintenance Domain Name. The Maintenance Domain name + inserted in CFM protocol messages will be a zero length + OCTET string."; + } + + leaf dns_like_name { + when "../md-name-type = 'DOMAIN_NAME'"; + description + "Domain name like string, globally unique text string + derived from a DNS name."; + type string { + length "1..43"; + } + } + + leaf address { + when "../md-name-type = 'MAC_ADDRESS_AND_UINT'"; + type oc-yang:mac-address; + mandatory true; + description + "The MAC address."; + } + leaf unsigned-int { + when "../md-name-type = 'MAC_ADDRESS_AND_UINT'"; + type uint16; + mandatory true; + description + "The additional 2-octet (unsigned) integer."; + } + + leaf char-string { + when "../md-name-type = 'CHARACTER_STRING'"; + description + "The character string name of the Maintenance Domain."; + type string { + length "1..43"; + pattern "[ -~]*"; + } + } + } + + grouping cfm-global-state { + description "Operational parameters relating to a CFM Maintenance Domain."; + + leaf local-meps { + type uint32; + description "The total number of local-meps configured on the local system."; + } + + leaf local-meps-operational { + type uint32; + description "The total number of local-meps operational on the local system."; + } + + leaf cfm-domains { + type uint32; + description "The total number cfm domains configured on the local system."; + } + + leaf cfm-services { + type uint32; + description "The total number cfm services configured on the local system."; + } + + leaf down-meps { + type uint32; + description "The total number cfm down meps configured on the local system."; + } + + leaf up-meps { + type uint32; + description "The total number cfm down meps configured on the local system."; + } + + leaf disabled-misconfigured { + type uint32; + description "The total number of disabled cfm down meps configured on the local system."; + } + + leaf disabled-operational-errors { + type uint32; + description "The total number cfm operational errors on the local system."; + } + + leaf disabled-out-of-resources { + type uint32; + description "The total number cfm endpoints disabled due to lack of resources on the local system."; + } + + leaf peer-meps{ + type uint32; + description "The total number cfm peer meps configured."; + } + + leaf operational-peer-meps { + type uint32; + description + "The total number cfm peer meps operational."; + } + + leaf peer-meps-with-defects { + type uint32; + description "The total number cfm peer meps with defects."; + } + + leaf peer-meps-timed-out { + type uint32; + description "The total number cfm peer meps timed out."; + } + + // End cfm-global-state + } + + + grouping performance-measurement-counters-state { + description "Performance measurement counters state."; + + leaf slm-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slm-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slr-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slr-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmm-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmm-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmr-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmr-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf probes-received { + type oc-yang:counter64; + description "CCM Probes received."; + } + + leaf probes-lost-rate { + type uint16; + description "mean loss reported."; + } + + leaf mean-near-end-frame-loss-rate { + type uint16; + description "mean loss reported."; + } + + leaf mean-far-end-frame-loss-rate { + type uint16; + description "mean loss reported."; + } + + leaf mean-delay { + type uint16; + description "mean loss reported."; + } + + leaf delay-variance { + type uint16; + description "mean loss reported."; + } + + } + + grouping performance-measurement-config { + description "Performance measurement configuration."; + + leaf profile-name { + type string; + description "Name of the measurement profile."; + } + + leaf enable { + type boolean; + default false; + description "Enable or disable measurement."; + } + + leaf type { + description "Measurement type."; + type enumeration { + enum SINGLE_ENDED { + description "single-ended measurement mode."; + } + enum DUAL_ENDED { + description "dual-ended measurement mode."; + } + } + } + + leaf frame-size { + type uint16; + description "Probe Frame size for measurement."; + } + + leaf burst-interval { + type uint32; + units "milliseconds"; + description "Interval between bursts for synthetic loss measurement."; + } + + leaf packet-interval { + type uint32; + units "milliseconds"; + description "Interval between packets within a burst."; + } + + leaf bucket-size { + type uint16; + units "probes count per bucket"; + description "Size of each statistics bucket."; + } + + leaf number-of-buckets { + type uint16; + description "Number of buckets archived for statistics collection."; + } + } + + + grouping rdi-config { + description "Remote Defect Indication (RDI) configuration."; + + leaf transmit-on-defect { + type boolean; + description "Transmit RDI when a defect is detected."; + } + } + + + grouping link-loss-forwarding-config { + description "Link loss forwarding configuration."; + + leaf enable { + type boolean; + description "Enable or disable link loss forwarding."; + } + + leaf action { + type enumeration { + enum "SHUTDOWN" { description "Shutdown action on link loss."; } + enum "ALARM" { description "Raise an alarm on link loss."; } + } + description "Action to take on link loss."; + } + } + uses cfm-top; + +} \ No newline at end of file From da9cf4acaadef14ff25a1be25d3f9ad506f22573 Mon Sep 17 00:00:00 2001 From: Annamalai Date: Tue, 17 Sep 2024 09:04:57 -0700 Subject: [PATCH 02/16] add y1731 profile states --- release/models/cfm/openconfig-cfm.yang | 454 +++++++++++++++++++------ 1 file changed, 344 insertions(+), 110 deletions(-) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 8e3616123..9ecf5fb84 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -122,6 +122,9 @@ module openconfig-cfm { description " Operational tate data for a MEP."; uses mep-config; uses mep-oper-states; + uses performance-measurement-config; + uses loss-measurement-state; + uses delay-measurement-state; } //end container mep state container rdi { @@ -151,9 +154,7 @@ module openconfig-cfm { config false; uses link-loss-forwarding-config; } - } - container remote-meps { description "Remote meps associated to a local mep"; @@ -219,7 +220,7 @@ module openconfig-cfm { description "Operational data for loss measurement."; config false; uses performance-measurement-config; - uses performance-measurement-counters-state; + uses loss-measurement-state; } } } @@ -247,7 +248,7 @@ module openconfig-cfm { description "Operational data for synthetic-loss measurement."; config false; uses performance-measurement-config; - uses performance-measurement-counters-state; + uses loss-measurement-state; } } } @@ -275,7 +276,7 @@ module openconfig-cfm { description "Operational data for delay-measurement measurement."; config false; uses performance-measurement-config; - uses performance-measurement-counters-state; + uses delay-measurement-state; } } } @@ -370,7 +371,6 @@ module openconfig-cfm { vpn-index is a 4 octet index identifying VPNaccording to the OUI."; } - leaf ccm-interval { description "CCM transmission interval."; type enumeration { @@ -481,27 +481,34 @@ module openconfig-cfm { reference "Itemt in 12.14.7.1.3, 20.21.2 of IEEE Std 802.1Q-2022"; } + uses mep-counters-state; + } // end grouping mep-oper-states. - leaf mep-ccm-sequence-errors { - type oc-yang:counter64; - mandatory true; + grouping mep-counters-state { + description "Counters for a remote MEP"; + container counters { description - "The total number of out-of-sequence CCMs received from - all remote MEPs."; - reference - "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; - } + "A collection of rmep-related statistics objects."; + leaf mep-ccm-sequence-errors { + type oc-yang:counter64; + mandatory true; + description + "The total number of out-of-sequence CCMs received from + all remote MEPs."; + reference + "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; + } - leaf mep-ccms-sent { - type oc-yang:counter64; - mandatory true; - description - "Total number of CCMs transmitted by the local MEP"; - reference - "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + leaf mep-ccms-sent { + type oc-yang:counter64; + mandatory true; + description + "Total number of CCMs transmitted by the local MEP"; + reference + "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + } } - - } // end grouping mep-oper-states. + } grouping rmep-oper-states { description "Operational state of a MEP"; @@ -545,25 +552,6 @@ module openconfig-cfm { description "Vector of enums for config errors detected. i.e. [cfm-leak]"; } - leaf mep-ccm-sequence-errors { - type oc-yang:counter64; - mandatory true; - description - "The total number of out-of-sequence CCMs received from - the remote MEP."; - reference - "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; - } - - leaf ccms-sent { - type oc-yang:counter64; - mandatory true; - description - "Total number of CCMs transmitted towards the Remote MEP"; - reference - "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; - } - leaf interface-status-tlv { type oc-cfm-types:interface-status-type; description @@ -583,9 +571,36 @@ module openconfig-cfm { reference "[802.1q] 12.14.7.6.3:f"; } + uses rmep-counters-state; } // end grouping mep-oper-states. + + grouping rmep-counters-state { + description "Counters for a remote MEP"; + container counters { + description + "A collection of rmep-related statistics objects."; + leaf mep-ccm-sequence-errors { + type oc-yang:counter64; + mandatory true; + description + "The total number of out-of-sequence CCMs received from + the remote MEP."; + reference + "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; + } + leaf ccms-sent { + type oc-yang:counter64; + mandatory true; + description + "Total number of CCMs transmitted towards the Remote MEP"; + reference + "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + } + } + } + grouping mep-config { description "Configuration for a MEP."; @@ -853,80 +868,231 @@ module openconfig-cfm { // End cfm-global-state } + grouping delay-measurement-state { + description "Delay measurement state."; - grouping performance-measurement-counters-state { - description "Performance measurement counters state."; + container delay-measurement-state { + description "Delay measurement state."; - leaf slm-sent { - type oc-yang:counter64; - description "slm Probes sent."; - } + leaf frame-delay-two-way-min { + type uint32; + units microseconds; + description + "This object contains the minimum two-way frame delay calculated by this + MEP for this Measurement Interval. - leaf slm-received { - type oc-yang:counter64; - description "slm Probes sent."; + This object is undefined if measurement-type is dm1-transmitted + or dm1-received."; } + leaf frame-delay-two-way-max { + type uint32; + units microseconds; + description + "This object contains the maximum two-way frame delay calculated by this + MEP for this Measurement Interval. - leaf slr-sent { - type oc-yang:counter64; - description "slm Probes sent."; + This object is undefined if measurement-type is dm1DmTx or + dm1-received."; } + leaf frame-delay-two-way-average { + type uint32; + units microseconds; + description + "This object contains the average two-way frame delay calculated by this + MEP for this Measurement Interval. - leaf slr-received { - type oc-yang:counter64; - description "slm Probes sent."; + This object is undefined if measurement-type is dm1-transmitted or + dm1-received."; } - leaf dmm-sent { - type oc-yang:counter64; - description "slm Probes sent."; - } + leaf frame-delay-two-way-stddev { + type uint32; + units microseconds; + description + "This object contains the standard deviation of two-way frame delay calculated by this + MEP for this Measurement Interval. - leaf dmm-received { - type oc-yang:counter64; - description "slm Probes sent."; + This object is undefined if measurement-type is dm1DmTx or + dm1-received."; } + uses delay-measurement-counters-state; + } + } - leaf dmr-sent { - type oc-yang:counter64; - description "slm Probes sent."; - } + grouping loss-measurement-state { + description "Performance measurement state."; - leaf dmr-received { - type oc-yang:counter64; - description "slm Probes sent."; - } + container loss-measurement-state { + description "Loss measurement state."; - leaf probes-received { - type oc-yang:counter64; - description "CCM Probes received."; - } + leaf far-end-min-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the minimum one-way availability flr in the + egress direction (source --> destination), + from among the set of availability flr values + calculated by the MEP in this Measurement Interval. There is + one availability flr value for each 'delta_t' time period + within the Measurement Interval, as specified in MEF 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardMinFlr"; + } + leaf far-end-max-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the maximum one-way availability flr in the + forward direction (source --> destination), + from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardMaxFlr"; + } + leaf near-end-min-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the minimum one-way availability flr in the + backward direction (destination --> source), + from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsBackwardMinFlr"; + } + leaf near-end-max-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the maximum one-way availability flr in the + backward direction, from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + Service OAM Performance Monitoring YANG Module + MEF 39 + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsBackwardMaxFlr"; + } - leaf probes-lost-rate { - type uint16; - description "mean loss reported."; - } + leaf near-end-average-frame-loss-ratio { - leaf mean-near-end-frame-loss-rate { - type uint16; - description "mean loss reported."; - } + type uint32 { + range "0..100000"; + } + units milli-percent; - leaf mean-far-end-frame-loss-rate { - type uint16; - description "mean loss reported."; - } + description + "This object contains the average one-way availability flr in the + backward direction, from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. - leaf mean-delay { - type uint16; - description "mean loss reported."; + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsBackwardAvgFlr"; + } + + uses loss-measurement-counters-state; } + } - leaf delay-variance { - type uint16; - description "mean loss reported."; + grouping loss-measurement-counters-state { + description "Performance measurement counters state."; + + container counters { + description + "A collection of loss-measurement-related statistics objects."; + + leaf slm-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slm-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slr-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slr-received { + type oc-yang:counter64; + description "slm Probes sent."; + } } + } + + grouping delay-measurement-counters-state { + description "Performance measurement counters state."; + + container counters { + description + "A collection of delay-measurement-related statistics objects."; + + leaf dmm-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmm-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + leaf dmr-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmr-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + } } grouping performance-measurement-config { @@ -943,8 +1109,35 @@ module openconfig-cfm { description "Enable or disable measurement."; } + leaf measurement-type { + type enumeration { + enum LMM { + description + "LMM SOAM PDU generated and received LMR responses tracked."; + } + enum SLM { + description + "SLM SOAM PDU generated and received SLR responses tracked."; + } + enum DMM { + description + "DMM SOAM PDU generated and received DMR responses tracked."; + } + enum CCM { + description + "CCM SOAM PDU generated and received CCM PDUs tracked."; + } + } + default SLM; + description + "This object specifies what type of Loss Measurement will be + performed."; + reference + "ITU Y1731"; + } + leaf type { - description "Measurement type."; + description "protocol type."; type enumeration { enum SINGLE_ENDED { description "single-ended measurement mode."; @@ -953,6 +1146,8 @@ module openconfig-cfm { description "dual-ended measurement mode."; } } + reference + "https://datatracker.ietf.org/doc/html/rfc7456#section-4"; } leaf frame-size { @@ -960,30 +1155,69 @@ module openconfig-cfm { description "Probe Frame size for measurement."; } - leaf burst-interval { - type uint32; - units "milliseconds"; - description "Interval between bursts for synthetic loss measurement."; + leaf measurement-interval { + type uint32 { + range "1..525600"; + } + units "minutes"; + description + "This object specifies the Measurement Interval for FLR statistics, in + minutes. + A Measurement Interval of 15 minutes needs to be supported, + other intervals may be supported."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCfgMeasurementInterval"; } - leaf packet-interval { + leaf repetition-period { type uint32; - units "milliseconds"; - description "Interval between packets within a burst."; + default 0; + description + "This object specifies a configurable repetition time between + Measurement Intervals in a Measurement session in hundredths of a + second. + + If the value is less than or equal to one Measurement Interval + there is no time gap between the end of one Measurement + Interval and the start of a new Measurement Interval. This is + the normal usage case. + + If the value is greater than one Measurement Interval there is + time gap between the end of one Measurement Interval and the + start of the next Measurement Interval."; + reference + "[MEF SOAM PM IA] R18, D3, R19, R20"; } - leaf bucket-size { + leaf intervals-archived { type uint16; - units "probes count per bucket"; - description "Size of each statistics bucket."; + description + "This object specifies the number of completed measurement intervals to + store in the history statistic table. + + At least 32 completed measurement intervals are to be + stored. 96 measurement intervals are recommended to be stored."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCfgNumIntervalsStored"; } - leaf number-of-buckets { + leaf packets-interval-per-meaurement-period { type uint16; - description "Number of buckets archived for statistics collection."; + description "Number of probe packets to send within a measurement interval."; + } + + leaf burst-interval { + type uint32; + units "milliseconds"; + description "Interval between bursts within a measurement interval."; } - } + leaf packet-per-burst { + type uint32; + units "milliseconds"; + description "if burst enabled. the leaf defines the number of packet per burst of probes."; + } + } grouping rdi-config { description "Remote Defect Indication (RDI) configuration."; @@ -994,7 +1228,6 @@ module openconfig-cfm { } } - grouping link-loss-forwarding-config { description "Link loss forwarding configuration."; @@ -1010,7 +1243,8 @@ module openconfig-cfm { } description "Action to take on link loss."; } - } + } + uses cfm-top; } \ No newline at end of file From 5df107f261d523260cad1e06403ea83c996e629b Mon Sep 17 00:00:00 2001 From: Annamalai Date: Tue, 17 Sep 2024 09:49:47 -0700 Subject: [PATCH 03/16] Add leaf for average frame loss in egress direction --- release/models/cfm/openconfig-cfm.yang | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 9ecf5fb84..04ec96bf3 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -966,6 +966,29 @@ module openconfig-cfm { reference "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardMaxFlr"; } + leaf far-end-average-frame-loss-ratio { + + type uint32 { + range "0..100000"; + } + units milli-percent; + + description + "This object contains the average one-way availability flr in the + forward direction, from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardAvgFlr"; + } + leaf near-end-min-frame-loss-ratio { type uint32 { range "0..100000"; From 0f351b7427a4230d657309281b4f9016ebfce5ff Mon Sep 17 00:00:00 2001 From: Annamalai Date: Wed, 18 Sep 2024 07:00:50 -0700 Subject: [PATCH 04/16] Commit does the following. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds references to the following leaf nodes [1] "remote-mep-id" [2] "mac-address" [2] "direction" * Updates description to "maintenance-domain" and adds a reference. * Adds leaf "group-name" to support Ciscoxr vendor implementation of xconnect/bridgedomains to support Ciscoxr implementation * https://github.com/YangModels/yang/blob/main/vendor/cisco/xr/613/Cisco-IOS-XR-ethernet-cfm-cfg.yang#L776C22-L776C33 * Adds "routing-disable" action to support Arista's implementation of link loss forwarding. * Merges ETH-SLM and ETH-LM into loss-measurement config and state. * Creates a common performance-measurement container for all performance-measurement functions i.e. delay & loss. * Moves "loss-measurement" and "delay-measurement" configs and states into a common performance-measurement container. * Moves the previously modeled loss measurement and delay measurement states into a "pm-profiles" container • Adds leaf-ref for "policy-name" associated with the endpoint to refer to the global policy --- release/models/cfm/openconfig-cfm-types.yang | 9 +- release/models/cfm/openconfig-cfm.yang | 187 ++++++++++--------- 2 files changed, 103 insertions(+), 93 deletions(-) diff --git a/release/models/cfm/openconfig-cfm-types.yang b/release/models/cfm/openconfig-cfm-types.yang index 293e5f0e6..fff32ecac 100644 --- a/release/models/cfm/openconfig-cfm-types.yang +++ b/release/models/cfm/openconfig-cfm-types.yang @@ -76,10 +76,11 @@ typedef config-error-type { } typedef mep-id-type { - description - "Maintenance association End Point Identifier, which is unique - over a given Maintenance Association."; - + description + "Maintenance association End Point Identifier (MEPID): A 12-bit + identifier, unique over a given Maintenance Association, identifying + a specific MEP."; + reference "[802.1q] 3.19 and 19.2.1"; type uint16 { range "1..8191"; } diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 04ec96bf3..9896c79e0 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -42,17 +42,27 @@ module openconfig-cfm { "Container for CFM configuration, state and perfomance measurement policies"; container domains { - description "Collection of CFM maintenance domains on the local system"; + description "A Container for CFM maintenance domain state and Configuration + on the local system"; list maintenance-domain { key "md-id"; - description "Collection of CFM maintenance domains on the local system"; + description + "A Maintenance Domain managed object is required in order to create + an MA with a MAID that includes that Maintenance Domain’s Name. From + this Maintenance Domain managed object, all Maintenance + Association managed objects associated with that Maintenance + Domain managed object can be accessed, and thus controlled."; + reference "[802.1q] 12.14.5"; leaf md-id { type leafref { path "../config/md-id"; } - description "A unique maintenance domain name identifying the domain"; + description + "A unique maintenance domain name identifying the domain"; + reference + "[802.1q] 12.14.5"; } container config { @@ -67,14 +77,15 @@ module openconfig-cfm { } container maintenance-associations { - description "Collection of maintenance associations within a - maintenance domain.Provides configuration and operational data - for the Maintenance Associations. A Maintenance Association is a set - of MEPs, each configured with the same MAID and MD level, - established to verify the integrity of a single service - instance. A Maintenance Association can be thought of as a - full mesh of Maintenance Entities among a set of MEPs so - configured."; + description + "Collection of maintenance associations within a + maintenance domain.Provides configuration and operational data + for the Maintenance Associations. A Maintenance Association is a set + of MEPs, each configured with the same MAID and MD level, + established to verify the integrity of a single service + instance. A Maintenance Association can be thought of as a + full mesh of Maintenance Entities among a set of MEPs so + configured."; list maintenance-association { key "ma-id"; @@ -85,6 +96,8 @@ module openconfig-cfm { type leafref { path "../config/ma-id"; } + reference + "[802.1q] 12.14.6"; } container config { @@ -122,11 +135,36 @@ module openconfig-cfm { description " Operational tate data for a MEP."; uses mep-config; uses mep-oper-states; - uses performance-measurement-config; - uses loss-measurement-state; - uses delay-measurement-state; } //end container mep state + container pm-profiles { + description + "This container includes configuration and state objects for the Frame Loss + Measurement & Delay Measurement functions defined in [Y.1731] and [MEF SOAM PM IA]."; + + list pm-profile { + description " measurement profile name and state."; + key "profile-name"; + + leaf "profile-name" { + description "A unique profile name identifying the profile"; + type leafref { + path "../../../../../../../../../performance-measurement-profiles-global/performance-measurement-profile/config/profile-name"; + } + } + + container config { + description "Associated performance Measurement profile."; + } + + container state { + description "Operational data for loss measurement."; + config false; + uses performance-measurement-state; + } + } + } + container rdi { description "rdi config for a mep."; container config { @@ -145,7 +183,10 @@ module openconfig-cfm { container link-loss-forwarding { description "link loss forwarding config for a mep."; container config { - description "link loss forwarding config for a mep."; + description + "Enable propagation of the remote + attachment-circuit link state to the + localattachment-circuit link state"; uses link-loss-forwarding-config; } @@ -180,7 +221,6 @@ module openconfig-cfm { uses remote-mep-config; uses mep-oper-states; } - } // end list remote-mep } // end container remote-meps } // end list mep-endpoint @@ -196,11 +236,11 @@ module openconfig-cfm { uses cfm-global-state; } - container loss-measurement-profiles { + container performance-measurement-profiles-global { description "This container includes configuration and state objects for the Frame Loss Measurement function defined in [Y.1731] and [MEF SOAM PM IA]."; - list loss-measurement-profile { + list performance-measurement-profile { description "Loss measurement configuration and state."; key "profile-name"; @@ -210,7 +250,6 @@ module openconfig-cfm { path "../config/profile-name"; } } - container config { description "Configuration data for loss measurement."; uses performance-measurement-config; @@ -221,61 +260,6 @@ module openconfig-cfm { config false; uses performance-measurement-config; uses loss-measurement-state; - } - } - } - - container synthetic-loss-measurement-profiles { - description "synthetic-loss measurement configuration and state."; - - list synthetic-loss-measurement-profile { - description "synthetic-loss measurement configuration and state."; - key "profile-name"; - - leaf "profile-name" { - type leafref { - path "../config/profile-name"; - } - description "A unique profile name identifying the profile"; - } - - container config { - description "Configuration data for synthetic-loss measurement."; - uses performance-measurement-config; - } - - container state { - description "Operational data for synthetic-loss measurement."; - config false; - uses performance-measurement-config; - uses loss-measurement-state; - } - } - } - - container delay-measurement-profiles { - description "delay-measurement measurement configuration and state."; - - list delay-measurement-profile { - description "delay-measurement configuration and state."; - key "profile-name"; - - leaf "profile-name" { - type leafref { - path "../config/profile-name"; - } - description "A unique profile name identifying the profile"; - } - - container config { - description "Configuration data for delay-measurement measurement."; - uses performance-measurement-config; - } - - container state { - description "Operational data for delay-measurement measurement."; - config false; - uses performance-measurement-config; uses delay-measurement-state; } } @@ -289,8 +273,18 @@ module openconfig-cfm { leaf ma-id { type oc-cfm-types:name-key-type; description "Key of the Maintenance Association list of entries."; + reference + "[802.1q] 12.14.6"; } + leaf group-name { + type string; + description + "Optional Bridge Group or Cross-connect Group name, if + Service Type is BridgeDomain or + CrossConnect"; +} + leaf ma-name-type { type enumeration { enum PRIMARY_VID { @@ -395,16 +389,15 @@ module openconfig-cfm { leaf id { type oc-cfm-types:mep-id-type; description "Remote MEP IDs in full mesh."; + reference + "Item a in 12.14.7.6.3, 20.20 of IEEE Std 802.1Q-2022"; } leaf mac-address { type oc-yang:mac-address; description "Remote MEP IDs in full mesh."; - } - - leaf-list performance-measurement-profiles { - type string; - description "Performance Measurement profile names associated with the endpoints "; + reference + "Item d in 12.14.7.6.3, 20.19.7 of IEEE Std 802.1Q-2022"; } } // end grouping @@ -488,7 +481,7 @@ module openconfig-cfm { description "Counters for a remote MEP"; container counters { description - "A collection of rmep-related statistics objects."; + "A collection of mep-related statistics objects."; leaf mep-ccm-sequence-errors { type oc-yang:counter64; mandatory true; @@ -686,8 +679,8 @@ module openconfig-cfm { } leaf direction { - description "The direction in which the MEP faces on the Bridge Port. - Example, up or down."; + description "The direction in which the MEP faces on the Bridge/Xconnect + Port. Example, up or down."; type enumeration { enum DOWN { value 1; @@ -702,6 +695,8 @@ module openconfig-cfm { dispatched towards the MAC Relay entity."; } } + reference + "Item c in 12.14.7.1.3, 19.2 of IEEE Std 802.1Q-2022"; } } @@ -711,6 +706,8 @@ module openconfig-cfm { leaf md-id { type oc-cfm-types:name-key-type; description "The unique identifier for a Maintenance Domain."; + reference + "[802.1q] 12.14.5"; } leaf level { @@ -920,10 +917,10 @@ module openconfig-cfm { } grouping loss-measurement-state { - description "Performance measurement state."; + description "Loss measurement state grouping."; container loss-measurement-state { - description "Loss measurement state."; + description "Loss measurement state container."; leaf far-end-min-frame-loss-ratio { type uint32 { @@ -1118,6 +1115,12 @@ module openconfig-cfm { } } + grouping performance-measurement-state { + description "Performance measurement state grouping."; + uses loss-measurement-state; + uses delay-measurement-state; + } + grouping performance-measurement-config { description "Performance measurement configuration."; @@ -1159,13 +1162,13 @@ module openconfig-cfm { "ITU Y1731"; } - leaf type { + leaf protocol-type { description "protocol type."; type enumeration { enum SINGLE_ENDED { description "single-ended measurement mode."; } - enum DUAL_ENDED { + enum DUAL_ENDED { description "dual-ended measurement mode."; } } @@ -1224,7 +1227,7 @@ module openconfig-cfm { "MEF-SOAM-PM-MIB.mefSoamLmCfgNumIntervalsStored"; } - leaf packets-interval-per-meaurement-period { + leaf packets-per-meaurement-period { type uint16; description "Number of probe packets to send within a measurement interval."; } @@ -1238,7 +1241,9 @@ module openconfig-cfm { leaf packet-per-burst { type uint32; units "milliseconds"; - description "if burst enabled. the leaf defines the number of packet per burst of probes."; + description + "if burst enabled. the leaf defines the number of packet per burst of probes. + packets-per-measurement-period / burst-interval"; } } @@ -1256,13 +1261,17 @@ module openconfig-cfm { leaf enable { type boolean; - description "Enable or disable link loss forwarding."; + description + "Enable propagation of the remote + attachment-circuit link state to the + local attachment-circuit link state"; } leaf action { type enumeration { enum "SHUTDOWN" { description "Shutdown action on link loss."; } enum "ALARM" { description "Raise an alarm on link loss."; } + enum "DISABLE_ROUTING" { description "Mark interface non-routable."; } } description "Action to take on link loss."; } From 421942895b7a5669bd480c8bd1132a8f0ae5055e Mon Sep 17 00:00:00 2001 From: Annamalai Date: Wed, 18 Sep 2024 07:33:28 -0700 Subject: [PATCH 05/16] fix seggregation for performance-mesurement-state. --- release/models/cfm/openconfig-cfm.yang | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 9896c79e0..be3ba9e15 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -259,8 +259,7 @@ module openconfig-cfm { description "Operational data for loss measurement."; config false; uses performance-measurement-config; - uses loss-measurement-state; - uses delay-measurement-state; + uses performance-measurement-state; } } } From 28b6cf9dcf913abcf55c32e8d4006ac7866bc831 Mon Sep 17 00:00:00 2001 From: Annamalai Date: Wed, 18 Sep 2024 07:38:18 -0700 Subject: [PATCH 06/16] fix descriptions. --- release/models/cfm/openconfig-cfm.yang | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index be3ba9e15..8a8484913 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -237,26 +237,31 @@ module openconfig-cfm { } container performance-measurement-profiles-global { - description "This container includes configuration and state objects for the Frame Loss - Measurement function defined in [Y.1731] and [MEF SOAM PM IA]."; + description "This container includes configuration and state objects + for the Frame Loss Measurement and Delay measurement + functions as defined in [Y.1731] and [MEF SOAM PM IA]."; list performance-measurement-profile { - description "Loss measurement configuration and state."; + description "Performance measurement configuration and state."; key "profile-name"; leaf "profile-name" { - description "A unique profile name identifying the profile"; + description + "A unique profile name identifying the + Performance measurement profile"; type leafref { path "../config/profile-name"; } } container config { - description "Configuration data for loss measurement."; + description + "Configuration data for Performance measurement profile."; uses performance-measurement-config; } container state { - description "Operational data for loss measurement."; + description + "Statistical data for performance measurement profiles."; config false; uses performance-measurement-config; uses performance-measurement-state; @@ -1057,7 +1062,7 @@ module openconfig-cfm { } grouping loss-measurement-counters-state { - description "Performance measurement counters state."; + description "Loss-measurement-related measurement counters state."; container counters { description @@ -1086,7 +1091,7 @@ module openconfig-cfm { } grouping delay-measurement-counters-state { - description "Performance measurement counters state."; + description "Delay measurement counters state."; container counters { description @@ -1155,7 +1160,7 @@ module openconfig-cfm { } default SLM; description - "This object specifies what type of Loss Measurement will be + "This object specifies what type of Performance Measurement will be performed."; reference "ITU Y1731"; From 69c941c68e3af2cc5dc4fb206456eb4d5abff30b Mon Sep 17 00:00:00 2001 From: Annamalai Date: Thu, 19 Sep 2024 05:47:24 -0700 Subject: [PATCH 07/16] commit 7 adds following * removes trailing spaces. * removes unused and non OC flavoured imports (ietf). * moves leaf nomenclature from "_" to "-" . * add damping timer leaf to LLF feature. --- release/models/cfm/openconfig-cfm-types.yang | 1 - release/models/cfm/openconfig-cfm.yang | 48 ++++++++++++-------- 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/release/models/cfm/openconfig-cfm-types.yang b/release/models/cfm/openconfig-cfm-types.yang index fff32ecac..48a99d0e9 100644 --- a/release/models/cfm/openconfig-cfm-types.yang +++ b/release/models/cfm/openconfig-cfm-types.yang @@ -8,7 +8,6 @@ module openconfig-cfm-types { prefix "oc-cfm-types"; // import some basic types - import ietf-yang-types { prefix yang; } import openconfig-extensions { prefix oc-ext; } // google diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 8a8484913..56a0712c1 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -47,7 +47,7 @@ module openconfig-cfm { list maintenance-domain { key "md-id"; - description + description "A Maintenance Domain managed object is required in order to create an MA with a MAID that includes that Maintenance Domain’s Name. From this Maintenance Domain managed object, all Maintenance @@ -59,9 +59,9 @@ module openconfig-cfm { type leafref { path "../config/md-id"; } - description + description "A unique maintenance domain name identifying the domain"; - reference + reference "[802.1q] 12.14.5"; } @@ -77,7 +77,7 @@ module openconfig-cfm { } container maintenance-associations { - description + description "Collection of maintenance associations within a maintenance domain.Provides configuration and operational data for the Maintenance Associations. A Maintenance Association is a set @@ -138,7 +138,7 @@ module openconfig-cfm { } //end container mep state container pm-profiles { - description + description "This container includes configuration and state objects for the Frame Loss Measurement & Delay Measurement functions defined in [Y.1731] and [MEF SOAM PM IA]."; @@ -146,7 +146,7 @@ module openconfig-cfm { description " measurement profile name and state."; key "profile-name"; - leaf "profile-name" { + leaf "profile-name" { description "A unique profile name identifying the profile"; type leafref { path "../../../../../../../../../performance-measurement-profiles-global/performance-measurement-profile/config/profile-name"; @@ -183,7 +183,7 @@ module openconfig-cfm { container link-loss-forwarding { description "link loss forwarding config for a mep."; container config { - description + description "Enable propagation of the remote attachment-circuit link state to the localattachment-circuit link state"; @@ -238,7 +238,7 @@ module openconfig-cfm { container performance-measurement-profiles-global { description "This container includes configuration and state objects - for the Frame Loss Measurement and Delay measurement + for the Frame Loss Measurement and Delay measurement functions as defined in [Y.1731] and [MEF SOAM PM IA]."; list performance-measurement-profile { @@ -246,21 +246,21 @@ module openconfig-cfm { key "profile-name"; leaf "profile-name" { - description - "A unique profile name identifying the + description + "A unique profile name identifying the Performance measurement profile"; type leafref { path "../config/profile-name"; } } container config { - description + description "Configuration data for Performance measurement profile."; uses performance-measurement-config; } container state { - description + description "Statistical data for performance measurement profiles."; config false; uses performance-measurement-config; @@ -443,9 +443,9 @@ module openconfig-cfm { leaf-list mep-defects { type oc-cfm-types:mep-defects-type; - max-elements 4; + max-elements 5; description - "Vector of boolean error conditions. + "Vector of boolean error conditions. Multiple defects can be present at the same time."; reference "12.14.7.1.3 of IEEE Std 802.1Q-2022"; @@ -683,7 +683,7 @@ module openconfig-cfm { } leaf direction { - description "The direction in which the MEP faces on the Bridge/Xconnect + description "The direction in which the MEP faces on the Bridge/Xconnect Port. Example, up or down."; type enumeration { enum DOWN { @@ -761,7 +761,7 @@ module openconfig-cfm { OCTET string."; } - leaf dns_like_name { + leaf dns-like-name { when "../md-name-type = 'DOMAIN_NAME'"; description "Domain name like string, globally unique text string @@ -1027,7 +1027,7 @@ module openconfig-cfm { The flr value is a ratio that is expressed as a percent with a value of 0 (ratio 0.00) through 100000 (ratio 1.00). Service OAM Performance Monitoring YANG Module - MEF 39 + MEF 39 Units are in milli-percent, where 1 indicates 0.001 percent."; reference @@ -1245,7 +1245,7 @@ module openconfig-cfm { leaf packet-per-burst { type uint32; units "milliseconds"; - description + description "if burst enabled. the leaf defines the number of packet per burst of probes. packets-per-measurement-period / burst-interval"; } @@ -1265,11 +1265,21 @@ module openconfig-cfm { leaf enable { type boolean; - description + description "Enable propagation of the remote attachment-circuit link state to the local attachment-circuit link state"; } + leaf damping-timer { + type uint64; + units milliseconds; + description + "The damping timer is the amount of time that the local + attachment-circuit link state will be held in the down state + after the remote attachment-circuit link state has been + detected to be up. The damping timer is used to prevent + flapping of the local attachment-circuit link state."; + } leaf action { type enumeration { From 3aa54840bdf6f4159d807244650d5afc5843de36 Mon Sep 17 00:00:00 2001 From: Annamalai Date: Sun, 22 Sep 2024 09:45:58 -0700 Subject: [PATCH 08/16] * refractor leaf-ref "profile-name" to point to config. * edit to ccm interval: remove 300ms and add 100ms enum. --- release/models/cfm/openconfig-cfm.yang | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 56a0712c1..854e472d2 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -149,17 +149,30 @@ module openconfig-cfm { leaf "profile-name" { description "A unique profile name identifying the profile"; type leafref { - path "../../../../../../../../../performance-measurement-profiles-global/performance-measurement-profile/config/profile-name"; + path "../config/profile-name"; } } container config { description "Associated performance Measurement profile."; + + leaf "profile-name" { + description "A unique profile name identifying the profile"; + type leafref { + path "../config/profile-name"; + } + } container state { description "Operational data for loss measurement."; config false; + + leaf "profile-name" { + type string; + description "Name of the measurement profile."; + } + uses performance-measurement-state; } } @@ -1121,6 +1134,7 @@ module openconfig-cfm { grouping performance-measurement-state { description "Performance measurement state grouping."; + uses loss-measurement-state; uses delay-measurement-state; } From b50307611e1b4e78555e0d26d0d17e6cdb954a4d Mon Sep 17 00:00:00 2001 From: Annamalai Date: Sun, 22 Sep 2024 10:22:36 -0700 Subject: [PATCH 09/16] * fix typo for profile-name under config. --- release/models/cfm/openconfig-cfm.yang | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 854e472d2..386f6d54a 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -143,7 +143,7 @@ module openconfig-cfm { Measurement & Delay Measurement functions defined in [Y.1731] and [MEF SOAM PM IA]."; list pm-profile { - description " measurement profile name and state."; + description " Measurement profile name and state."; key "profile-name"; leaf "profile-name" { @@ -157,9 +157,8 @@ module openconfig-cfm { description "Associated performance Measurement profile."; leaf "profile-name" { - description "A unique profile name identifying the profile"; - type leafref { - path "../config/profile-name"; + description "A unique profile name identifying the profile"; + type string; } } From fb67fde9ab5f5e974d796a6dff5d74966005409b Mon Sep 17 00:00:00 2001 From: Annamalai Date: Mon, 23 Sep 2024 02:12:18 -0700 Subject: [PATCH 10/16] change unit for packets-per-burst --- release/models/cfm/openconfig-cfm.yang | 1 - 1 file changed, 1 deletion(-) diff --git a/release/models/cfm/openconfig-cfm.yang b/release/models/cfm/openconfig-cfm.yang index 386f6d54a..76db35055 100644 --- a/release/models/cfm/openconfig-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -1257,7 +1257,6 @@ module openconfig-cfm { leaf packet-per-burst { type uint32; - units "milliseconds"; description "if burst enabled. the leaf defines the number of packet per burst of probes. packets-per-measurement-period / burst-interval"; From fd9e30187aeb0d6a7c950f410ac2b87644dd65e3 Mon Sep 17 00:00:00 2001 From: Annamalai Date: Fri, 18 Oct 2024 15:15:28 -0700 Subject: [PATCH 11/16] * refractor cfm module. add oam super node and augment OAM with cfm. --- 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 From e1b9dacd9ab12ed1f457fe4da7892dd960fb6aec Mon Sep 17 00:00:00 2001 From: Annamalai Date: Fri, 18 Oct 2024 15:20:15 -0700 Subject: [PATCH 12/16] Revert "* refractor cfm module. add oam super node and augment OAM with cfm." This reverts commit fd9e30187aeb0d6a7c950f410ac2b87644dd65e3. * revert commit to pull and push --- release/models/cfm/.spec.yml | 6 +++ .../{oam => cfm}/openconfig-cfm-types.yang | 2 +- .../openconfig-cfm.yang} | 24 ++++----- release/models/oam/.spec.yml | 9 ---- release/models/oam/openconfig-oam.yang | 53 ------------------- 5 files changed, 19 insertions(+), 75 deletions(-) create mode 100644 release/models/cfm/.spec.yml rename release/models/{oam => cfm}/openconfig-cfm-types.yang (99%) rename release/models/{oam/openconfig-oam-cfm.yang => cfm/openconfig-cfm.yang} (98%) delete mode 100644 release/models/oam/.spec.yml delete mode 100644 release/models/oam/openconfig-oam.yang diff --git a/release/models/cfm/.spec.yml b/release/models/cfm/.spec.yml new file mode 100644 index 000000000..8fbd088a6 --- /dev/null +++ b/release/models/cfm/.spec.yml @@ -0,0 +1,6 @@ +- name: openconfig-cfm + docs: + - yang/cfm/openconfig-cfm.yang + build: + - yang/cfm/openconfig-cfm.yang + run-ci: true diff --git a/release/models/oam/openconfig-cfm-types.yang b/release/models/cfm/openconfig-cfm-types.yang similarity index 99% rename from release/models/oam/openconfig-cfm-types.yang rename to release/models/cfm/openconfig-cfm-types.yang index c27d77e9b..48a99d0e9 100644 --- a/release/models/oam/openconfig-cfm-types.yang +++ b/release/models/cfm/openconfig-cfm-types.yang @@ -3,7 +3,7 @@ module openconfig-cfm-types { yang-version "1"; // namespace - namespace "http://openconfig.net/yang/oam/cfm-types"; + namespace "http://openconfig.net/yang/cfm-types"; prefix "oc-cfm-types"; diff --git a/release/models/oam/openconfig-oam-cfm.yang b/release/models/cfm/openconfig-cfm.yang similarity index 98% rename from release/models/oam/openconfig-oam-cfm.yang rename to release/models/cfm/openconfig-cfm.yang index 90fd63bf9..76db35055 100644 --- a/release/models/oam/openconfig-oam-cfm.yang +++ b/release/models/cfm/openconfig-cfm.yang @@ -1,17 +1,16 @@ -module openconfig-oam-cfm { +module openconfig-cfm { yang-version "1"; // namespace - namespace "http://openconfig.net/yang/oam/cfm"; + namespace "http://openconfig.net/yang/cfm"; - prefix "oc-oam-cfm"; + prefix "oc-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 @@ -161,12 +160,18 @@ module openconfig-oam-cfm { description "A unique profile name identifying the profile"; type string; } + } container state { description "Operational data for loss measurement."; config false; - uses performance-measurement-config; + + leaf "profile-name" { + type string; + description "Name of the measurement profile."; + } + uses performance-measurement-state; } } @@ -1253,7 +1258,7 @@ module openconfig-oam-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"; } } @@ -1298,11 +1303,6 @@ module openconfig-oam-cfm { } } - // augment statements + uses cfm-top; - 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/.spec.yml b/release/models/oam/.spec.yml deleted file mode 100644 index c72f72b7f..000000000 --- a/release/models/oam/.spec.yml +++ /dev/null @@ -1,9 +0,0 @@ -- 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/oam/openconfig-oam.yang b/release/models/oam/openconfig-oam.yang deleted file mode 100644 index 12a755874..000000000 --- a/release/models/oam/openconfig-oam.yang +++ /dev/null @@ -1,53 +0,0 @@ -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 From 1dfb64e023ee2c9550b8e4ab684ec68ac86bf882 Mon Sep 17 00:00:00 2001 From: Annamalai Date: Fri, 18 Oct 2024 15:28:22 -0700 Subject: [PATCH 13/16] 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 From 8370bcdea5e2062a2010671714a492dd8829093c Mon Sep 17 00:00:00 2001 From: Annamalai Date: Wed, 23 Oct 2024 14:55:13 -0700 Subject: [PATCH 14/16] add posix-regex extension statements to fix lint --- release/models/oam/openconfig-cfm-types.yang | 1 + release/models/oam/openconfig-oam-cfm.yang | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/release/models/oam/openconfig-cfm-types.yang b/release/models/oam/openconfig-cfm-types.yang index c27d77e9b..c1f1ccae1 100644 --- a/release/models/oam/openconfig-cfm-types.yang +++ b/release/models/oam/openconfig-cfm-types.yang @@ -33,6 +33,7 @@ typedef name-key-type { type string { length "1..255"; pattern '[0-9a-zA-Z\-_.]*'; + oc-ext:posix-pattern '^[0-9a-zA-Z\-_.]*$'; } description "String type with at least 1 and up to 255 of the specified diff --git a/release/models/oam/openconfig-oam-cfm.yang b/release/models/oam/openconfig-oam-cfm.yang index 90fd63bf9..ff45b3b28 100644 --- a/release/models/oam/openconfig-oam-cfm.yang +++ b/release/models/oam/openconfig-oam-cfm.yang @@ -336,7 +336,8 @@ module openconfig-oam-cfm { mandatory true; type string { length "1..45"; - pattern "[ -~]*"; + pattern '[ -~]*'; + oc-ext:posix-pattern '^[ -~]*$'; } description "RFC2579 DisplayString, except that the character codes 0-31 @@ -800,6 +801,7 @@ module openconfig-oam-cfm { type string { length "1..43"; pattern "[ -~]*"; + oc-ext:posix-pattern '^[ -~]*$'; } } } From 23b9087b7c7cd9fa6103520512aee4a83ac4a1ac Mon Sep 17 00:00:00 2001 From: Annamalai Date: Tue, 12 Nov 2024 08:56:21 -0800 Subject: [PATCH 15/16] "add auto discovery knob" --- release/models/oam/openconfig-oam-cfm.yang | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release/models/oam/openconfig-oam-cfm.yang b/release/models/oam/openconfig-oam-cfm.yang index ff45b3b28..8197c487d 100644 --- a/release/models/oam/openconfig-oam-cfm.yang +++ b/release/models/oam/openconfig-oam-cfm.yang @@ -411,6 +411,7 @@ module openconfig-oam-cfm { reference "Item d in 12.14.7.6.3, 20.19.7 of IEEE Std 802.1Q-2022"; } + } // end grouping grouping mep-oper-states { @@ -710,6 +711,13 @@ module openconfig-oam-cfm { reference "Item c in 12.14.7.1.3, 19.2 of IEEE Std 802.1Q-2022"; } + leaf auto-discovery { + type boolean; + description + "A boolean value to enable or disable auto-discovery. + users must configure explicitly true or false. + If unset, then it’s implementation specific."; + } } grouping cfm-domain-config { From 8773950dbb32e880e51db9959bd8485759d1158a Mon Sep 17 00:00:00 2001 From: Annamalai Date: Tue, 12 Nov 2024 09:01:59 -0800 Subject: [PATCH 16/16] remove trailing spaces --- release/models/oam/openconfig-oam-cfm.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/oam/openconfig-oam-cfm.yang b/release/models/oam/openconfig-oam-cfm.yang index 8197c487d..dbf0888e7 100644 --- a/release/models/oam/openconfig-oam-cfm.yang +++ b/release/models/oam/openconfig-oam-cfm.yang @@ -411,7 +411,6 @@ module openconfig-oam-cfm { reference "Item d in 12.14.7.6.3, 20.19.7 of IEEE Std 802.1Q-2022"; } - } // end grouping grouping mep-oper-states { @@ -711,6 +710,7 @@ module openconfig-oam-cfm { reference "Item c in 12.14.7.1.3, 19.2 of IEEE Std 802.1Q-2022"; } + leaf auto-discovery { type boolean; description