From: Yakir Dorani Date: Sun, 9 Oct 2016 15:19:11 +0000 (+0200) Subject: Add l3vpn support X-Git-Tag: release/carbon~74 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=1f43f68a323c19e8aa4268653496ee8dd28f8eb2;p=unimgr.git Add l3vpn support Change-Id: Iad8cc507646c1e8b8daa39c340da429dc7da6879 Signed-off-by: Yakir Dorani --- diff --git a/legato-api/src/main/yang/mef-global.yang b/legato-api/src/main/yang/mef-global.yang index 92e3ce9b..68af4295 100644 --- a/legato-api/src/main/yang/mef-global.yang +++ b/legato-api/src/main/yang/mef-global.yang @@ -1,210 +1,183 @@ module mef-global { namespace "http://metroethernetforum.org/ns/yang/mef-global"; prefix mef-global; - import ietf-yang-types { - prefix yang; - } - import ietf-inet-types { - prefix inet; - } - import mef-types { - prefix mef-types; - } + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + import mef-types { prefix mef-types; } organization "Metro Ethernet Forum"; contact - "Web URL: http://metroethernetforum.org/ - E-mail: mibs@metroethernetforum.org - Postal: Metro Ethernet Forum - 6033 W. Century Boulevard, Suite 1107 - Los Angeles, CA 90045 - U.S.A. - Phone: +1 310-642-2800 - Fax: +1 310-642-2808"; + "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org + Postal: Metro Ethernet Forum 6033 W. Century Boulevard, Suite + 1107 Los Angeles, CA 90045 U.S.A. Phone: +1 310-642-2800 Fax: + +1 310-642-2808"; description - "This module defines the shared profiles and related lists - to be referenced when configuring MEF Services. Service - Providers are expected to define a set of profiles for - Service Attributes associated with Bandwidth, L2CP, CoS, - and so on. These are expected to be slowly changing as - they reflect the Products offered by the Service Providers - to their Subscribers. - - Reference Overview: - A number of base documents have been used to create - the MEF Global YANG Module. The following are the - abbreviations for the baseline documents: - [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', - 2013-07-15 - [RFC 6643] refers to IETF RFC 6643 'Translation of Structure - of Management Information - Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 - [802.1AB] refers to 'Station and Media Access Control - Connectivity Discovery', IEEE 802.1AB-2009, September 2009 - [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard for Local - and metropolitan area networks --Media Access Control (MAC) - Bridges and Virtual Bridged Local Area Networks, August 2011 - [802-2001] refers to 'IEEE Standard for Local and Metropolitan - Area Networks: Overview and Architecture', IEEE 802-2001, - February 2002 - [MEF10.3] refers to MEF 10.3 - 'Ethernet Services Attributes Phase 3', October 2013 - [MEF6.2] refers to MEF 6.2 - 'EVC Ethernet Services Defintions Phase 3', August 2014 - [MEF40] refers to MEF 40 - 'UNI and EVC Definition of Managed Objects', April 2013 - [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014 - [MEF7.2] refers to MEF 7.2 - 'Carrier Ethernet Management Information Model', April 2013 - [MEF7.3] refers to MEF 7.3 - 'Carrier Ethernet Management Information Model', - Working Draft #1 2015 - [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version 2)', - December 1999 - [RFC 2863] refers to IETF RFC 2863 'The Interfaces Group MIB', - June 2000 - [RFC 3419] refers to IETF RFC 3419 - 'Textual Conventions for Transport Addresses', December 2002 - [Y.1731] refers to ITU-T Y.1731 - 'OAM functions and mechanisms for Ethernet based networks', - July 2011 - [Q.840.1] refers to ITU-T Q.840.1 - 'Requirements and analysis for NMS-EMS management interface - of Ethernet over Transport and Metro Ethernet - Network(EoT/MEN)' March 2007"; + "This module defines the shared profiles and related lists to + be referenced when configuring MEF Services. Service Providers + are expected to define a set of profiles for Service Attributes + associated with Bandwidth, L2CP, CoS, and so on. These are expected + to be slowly changing as they reflect the Products offered by + the Service Providers to their Subscribers. Reference Overview: + A number of base documents have been used to create the MEF Global + YANG Module. The following are the abbreviations for the baseline + documents: [RFC 6991] refers to IETF RFC 6991 'Common YANG Data + Types', 2013-07-15 [RFC 6643] refers to IETF RFC 6643 'Translation + of Structure of Management Information Version 2 (SMIv2) MIB Modules + to YANG Modules', 2011-11-25 [802.1AB] refers to 'Station and + Media Access Control Connectivity Discovery', IEEE 802.1AB-2009, + September 2009 [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard + for Local and metropolitan area networks --Media Access Control + (MAC) Bridges and Virtual Bridged Local Area Networks, August + 2011 [802-2001] refers to 'IEEE Standard for Local and Metropolitan + Area Networks: Overview and Architecture', IEEE 802-2001, February + 2002 [MEF10.3] refers to MEF 10.3 'Ethernet Services Attributes + Phase 3', October 2013 [MEF6.2] refers to MEF 6.2 'EVC Ethernet + Services Defintions Phase 3', August 2014 [MEF40] refers to MEF + 40 'UNI and EVC Definition of Managed Objects', April 2013 [MEF45] + refers to MEF 45 'Multi-CEN L2CP', August 2014 [MEF7.2] refers + to MEF 7.2 'Carrier Ethernet Management Information Model', April + 2013 [MEF7.3] refers to MEF 7.3 'Carrier Ethernet Management Information + Model', Working Draft #1 2015 [RFC 2737] refers to IETF RFC 2737 + 'Entity MIB (Version 2)', December 1999 [RFC 2863] refers to IETF + RFC 2863 'The Interfaces Group MIB', June 2000 [RFC 3419] refers + to IETF RFC 3419 'Textual Conventions for Transport Addresses', + December 2002 [Y.1731] refers to ITU-T Y.1731 'OAM functions and + mechanisms for Ethernet based networks', July 2011 [Q.840.1] refers + to ITU-T Q.840.1 'Requirements and analysis for NMS-EMS management + interface of Ethernet over Transport and Metro Ethernet Network(EoT/MEN)' + March 2007"; revision 2015-05-26 { description - "Formal Project Review Draft 1."; - reference "EVC Ethernet Services Definitions YANG Modules - (MEF XX), TBD"; + "Formal Project Review Draft 1."; + reference "EVC Ethernet Services Definitions YANG Modules (MEF XX), TBD"; } container mef-global { description - "MEF Global Profiles"; + "MEF Global Profiles"; grouping bwp-flows-group { description - "Bandwidth Profile Flows Group."; + "Bandwidth Profile Flows Group."; list bwp-flow { key "bw-profile"; description - "Bandwidth Profiles."; + "Bandwidth Profiles."; reference "[MEF10.3] Section 9.14, 12.2."; leaf bw-profile { type mef-types:identifier45; description - "Bandwidth Profile Identifier."; + "Bandwidth Profile Identifier."; reference "[MEF10.3] Section 9.14, 12.2."; } leaf user-label { type mef-types:identifier45; description - "This attribute is a friendly name for this specific " + - "Bandwidth Profile."; + "This attribute is a friendly name for this specific " + + "Bandwidth Profile."; } leaf cir { type mef-types:bwp-cir-type; units "kbits-per-sec"; default "0"; description - "This attribute identifies the Committed Information " + - "Rate (CIR) in Kilobits per second for one " + - "direction of an ETH EVC. If the value is 0, then " + - "no guarantee is assumed."; + "This attribute identifies the Committed Information " + + "Rate (CIR) in Kilobits per second for one " + + "direction of an ETH EVC. If the value is 0, then " + + "no guarantee is assumed."; } leaf cir-max { type mef-types:bwp-cir-type; units "kbits-per-sec"; default "0"; description - "This attribute identifies the Maximum Committed " + - "Information Rate (CIR). This parameter limits the " + - "rate of tokens added to the committed token bucket. " + - "If this value is 0, then no limit is assumed."; + "This attribute identifies the Maximum Committed " + + "Information Rate (CIR). This parameter limits the " + + "rate of tokens added to the committed token bucket. " + + "If this value is 0, then no limit is assumed."; } leaf cbs { type mef-types:bwp-cbs-type; units "bytes"; default "0"; description - "This attribute identifies the Committed Burst Size " + - "(CBS) in bytes for one direction of an ETH EVC. " + - "This parameter limits the maximum number of bytes " + - "available for a burst of Service Frames sent at " + - "the UNI line rate that will be declared Green " + - "by the Bandwidth Profile. If this value is 0, " + - "then no limit is assumed."; + "This attribute identifies the Committed Burst Size " + + "(CBS) in bytes for one direction of an ETH EVC. " + + "This parameter limits the maximum number of bytes " + + "available for a burst of Service Frames sent at " + + "the UNI line rate that will be declared Green " + + "by the Bandwidth Profile. If this value is 0, " + + "then no limit is assumed."; } leaf eir { type mef-types:bwp-eir-type; units "kbits-per-sec"; default "0"; description - "This attribute identifies the Excess Information " + - "Rate (EIR) in Kilobits per second for one " + - "direction of an ETH EVC. This parameter limits the " + - "average rate in bits per second of Service Frames " + - "that will be declared Yellow by the Bandwidth " + - "Profile. If this value is 0, then no limit is assumed."; + "This attribute identifies the Excess Information " + + "Rate (EIR) in Kilobits per second for one " + + "direction of an ETH EVC. This parameter limits the " + + "average rate in bits per second of Service Frames " + + "that will be declared Yellow by the Bandwidth " + + "Profile. If this value is 0, then no limit is assumed."; } leaf eir-max { type mef-types:bwp-eir-type; units "kbits-per-sec"; default "0"; description - "This attribute identifies the Maximum Excess " + - "Information Rate (EIR) in Kilobits per second for " + - "one direction of an ETH EVC. This parameter " + - "limits the rate of tokens added to the excess " + - "token bucket. If this value is 0, then no " + - "limit is assumed."; + "This attribute identifies the Maximum Excess " + + "Information Rate (EIR) in Kilobits per second for " + + "one direction of an ETH EVC. This parameter " + + "limits the rate of tokens added to the excess " + + "token bucket. If this value is 0, then no " + + "limit is assumed."; } leaf ebs { type mef-types:bwp-ebs-type; units "bytes"; default "0"; description - "This attribute identifies the Excess Burst Size " + - "(EBS) in bytes for one direction of an ETH EVC. " + - "This parameter limits the maximum number of " + - "bytes available for a burst of Service Frames " + - "sent at the UNI line rate that will be " + - "declared Yellow by the Bandwidth Profile. " + - "If this value is 0, then no limit is assumed."; + "This attribute identifies the Excess Burst Size " + + "(EBS) in bytes for one direction of an ETH EVC. " + + "This parameter limits the maximum number of " + + "bytes available for a burst of Service Frames " + + "sent at the UNI line rate that will be " + + "declared Yellow by the Bandwidth Profile. " + + "If this value is 0, then no limit is assumed."; } leaf coupling-enabled { type boolean; default "false"; description - "The Per Bandwidth Profile Coupling Flag (CF) " + - "attribute. This parameter determines whether " + - "or not overflow tokens not used for Service " + - "Frames declared Green can be used as Yellow tokens."; + "The Per Bandwidth Profile Coupling Flag (CF) " + + "attribute. This parameter determines whether " + + "or not overflow tokens not used for Service " + + "Frames declared Green can be used as Yellow tokens."; reference "[MEF10.3] Section 12.1 [R149]."; } leaf color-mode { type mef-types:bwp-color-mode-type; default "color-blind"; description - "This attribute describes the color mode (CM) to " + - "be applied as 'color-blind mode' or " + - "'color-aware mode'."; + "This attribute describes the color mode (CM) to " + + "be applied as 'color-blind mode' or " + + "'color-aware mode'."; reference "[MEF10.3] Section 10.3, [R151]."; } leaf coupling-flag { type mef-types:bwp-coupling-flag-type; default "yellow-eir-only"; description - "The optional coupling flag (CF) attribute, " + - "describes if yellow frames will be admitted " + - "if unused bandwidth is available. When CF is " + - "set to \"yellow-eir-only\", the volume of the " + - "yellow service frames admitted to the network " + - "cannot exceed EIR. When CF is set " + - "to \"yellow-eir-plus-cir\", the volume of the " + - "yellow service frames admitted to the network is " + - "bounded by CIR + EIR depending on volume of the " + - "offered green Service Frames. In both cases the " + - "burst size of the yellow service frames " + - "admitted to the network is bounded by EBS."; + "The optional coupling flag (CF) attribute, " + + "describes if yellow frames will be admitted " + + "if unused bandwidth is available. When CF is " + + "set to \"yellow-eir-only\", the volume of the " + + "yellow service frames admitted to the network " + + "cannot exceed EIR. When CF is set " + + "to \"yellow-eir-plus-cir\", the volume of the " + + "yellow service frames admitted to the network is " + + "bounded by CIR + EIR depending on volume of the " + + "offered green Service Frames. In both cases the " + + "burst size of the yellow service frames " + + "admitted to the network is bounded by EBS."; reference "[MEF23.1] Section 8.1."; } } @@ -212,16 +185,16 @@ module mef-global { container svc-providers { presence "Use non-default Service Providers"; description - "Global Service Providers List."; + "Global Service Providers List."; list svc-provider { key "sp-id"; description - "Service Provider Identifier."; + "Service Provider Identifier."; leaf sp-id { type mef-types:svc-provider-type; description - "The Service Provider ID identifies a unique SP that " + - "contains multiple CENs."; + "The Service Provider ID identifies a unique SP that " + + "contains multiple CENs."; reference "[MEF10.3] Section 7."; } } @@ -229,46 +202,46 @@ module mef-global { container cens { presence "Use non-default CEN"; description - "Global CENs List."; + "Global CENs List."; list cen { must "(not(/mef-global/svc-providers) and " + "not(./sp-id)) or " + "(/mef-global/svc-providers and ./sp-id)" { error-message "If the Service Providers list has been " + - "populated, a Service Provider ID must be " + - "configured for a CEN."; + "populated, a Service Provider ID must be " + + "configured for a CEN."; description - "A CEN sees a single Service Provider. This must " + - "statement is effectively a 'mandatory true' when " + - "the Global Service Providers list is being used."; + "A CEN sees a single Service Provider. This must " + + "statement is effectively a 'mandatory true' when " + + "the Global Service Providers list is being used."; } key "cen-id"; description - "List of CENs."; + "List of CENs."; leaf cen-id { type mef-types:cen-type; description - "The CEN ID identifies a specific Carrier Ethernet " + - "Network belong to a Service Provider."; + "The CEN ID identifies a specific Carrier Ethernet " + + "Network belong to a Service Provider."; reference "[MEF10.3] Section 7. The CEN ID must be " + - "unique for this Service Provider."; + "unique for this Service Provider."; } leaf sp-id { when "/mef-global:mef-global/mef-global:svc-providers" { description - "Service Provider Identifier associated with " + - "this CEN."; + "Service Provider Identifier associated with " + + "this CEN."; } type leafref { path "/mef-global:mef-global/mef-global:" + - "svc-providers/mef-global:svc-provider/" + - "mef-global:sp-id"; + "svc-providers/mef-global:svc-provider/" + + "mef-global:sp-id"; } description - "The Service Provider ID must be globally unique " + - "as all CENs and Subscribers must be supported " + - "by a specific Service Provider(SP). A SP can " + - "support multiple CENs."; + "The Service Provider ID must be globally unique " + + "as all CENs and Subscribers must be supported " + + "by a specific Service Provider(SP). A SP can " + + "support multiple CENs."; reference "[MEF10.3] Section 7."; } } @@ -276,384 +249,384 @@ module mef-global { container slss { presence "Use non-default SLS"; description - "The technical specification of the service level being " + - "offered by the Service Provider to the Subscriber is " + - "defined to be the Service Level Specification (SLS)."; + "The technical specification of the service level being " + + "offered by the Service Provider to the Subscriber is " + + "defined to be the Service Level Specification (SLS)."; list sls { must "(not(/mef-global/svc-providers) and " + "not(./sp-id)) or " + "(/mef-global/svc-providers and ./sp-id)" { error-message "If the Service Providers list has been " + - "populated, a Service Provider ID must be " + - "configured for an SLS."; + "populated, a Service Provider ID must be " + + "configured for an SLS."; description - "An SLS sees a single Service Provider. This must " + - "statement is effectively a 'mandatory true' when " + - "the Global Service Providers list is being used."; + "An SLS sees a single Service Provider. This must " + + "statement is effectively a 'mandatory true' when " + + "the Global Service Providers list is being used."; } key "sls-id"; description - "Global Service Level Specification(SLS) List."; + "Global Service Level Specification(SLS) List."; container perf-objs { description - "Performance Objectives for this SLS."; + "Performance Objectives for this SLS."; leaf pm-time-interval { type uint64; units "seconds"; mandatory true; description - "Performance Metric(PM): Time Interval."; + "Performance Metric(PM): Time Interval."; } leaf pm-time-interval-increment { when "(count(../perf-obj[pm-type = " + - "'one-way-resiliency-performance-hli']) > 0) " + - "or (count(../perf-obj" + - "[pm-type = " + - "'one-way-resiliency-performance-chli']) > 0)" + - " or (count(../perf-obj" + - "[pm-type = " + - "'one-way-availability-performance']) > 0) " + - "or (count(../perf-obj[pm-type = " + - "'one-way-multiple-evc-group-availability-" + - "performance']) > 0) or " + - "(count(../perf-obj[pm-type = " + - "'one-way-group-availability-" + - "performance']) > 0)" { + "'one-way-resiliency-performance-hli']) > 0) " + + "or (count(../perf-obj" + + "[pm-type = " + + "'one-way-resiliency-performance-chli']) > 0)" + + " or (count(../perf-obj" + + "[pm-type = " + + "'one-way-availability-performance']) > 0) " + + "or (count(../perf-obj[pm-type = " + + "'one-way-multiple-evc-group-availability-" + + "performance']) > 0) or " + + "(count(../perf-obj[pm-type = " + + "'one-way-group-availability-" + + "performance']) > 0)" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; units "ms"; mandatory true; description - "A time interval much smaller than pm-time-interval."; + "A time interval much smaller than pm-time-interval."; } leaf unavail-flr-threshold-pp { when "(count(../perf-obj[pm-type = " + - "'one-way-resiliency-performance-hli']) > 0) " + - "or " + - "(count(../perf-obj[pm-type = " + - "'one-way-resiliency-performance-chli']) > 0) " + - "or " + - "(count(../perf-obj[pm-type = " + - "'one-way-availability-performance']) > 0) " + - "or " + - "(count(../perf-obj[pm-type = " + - "'one-way-multiple-evc-group-availability-" + - "performance']) > 0) or " + - "(count(../perf-obj[pm-type = " + - "'one-way-group-availability-" + - "performance']) > 0)" { + "'one-way-resiliency-performance-hli']) > 0) " + + "or " + + "(count(../perf-obj[pm-type = " + + "'one-way-resiliency-performance-chli']) > 0) " + + "or " + + "(count(../perf-obj[pm-type = " + + "'one-way-availability-performance']) > 0) " + + "or " + + "(count(../perf-obj[pm-type = " + + "'one-way-multiple-evc-group-availability-" + + "performance']) > 0) or " + + "(count(../perf-obj[pm-type = " + + "'one-way-group-availability-" + + "performance']) > 0)" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "percent"; mandatory true; description - "Unavailability frame loss ratio threshold " + - "expressed in percentage."; + "Unavailability frame loss ratio threshold " + + "expressed in percentage."; } leaf consecutive-small-time-intervals { when "(count(../perf-obj[pm-type = " + - "'one-way-availability-performance']) > 0) or " + - "(count(../perf-obj[pm-type = " + - "'one-way-multiple-evc-group-availability-" + - "performance']) > 0) or " + - "(count(../perf-obj[pm-type = " + - "'one-way-group-availability-" + - "performance']) > 0)" { + "'one-way-availability-performance']) > 0) or " + + "(count(../perf-obj[pm-type = " + + "'one-way-multiple-evc-group-availability-" + + "performance']) > 0) or " + + "(count(../perf-obj[pm-type = " + + "'one-way-group-availability-" + + "performance']) > 0)" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; mandatory true; description - "Number of consecutive small time intervals " + - "to assess."; + "Number of consecutive small time intervals " + + "to assess."; } list perf-obj { key "pm-type pm-id"; unique "pm-type cos-name fd-pp fd-range-pp " + - "fd-perf-obj fd-range-perf-obj " + - "fd-mean-perf-obj ifdv-pp ifdv-pair-interval " + - "ifdv-perf-obj flr-perf-obj avail-pp " + - "hli-perf-obj " + - "chli-consecutive-small-time-intervals " + - "chli-perf-obj min-uni-pairs-avail gp-avail-pp"; + "fd-perf-obj fd-range-perf-obj " + + "fd-mean-perf-obj ifdv-pp ifdv-pair-interval " + + "ifdv-perf-obj flr-perf-obj avail-pp " + + "hli-perf-obj " + + "chli-consecutive-small-time-intervals " + + "chli-perf-obj min-uni-pairs-avail gp-avail-pp"; description - "For any given SLS, performance objectives related " + - "to the Performance Metrics may or may not be " + - "specified. No functionally duplicated " + - "Performance Objectives are allowed."; + "For any given SLS, performance objectives related " + + "to the Performance Metrics may or may not be " + + "specified. No functionally duplicated " + + "Performance Objectives are allowed."; leaf pm-type { type mef-types:performance-metric-type; description - "Performance Metric Type."; + "Performance Metric Type."; reference "[MEF10.3] Section 8.8."; } leaf pm-id { type mef-types:identifier45; description - "This is a friendly name for specific " + - "performance profile."; + "This is a friendly name for specific " + + "performance profile."; } leaf cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } mandatory true; description - "CoS Name Identifier."; + "CoS Name Identifier."; } leaf fd-pp { when "(../pm-type = 'one-way-frame-delay-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "percent"; mandatory true; description - "Frame Delay Performance Percentile."; + "Frame Delay Performance Percentile."; } leaf fd-range-pp { when "(../pm-type = 'one-way-frame-delay-range-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "percent"; mandatory true; description - "Frame Delay Range Performance Percentile."; + "Frame Delay Range Performance Percentile."; } leaf fd-perf-obj { when "(../pm-type = 'one-way-frame-delay-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; units "ms"; mandatory true; description - "Frame Delay Performance Objective."; + "Frame Delay Performance Objective."; } leaf fd-range-perf-obj { when "(../pm-type = 'one-way-frame-delay-range-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; units "ms"; mandatory true; description - "Frame Delay Range Performance Objective."; + "Frame Delay Range Performance Objective."; } leaf fd-mean-perf-obj { when "(../pm-type = 'one-way-mean-frame-delay-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; units "ms"; mandatory true; description - "Frame Delay Mean Performance Objective."; + "Frame Delay Mean Performance Objective."; } leaf ifdv-pp { when "(../pm-type = 'one-way-inter-frame-delay-" + - "variation-performance')" { + "variation-performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "percent"; mandatory true; description - "Inter-Frame Delay Variation Performance " + - "Percentile."; + "Inter-Frame Delay Variation Performance " + + "Percentile."; } leaf ifdv-pair-interval { when "(../pm-type = 'one-way-inter-frame-delay-" + - "variation-performance')" { + "variation-performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "ms"; mandatory true; description - "Inter-Frame Delay Variation Performance " + - "Separation / Pair Interval."; + "Inter-Frame Delay Variation Performance " + + "Separation / Pair Interval."; } leaf ifdv-perf-obj { when "(../pm-type = 'one-way-inter-frame-delay-" + - "variation-performance')" { + "variation-performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; units "ms"; mandatory true; description - "Inter-Frame Delay Variation Performance Objective."; + "Inter-Frame Delay Variation Performance Objective."; } leaf flr-perf-obj { when "(../pm-type = 'one-way-frame-loss-ratio-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; units "ms"; mandatory true; description - "Frame Loss Ratio Performance Objective."; + "Frame Loss Ratio Performance Objective."; } leaf avail-pp { when "(../pm-type = 'one-way-availability-" + - "performance')" { + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "percent"; mandatory true; description - "Availability Performance Objective expressed " + - "as a percentage."; + "Availability Performance Objective expressed " + + "as a percentage."; } leaf hli-perf-obj { when "(../pm-type = 'one-way-resiliency-" + - "performance-hli')" { + "performance-hli')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; mandatory true; description - "HLI Performance Objective expressed as an integer."; + "HLI Performance Objective expressed as an integer."; } leaf chli-consecutive-small-time-intervals { when "(../pm-type = 'one-way-resiliency-" + - "performance-chli')" { + "performance-chli')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; must "not(../../consecutive-small-time-intervals) " + - "or " + - "(. < ../../consecutive-small-time-" + - "intervals)" { + "or " + + "(. < ../../consecutive-small-time-" + + "intervals)" { error-message "The value of chli-consecutive-" + - "small-time-intervals must be less " + - "than consecutive-small-time-intervals " + - "(where p < n) if both are defined."; + "small-time-intervals must be less " + + "than consecutive-small-time-intervals " + + "(where p < n) if both are defined."; description - "The value of chli-consecutive-small-time-" + - "intervals must be less than consecutive-" + - "small-time-intervals (where p < n) if " + - "both are defined."; + "The value of chli-consecutive-small-time-" + + "intervals must be less than consecutive-" + + "small-time-intervals (where p < n) if " + + "both are defined."; } mandatory true; description - "Number of consecutive small time intervals " + - "for assessing CHLI."; + "Number of consecutive small time intervals " + + "for assessing CHLI."; reference "[MEF10.3] Table 10."; } leaf chli-perf-obj { when "(../pm-type = 'one-way-resiliency-" + - "performance-chli')" { + "performance-chli')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; mandatory true; description - "Consecutive HLI Performance Objective " + - "expressed as an integer."; + "Consecutive HLI Performance Objective " + + "expressed as an integer."; } leaf min-uni-pairs-avail { when "(../pm-type = 'one-way-multiple-evc-group-" + - "availability-performance') or " + - "(../pm-type = 'one-way-group-availability-" + - "performance')" { + "availability-performance') or " + + "(../pm-type = 'one-way-group-availability-" + + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type uint64; mandatory true; description - "Minimum number of ordered UNI pairs that are " + - "to be available in the EVC."; + "Minimum number of ordered UNI pairs that are " + + "to be available in the EVC."; } leaf gp-avail-pp { when "(../pm-type = 'one-way-multiple-evc-group-" + - "availability-performance') or " + - "(../pm-type = 'one-way-group-availability-" + - "performance')" { + "availability-performance') or " + + "(../pm-type = 'one-way-group-availability-" + + "performance')" { description - "This PM Metric only applies to specific " + - "Performance Objective Types."; + "This PM Metric only applies to specific " + + "Performance Objective Types."; } type mef-types:simple-percent; units "percent"; mandatory true; description - "Group Availability Performance Objective " + - "expressed as a percentage."; + "Group Availability Performance Objective " + + "expressed as a percentage."; } } } leaf sls-id { type mef-types:cen-type; description - "The SLS ID identifies a specific Service Level " + - "Specification offered by a Service Provider."; + "The SLS ID identifies a specific Service Level " + + "Specification offered by a Service Provider."; reference "[MEF10.3] Section 8.8. The SLS ID must " + - "be unique for this Service Provider."; + "be unique for this Service Provider."; } leaf sp-id { when "/mef-global:mef-global/mef-global:svc-" + - "providers" { + "providers" { description - "Service Provider Identifier associated " + - "with this SLS."; + "Service Provider Identifier associated " + + "with this SLS."; } type leafref { path "/mef-global:mef-global/mef-global:" + - "svc-providers/mef-global:svc-provider/" + - "mef-global:sp-id"; + "svc-providers/mef-global:svc-provider/" + + "mef-global:sp-id"; } description - "The Service Provider ID must be globally unique " + - "as all Subscriber SLSs must be supported by " + - "a specific Service Provider(SP). A SP can " + - "support multiple SLSs."; + "The Service Provider ID must be globally unique " + + "as all Subscriber SLSs must be supported by " + + "a specific Service Provider(SP). A SP can " + + "support multiple SLSs."; reference "[MEF10.3] Section 7."; } } @@ -661,72 +634,72 @@ module mef-global { container subscribers { presence "Use non-default Subscribers."; description - "Subscribers List (Global)."; + "Subscribers List (Global)."; list subscriber { must "(not(/mef-global/svc-providers) and not(./sp-id)) " + "or " + "(/mef-global/svc-providers and ./sp-id)" { error-message "If the Service Providers list has been " + - "populated, a Service Provider ID must be " + - "configured for a Subscriber."; + "populated, a Service Provider ID must be " + + "configured for a Subscriber."; description - "A Subscriber sees a single Service Provider. " + - "This must statement is effectively a " + - "'mandatory true' when the Global Service " + - "Providers list is being used."; + "A Subscriber sees a single Service Provider. " + + "This must statement is effectively a " + + "'mandatory true' when the Global Service " + + "Providers list is being used."; } must "(not(/mef-global/cens) and not(./cen-id)) or " + "(/mef-global/cens and ./cen-id)" { error-message "If the CENs list has been populated, " + - "a CEN ID must be configured for a Subscriber."; + "a CEN ID must be configured for a Subscriber."; description - "[MEF103] A Subscriber sees a single CEN from a " + - "SP. This must statement is effectively a " + - "'mandatory true' when the Global CENs list " + - "is being used."; + "[MEF103] A Subscriber sees a single CEN from a " + + "SP. This must statement is effectively a " + + "'mandatory true' when the Global CENs list " + + "is being used."; } key "sub-id"; description - "Global Subscriber List."; + "Global Subscriber List."; leaf sub-id { type mef-types:subscriber-type; description - "The Subscriber ID identifies a unique Subscriber to " + - "this CEN. Note that you can have the same " + - "Subscriber as part of multiple Service Providers."; + "The Subscriber ID identifies a unique Subscriber to " + + "this CEN. Note that you can have the same " + + "Subscriber as part of multiple Service Providers."; reference "[MEF10.3] Section 7"; } leaf sp-id { when "/mef-global:mef-global/mef-global:svc-providers" { description - "Only configure when the Global Service Providers " + - "list has been populated."; + "Only configure when the Global Service Providers " + + "list has been populated."; } type leafref { path "/mef-global:mef-global/mef-global:" + - "svc-providers/mef-global:" + - "svc-provider/mef-global:sp-id"; + "svc-providers/mef-global:" + + "svc-provider/mef-global:sp-id"; } description - "The Service Provider ID must be globally unique " + - "as all CENs and Subscribers must be supported by " + - "a specific Service Provider(SP). A SP can " + - "support multiple CENs."; + "The Service Provider ID must be globally unique " + + "as all CENs and Subscribers must be supported by " + + "a specific Service Provider(SP). A SP can " + + "support multiple CENs."; reference "[MEF10.3] Section 7."; } leaf cen-id { when "/mef-global:mef-global/mef-global:cens" { description - "Only configure when the Global CENs list " + - "has been populated."; + "Only configure when the Global CENs list " + + "has been populated."; } type leafref { path "/mef-global:mef-global/mef-global:cens/" + - "mef-global:cen/mef-global:cen-id"; + "mef-global:cen/mef-global:cen-id"; } description - "A CEN is defined as a network from a " + - "Service Provider (SP). "; + "A CEN is defined as a network from a " + + "Service Provider (SP). "; reference "[MEF10.3] Section 7."; } } @@ -735,425 +708,425 @@ module mef-global { presence "Use to confirm whether ANY profiles have " + "been configured"; description - "Global Profiles."; + "Global Profiles."; container cos-names { description - "CoS Names (AKA CoS Labels) agreed to between " + - "the Service Provider and the Subscribers."; + "CoS Names (AKA CoS Labels) agreed to between " + + "the Service Provider and the Subscribers."; list cos-name { key "name"; description - "List of CoS Names."; + "List of CoS Names."; leaf name { type mef-types:identifier45; description - "CoS Name."; + "CoS Name."; } } } container eec-names { description - "Egress Equivalance Class (EEC) Names agreed to " + - "between the Service Provider and the Subscribers."; + "Egress Equivalance Class (EEC) Names agreed to " + + "between the Service Provider and the Subscribers."; list eec-name { key "name"; description - "List of EEC Names."; + "List of EEC Names."; leaf name { type mef-types:identifier45; description - "EEC Name."; + "EEC Name."; } } } container ingress-bwp-flows { description - "Ingress Bandwidth Profile Flows."; + "Ingress Bandwidth Profile Flows."; uses bwp-flows-group; } container egress-bwp-flows { description - "Egress Bandwidth Profile Flows."; + "Egress Bandwidth Profile Flows."; uses bwp-flows-group; } container l2cp-cos { description - "Ingress Layer 2 Control Protocol (L2CP) " + - "Configuration with CoS Names."; + "Ingress Layer 2 Control Protocol (L2CP) " + + "Configuration with CoS Names."; list l2cp-profile { key "id"; description - "A list of global profiles for Layer 2 " + - "Control Processing."; + "A list of global profiles for Layer 2 " + + "Control Processing."; reference "[MEF10.3] Section 8.5."; container l2cps { description - "Layer 2 Control Protocol (L2CP) Profiles " + - "for Classes of Service (CoS)."; + "Layer 2 Control Protocol (L2CP) Profiles " + + "for Classes of Service (CoS)."; list l2cp { key "dest-mac-addr peering-proto-name"; description - "L2CP Destination MAC Address."; + "L2CP Destination MAC Address."; reference "[MEF10.3] Section 8.5."; leaf dest-mac-addr { type yang:mac-address; description - "The Destination MAC Address for the " + - "Layer 2 Control Protocol."; + "The Destination MAC Address for the " + + "Layer 2 Control Protocol."; } leaf peering-proto-name { type mef-types:identifier45; description - "This attribute is a friendly name for " + - "the Protocol to be Peered. It is optional."; + "This attribute is a friendly name for " + + "the Protocol to be Peered. It is optional."; } leaf protocol { type mef-types:l2cp-peering-protocol-type; default "ethertype"; description - "The Protocol is one of Ethertype, LLC, or Other."; + "The Protocol is one of Ethertype, LLC, or Other."; } leaf protocol-id { type yang:hex-string; description - "The Protocol Identifier is the protocol " + - "specific value associated with the " + - "protocol in a colon separated list of " + - "hex values (ie. 88:EE or 82)."; + "The Protocol Identifier is the protocol " + + "specific value associated with the " + + "protocol in a colon separated list of " + + "hex values (ie. 88:EE or 82)."; } leaf cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "This attribute identifies the name of " + - "a class of service (CoS)."; + "This attribute identifies the name of " + + "a class of service (CoS)."; } leaf handling { type mef-types:l2cp-handling-type; description - "The handling selection indicates whether " + - "the L2CP Service Frames identified by " + - "this list entry should be passed, " + - "discarded, or peered."; + "The handling selection indicates whether " + + "the L2CP Service Frames identified by " + + "this list entry should be passed, " + + "discarded, or peered."; reference "[MEF45] Section 8.5."; } leaf-list subtype { type yang:hex-string; max-elements "255"; description - "L2CP Subtype for this Destination " + - "MAC's Protocol ID."; + "L2CP Subtype for this Destination " + + "MAC's Protocol ID."; } } } leaf id { type mef-types:identifier45; description - "The L2CP ID identifies a specific profile for " + - "Layer 2 Control Processing."; + "The L2CP ID identifies a specific profile for " + + "Layer 2 Control Processing."; reference "[MEF10.3] Section 8.5."; } leaf user-label { type mef-types:identifier45; description - "This attribute is a friendly name for the " + - "specific L2CP profile."; + "This attribute is a friendly name for the " + + "specific L2CP profile."; } } } container l2cp-eec { description - "Egress Layer 2 Control Protocol (L2CP) Configuration " + - "with EEC Names."; + "Egress Layer 2 Control Protocol (L2CP) Configuration " + + "with EEC Names."; list l2cp-profile { key "id"; description - "A list of global profiles for Layer 2 Control " + - "Processing."; + "A list of global profiles for Layer 2 Control " + + "Processing."; reference "[MEF10.3] Section 8.5."; container l2cps { description - "Layer 2 Control Protocol (L2CP) Profiles for " + - "Egress Equivalence Classes."; + "Layer 2 Control Protocol (L2CP) Profiles for " + + "Egress Equivalence Classes."; list l2cp { key "dest-mac-addr peering-proto-name"; description - "L2CP Destination MAC Address."; + "L2CP Destination MAC Address."; reference "[MEF10.3] Section 8.5."; leaf dest-mac-addr { type yang:mac-address; description - "The Destination MAC Address for the " + - "Layer 2 Control Protocol."; + "The Destination MAC Address for the " + + "Layer 2 Control Protocol."; } leaf peering-proto-name { type mef-types:identifier45; description - "This attribute is a friendly name for the " + - "Protocol to be Peered. It is optional."; + "This attribute is a friendly name for the " + + "Protocol to be Peered. It is optional."; } leaf protocol { type mef-types:l2cp-peering-protocol-type; default "ethertype"; description - "The Protocol is one of Ethertype, LLC, or Other."; + "The Protocol is one of Ethertype, LLC, or Other."; } leaf protocol-id { type yang:hex-string; description - "The Protocol Identifier is the protocol " + - "specific " + - "value associated with the protocol in a " + - "colon separated list of hex values " + - "(ie. 88:EE or 82)."; + "The Protocol Identifier is the protocol " + + "specific " + + "value associated with the protocol in a " + + "colon separated list of hex values " + + "(ie. 88:EE or 82)."; } leaf eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "This attribute identifies the name of a " + - "Egress Equivalence Class (EEC)."; + "This attribute identifies the name of a " + + "Egress Equivalence Class (EEC)."; } leaf handling { type mef-types:l2cp-handling-type; description - "The handling selection indicates whether " + - "the L2CP Service Frames identified by this " + - "list entry should be passed, discarded, " + - "or peered."; + "The handling selection indicates whether " + + "the L2CP Service Frames identified by this " + + "list entry should be passed, discarded, " + + "or peered."; reference "[MEF45] Section 8.5."; } leaf-list subtype { type yang:hex-string; max-elements "255"; description - "L2CP Subtype for this Destination MAC's " + - "Protocol ID."; + "L2CP Subtype for this Destination MAC's " + + "Protocol ID."; } } } leaf id { type mef-types:identifier45; description - "The L2CP ID identifies a specific profile for " + - "Layer 2 Control Processing."; + "The L2CP ID identifies a specific profile for " + + "Layer 2 Control Processing."; reference "[MEF10.3] Section 8.5."; } leaf user-label { type mef-types:identifier45; description - "This attribute is a friendly name for the " + - "specific L2CP profile."; + "This attribute is a friendly name for the " + + "specific L2CP profile."; } } } container l2cp-peering { description - "Layer 2 Control Protocol (L2CP) Configuration " + - "for Peering Lists."; + "Layer 2 Control Protocol (L2CP) Configuration " + + "for Peering Lists."; list l2cp-profile { key "id"; description - "A list of global profiles for " + - "Layer 2 Control Processing."; + "A list of global profiles for " + + "Layer 2 Control Processing."; reference "[MEF10.3] Section 8.5."; container l2cps { description - "Layer 2 Control Protocol (L2CP) Profiles for " + - "Peering."; + "Layer 2 Control Protocol (L2CP) Profiles for " + + "Peering."; list l2cp { key "dest-mac-addr peering-proto-name"; description - "L2CP Destination MAC Address."; + "L2CP Destination MAC Address."; reference "[MEF10.3] Section 8.5."; leaf dest-mac-addr { type yang:mac-address; description - "The Destination MAC Address for the " + - "Layer 2 Control Protocol."; + "The Destination MAC Address for the " + + "Layer 2 Control Protocol."; } leaf peering-proto-name { type mef-types:identifier45; description - "This attribute is a friendly name for the " + - "Protocol to be Peered. It is optional."; + "This attribute is a friendly name for the " + + "Protocol to be Peered. It is optional."; } leaf protocol { type mef-types:l2cp-peering-protocol-type; default "ethertype"; description - "The Protocol is one of Ethertype, LLC, or Other."; + "The Protocol is one of Ethertype, LLC, or Other."; } leaf protocol-id { type yang:hex-string; description - "The Protocol Identifier is the protocol " + - "specific value associated with the protocol " + - "in a colon separated list of hex values " + - "(ie. 88:EE or 82)."; + "The Protocol Identifier is the protocol " + + "specific value associated with the protocol " + + "in a colon separated list of hex values " + + "(ie. 88:EE or 82)."; } leaf-list subtype { type yang:hex-string; max-elements "255"; description - "L2CP Subtype for this Destination MAC's " + - "Protocol ID."; + "L2CP Subtype for this Destination MAC's " + + "Protocol ID."; } } } leaf id { type mef-types:identifier45; description - "The L2CP ID identifies a specific profile for " + - "Layer 2 Control Processing."; + "The L2CP ID identifies a specific profile for " + + "Layer 2 Control Processing."; reference "[MEF10.3] Section 8.5."; } leaf user-label { type mef-types:identifier45; description - "This attribute is a friendly name for the " + - "specific L2CP profile."; + "This attribute is a friendly name for the " + + "specific L2CP profile."; } } } container elmi { description - "Ethernet Local Management Interface(ELMI)."; + "Ethernet Local Management Interface(ELMI)."; list elmi-profile { key "id"; description - "Ethernet Local Management Interface(ELMI) Profile ID."; + "Ethernet Local Management Interface(ELMI) Profile ID."; reference "[MEF10.3] [R88]. [MEF16]."; leaf id { type mef-types:identifier45; description - "Ethernet Local Management Interface(ELMI) " + - "Profile ID."; + "Ethernet Local Management Interface(ELMI) " + + "Profile ID."; reference "[MEF10.3] [R88]. [MEF16]."; } leaf user-label { type mef-types:identifier45; description - "This attribute is a friendly name for the " + - "specific ELMI Category described within this " + - "profile."; + "This attribute is a friendly name for the " + + "specific ELMI Category described within this " + + "profile."; } leaf polling-counter { type mef-types:elmi-polling-counter-type; default "360"; description - "Polling cycles between Full Status exchanges."; + "Polling cycles between Full Status exchanges."; reference "[MEF16] Section 5.6.1."; } leaf status-error-threshold { type mef-types:elmi-status-error-threshold-type; default "4"; description - "The count of consecutive ELMI status polling " + - "errors before raising an error."; + "The count of consecutive ELMI status polling " + + "errors before raising an error."; reference "[MEF16] Section 5.6.1."; } leaf polling-timer { type mef-types:elmi-polling-timer-type; default "10"; description - "The timer started after tranmitting a Status " + - "Enquiry. If the timer expires, record the error " + - "if a STATUS message not received and resend " + - "Status Enquiry."; + "The timer started after tranmitting a Status " + + "Enquiry. If the timer expires, record the error " + + "if a STATUS message not received and resend " + + "Status Enquiry."; reference "[MEF16] Section 5.6.1."; } leaf polling-verification-timer { type mef-types:elmi-polling-verification-timer-type; default "15"; description - "The type used for a timer started after " + - "tranmitting a Status Message. If a Status " + - "Enquiry is recieved before this timer " + - "expires, record the error."; + "The type used for a timer started after " + + "tranmitting a Status Message. If a Status " + + "Enquiry is recieved before this timer " + + "expires, record the error."; reference "[MEF16] Section 5.6.1."; } } } container eec { description - "Egress Equivalence Class (EEC) Profiles."; + "Egress Equivalence Class (EEC) Profiles."; list eec-profile { key "id"; description - "This attribute identifies the identifier of a " + - "Egress Equivance Class (EEC) instance."; + "This attribute identifies the identifier of a " + + "Egress Equivance Class (EEC) instance."; reference "[MEF6.2] Appendix A."; leaf id { type mef-types:identifier45; description - "This attribute identifies the label of a " + - "Egress Equivance Class (EEC) instance."; + "This attribute identifies the label of a " + + "Egress Equivance Class (EEC) instance."; } choice eec-id { description - "EEC Identifier."; + "EEC Identifier."; case pcp { container eec-pcp { presence "EEC Mode PCP."; description - "EEC Mode PCP."; + "EEC Mode PCP."; leaf default-pcp-eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "Default value for EEC Name for PCP " + - "when it has not been explicitly configured."; + "Default value for EEC Name for PCP " + + "when it has not been explicitly configured."; } leaf default-pcp-color { type mef-types:cos-color-type; default "green"; description - "If the EEC ID = pcp, then this value " + - "will be used as the default Color when " + - "the PCP value does not have an explicitly " + - "configured Color."; + "If the EEC ID = pcp, then this value " + + "will be used as the default Color when " + + "the PCP value does not have an explicitly " + + "configured Color."; reference "MEF 10.3 Section 10.3"; } list pcp { key "pcp-value"; description - "PCP."; + "PCP."; leaf pcp-value { type mef-types:ieee8021p-priority-type; description - "Use the VLAN Tag IEEE 802.1p Priority " + - "Code Point value (0..7) for CoS."; + "Use the VLAN Tag IEEE 802.1p Priority " + + "Code Point value (0..7) for CoS."; reference "[MEF10.3] Section 10.2.1."; } leaf discard-value { type boolean; default "false"; description - "Set to True to discard Service Frames " + - "that match to this PCP value."; + "Set to True to discard Service Frames " + + "that match to this PCP value."; } leaf eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "This attribute identifies the name of a " + - "Egress Equivalence Class instance."; + "This attribute identifies the name of a " + + "Egress Equivalence Class instance."; } leaf color { type mef-types:cos-color-type; default "green"; description - "EVC Per UNI: The EEC Color for " + - "Service Frames."; + "EVC Per UNI: The EEC Color for " + + "Service Frames."; reference "[MEF10.3] [R102], [R103]. "; } } @@ -1163,112 +1136,112 @@ module mef-global { container eec-dscp { presence "EEC Mode DSCP."; description - "ECC Mode DSCP."; + "ECC Mode DSCP."; leaf default-ipv4-eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "Default value for EEC Name for DSCP IPv4 " + - "Packets when it has not been " + - "explicitly configured."; + "Default value for EEC Name for DSCP IPv4 " + + "Packets when it has not been " + + "explicitly configured."; } leaf default-ipv4-color { type mef-types:cos-color-type; default "green"; description - "If the EEC ID = dscp, then this value will " + - "be used as the default Color when the " + - "DSCP value for IPv4 does not have an " + - "explicitly configured Color."; + "If the EEC ID = dscp, then this value will " + + "be used as the default Color when the " + + "DSCP value for IPv4 does not have an " + + "explicitly configured Color."; reference "MEF 10.3 Section 10.3"; } leaf default-ipv6-eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "Default value for EEC Name for DSCP IPv6 " + - "Packets when it has not been explicitly " + - "configured."; + "Default value for EEC Name for DSCP IPv6 " + + "Packets when it has not been explicitly " + + "configured."; } leaf default-ipv6-color { type mef-types:cos-color-type; default "green"; description - "If the EEC ID = dscp, then this value " + - "will be used as the default Color " + - "when the DSCP value for IPv6 does " + - "not have an explicitly configured Color."; + "If the EEC ID = dscp, then this value " + + "will be used as the default Color " + + "when the DSCP value for IPv6 does " + + "not have an explicitly configured Color."; reference "MEF 10.3 Section 10.3"; } list ipv4-dscp { key "dscp-value"; description - "DSCP value for IPv4 Packets."; + "DSCP value for IPv4 Packets."; leaf dscp-value { type inet:dscp; description - "Map CoS to IPv4 DSCP values."; + "Map CoS to IPv4 DSCP values."; } leaf discard-value { type boolean; default "false"; description - "Set to True to discard Service Frames " + - "that match to this DSCP value."; + "Set to True to discard Service Frames " + + "that match to this DSCP value."; } leaf eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "This attribute identifies the name " + - "of a Egress Equivalence Class instance."; + "This attribute identifies the name " + + "of a Egress Equivalence Class instance."; } leaf color { type mef-types:cos-color-type; default "green"; description - "EVC Per UNI: The EEC Color for " + - "Service Frames."; + "EVC Per UNI: The EEC Color for " + + "Service Frames."; reference "[MEF10.3] [R102], [R103]. "; } } list ipv6-dscp { key "dscp-value"; description - "DSCP value for IPv6 Packets."; + "DSCP value for IPv6 Packets."; leaf dscp-value { type inet:dscp; description - "Map EEC to IPv4 and IPv6 DSCP values."; + "Map EEC to IPv4 and IPv6 DSCP values."; } leaf discard-value { type boolean; default "false"; description - "Set to True to discard Service Frames " + - "that match to this DSCP value."; + "Set to True to discard Service Frames " + + "that match to this DSCP value."; } leaf eec-name { type leafref { path "/mef-global:mef-global/profiles/" + - "eec-names/eec-name/name"; + "eec-names/eec-name/name"; } description - "This attribute identifies the name of a " + - "Egress Equivalence Class instance."; + "This attribute identifies the name of a " + + "Egress Equivalence Class instance."; } leaf color { type mef-types:cos-color-type; default "green"; description - "EVC Per UNI: The EEC Color for " + - "Service Frames."; + "EVC Per UNI: The EEC Color for " + + "Service Frames."; reference "[MEF10.3] [R102], [R103]. "; } } @@ -1279,42 +1252,42 @@ module mef-global { } container cos { description - "Class of Service (CoS) Profiles."; + "Class of Service (CoS) Profiles."; list cos-profile { key "id"; description - "This attribute identifies the identifier of a " + - "Class of Service (CoS) instance."; + "This attribute identifies the identifier of a " + + "Class of Service (CoS) instance."; reference "[MEF6.2] Appendix A."; leaf id { type mef-types:identifier45; description - "This attribute identifies the label of a " + - "Class of Service (CoS) instance."; + "This attribute identifies the label of a " + + "Class of Service (CoS) instance."; } choice cos-id { description - "CoS identifier."; + "CoS identifier."; case evc { container cos-evc { presence "EVC ID PCP."; description - "CoS ID EVC."; + "CoS ID EVC."; leaf default-evc-cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "This attribute identifies the name of a " + - "Class of Service (CoS) instance."; + "This attribute identifies the name of a " + + "Class of Service (CoS) instance."; } leaf default-evc-color { type mef-types:cos-color-type; default "green"; description - "If the CoS ID = evc, then all service " + - "frames are treated with the same color."; + "If the CoS ID = evc, then all service " + + "frames are treated with the same color."; reference "MEF 10.3 Section 10.3"; } } @@ -1323,58 +1296,58 @@ module mef-global { container cos-pcp { presence "CoS ID PCP."; description - "CoS ID PCP."; + "CoS ID PCP."; leaf default-pcp-cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "Default value for CoS Name for PCP when it " + - "has not been explicitly configured."; + "Default value for CoS Name for PCP when it " + + "has not been explicitly configured."; } leaf default-pcp-color { type mef-types:cos-color-type; default "green"; description - "If the CoS ID = pcp, then this value will " + - "be used as the default Color when the PCP " + - "value does not have an explicitly " + - "configured Color."; + "If the CoS ID = pcp, then this value will " + + "be used as the default Color when the PCP " + + "value does not have an explicitly " + + "configured Color."; reference "MEF 10.3 Section 10.3"; } list pcp { key "pcp-value"; description - "PCP."; + "PCP."; leaf pcp-value { type mef-types:ieee8021p-priority-type; description - "Use the VLAN Tag IEEE 802.1p Priority " + - "Code Point value (0..7) for CoS."; + "Use the VLAN Tag IEEE 802.1p Priority " + + "Code Point value (0..7) for CoS."; } leaf discard-value { type boolean; default "false"; description - "Set to True to discard Service Frames " + - "that match to this PCP value."; + "Set to True to discard Service Frames " + + "that match to this PCP value."; } leaf cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "This attribute identifies the name of " + - "a class of service (CoS) instance."; + "This attribute identifies the name of " + + "a class of service (CoS) instance."; } leaf color { type mef-types:cos-color-type; default "green"; description - "EVC Per UNI: The CoS Color for " + - "Service Frames."; + "EVC Per UNI: The CoS Color for " + + "Service Frames."; reference "[MEF10.3] [R102], [R103]. "; } } @@ -1384,112 +1357,112 @@ module mef-global { container cos-dscp { presence "CoS ID DSCP."; description - "CoS ID DSCP."; + "CoS ID DSCP."; leaf default-ipv4-cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "Default value for CoS Name for DSCP " + - "IPv4 Packets when it has not been " + - "explicitly configured."; + "Default value for CoS Name for DSCP " + + "IPv4 Packets when it has not been " + + "explicitly configured."; } leaf default-ipv4-color { type mef-types:cos-color-type; default "green"; description - "If the CoS ID = dscp, then this value " + - "will be used as the default Color when " + - "the DSCP value for IPv4 does not have " + - "an explicitly configured Color."; + "If the CoS ID = dscp, then this value " + + "will be used as the default Color when " + + "the DSCP value for IPv4 does not have " + + "an explicitly configured Color."; reference "MEF 10.3 Section 10.3"; } leaf default-ipv6-cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "Default value for CoS Name for DSCP " + - "IPv6 Packets when it has not been " + - "explicitly configured."; + "Default value for CoS Name for DSCP " + + "IPv6 Packets when it has not been " + + "explicitly configured."; } leaf default-ipv6-color { type mef-types:cos-color-type; default "green"; description - "If the CoS ID = dscp, then this value will " + - "be used as the default Color when the " + - "DSCP value for IPv6 does not have an " + - "explicitly configured Color."; + "If the CoS ID = dscp, then this value will " + + "be used as the default Color when the " + + "DSCP value for IPv6 does not have an " + + "explicitly configured Color."; reference "MEF 10.3 Section 10.3"; } list ipv4-dscp { key "dscp-value"; description - "DSCP value for IPv4 Packets."; + "DSCP value for IPv4 Packets."; leaf dscp-value { type inet:dscp; description - "Map CoS to IPv4 and IPv6 DSCP values."; + "Map CoS to IPv4 and IPv6 DSCP values."; } leaf discard-value { type boolean; default "false"; description - "Set to True to discard Service Frames " + - "that match to this DSCP value."; + "Set to True to discard Service Frames " + + "that match to this DSCP value."; } leaf cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "This attribute identifies the name of a " + - "Class of Service (CoS) instance."; + "This attribute identifies the name of a " + + "Class of Service (CoS) instance."; } leaf color { type mef-types:cos-color-type; default "green"; description - "EVC Per UNI: The CoS Color for " + - "Service Frames."; + "EVC Per UNI: The CoS Color for " + + "Service Frames."; reference "[MEF10.3] [R102], [R103]. "; } } list ipv6-dscp { key "dscp-value"; description - "DSCP value for IPv6 Packets."; + "DSCP value for IPv6 Packets."; leaf dscp-value { type inet:dscp; description - "Map CoS to IPv4 and IPv6 DSCP values."; + "Map CoS to IPv4 and IPv6 DSCP values."; } leaf discard-value { type boolean; default "false"; description - "Set to True to discard Service Frames " + - "that match to this DSCP value."; + "Set to True to discard Service Frames " + + "that match to this DSCP value."; } leaf cos-name { type leafref { path "/mef-global:mef-global/profiles/" + - "cos-names/cos-name/name"; + "cos-names/cos-name/name"; } description - "This attribute identifies the name of a " + - "Class of Service (CoS) instance."; + "This attribute identifies the name of a " + + "Class of Service (CoS) instance."; } leaf color { type mef-types:cos-color-type; default "green"; description - "EVC Per UNI: The CoS Color for " + - "Service Frames."; + "EVC Per UNI: The CoS Color for " + + "Service Frames."; reference "[MEF10.3] [R102], [R103]. "; } } @@ -1499,20 +1472,20 @@ module mef-global { } } } - + grouping tenant { - leaf name { - type string; - description "Tenant Name"; - } + leaf name { + type string; + description "Tenant Name"; + } } - + container tenants-instances { - list tenant-list { - key name; - unique name; - uses tenant; - } + list tenant-list { + key name; + unique name; + uses tenant; + } } } -} \ No newline at end of file +} diff --git a/legato-api/src/main/yang/mef-interfaces.yang b/legato-api/src/main/yang/mef-interfaces.yang index 359f66c4..c096b6c8 100644 --- a/legato-api/src/main/yang/mef-interfaces.yang +++ b/legato-api/src/main/yang/mef-interfaces.yang @@ -1,108 +1,85 @@ module mef-interfaces { namespace "http://metroethernetforum.org/ns/yang/mef-interfaces"; prefix mef-interfaces; - import ietf-yang-types { - prefix yang; - } - import mef-types { - prefix mef-types; - } - import mef-global { - prefix mef-global; - } - import mef-topology { - prefix mef-topology; - } + import ietf-inet-types { prefix inet; } + import ietf-yang-types { prefix yang; } + import mef-types { prefix mef-types; } + import mef-global { prefix mef-global; } + import mef-topology { prefix mef-topology; } + + import opendaylight-l2-types { prefix ethertype; } + // revision-date "2013-08-27"; + organization "Metro Ethernet Forum"; contact - "Web URL: http://metroethernetforum.org/ - E-mail: mibs@metroethernetforum.org - Postal: Metro Ethernet Forum - 6033 W. Century Boulevard, Suite 1107 - Los Angeles, CA 90045 - U.S.A. - Phone: +1 310-642-2800 - Fax: +1 310-642-2808"; + "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org + Postal: Metro Ethernet Forum 6033 W. Century Boulevard, Suite + 1107 Los Angeles, CA 90045 U.S.A. Phone: +1 310-642-2800 Fax: + +1 310-642-2808"; description - "This module implements the UNI functionality specified - in MEF 10.3, MEF 6.2, and MEF 7.2. - - Reference Overview: - A number of base documents have been used to create - the MEF Interfaces YANG Module. The following are the - abbreviations for the baseline documents: - [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', - 2013-07-15 - [RFC 6643] refers to IETF RFC 6643 'Translation of Structure - of Management Information - Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 - [802.1AB] refers to 'Station and Media Access Control - Connectivity Discovery', IEEE 802.1AB-2009, September 2009 - [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard for Local - and metropolitan area networks --Media Access Control (MAC) - Bridges and Virtual Bridged Local Area Networks, August 2011 - [802-2001] refers to 'IEEE Standard for Local and Metropolitan - Area Networks: Overview and Architecture', IEEE 802-2001, - February 2002 - [MEF10.3] refers to MEF 10.3 - 'Ethernet Services Attributes Phase 3', October 2013 - [MEF6.2] refers to MEF 6.2 - 'EVC Ethernet Services Defintions Phase 3', August 2014 - [MEF40] refers to MEF 40 - 'UNI and EVC Definition of Managed Objects', April 2013 - [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014 - [MEF7.2] refers to MEF 7.2 - 'Carrier Ethernet Management Information Model', April 2013 - [MEF7.3] refers to MEF 7.3 - 'Carrier Ethernet Management Information Model', - Working Draft #1 2015 - [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version 2)', - December 1999 - [RFC 2863] refers to IETF RFC 2863 'The Interfaces Group MIB', - June 2000 - [RFC 3419] refers to IETF RFC 3419 - 'Textual Conventions for Transport Addresses', December 2002 - [Y.1731] refers to ITU-T Y.1731 - 'OAM functions and mechanisms for Ethernet based networks', - July 2011 - [Q.840.1] refers to ITU-T Q.840.1 - 'Requirements and analysis for NMS-EMS management interface - of Ethernet over Transport and Metro Ethernet - Network(EoT/MEN)' March 2007"; + "This module implements the UNI functionality specified in MEF + 10.3, MEF 6.2, and MEF 7.2. Reference Overview: A number of base + documents have been used to create the MEF Interfaces YANG Module. + The following are the abbreviations for the baseline documents: + [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', 2013-07-15 + [RFC 6643] refers to IETF RFC 6643 'Translation of Structure of + Management Information Version 2 (SMIv2) MIB Modules to YANG Modules', + 2011-11-25 [802.1AB] refers to 'Station and Media Access Control + Connectivity Discovery', IEEE 802.1AB-2009, September 2009 [802.1q] + refers to IEEE 802.1Q-2011 'IEEE Standard for Local and metropolitan + area networks --Media Access Control (MAC) Bridges and Virtual + Bridged Local Area Networks, August 2011 [802-2001] refers to + 'IEEE Standard for Local and Metropolitan Area Networks: Overview + and Architecture', IEEE 802-2001, February 2002 [MEF10.3] refers + to MEF 10.3 'Ethernet Services Attributes Phase 3', October 2013 + [MEF6.2] refers to MEF 6.2 'EVC Ethernet Services Defintions Phase + 3', August 2014 [MEF40] refers to MEF 40 'UNI and EVC Definition + of Managed Objects', April 2013 [MEF45] refers to MEF 45 'Multi-CEN + L2CP', August 2014 [MEF7.2] refers to MEF 7.2 'Carrier Ethernet + Management Information Model', April 2013 [MEF7.3] refers to MEF + 7.3 'Carrier Ethernet Management Information Model', Working Draft + #1 2015 [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version + 2)', December 1999 [RFC 2863] refers to IETF RFC 2863 'The Interfaces + Group MIB', June 2000 [RFC 3419] refers to IETF RFC 3419 'Textual + Conventions for Transport Addresses', December 2002 [Y.1731] refers + to ITU-T Y.1731 'OAM functions and mechanisms for Ethernet based + networks', July 2011 [Q.840.1] refers to ITU-T Q.840.1 'Requirements + and analysis for NMS-EMS management interface of Ethernet over + Transport and Metro Ethernet Network(EoT/MEN)' March 2007"; revision 2015-05-26 { description - "Formal Project Review Draft 1."; + "Formal Project Review Draft 1."; reference "EVC Ethernet Services Definitions YANG Modules " + - "(MEF XX), TBD"; + "(MEF XX), TBD"; } container mef-interfaces { description - "MEF Interfaces"; + "MEF Interfaces"; container unis { description - "User Network Interface(UNI)."; + "User Network Interface(UNI)."; list uni { must "not(./ingress-bw-profile-per-uni) or " + "((./ingress-bw-profile-per-uni) and " + "not(./ingress-envelopes))" { error-message "If there is a per UNI Ingress Bandwidth " + - "Profile, then there cannot be any other Ingress " + - "Bandwidth Profiles at that UNI."; + "Profile, then there cannot be any other Ingress " + + "Bandwidth Profiles at that UNI."; description - "If there is a per UNI Ingress Bandwidth Profile, " + - "then there cannot be any other Ingress Bandwidth " + - "Profiles at that UNI."; + "If there is a per UNI Ingress Bandwidth Profile, " + + "then there cannot be any other Ingress Bandwidth " + + "Profiles at that UNI."; } must "not(./egress-bw-profile-per-uni) or " + "((./egress-bw-profile-per-uni) and " + "not(./egress-envelopes))" { error-message "If there is a per UNI Egress Bandwidth " + - "Profile, then there cannot be any other Egress " + - "Bandwidth Profiles at that UNI."; + "Profile, then there cannot be any other Egress " + + "Bandwidth Profiles at that UNI."; description - "If there is a per UNI Egress Bandwidth Profile, " + - "then there cannot be any other Egress Bandwidth " + - "Profiles at that UNI."; + "If there is a per UNI Egress Bandwidth Profile, " + + "then there cannot be any other Egress Bandwidth " + + "Profiles at that UNI."; } must "(not(/mef-global:mef-global/mef-global:" + "subscribers) and " + @@ -111,82 +88,110 @@ module mef-interfaces { "subscribers and " + "./subscriber)" { error-message "If the Subscribers list has been " + - "populated, a UNI must be configured for " + - "a single Subscriber."; + "populated, a UNI must be configured for " + + "a single Subscriber."; description - "[MEF103] [R1] A UNI must be dedicated to a single " + - "Subscriber. This must statement is effectively " + - "a 'mandatory true' when the Global Subscribers " + - "list is being used."; + "[MEF103] [R1] A UNI must be dedicated to a single " + + "Subscriber. This must statement is effectively " + + "a 'mandatory true' when the Global Subscribers " + + "list is being used."; } must "(not(/mef-global:mef-global/mef-global:cens) and " + "not(./cen-id)) or " + "(/mef-global:mef-global/mef-global:cens and " + "./cen-id)" { error-message "If the CENs list has been populated, " + - "a UNI must be configured for a single CEN."; + "a UNI must be configured for a single CEN."; description - "[MEF103] [R57] A UNI must be dedicated to a " + - "single CEN. This must statement is effectively " + - "a 'mandatory true' when the Global CENs list " + - "is being used."; + "[MEF103] [R57] A UNI must be dedicated to a " + + "single CEN. This must statement is effectively " + + "a 'mandatory true' when the Global CENs list " + + "is being used."; } key "uni-id"; description - "MEF UNI List."; + "MEF UNI List."; reference "[MEF6.2] Section 8.2.2."; + container ip-unis { + list ip-uni { + key "ip-uni-id"; + leaf ip-uni-id { + type mef-types:identifier45; + } + leaf id { + type mef-types:identifier45; + } + leaf ip-address { + type inet:ip-prefix; + } + leaf vlan { + type ethertype:vlan-id; + } + container subnets { + list subnet { + key "subnet"; + leaf subnet { + type inet:ip-prefix; + } + leaf gateway { + type inet:ip-address; + } + } + } + } + } container physical-layers { description - "The Physical Layer MUST operate in a full duplex " + - "mode. It is not configurable."; + "The Physical Layer MUST operate in a full duplex " + + "mode. It is not configurable."; reference "[MEF10.3] Section 9.2, [R61], [R62]"; container links { presence "A UNI must have links."; description - "The Physical Layer for each physical link " + - "implementing the UNI MUST be one of the " + - "PHYs listed in IEEE Std 802.3–2012 but " + - "excluding 1000BASE-PX-D and 1000BASE-PX-U."; + "The Physical Layer for each physical link " + + "implementing the UNI MUST be one of the " + + "PHYs listed in IEEE Std 802.3–2012 but " + + "excluding 1000BASE-PX-D and 1000BASE-PX-U."; reference "[MEF10.3] Section 9.2 [R60]"; list link { must "count(.) >= 1" { error-message "A UNI must have at least one " + - "physical link configured."; + "physical link configured."; description - "A UNI must have at least one physical link " + - "configured."; + "A UNI must have at least one physical link " + + "configured."; } key "device interface"; description - "A list of all the physical ports associated " + - "with this Link Layer."; + "A list of all the physical ports associated " + + "with this Link Layer."; leaf device { type leafref { path "/mef-topology:mef-topology/mef-topology:" + - "devices/mef-topology:device/" + - "mef-topology:dev-id"; + "devices/mef-topology:device/" + + "mef-topology:dev-id"; } description - "The Physical Layer for each physical link " + - "implementing the UNI MUST be one of the " + - "PHYs listed in IEEE Std 802.3–2012 but " + - "excluding 1000BASE-PX-D and 1000BASE-PX-U."; + "The Physical Layer for each physical link " + + "implementing the UNI MUST be one of the " + + "PHYs listed in IEEE Std 802.3–2012 but " + + "excluding 1000BASE-PX-D and 1000BASE-PX-U."; reference "[MEF10.3] Section 9.2 [R60]"; } leaf interface { type leafref { path "/mef-topology:mef-topology/mef-topology:" + - "devices/mef-topology:device" + - "[mef-topology:dev-id = " + - "current()/../device]" + - "/mef-topology:interfaces/mef-topology:" + - "interface/mef-topology:phy"; + "devices/mef-topology:device" + + "[mef-topology:dev-id = " + + "current()/../device]" + + "/mef-topology:interfaces/mef-topology:" + + "interface/mef-topology:phy"; } description - "The Physical Layer for each physical link " + - "implementing the UNI MUST be one of the " + - "PHYs listed in IEEE Std 802.3–2012 but " + - "excluding 1000BASE-PX-D and 1000BASE-PX-U."; + "The Physical Layer for each physical link " + + "implementing the UNI MUST be one of the " + + "PHYs listed in IEEE Std 802.3–2012 but " + + "excluding 1000BASE-PX-D and 1000BASE-PX-U."; reference "[MEF10.3] Section 9.2 [R60]"; } leaf ieee8023-phy { @@ -194,21 +199,21 @@ module mef-interfaces { base mef-types:ieee-8023-interface-type; } must "(. != 'mef-types:" + - "ieee8023-1000BASE-PX-D') and " + - "(. != 'mef-types:ieee8023-1000BASE-PX-U')" { + "ieee8023-1000BASE-PX-D') and " + + "(. != 'mef-types:ieee8023-1000BASE-PX-U')" { error-message "The Physical Layer for each " + - "physical link implementing the UNI " + - "cannot be 1000BASE-PX-D and 1000BASE-PX-U."; + "physical link implementing the UNI " + + "cannot be 1000BASE-PX-D and 1000BASE-PX-U."; description - "The Physical Layer for each physical " + - "link implementing the UNI cannot be " + - "1000BASE-PX-D and 1000BASE-PX-U."; + "The Physical Layer for each physical " + + "link implementing the UNI cannot be " + + "1000BASE-PX-D and 1000BASE-PX-U."; } description - "The Physical Layer for each physical link " + - "implementing the UNI MUST be one of the " + - "PHYs listed in IEEE Std 802.3–2012 but " + - "excluding 1000BASE-PX-D and 1000BASE-PX-U."; + "The Physical Layer for each physical link " + + "implementing the UNI MUST be one of the " + + "PHYs listed in IEEE Std 802.3–2012 but " + + "excluding 1000BASE-PX-D and 1000BASE-PX-U."; reference "[MEF10.3] Section 9.2 [R60]"; } leaf connection-speed { @@ -216,35 +221,35 @@ module mef-interfaces { units "bits-per-second"; default "1G"; description - "Physical Layer Connection Speed (Max Data Rate)."; + "Physical Layer Connection Speed (Max Data Rate)."; reference "[MEF10.3] Section 9.2. [MEF6.2] " + - "Section 8.2.2. [MEF20] [R80]."; + "Section 8.2.2. [MEF20] [R80]."; } leaf phy-auto-neg { type mef-types:auto-negotiation-type; default "on"; description - "Auto-Negotiation ON/OFF/Auto."; + "Auto-Negotiation ON/OFF/Auto."; reference "[MEF6.2] Section 8.2.2. [MEF20] [R80]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF7.3] Section 10.2.2."; } leaf sync-mode-enabled { type boolean; must ".='false' or (.='true' and " + - "../clock-accuracy)" { + "../clock-accuracy)" { error-message "The quality of the clock " + - "reference must be set if Synchronous " + - "Mode is enabled."; + "reference must be set if Synchronous " + + "Mode is enabled."; description - "The quality of the clock reference must " + - "be set if Synchronous Mode is enabled."; + "The quality of the clock reference must " + + "be set if Synchronous Mode is enabled."; } default "false"; description - "Enabled or Disabled for each physical link " + - "implementing the UNI."; + "Enabled or Disabled for each physical link " + + "implementing the UNI."; reference "[MEF10.3] Section 9.3. [MEF6.2] " + - "Section 8.2.2. [MEF7.3] Section 10.2.2."; + "Section 8.2.2. [MEF7.3] Section 10.2.2."; } leaf clock-accuracy { type decimal64 { @@ -252,12 +257,12 @@ module mef-interfaces { } units "ppm"; description - "ESMC:Ethernet Equipment Slave Clock Accuracy " + - "in PPM. IEEE 802.3 standard specifies " + - "that Ethernet clock accuracy is to be less " + - "than or equal to +- 4.6 PPM."; + "ESMC:Ethernet Equipment Slave Clock Accuracy " + + "in PPM. IEEE 802.3 standard specifies " + + "that Ethernet clock accuracy is to be less " + + "than or equal to +- 4.6 PPM."; reference "[MEF10.3] Section 9.3, [R62]. " + - "[MEF22.1], [IEEE802.3]."; + "[MEF22.1], [IEEE802.3]."; } } } @@ -267,158 +272,158 @@ module mef-interfaces { } must ". = count(../links/link)" { error-message "The UNI Number of Links value " + - "must match to the number of interfaces " + - "in the link list."; + "must match to the number of interfaces " + + "in the link list."; description - "The UNI Number of Links value must match " + - "to the number of interfaces in the link list."; + "The UNI Number of Links value must match " + + "to the number of interfaces in the link list."; } default "1"; description - "The number of links configured in the links list."; + "The number of links configured in the links list."; reference "[MEF10.3] [R63]. [MEF7.3] Section 10.2.2."; } } container ce-vlans { description - "Each Device (and by extension UNIs) MUST have list " + - "of the CE-VLAN ID including mappings to configured " + - "EVCs if assigned. This list of ce-vlans is a " + - "complete list of all VLANs associated with this " + - "UNI. At the Service Module level, there are two " + - "lists: This one and the list of CE-VLAN IDs " + - "associated with the EVC's UNI List as part of " + - "the MEF Service Definition. "; + "Each Device (and by extension UNIs) MUST have list " + + "of the CE-VLAN ID including mappings to configured " + + "EVCs if assigned. This list of ce-vlans is a " + + "complete list of all VLANs associated with this " + + "UNI. At the Service Module level, there are two " + + "lists: This one and the list of CE-VLAN IDs " + + "associated with the EVC's UNI List as part of " + + "the MEF Service Definition. "; reference "[MEF10.3] Section 9.10, [R77], [R78]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF7.3] Section 10.2.2."; list ce-vlan { key "vid"; description - "A list of all EC-VLANs allowed ingres or egress " + - "on the UNI. This is the UNI-specific CE-VLAN ID " + - "listing as part of the Service Level " + - "CE-VLAN ID / EVC Map."; + "A list of all EC-VLANs allowed ingres or egress " + + "on the UNI. This is the UNI-specific CE-VLAN ID " + + "listing as part of the Service Level " + + "CE-VLAN ID / EVC Map."; reference "[MEF10.3] Section 9.10.1."; leaf vid { type mef-types:vlan-id-type; description - "The Customer Edge VLAN ID is equivalent " + - "to a Static VLAN allowed on that port " + - "(ie. Port is not Forbidden). The " + - "association with the EVC is part of " + - "the EVC configuration."; + "The Customer Edge VLAN ID is equivalent " + + "to a Static VLAN allowed on that port " + + "(ie. Port is not Forbidden). The " + + "association with the EVC is part of " + + "the EVC configuration."; reference "[MEF10.3] Section 9.10."; } } } container ingress-envelopes { presence "Ingress Bandwidth Profile Envelopes " + - "configured."; + "configured."; description - "UNI Bandwidth Profile Flow Envelopes."; + "UNI Bandwidth Profile Flow Envelopes."; reference "[MEF10.3] Section 9.15, Section 12.1. " + - "[MEF6.2] Section 8.2.1: [R3]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF6.2] Section 8.2.1: [R3]. " + + "[MEF7.3] Section 10.2.2."; list envelope { key "env-id"; description - "UNI Bandwidth Profile Flow Envelope List."; + "UNI Bandwidth Profile Flow Envelope List."; reference "[MEF10.3] Section 9.15, Section 12.1. " + - "[MEF6.2] Section 8.2.1, [R3], " + - "Section 8.2.2, [R4]. [MEF7.3] " + - "Section 10.2.2."; + "[MEF6.2] Section 8.2.1, [R3], " + + "Section 8.2.2, [R4]. [MEF7.3] " + + "Section 10.2.2."; container bwp-flows { presence "Bandwidth Profile configured for " + - "this envelope."; + "this envelope."; description - "UNI Bandwidth Profile Flows per Envelope."; + "UNI Bandwidth Profile Flows per Envelope."; reference "[MEF10.3] Section 12.1. " + - "[MEF6.2] Section 10.1."; + "[MEF6.2] Section 10.1."; list bwp-flow { key "bw-profile"; ordered-by user; description - "UNI Bandwidth Profile Flow List per Envelope. " + - "The order of entries in the list is user " + - "controlled. The first element of the list " + - "has the lowest priority and the last " + - "element will have the highest priority."; + "UNI Bandwidth Profile Flow List per Envelope. " + + "The order of entries in the list is user " + + "controlled. The first element of the list " + + "has the lowest priority and the last " + + "element will have the highest priority."; reference "[MEF10.3] Section 12.1. " + - "[MEF6.2] Section 10.1. " + - "[MEF6.2] Section 8.2.1, [R3]. "; + "[MEF6.2] Section 10.1. " + + "[MEF6.2] Section 8.2.1, [R3]. "; leaf bw-profile { type leafref { path "/mef-global:mef-global/mef-global:" + - "profiles/mef-global:" + - "ingress-bwp-flows/mef-global:" + - "bwp-flow/mef-global:bw-profile"; + "profiles/mef-global:" + + "ingress-bwp-flows/mef-global:" + + "bwp-flow/mef-global:bw-profile"; } must "(../../../../../token-share-enabled = " + - "'true') or " + - "((../../../../../token-share-enabled = " + - "'false') and " + - "(count(../../bwp-flow) = 1))" { + "'true') or " + + "((../../../../../token-share-enabled = " + + "'false') and " + + "(count(../../bwp-flow) = 1))" { error-message "A UNI with Token Share " + - "Disabled MUST have exactly one " + - "Bandwidth Profile Flow per envelope."; + "Disabled MUST have exactly one " + + "Bandwidth Profile Flow per envelope."; description - "A UNI with Token Share Disabled MUST " + - "have exactly one Bandwidth Profile Flow " + - "per envelope."; + "A UNI with Token Share Disabled MUST " + + "have exactly one Bandwidth Profile Flow " + + "per envelope."; } must "(../../../coupling-enabled = 'false') or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:" + - "ingress-bwp-flows/mef-global:bwp-flow" + - "[mef-global:bw-profile = current()]/" + - "mef-global:coupling-enabled = 'false')" { + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:" + + "ingress-bwp-flows/mef-global:bwp-flow" + + "[mef-global:bw-profile = current()]/" + + "mef-global:coupling-enabled = 'false')" { error-message "If an Ingress Envelope's " + - "Coupling Flag is Enabled, then " + - "the Coupling Flags must be disabled " + - "for all Bandwidth Profile Flows " + - "mapped to the Envelope."; + "Coupling Flag is Enabled, then " + + "the Coupling Flags must be disabled " + + "for all Bandwidth Profile Flows " + + "mapped to the Envelope."; description - "If an Ingress Envelope's Coupling Flag is " + - "Enabled, then the Coupling Flags must " + - "be disabled for all Bandwidth Profile " + - "Flows mapped to the Envelope."; + "If an Ingress Envelope's Coupling Flag is " + + "Enabled, then the Coupling Flags must " + + "be disabled for all Bandwidth Profile " + + "Flows mapped to the Envelope."; } description - "If no Ingress Bandwidth Profile per UNI " + - "has been defined (ie. 'No'), then the " + - "behavior has been defined at the Service " + - "Level of the configuration."; + "If no Ingress Bandwidth Profile per UNI " + + "has been defined (ie. 'No'), then the " + + "behavior has been defined at the Service " + + "Level of the configuration."; reference "[MEF10.3] Section 9.14, " + - "Section 12.1, [R84], [R134]. " + - "[MEF6.2] Section 8.2.1,[R3],[R136]. " + - "Section 8.2.2, 10.1, [R6]. [MEF7.3] " + - "Section 10.2.2."; + "Section 12.1, [R84], [R134]. " + + "[MEF6.2] Section 8.2.1,[R3],[R136]. " + + "Section 8.2.2, 10.1, [R6]. [MEF7.3] " + + "Section 10.2.2."; } } } leaf env-id { type mef-types:identifier45; description - "This attribute identifies the Envelope of " + - "Bandwidth Profile Parameters."; + "This attribute identifies the Envelope of " + + "Bandwidth Profile Parameters."; reference "[MEF10.3] Section 12.1."; } leaf coupling-enabled { type boolean; must "not(../bwp-flows) or " + - "(../bwp-flows/bwp-flow[2]) or " + - "(. = 'false')" { + "(../bwp-flows/bwp-flow[2]) or " + + "(. = 'false')" { error-message "When only one Bandwidth Profile " + - "Flow is mapped to an envelope, Envelope " + - "Coupling must be Disabled."; + "Flow is mapped to an envelope, Envelope " + + "Coupling must be Disabled."; description - "When only one Bandwidth Profile Flow is " + - "mapped to an envelope, Envelope " + - "Coupling must be Disabled."; + "When only one Bandwidth Profile Flow is " + + "mapped to an envelope, Envelope " + + "Coupling must be Disabled."; } default "false"; description - "The Envelope Coupling Flag (CF) attribute."; + "The Envelope Coupling Flag (CF) attribute."; reference "[MEF10.3] Section 12.1."; } } @@ -426,120 +431,120 @@ module mef-interfaces { container egress-envelopes { presence "Egress Bandwidth Profile Envelopes configured."; description - "UNI Bandwidth Profile Flow Envelopes."; + "UNI Bandwidth Profile Flow Envelopes."; reference "[MEF10.3] Section 9.15, Section 12.1. " + - "[MEF6.2] Section 8.2.1: [R3]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF6.2] Section 8.2.1: [R3]. " + + "[MEF7.3] Section 10.2.2."; list envelope { key "env-id"; description - "UNI Bandwidth Profile Flow Envelope List."; + "UNI Bandwidth Profile Flow Envelope List."; reference "[MEF10.3] Section 9.15, Section 12.1. " + - "[MEF6.2] Section 8.2.1, [R3], " + - "Section 8.2.2, [R4]. [MEF7.3] " + - "Section 10.2.2."; + "[MEF6.2] Section 8.2.1, [R3], " + + "Section 8.2.2, [R4]. [MEF7.3] " + + "Section 10.2.2."; container bwp-flows { presence "Bandwidth Profile configured for " + - "this envelope."; + "this envelope."; description - "UNI Bandwidth Profile Flows per Envelope."; + "UNI Bandwidth Profile Flows per Envelope."; reference "[MEF10.3] Section 12.1. [MEF6.2] " + - "Section 10.1."; + "Section 10.1."; list bwp-flow { key "bw-profile"; ordered-by user; description - "UNI Bandwidth Profile Flow List per Envelope. " + - "The order of entries in the list is user " + - "controlled. The first element of the list " + - "has the lowest priority and the last element " + - "will have the highest priority."; + "UNI Bandwidth Profile Flow List per Envelope. " + + "The order of entries in the list is user " + + "controlled. The first element of the list " + + "has the lowest priority and the last element " + + "will have the highest priority."; reference "[MEF10.3] Section 12.1. " + - "[MEF6.2] Section 10.1. " + - "[MEF6.2] Section 8.2.1, [R3]. "; + "[MEF6.2] Section 10.1. " + + "[MEF6.2] Section 8.2.1, [R3]. "; leaf bw-profile { type leafref { path "/mef-global:mef-global/mef-global:" + - "profiles/mef-global:egress-bwp-flows" + - "/mef-global:bwp-flow/" + - "mef-global:bw-profile"; + "profiles/mef-global:egress-bwp-flows" + + "/mef-global:bwp-flow/" + + "mef-global:bw-profile"; } must "(../../../../../token-share-enabled = " + - "'true') or " + - "((../../../../../token-share-enabled = " + - "'false') and " + - "(count(../../bwp-flow) = 1))" { + "'true') or " + + "((../../../../../token-share-enabled = " + + "'false') and " + + "(count(../../bwp-flow) = 1))" { error-message "A UNI with Token Share " + - "Disabled must have exactly one " + - "Bandwidth Profile Flow per envelope."; + "Disabled must have exactly one " + + "Bandwidth Profile Flow per envelope."; description - "A UNI with Token Share Disabled must have " + - "exactly one Bandwidth Profile Flow per " + - "envelope."; + "A UNI with Token Share Disabled must have " + + "exactly one Bandwidth Profile Flow per " + + "envelope."; } must "(../../../coupling-enabled = 'false') or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:" + - "egress-bwp-flows/mef-global:bwp-flow" + - "[mef-global:bw-profile = current()]/" + - "mef-global:coupling-enabled = 'false')" { + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:" + + "egress-bwp-flows/mef-global:bwp-flow" + + "[mef-global:bw-profile = current()]/" + + "mef-global:coupling-enabled = 'false')" { error-message "If an Egress Envelope's " + - "Coupling Flag is Enabled, then the " + - "Coupling Flags must be disabled " + - "for all Bandwidth Profile Flows " + - "mapped to the Envelope."; + "Coupling Flag is Enabled, then the " + + "Coupling Flags must be disabled " + + "for all Bandwidth Profile Flows " + + "mapped to the Envelope."; description - "If an Egress Envelope's Coupling Flag " + - "is Enabled, then the Coupling Flags must " + - "be disabled for all Bandwidth Profile " + - "Flows mapped to the Envelope."; + "If an Egress Envelope's Coupling Flag " + + "is Enabled, then the Coupling Flags must " + + "be disabled for all Bandwidth Profile " + + "Flows mapped to the Envelope."; } description - "UNI Bandwidth Profile Flow per Envelope."; + "UNI Bandwidth Profile Flow per Envelope."; reference "[MEF10.3] Section 12.1. " + - "[MEF6.2] Section 10.1. " + - "[MEF6.2] Section 8.2.1, [R3], [R136]. "; + "[MEF6.2] Section 10.1. " + + "[MEF6.2] Section 8.2.1, [R3], [R136]. "; } } } leaf env-id { type mef-types:identifier45; description - "This attribute identifies the Envelope of " + - "Bandwidth Profile Parameters."; + "This attribute identifies the Envelope of " + + "Bandwidth Profile Parameters."; reference "[MEF10.3] Section 12.1."; } leaf coupling-enabled { type boolean; must "not(../bwp-flows) or " + - "(../bwp-flows/bwp-flow[2]) or " + - "(. = 'false')" { + "(../bwp-flows/bwp-flow[2]) or " + + "(. = 'false')" { error-message "When only one Bandwidth Profile " + - "Flow is mapped to an envelope, " + - "Envelope Coupling must be Disabled."; + "Flow is mapped to an envelope, " + + "Envelope Coupling must be Disabled."; description - "When only one Bandwidth Profile Flow is " + - "mapped to an envelope, Envelope Coupling " + - "must be Disabled."; + "When only one Bandwidth Profile Flow is " + + "mapped to an envelope, Envelope Coupling " + + "must be Disabled."; } default "false"; description - "The Envelope Coupling Flag (CF) attribute."; + "The Envelope Coupling Flag (CF) attribute."; reference "[MEF10.3] Section 12.1."; } } } container status { description - "This group is related to the MEF 7.3 External " + - "Network Interface"; + "This group is related to the MEF 7.3 External " + + "Network Interface"; leaf oper-state-enabled { type boolean; default "false"; config false; description - "Operational Status of the Link as " + - "Enabled/Disabled."; + "Operational Status of the Link as " + + "Enabled/Disabled."; reference "[MEF15]. [MEF7.3] Section 10.1.1."; } leaf available-status { @@ -547,7 +552,7 @@ module mef-interfaces { default "not-installed"; config false; description - "Availability Status of the Link."; + "Availability Status of the Link."; reference "[MEF15]. [MEF7.3] Section 10.1.1."; } leaf physical-layer { @@ -555,7 +560,7 @@ module mef-interfaces { default "1G"; config false; description - "Physical Layer Connection Speed."; + "Physical Layer Connection Speed."; reference "[MEF15]. [MEF7.3] Section 10.1.1."; } leaf number-of-links { @@ -563,8 +568,8 @@ module mef-interfaces { default "0"; config false; description - "A count of the number of physical links in this " + - "physical layer."; + "A count of the number of physical links in this " + + "physical layer."; reference "[MEF15]. [MEF7.3] Section 10.1.1."; } leaf svc-frame-format { @@ -572,172 +577,172 @@ module mef-interfaces { default "ctag"; config false; description - "The format must be that of a MAC Frame specified " + - "in IEEE Std 802.3-2012 Clause 3."; + "The format must be that of a MAC Frame specified " + + "in IEEE Std 802.3-2012 Clause 3."; reference "[MEF10.3] Section 9.6. [MEF15]. " + - "[MEF7.2]. [MEF7.3] Section 10.1.1."; + "[MEF7.2]. [MEF7.3] Section 10.1.1."; } } leaf cen-id { when "/mef-global:mef-global/mef-global:cens" { description - "Only configure when the Global CENs list " + - "has been populated."; + "Only configure when the Global CENs list " + + "has been populated."; } type leafref { path "/mef-global:mef-global/mef-global:cens/" + - "mef-global:cen/mef-global:cen-id"; + "mef-global:cen/mef-global:cen-id"; } description - "A CEN is defined as a network from a Service " + - "Provider (SP). The CEN ID must be unique for " + - "a specific Service Provider."; + "A CEN is defined as a network from a Service " + + "Provider (SP). The CEN ID must be unique for " + + "a specific Service Provider."; reference "[MEF10.3] Section 7."; } leaf uni-id { type mef-types:identifier45; description - " The UNI IDs must be be unique within a specific CEN."; + " The UNI IDs must be be unique within a specific CEN."; reference "[MEF10.3] Section 9.1, [R1], [R57], [R58], " + - "[R59]. [MEF7.3] Section 10.2.2."; + "[R59]. [MEF7.3] Section 10.2.2."; } leaf uni-type { type mef-types:uni-mode-type; default "uni"; description - " The UNI Type must be one of {UNI, VUNI}."; + " The UNI Type must be one of {UNI, VUNI}."; reference "[MEF10.3] Section 9.1, [R1], [R57], [R58], " + - "[R59]. [MEF7.3] Section 10.2.2."; + "[R59]. [MEF7.3] Section 10.2.2."; } leaf subscriber { when "/mef-global:mef-global/mef-global:subscribers" { description - "UNI Subscriber Attribute is only configurable " + - "when multiple Global Subscribers have been " + - "configured."; + "UNI Subscriber Attribute is only configurable " + + "when multiple Global Subscribers have been " + + "configured."; } type leafref { path "/mef-global:mef-global/mef-global:subscribers/" + - "mef-global:subscriber/mef-global:sub-id"; + "mef-global:subscriber/mef-global:sub-id"; } description - "A UNI MUST be dedicated to a single Subscriber. " + - "This value can only be configured if the " + - "'/mef-global/subscribers/subscriber' list " + - "has been populated."; + "A UNI MUST be dedicated to a single Subscriber. " + + "This value can only be configured if the " + + "'/mef-global/subscribers/subscriber' list " + + "has been populated."; reference "[MEF10.3] Section 7."; } leaf admin-state-enabled { type boolean; default "true"; description - "Locked/Unlocked is inconsistent with Oper Status " + - "and will be confusing."; + "Locked/Unlocked is inconsistent with Oper Status " + + "and will be confusing."; reference "MEF 15. MEF 7.3 Section 10.1.1."; } leaf mac-address { type yang:mac-address; description - "MAC Address."; + "MAC Address."; reference "[MEF15]. [MEF7.3] Section 10.1.1."; } leaf uni-resiliency { type mef-types:uni-resiliency-type; must "(. != 'none') or ((. = 'none') and " + - "(../physical-layers/number-of-links = 1))" { + "(../physical-layers/number-of-links = 1))" { error-message "If uni-resiliency is 'none', " + - "number-of-links must be 1."; + "number-of-links must be 1."; description - "If uni-resiliency is 'none', number-of-links " + - "must be 1."; + "If uni-resiliency is 'none', number-of-links " + + "must be 1."; } must "(. != 'dual-link-aggregation') or " + - "((. = 'dual-link-aggregation') and " + - "(../physical-layers/number-of-links = 2))" { + "((. = 'dual-link-aggregation') and " + + "(../physical-layers/number-of-links = 2))" { error-message "If uni-resiliency is " + - "'dual-link-aggregation', " + - "number-of-links must be 2."; + "'dual-link-aggregation', " + + "number-of-links must be 2."; description - "If uni-resiliency is 'dual-link-aggregation', " + - "number-of-links must be 2."; + "If uni-resiliency is 'dual-link-aggregation', " + + "number-of-links must be 2."; } must "(. != 'other') or " + - "((. = 'other') and " + - "(../physical-layers/number-of-links > 2))" { + "((. = 'other') and " + + "(../physical-layers/number-of-links > 2))" { error-message "If uni-resiliency is 'other', " + - "number-of-links must be 3 or greater."; + "number-of-links must be 3 or greater."; description - "If uni-resiliency is 'other', number-of-links " + - "must be 3 or greater."; + "If uni-resiliency is 'other', number-of-links " + + "must be 3 or greater."; } default "none"; description - "UNI Resiliency."; + "UNI Resiliency."; reference "[MEF10.3] Section 9.5 [R64], [R65], [R66], " + - "[R67]. [MEF6.2] Section 8.2.2."; + "[R67]. [MEF6.2] Section 8.2.2."; } leaf max-svc-frame-size { type mef-types:max-svc-frame-size-type; default "1600"; description - "This attribute describes the maximum service frame " + - "size for the UNI."; + "This attribute describes the maximum service frame " + + "size for the UNI."; reference "[MEF10.3] Section 9.7, [R71], MEF 6.2 " + - "Section 8.2.2 and MEF 22.1: [D2]. " + - "[MEF7.3] Section 10.2.2."; + "Section 8.2.2 and MEF 22.1: [D2]. " + + "[MEF7.3] Section 10.2.2."; } leaf svc-mux-enabled { type boolean; default "false"; description - "Service Multiplexing Enable - Enable if to support " + - "multiple EVCs per UNI."; + "Service Multiplexing Enable - Enable if to support " + + "multiple EVCs per UNI."; reference "[MEF10.3] Section 9.8. " + - "[MEF7.3] Section 10.2.2."; + "[MEF7.3] Section 10.2.2."; } leaf bundling-enabled { type boolean; default "false"; description - "When a UNI has Bundling Enabled, it MUST be able to " + - "support more than one CE-VLAN ID mapping to a " + - "particular EVC at the UNI. When more than one " + - "CE-VLAN-ID is mapped to an EVC at a UNI, the " + - "EVC have CE-VLAN ID Preservation enabled"; + "When a UNI has Bundling Enabled, it MUST be able to " + + "support more than one CE-VLAN ID mapping to a " + + "particular EVC at the UNI. When more than one " + + "CE-VLAN-ID is mapped to an EVC at a UNI, the " + + "EVC have CE-VLAN ID Preservation enabled"; reference "[MEF10.3] Section 9.12, [R25], [R77], " + - "[R78], [R80]. [MEF7.3] Section 10.2.2."; + "[R78], [R80]. [MEF7.3] Section 10.2.2."; } leaf all-to-one-bundling-enabled { type boolean; default "false"; description - "When all-to-one-bundling-enabled = true, all " + - "CE-VLAN IDs MUST map to a single EVC at the " + - "UNI. This also means that the UNI cannot " + - "have svc-mux-enabled = true. When " + - "all-to-one-bundling-enabled = true, " + - "all other UNIs in the EVC associating this UNI " + - "must have all-to-one-bundling-enabled = true. " + - "If this values is true, the value of " + - "ce-vlan-id-for-untagged-and-priority is not " + - "applicable."; + "When all-to-one-bundling-enabled = true, all " + + "CE-VLAN IDs MUST map to a single EVC at the " + + "UNI. This also means that the UNI cannot " + + "have svc-mux-enabled = true. When " + + "all-to-one-bundling-enabled = true, " + + "all other UNIs in the EVC associating this UNI " + + "must have all-to-one-bundling-enabled = true. " + + "If this values is true, the value of " + + "ce-vlan-id-for-untagged-and-priority is not " + + "applicable."; reference "[MEF10.3] Section 9.13, Table 12 " + - "(5 valid combinations), [R82], [R83]. " + - "[MEF7.3] Section 10.2.2."; + "(5 valid combinations), [R82], [R83]. " + + "[MEF7.3] Section 10.2.2."; } leaf ce-vlan-id-for-untagged-and-priority { type mef-types:vlan-id-type; default "1"; description - "The ce-vlan-id-for-untagged-and-priority is " + - "equivalent to the Layer 2 PVID (Port VLAN ID) " + - "with the Q-BRIDGE-MIB option for frame admitance set " + - "to admitAll. With AdmitAll set, all Untagged and " + - "Priority Tagged Service Frames are treated with " + - "the CE-VLAN-ID tag on ingress. It is not applicable " + - "if All in One Bundling is enabled."; + "The ce-vlan-id-for-untagged-and-priority is " + + "equivalent to the Layer 2 PVID (Port VLAN ID) " + + "with the Q-BRIDGE-MIB option for frame admitance set " + + "to admitAll. With AdmitAll set, all Untagged and " + + "Priority Tagged Service Frames are treated with " + + "the CE-VLAN-ID tag on ingress. It is not applicable " + + "if All in One Bundling is enabled."; reference "[MEF10.3] Section 9.9, [R73], [R74], " + - "[R75]. [MEF7.3] Section 10.2.2."; + "[R75]. [MEF7.3] Section 10.2.2."; } leaf max-evc-count { type uint32 { @@ -745,135 +750,135 @@ module mef-interfaces { } default "1"; description - "The Maximum Number of EVCs that can be supported " + - "by this UNI (Default 1)."; + "The Maximum Number of EVCs that can be supported " + + "by this UNI (Default 1)."; reference "[MEF10.3] Section 9.11, [R79]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF7.3] Section 10.2.2."; } leaf token-share-enabled { type boolean; default "false"; description - "Token Share Enabled/Disabled is used to indicate " + - "whether a given UNI is capable of sharing tokens " + - "across Bandwidth Profile Flows in an envelope."; + "Token Share Enabled/Disabled is used to indicate " + + "whether a given UNI is capable of sharing tokens " + + "across Bandwidth Profile Flows in an envelope."; reference "[MEF6.2] Section 8.2.1, [R2], [D1], [R3]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF7.3] Section 10.2.2."; } leaf ingress-bw-profile-per-uni { type leafref { path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:ingress-bwp-flows/mef-global:" + - "bwp-flow/mef-global:bw-profile"; + "mef-global:ingress-bwp-flows/mef-global:" + + "bwp-flow/mef-global:bw-profile"; } description - "Ingress Bandwidth Profile for this UNI."; + "Ingress Bandwidth Profile for this UNI."; reference "[MEF10.3] Section 9.15, Section 12.1. " + - "[MEF6.2] Section 8.2.1: [R3]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF6.2] Section 8.2.1: [R3]. " + + "[MEF7.3] Section 10.2.2."; } leaf egress-bw-profile-per-uni { type leafref { path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:egress-bwp-flows/mef-global:" + - "bwp-flow/mef-global:bw-profile"; + "mef-global:egress-bwp-flows/mef-global:" + + "bwp-flow/mef-global:bw-profile"; } description - "Egress Bandwidth Profile Flow for this UNI."; + "Egress Bandwidth Profile Flow for this UNI."; reference "[MEF10.3] Section 9.15, Section 12.1. " + - "[MEF6.2] Section 8.2.1: [R3]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF6.2] Section 8.2.1: [R3]. " + + "[MEF7.3] Section 10.2.2."; } leaf link-oam-enabled { type boolean; default "false"; description - "Link OAM Enabled/Disabled."; + "Link OAM Enabled/Disabled."; reference "[MEF10.3] Section 9.16, [R86]. " + - "[MEF6.2] Section 8.2.2, [D3]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF6.2] Section 8.2.2, [D3]. " + + "[MEF7.3] Section 10.2.2."; } leaf uni-meg-enabled { type boolean; default "false"; description - "Enables / Disables the Maintenance Entity Group (MEG)."; + "Enables / Disables the Maintenance Entity Group (MEG)."; reference "[MEF10.3] Section 9.17, [R87]. " + - "[MEF30.1] Section 7.9. [MEF6.2] Section 8.2.2, " + - "[D4]. [MEF7.3] Section 10.2.2."; + "[MEF30.1] Section 7.9. [MEF6.2] Section 8.2.2, " + + "[D4]. [MEF7.3] Section 10.2.2."; } leaf elmi-enabled { type boolean; must "(. = 'false') or " + - "(. = 'true' and " + - "(../elmi-profile))" { + "(. = 'true' and " + + "(../elmi-profile))" { error-message "ELMI Profile must be set if " + - "ELMI is Enabled."; + "ELMI is Enabled."; description - "Ethernet Local Management Interface(ELMI) " + - "Profile ID must be set if ELMI is Enabled."; + "Ethernet Local Management Interface(ELMI) " + + "Profile ID must be set if ELMI is Enabled."; } default "false"; description - "Ethernet Local Management Interface(ELMI) " + - "Enabled / Disabled."; + "Ethernet Local Management Interface(ELMI) " + + "Enabled / Disabled."; reference "[MEF10.3] Section 9.18, [R88]. " + - "[MEF16]. [MEF6.2] Section 8.2.2, [D5]. " + - "[MEF7.3] Section 10.2.2."; + "[MEF16]. [MEF6.2] Section 8.2.2, [D5]. " + + "[MEF7.3] Section 10.2.2."; } leaf elmi-profile { type leafref { path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:elmi/mef-global:elmi-profile/" + - "mef-global:id"; + "mef-global:elmi/mef-global:elmi-profile/" + + "mef-global:id"; } description - "The ELMI Profile is only applicable when ELMI " + - "is enabled. The E-LMI protocol is based on " + - "ITU-T Q.933, X.36 and other relevant " + - "recommendations as well as Frame Relay " + - "Local Management Interface (FR-LMI) " + - "Implementation Agreement document defined " + - "by the Frame Relay Forum and related " + - "ITU-T recommendations."; + "The ELMI Profile is only applicable when ELMI " + + "is enabled. The E-LMI protocol is based on " + + "ITU-T Q.933, X.36 and other relevant " + + "recommendations as well as Frame Relay " + + "Local Management Interface (FR-LMI) " + + "Implementation Agreement document defined " + + "by the Frame Relay Forum and related " + + "ITU-T recommendations."; reference "[MEF10.3] Section 9.18. " + - "[MEF7.3] Section 10.2.2."; + "[MEF7.3] Section 10.2.2."; } leaf l2cp-address-set { type mef-types:l2cp-address-set-type; default "aware-cta"; description - "The L2CP Address Set Service Attribute specifies " + - "the subset of the Bridge Reserved Addresses " + - "that are filtered (i.e. L2CP Frames with " + - "this destination address are Peered or " + - "Discarded but not Passed) at a L2CP Decision Point."; + "The L2CP Address Set Service Attribute specifies " + + "the subset of the Bridge Reserved Addresses " + + "that are filtered (i.e. L2CP Frames with " + + "this destination address are Peered or " + + "Discarded but not Passed) at a L2CP Decision Point."; reference "[MEF10.3] Section 9.19. " + - "[MEF45] Section 8.1, [R2] through [R9]. " + - "[MEF6.2] Section 8.2.2, [R1]. " + - "[MEF45] Section 8.1."; + "[MEF45] Section 8.1, [R2] through [R9]. " + + "[MEF6.2] Section 8.2.2, [R1]. " + + "[MEF45] Section 8.1."; } leaf l2cp-peering-profile { type leafref { path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:l2cp-peering/mef-global:" + - "l2cp-profile/mef-global:id"; + "mef-global:l2cp-peering/mef-global:" + + "l2cp-profile/mef-global:id"; } description - "L2CP Peering Profile for this UNI. This profile " + - "may contain groups of L2CP Destination " + - "MAC Addresses and protocols to be peered at " + - "the UNI (as opposed to being passed or discarded)."; + "L2CP Peering Profile for this UNI. This profile " + + "may contain groups of L2CP Destination " + + "MAC Addresses and protocols to be peered at " + + "the UNI (as opposed to being passed or discarded)."; reference "[MEF10.3] Section 9.19. " + - "[MEF45] Section 8.2. " + - "[MEF7.3] Section 10.2.2."; + "[MEF45] Section 8.2. " + + "[MEF7.3] Section 10.2.2."; } leaf tenant-id { - type leafref { - path "/mef-global:mef-global/mef-global:tenants-instances/mef-global:tenant-list/mef-global:name"; - } - } + type leafref { + path "/mef-global:mef-global/mef-global:tenants-instances/mef-global:tenant-list/mef-global:name"; + } + } } } } -} \ No newline at end of file +} diff --git a/legato-api/src/main/yang/mef-services.yang b/legato-api/src/main/yang/mef-services.yang index 99c2979f..d2e81221 100644 --- a/legato-api/src/main/yang/mef-services.yang +++ b/legato-api/src/main/yang/mef-services.yang @@ -1,84 +1,57 @@ module mef-services { namespace "http://metroethernetforum.org/ns/yang/mef-services"; prefix mef-services; - import ietf-yang-types { - prefix yang; - } - import mef-types { - prefix mef-types; - } - import mef-global { - prefix mef-global; - } - import mef-interfaces { - prefix mef-interfaces; - } + import ietf-yang-types { prefix yang; } + import ietf-inet-types { prefix inet; } + import mef-types { prefix mef-types; } + import mef-global { prefix mef-global; } + import mef-interfaces { prefix mef-interfaces; } organization "Metro Ethernet Forum"; contact - "Web URL: http://metroethernetforum.org/ - E-mail: mibs@metroethernetforum.org - Postal: Metro Ethernet Forum - 6033 W. Century Boulevard, Suite 1107 - Los Angeles, CA 90045 - U.S.A. - Phone: +1 310-642-2800 - Fax: +1 310-642-2808"; + "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org + Postal: Metro Ethernet Forum 6033 W. Century Boulevard, Suite + 1107 Los Angeles, CA 90045 U.S.A. Phone: +1 310-642-2800 Fax: + +1 310-642-2808"; description - "This module implements the Carrier Ethernet Services as - defined in MEF 10.3, MEF 6.2, and MEF 7.2. - - Reference Overview: - A number of base documents have been used to create the - MEF Services YANG Module. The - following are the abbreviations for the baseline documents: - [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', - 2013-07-15 - [RFC 6643] refers to IETF RFC 6643 'Translation of Structure - of Management Information - Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 - [802.1AB] refers to 'Station and Media Access Control - Connectivity Discovery', IEEE 802.1AB-2009, September 2009 - [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard for Local - and metropolitan area networks --Media Access Control (MAC) - Bridges and Virtual Bridged Local Area Networks, August 2011 - [802-2001] refers to 'IEEE Standard for Local and Metropolitan - Area Networks: Overview and Architecture', IEEE 802-2001, - February 2002 - [MEF10.3] refers to MEF 10.3 - 'Ethernet Services Attributes Phase 3', October 2013 - [MEF6.2] refers to MEF 6.2 - 'EVC Ethernet Services Defintions Phase 3', August 2014 - [MEF40] refers to MEF 40 - 'UNI and EVC Definition of Managed Objects', April 2013 - [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014 - [MEF7.2] refers to MEF 7.2 - 'Carrier Ethernet Management Information Model', April 2013 - [MEF7.3] refers to MEF 7.3 - 'Carrier Ethernet Management Information Model', - Working Draft #1 2015 - [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version 2)', - December 1999 - [RFC 2863] refers to IETF RFC 2863 'The Interfaces Group MIB', - June 2000 - [RFC 3419] refers to IETF RFC 3419 - 'Textual Conventions for Transport Addresses', December 2002 - [Y.1731] refers to ITU-T Y.1731 - 'OAM functions and mechanisms for Ethernet based networks', - July 2011 - [Q.840.1] refers to ITU-T Q.840.1 - 'Requirements and analysis for NMS-EMS management interface - of Ethernet over Transport and Metro Ethernet - Network(EoT/MEN)' March 2007"; + "This module implements the Carrier Ethernet Services as defined + in MEF 10.3, MEF 6.2, and MEF 7.2. Reference Overview: A number + of base documents have been used to create the MEF Services YANG + Module. The following are the abbreviations for the baseline documents: + [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', 2013-07-15 + [RFC 6643] refers to IETF RFC 6643 'Translation of Structure of + Management Information Version 2 (SMIv2) MIB Modules to YANG Modules', + 2011-11-25 [802.1AB] refers to 'Station and Media Access Control + Connectivity Discovery', IEEE 802.1AB-2009, September 2009 [802.1q] + refers to IEEE 802.1Q-2011 'IEEE Standard for Local and metropolitan + area networks --Media Access Control (MAC) Bridges and Virtual + Bridged Local Area Networks, August 2011 [802-2001] refers to + 'IEEE Standard for Local and Metropolitan Area Networks: Overview + and Architecture', IEEE 802-2001, February 2002 [MEF10.3] refers + to MEF 10.3 'Ethernet Services Attributes Phase 3', October 2013 + [MEF6.2] refers to MEF 6.2 'EVC Ethernet Services Defintions Phase + 3', August 2014 [MEF40] refers to MEF 40 'UNI and EVC Definition + of Managed Objects', April 2013 [MEF45] refers to MEF 45 'Multi-CEN + L2CP', August 2014 [MEF7.2] refers to MEF 7.2 'Carrier Ethernet + Management Information Model', April 2013 [MEF7.3] refers to MEF + 7.3 'Carrier Ethernet Management Information Model', Working Draft + #1 2015 [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version + 2)', December 1999 [RFC 2863] refers to IETF RFC 2863 'The Interfaces + Group MIB', June 2000 [RFC 3419] refers to IETF RFC 3419 'Textual + Conventions for Transport Addresses', December 2002 [Y.1731] refers + to ITU-T Y.1731 'OAM functions and mechanisms for Ethernet based + networks', July 2011 [Q.840.1] refers to ITU-T Q.840.1 'Requirements + and analysis for NMS-EMS management interface of Ethernet over + Transport and Metro Ethernet Network(EoT/MEN)' March 2007"; revision 2015-05-26 { description - "Formal Project Review Draft 1."; + "Formal Project Review Draft 1."; reference "EVC Ethernet Services Definitions YANG Modules " + - "(MEF XX), TBD"; + "(MEF XX), TBD"; } - + container mef-services { description - "MEF Services"; + "MEF Services"; list mef-service { must "(not(/mef-global:mef-global/mef-global:svc-providers)" + " and " + @@ -89,1488 +62,1554 @@ module mef-services { "populated, a Service Provider ID must be " + "configured for a Service."; description - "A Service sees a single Service Provider. This must " + - "statement is effectively a 'mandatory true' when " + - "the Global Service Providers list is being used."; + "A Service sees a single Service Provider. This must " + + "statement is effectively a 'mandatory true' when " + + "the Global Service Providers list is being used."; } key "svc-id"; unique "evc/evc-id"; + unique "ipvc/ipvc-id"; description - "Metro Ethernet Forum's Ethernet Services."; - container evc { - must "not(sls-uni-inclusions) or " + - "(sls-uni-inclusions and not(sls-uni-exclusions))" { - error-message "The EVC Performance SLS Exclusions and " + - "Inclusions List cannot both be configured for " + - "an EVC."; - description - "The EVC Performance SLS Exclusions and Inclusions " + - "List cannot both be configured for an EVC."; - } - must "(evc-type != 'rooted-multipoint') or " + - "((evc-type = 'rooted-multipoint') and " + - "not(sls-uni-exclusions) )" { - error-message "If EVC Type is Rooted-Multipoint, " + - "sls-uni-inclusions must be used instead of " + - "sls-uni-exclusions."; - description - "If EVC Type is Rooted-Multipoint, " + - "sls-uni-inclusions must be used instead of " + - "sls-uni-exclusions."; - } - description - "Ethernet Virtual Circuit(EVC) Configuration and Status."; - container unis { - description - "EVC Per Universal Network Interface(UNI) " + - "Configuration and Status."; - list uni { - must "not(evc-uni-ce-vlans/evc-uni-ce-vlan[2]) or " + - "../../preserve-ce-vlan-id = 'true'" { - error-message "When more than one CE-VLAN-ID is " + - "mapped to an EVC at a UNI, the EVC must have " + - "CE-VLAN ID Preservation Enabled."; - description - "When more than one CE-VLAN-ID is mapped to " + - "an EVC at a UNI, the EVC must have CE-VLAN ID " + - "Preservation Enabled."; - } - must "/mef-interfaces:mef-interfaces/mef-interfaces:" + - "unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "[mef-interfaces:uni-id/../mef-interfaces:" + - "max-svc-frame-size >= current()/../../" + - "mef-services:max-svc-frame-size]" { - error-message "The value of the EVC Maximum " + - "Service Frame Size must be less than " + - "or equal to all the UNI Maximum Service " + - "Frame Sizes."; - description - "The value of the EVC Maximum Service Frame " + - "Size must be less than or equal to all the " + - "UNI Maximum Service Frame Sizes."; - } - must "(/mef-interfaces:mef-interfaces/mef-interfaces:" + - "unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "[mef-interfaces:uni-id/../mef-interfaces:" + - "bundling-enabled = 'true']) or " + - "(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "[mef-interfaces:uni-id/../mef-interfaces:" + - "all-to-one-bundling-enabled = 'true']) or " + - "not(evc-uni-ce-vlans/evc-uni-ce-vlan[2])" { - error-message "If both Bundling and All-to-One " + - "Bundling are disabled for a UNI, only one " + - "CE VLAN ID can be configured for a specific " + - "EVC on that UNI."; - description - "If both Bundling and All-to-One Bundling are " + - "disabled for a UNI, only one CE VLAN ID can be " + - "configured for a specific EVC on that UNI."; - } - must "(/mef-interfaces:mef-interfaces/mef-interfaces:" + - "unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "[mef-interfaces:uni-id/../mef-interfaces:" + - "all-to-one-bundling-enabled = 'false']) or " + - "(count(/mef-services:mef-services/" + - "mef-service/evc/unis/uni[uni-id = " + - "current()/uni-id]) = 1)" { - error-message "If All-to-One Bundling is enabled " + - "for any UNI in an EVC, all CE-VLAN IDs " + - "mapped to any EVC for that UNI must map " + - "to the same EVC ID."; - description - "If All-to-One Bundling is enabled for any UNI " + - "in an EVC, all CE-VLAN IDs mapped to any EVC " + - "for that UNI must map to the same EVC ID."; - } - must "((/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "[mef-interfaces:uni-id/../mef-interfaces:" + - "ingress-bw-profile-per-uni]) or " + - "(/mef-services:mef-services/mef-service/" + - "evc/unis/uni" + - "[uni-id = current()/mef-services:uni-id]" + - "/ingress-bwp-flows-per-cos) or " + - "(/mef-services:mef-services/mef-service/" + - "evc/unis/uni" + - "[uni-id = current()/mef-services:uni-id]" + - "/ingress-bw-profile-per-evc)) or " + - "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes)" { - error-message "If no Ingress Bandwidth Profiles " + - "are specied for this UNI (BW Profile " + - "Per UNI, BWP Flows Per CoS, nor BW Profile " + - "Per EVC), then the UNI Ingress Envelopes " + - "list must be empty."; - description - "If no Ingress Bandwidth Profiles are specied " + - "for this UNI (BW Profile Per UNI, BWP Flows " + - "Per CoS, nor BW Profile Per EVC), then the " + - "UNI Ingress Envelopes list must be empty."; - } - must "((/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "[mef-interfaces:uni-id/../mef-interfaces:" + - "egress-bw-profile-per-uni]) or " + - "(/mef-services:mef-services/mef-service/" + - "evc/unis/uni" + - "[uni-id = current()/mef-services:uni-id]" + - "/egress-bwp-flows-per-eec) or " + - "(/mef-services:mef-services/mef-service/" + - "evc/unis/uni" + - "[uni-id = current()/mef-services:uni-id]" + - "/egress-bw-profile-per-evc)) or " + - "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes)" { - error-message "If no Egress Bandwidth Profiles are " + - "specied for this UNI (BW Profile Per UNI, " + - "BWP Flows Per EEC, nor BW Profile Per EVC), " + - "then the UNI Egress Envelopes list must be " + - "empty."; - description - "If no Egress Bandwidth Profiles are specied " + - "for this UNI (BW Profile Per UNI, BWP Flows " + - "Per EEC, nor BW Profile Per EVC), then the UNI " + - "Egress Envelopes list must be empty."; - } - must "not(./ingress-bw-profile-per-evc) or " + - "((./ingress-bw-profile-per-evc) and " + - "not(./ingress-bwp-flows-per-cos))" { - error-message "If there is a per EVC Ingress " + - "Bandwidth Profile on an EVC, then there " + - "cannot be any per Class of Service Ingress " + - "Bandwidth Profiles on that EVC."; - description - "If there is a per EVC Ingress Bandwidth Profile " + - "on an EVC, then there cannot be any per " + - "Class of Service Ingress Bandwidth Profiles " + - "on that EVC."; - } - must "not(./egress-bw-profile-per-evc) or " + - "((./egress-bw-profile-per-evc) and " + - "not(./egress-bwp-flows-per-eec))" { - error-message "If there is a per EVC Egress " + - "Bandwidth Profile on an EVC, then there " + - "cannot be any per Egress Equivalence " + - "Class Identifier Bandwidth Profiles on " + - "that EVC."; - description - "If there is a per EVC Egress Bandwidth " + - "Profile on an EVC, then there cannot be " + - "any per Egress Equivalence Class Identifier " + - "Bandwidth Profiles on that EVC."; - } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-bw-profile-" + - "per-uni) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:ingress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-bw-profile-per-uni]" + - "[mef-global:cir = 0]) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:ingress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-bw-profile-per-uni]" + - "[mef-global:cbs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Ingress Bandwidth Profile Per UNI: " + - "If CIR > 0, CBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; - description - "Ingress Bandwidth Profile Per UNI: If CIR > 0, " + - "CBS must be greater than or equal to the " + - "EVC Max Service Frame Size for the EVC."; - } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-bw-profile-per-uni) " + - "or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:egress-bwp-flows/mef-global:" + - "bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-bw-profile-per-uni]" + - "[mef-global:cir = 0]) or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:ingress-bwp-flows/mef-global:" + - "bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-bw-profile-per-uni]" + - "[mef-global:cbs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Egress Bandwidth Profile Per UNI: " + - "If CIR > 0, CBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; - description - "Egress Bandwidth Profile Per UNI: If CIR > 0, " + - "CBS must be greater than or equal to the " + - "EVC Max Service Frame Size for the EVC."; - } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:ingress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:cir = 0]) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:ingress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:cbs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Ingress Bandwidth Profile Envelope: " + - "If CIR > 0, CBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; - description - "Ingress Bandwidth Profile Envelope: " + - "If CIR > 0, CBS must be greater than " + - "or equal to the EVC Max Service Frame " + - "Size for the EVC."; - } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:egress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = " + - "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:cir = 0]) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:egress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:cbs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Egress Bandwidth Profile " + - "Envelope: If CIR > 0, CBS must be greater " + - "than or equal to the EVC Max Service Frame " + - "Size for the EVC."; - description - "Egress Bandwidth Profile Envelope: If CIR > 0, " + - "CBS must be greater than or equal to the " + - "EVC Max Service Frame Size for the EVC."; + "Metro Ethernet Forum's Ethernet Services."; + choice mef-service-choice { + case ipvc-choice { + container ipvc { + container unis { + list uni { + leaf uni-id { + type leafref { + path "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni/" + + "mef-interfaces:uni-id"; + } + } + leaf ip-uni-id { + type mef-types:identifier45; + } + + container evc-uni-ce-vlans { + description + "EVC Per UNI CE-VLAN IDs."; + list evc-uni-ce-vlan { + key "vid"; + description + "A list of the CE-VLAN IDs mapped to this UNI " + + "for this EVC."; + reference "[MEF10.3] Section 8.6.1, [R24] " + + "[R25], Section 9.10.2, Section 9.12, " + + "[R76], [R81]."; + leaf vid { + type leafref { + path "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = " + + "current()/../../../uni-id]" + + "/mef-interfaces:ce-vlans/" + + "mef-interfaces:ce-vlan/" + + "mef-interfaces:vid"; + } + description + "VLAN Identifier."; + } + } + } + } } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-bw-profile-per-uni) " + - "or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:ingress-bwp-flows/mef-global:" + - "bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]/mef-interfaces:" + - "ingress-bw-profile-per-uni]" + - "[mef-global:eir = 0]) or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:ingress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-bw-profile-per-uni]" + - "[mef-global:ebs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Ingress Bandwidth Profile Per UNI: " + - "If EIR > 0, EBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; - description - "Ingress Bandwidth Profile Per UNI: If EIR > 0, " + - "EBS must be greater than or equal to the " + - "EVC Max Service Frame Size for the EVC."; + + leaf ipvc-id { + type mef-types:evc-id-type; + mandatory true; } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-bw-profile-" + - "per-uni) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:egress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]/mef-interfaces:" + - "egress-bw-profile-per-uni]" + - "[mef-global:eir = 0]) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:ingress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]/mef-interfaces:" + - "egress-bw-profile-per-uni]" + - "[mef-global:ebs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Egress Bandwidth Profile Per UNI: " + - "If EIR > 0, EBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; + leaf ipvc-type { + type mef-types:ipvc-type; + + mandatory true; description - "Egress Bandwidth Profile Per UNI: If EIR > 0, " + - "EBS must be greater than or equal to the " + - "EVC Max Service Frame Size for the EVC."; + "This IPVC attribute describes the IPVC as either " + + "Cloud-access, Multipoint, or " + + "Rooted-Multipoint."; } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:" + - "unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes) or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:ingress-bwp-flows/mef-global:" + - "bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:eir = 0]) or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:ingress-bwp-flows/mef-global:" + - "bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:ingress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:ebs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Ingress Bandwidth Profile Envelope: " + - "If EIR > 0, EBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; + } + } + case evc-choice { + container evc { + + must "not(sls-uni-inclusions) or " + + "(sls-uni-inclusions and not(sls-uni-exclusions))" { + error-message "The EVC Performance SLS Exclusions and " + + "Inclusions List cannot both be configured for " + + "an EVC."; description - "Ingress Bandwidth Profile Envelope: " + - "If EIR > 0, EBS must be greater than or equal " + - "to the EVC Max Service Frame Size for the EVC."; + "The EVC Performance SLS Exclusions and Inclusions " + + "List cannot both be configured for an EVC."; } - must "not(/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes) or " + - "(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:egress-bwp-flows/" + - "mef-global:bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:eir = 0]) or " + - "(/mef-global:mef-global/mef-global:profiles/" + - "mef-global:egress-bwp-flows/mef-global:" + - "bwp-flow" + - "[mef-global:bw-profile = /mef-interfaces:" + - "mef-interfaces/mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = current()/" + - "mef-services:uni-id]" + - "/mef-interfaces:egress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "bwp-flows/mef-interfaces:bwp-flow/" + - "mef-interfaces:bw-profile]" + - "[mef-global:ebs >= current()/../../" + - "max-svc-frame-size])" { - error-message "Egress Bandwidth Profile Envelope: " + - "If EIR > 0, EBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; + must "(evc-type != 'rooted-multipoint') or " + + "((evc-type = 'rooted-multipoint') and " + + "not(sls-uni-exclusions) )" { + error-message "If EVC Type is Rooted-Multipoint, " + + "sls-uni-inclusions must be used instead of " + + "sls-uni-exclusions."; description - "Egress Bandwidth Profile Envelope: " + - "If EIR > 0, EBS must be greater than or " + - "equal to the EVC Max Service Frame Size " + - "for the EVC."; + "If EVC Type is Rooted-Multipoint, " + + "sls-uni-inclusions must be used instead of " + + "sls-uni-exclusions."; } - key "uni-id"; description - "EVC Flow Points and EVC-UNI List defines the " + - "roles of each UNI in the Service. One UNI can " + - "be used by 0 or more EVCs."; - reference "[MEF10.3] Section 8.3. " + - "[MEF7.3] Section 12.2.2."; - container evc-uni-ce-vlans { + "Ethernet Virtual Circuit(EVC) Configuration and Status."; + container unis { description - "EVC Per UNI CE-VLAN IDs."; - list evc-uni-ce-vlan { - key "vid"; + "EVC Per Universal Network Interface(UNI) " + + "Configuration and Status."; + list uni { + must "not(evc-uni-ce-vlans/evc-uni-ce-vlan[2]) or " + + "../../preserve-ce-vlan-id = 'true'" { + error-message "When more than one CE-VLAN-ID is " + + "mapped to an EVC at a UNI, the EVC must have " + + "CE-VLAN ID Preservation Enabled."; + description + "When more than one CE-VLAN-ID is mapped to " + + "an EVC at a UNI, the EVC must have CE-VLAN ID " + + "Preservation Enabled."; + } + must "/mef-interfaces:mef-interfaces/mef-interfaces:" + + "unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "[mef-interfaces:uni-id/../mef-interfaces:" + + "max-svc-frame-size >= current()/../../" + + "mef-services:max-svc-frame-size]" { + error-message "The value of the EVC Maximum " + + "Service Frame Size must be less than " + + "or equal to all the UNI Maximum Service " + + "Frame Sizes."; + description + "The value of the EVC Maximum Service Frame " + + "Size must be less than or equal to all the " + + "UNI Maximum Service Frame Sizes."; + } + must "(/mef-interfaces:mef-interfaces/mef-interfaces:" + + "unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "[mef-interfaces:uni-id/../mef-interfaces:" + + "bundling-enabled = 'true']) or " + + "(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "[mef-interfaces:uni-id/../mef-interfaces:" + + "all-to-one-bundling-enabled = 'true']) or " + + "not(evc-uni-ce-vlans/evc-uni-ce-vlan[2])" { + error-message "If both Bundling and All-to-One " + + "Bundling are disabled for a UNI, only one " + + "CE VLAN ID can be configured for a specific " + + "EVC on that UNI."; + description + "If both Bundling and All-to-One Bundling are " + + "disabled for a UNI, only one CE VLAN ID can be " + + "configured for a specific EVC on that UNI."; + } + must "(/mef-interfaces:mef-interfaces/mef-interfaces:" + + "unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "[mef-interfaces:uni-id/../mef-interfaces:" + + "all-to-one-bundling-enabled = 'false']) or " + + "(count(/mef-services:mef-services/" + + "mef-service/evc/unis/uni[uni-id = " + + "current()/uni-id]) = 1)" { + error-message "If All-to-One Bundling is enabled " + + "for any UNI in an EVC, all CE-VLAN IDs " + + "mapped to any EVC for that UNI must map " + + "to the same EVC ID."; + description + "If All-to-One Bundling is enabled for any UNI " + + "in an EVC, all CE-VLAN IDs mapped to any EVC " + + "for that UNI must map to the same EVC ID."; + } + must "((/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "[mef-interfaces:uni-id/../mef-interfaces:" + + "ingress-bw-profile-per-uni]) or " + + "(/mef-services:mef-services/mef-service/" + + "evc/unis/uni" + + "[uni-id = current()/mef-services:uni-id]" + + "/ingress-bwp-flows-per-cos) or " + + "(/mef-services:mef-services/mef-service/" + + "evc/unis/uni" + + "[uni-id = current()/mef-services:uni-id]" + + "/ingress-bw-profile-per-evc)) or " + + "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes)" { + error-message "If no Ingress Bandwidth Profiles " + + "are specied for this UNI (BW Profile " + + "Per UNI, BWP Flows Per CoS, nor BW Profile " + + "Per EVC), then the UNI Ingress Envelopes " + + "list must be empty."; + description + "If no Ingress Bandwidth Profiles are specied " + + "for this UNI (BW Profile Per UNI, BWP Flows " + + "Per CoS, nor BW Profile Per EVC), then the " + + "UNI Ingress Envelopes list must be empty."; + } + must "((/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "[mef-interfaces:uni-id/../mef-interfaces:" + + "egress-bw-profile-per-uni]) or " + + "(/mef-services:mef-services/mef-service/" + + "evc/unis/uni" + + "[uni-id = current()/mef-services:uni-id]" + + "/egress-bwp-flows-per-eec) or " + + "(/mef-services:mef-services/mef-service/" + + "evc/unis/uni" + + "[uni-id = current()/mef-services:uni-id]" + + "/egress-bw-profile-per-evc)) or " + + "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes)" { + error-message "If no Egress Bandwidth Profiles are " + + "specied for this UNI (BW Profile Per UNI, " + + "BWP Flows Per EEC, nor BW Profile Per EVC), " + + "then the UNI Egress Envelopes list must be " + + "empty."; + description + "If no Egress Bandwidth Profiles are specied " + + "for this UNI (BW Profile Per UNI, BWP Flows " + + "Per EEC, nor BW Profile Per EVC), then the UNI " + + "Egress Envelopes list must be empty."; + } + must "not(./ingress-bw-profile-per-evc) or " + + "((./ingress-bw-profile-per-evc) and " + + "not(./ingress-bwp-flows-per-cos))" { + error-message "If there is a per EVC Ingress " + + "Bandwidth Profile on an EVC, then there " + + "cannot be any per Class of Service Ingress " + + "Bandwidth Profiles on that EVC."; + description + "If there is a per EVC Ingress Bandwidth Profile " + + "on an EVC, then there cannot be any per " + + "Class of Service Ingress Bandwidth Profiles " + + "on that EVC."; + } + must "not(./egress-bw-profile-per-evc) or " + + "((./egress-bw-profile-per-evc) and " + + "not(./egress-bwp-flows-per-eec))" { + error-message "If there is a per EVC Egress " + + "Bandwidth Profile on an EVC, then there " + + "cannot be any per Egress Equivalence " + + "Class Identifier Bandwidth Profiles on " + + "that EVC."; + description + "If there is a per EVC Egress Bandwidth " + + "Profile on an EVC, then there cannot be " + + "any per Egress Equivalence Class Identifier " + + "Bandwidth Profiles on that EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-bw-profile-" + + "per-uni) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:ingress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-bw-profile-per-uni]" + + "[mef-global:cir = 0]) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:ingress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-bw-profile-per-uni]" + + "[mef-global:cbs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Ingress Bandwidth Profile Per UNI: " + + "If CIR > 0, CBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Ingress Bandwidth Profile Per UNI: If CIR > 0, " + + "CBS must be greater than or equal to the " + + "EVC Max Service Frame Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-bw-profile-per-uni) " + + "or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:egress-bwp-flows/mef-global:" + + "bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-bw-profile-per-uni]" + + "[mef-global:cir = 0]) or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:ingress-bwp-flows/mef-global:" + + "bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-bw-profile-per-uni]" + + "[mef-global:cbs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Egress Bandwidth Profile Per UNI: " + + "If CIR > 0, CBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Egress Bandwidth Profile Per UNI: If CIR > 0, " + + "CBS must be greater than or equal to the " + + "EVC Max Service Frame Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:ingress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:cir = 0]) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:ingress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:cbs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Ingress Bandwidth Profile Envelope: " + + "If CIR > 0, CBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Ingress Bandwidth Profile Envelope: " + + "If CIR > 0, CBS must be greater than " + + "or equal to the EVC Max Service Frame " + + "Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:egress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = " + + "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:cir = 0]) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:egress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:cbs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Egress Bandwidth Profile " + + "Envelope: If CIR > 0, CBS must be greater " + + "than or equal to the EVC Max Service Frame " + + "Size for the EVC."; + description + "Egress Bandwidth Profile Envelope: If CIR > 0, " + + "CBS must be greater than or equal to the " + + "EVC Max Service Frame Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-bw-profile-per-uni) " + + "or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:ingress-bwp-flows/mef-global:" + + "bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]/mef-interfaces:" + + "ingress-bw-profile-per-uni]" + + "[mef-global:eir = 0]) or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:ingress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-bw-profile-per-uni]" + + "[mef-global:ebs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Ingress Bandwidth Profile Per UNI: " + + "If EIR > 0, EBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Ingress Bandwidth Profile Per UNI: If EIR > 0, " + + "EBS must be greater than or equal to the " + + "EVC Max Service Frame Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-bw-profile-" + + "per-uni) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:egress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]/mef-interfaces:" + + "egress-bw-profile-per-uni]" + + "[mef-global:eir = 0]) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:ingress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]/mef-interfaces:" + + "egress-bw-profile-per-uni]" + + "[mef-global:ebs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Egress Bandwidth Profile Per UNI: " + + "If EIR > 0, EBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Egress Bandwidth Profile Per UNI: If EIR > 0, " + + "EBS must be greater than or equal to the " + + "EVC Max Service Frame Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:" + + "unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes) or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:ingress-bwp-flows/mef-global:" + + "bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:eir = 0]) or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:ingress-bwp-flows/mef-global:" + + "bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:ingress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:ebs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Ingress Bandwidth Profile Envelope: " + + "If EIR > 0, EBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Ingress Bandwidth Profile Envelope: " + + "If EIR > 0, EBS must be greater than or equal " + + "to the EVC Max Service Frame Size for the EVC."; + } + must "not(/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes) or " + + "(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:egress-bwp-flows/" + + "mef-global:bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:eir = 0]) or " + + "(/mef-global:mef-global/mef-global:profiles/" + + "mef-global:egress-bwp-flows/mef-global:" + + "bwp-flow" + + "[mef-global:bw-profile = /mef-interfaces:" + + "mef-interfaces/mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = current()/" + + "mef-services:uni-id]" + + "/mef-interfaces:egress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "bwp-flows/mef-interfaces:bwp-flow/" + + "mef-interfaces:bw-profile]" + + "[mef-global:ebs >= current()/../../" + + "max-svc-frame-size])" { + error-message "Egress Bandwidth Profile Envelope: " + + "If EIR > 0, EBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + description + "Egress Bandwidth Profile Envelope: " + + "If EIR > 0, EBS must be greater than or " + + "equal to the EVC Max Service Frame Size " + + "for the EVC."; + } + key "uni-id"; description - "A list of the CE-VLAN IDs mapped to this UNI " + - "for this EVC."; - reference "[MEF10.3] Section 8.6.1, [R24] " + - "[R25], Section 9.10.2, Section 9.12, " + - "[R76], [R81]."; - leaf vid { + "EVC Flow Points and EVC-UNI List defines the " + + "roles of each UNI in the Service. One UNI can " + + "be used by 0 or more EVCs."; + reference "[MEF10.3] Section 8.3. " + + "[MEF7.3] Section 12.2.2."; + container evc-uni-ce-vlans { + description + "EVC Per UNI CE-VLAN IDs."; + list evc-uni-ce-vlan { + key "vid"; + description + "A list of the CE-VLAN IDs mapped to this UNI " + + "for this EVC."; + reference "[MEF10.3] Section 8.6.1, [R24] " + + "[R25], Section 9.10.2, Section 9.12, " + + "[R76], [R81]."; + leaf vid { + type leafref { + path "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = " + + "current()/../../../uni-id]" + + "/mef-interfaces:ce-vlans/" + + "mef-interfaces:ce-vlan/" + + "mef-interfaces:vid"; + } + must "not(current()/../../" + + "evc-uni-ce-vlan[2]) or " + + "(count(../../../../uni/evc-uni-ce-vlans/" + + "evc-uni-ce-vlan" + + "[vid = current()]) = " + + "count(../../../../uni))" { + error-message "If more than one CE-VLAN ID " + + "is configured for a UNI as part of " + + "an EVC, every CE VLAN-ID mapped to " + + "that EVC must be configured for all " + + "UNIs within that EVC."; + description + "If more than one CE-VLAN ID is configured " + + "for a UNI as part of an EVC, every " + + "CE VLAN-ID mapped to that EVC must be " + + "configured for all UNIs within that EVC."; + } + description + "VLAN Identifier."; + } + } + } + container ingress-bwp-flows-per-cos { + presence "Use Ingress Bandwidth Profiles Per CoS"; + description + "EVC Per UNI Class of Service Identifiers " + + "corresponding to this EVC's Ingress Bandwidth " + + "Profile Flows."; + leaf coupling-enabled { + type boolean; + default "false"; + description + "EVC Per UNI Envelope Coupling Flag (CF) " + + "attribute."; + reference "[MEF10.3] Section 12.1."; + } + list bwp-flow-per-cos { + key "cos-name"; + description + "EVC Per UNI: The list of Class of Service " + + "Identifiers corresponding to this UNI's " + + "Ingress Bandwidth Profile Flow."; + leaf cos-name { + type leafref { + path "/mef-global:mef-global/mef-global:" + + "profiles/mef-global:cos-names/" + + "mef-global:cos-name/mef-global:name"; + } + description + "EVC Per UNI: Class of Service Identifier " + + "for this Bandwidth Profile Flow."; + reference "[MEF7.3] Section 12.1.2."; + } + leaf bw-profile { + type leafref { + path "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = " + + "current()/../../../uni-id]" + + "/mef-interfaces:ingress-envelopes/" + + "mef-interfaces:envelope/" + + "mef-interfaces:env-id"; + } + mandatory true; + description + "EVC Per UNI: Ingress Bandwidth Profile " + + "Envelope Per CoS ID. If this parameter " + + "is not configured (ie. 'No') this " + + "setting is configured else at the " + + "UNI Level."; + reference "[MEF10.3] Section 10.6, Table 28. " + + "[MEF7.3] Section 12.1.2."; + } + } + } + container egress-bwp-flows-per-eec { + presence "Using Egress Bandwidth Profiles Per " + + "Egress Equivalence Class"; + description + "EVC Per UNI: The Egress Equivalence Class " + + "Identifiers corresponding to this EVC's Egress " + + "Bandwidth Profile Flows."; + leaf coupling-enabled { + type boolean; + default "false"; + description + "EVC Per UNI: The Envelope Coupling Flag (CF) " + + "attribute."; + reference "[MEF10.3] Section 12.1."; + } + list bwp-flow-per-eec { + key "eec-name"; + description + "EVC Per UNI: The list of Egress Equivalence " + + "Class Identifiers corresponding to this " + + "EVC's Egress Bandwidth Profile Flow."; + leaf eec-name { + type leafref { + path "/mef-global:mef-global/mef-global:" + + "profiles/mef-global:eec-names/" + + "mef-global:eec-name/mef-global:name"; + } + description + "EVC Per UNI: Egress Equivalence Class " + + "Identifier for this Bandwidth Profile Flow."; + reference "[MEF7.3] Section 12.1.2."; + } + leaf bw-profile { + type leafref { + path "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = " + + "current()/../../../uni-id]" + + "/mef-interfaces:egress-envelopes/" + + "mef-interfaces:envelope/" + + "mef-interfaces:env-id"; + } + mandatory true; + description + "EVC Per UNI: Egress Bandwidth Profile " + + "Envelope Per Equivance Class. If this " + + "parameter is not configured (ie. 'No') " + + "this setting is configured else at the " + + "UNI Level."; + reference "[MEF10.3] Section 10.6, Table 28. " + + "[MEF7.3] Section 12.1.2."; + } + } + } + container status { + description + "EVC Per UNI: This status group is related to " + + "the MEF 7.3 Service Endpoint"; + leaf oper-state-enabled { + type boolean; + default "false"; + config false; + description + "EVC Per UNI: Operational Status of the " + + "Virtual Connection as Enabled/Disabled."; + reference "[MEF15]. [MEF7.3] Section 11.2.1."; + } + leaf available-status { + type mef-types:svc-endpoint-availability-type; + default "not-installed"; + config false; + description + "EVC Per UNI: Availability Status of the " + + "Virtual Connection."; + reference "[MEF15]. [MEF7.3] Section 11.2.1."; + } + } + leaf uni-id { type leafref { path "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = " + - "current()/../../../uni-id]" + - "/mef-interfaces:ce-vlans/" + - "mef-interfaces:ce-vlan/" + - "mef-interfaces:vid"; + "mef-interfaces:unis/mef-interfaces:uni/" + + "mef-interfaces:uni-id"; } - must "not(current()/../../" + - "evc-uni-ce-vlan[2]) or " + - "(count(../../../../uni/evc-uni-ce-vlans/" + - "evc-uni-ce-vlan" + - "[vid = current()]) = " + - "count(../../../../uni))" { - error-message "If more than one CE-VLAN ID " + - "is configured for a UNI as part of " + - "an EVC, every CE VLAN-ID mapped to " + - "that EVC must be configured for all " + - "UNIs within that EVC."; + description + "EVC Per UNI: The UNI ID paired with the EVC ID " + + "in the containing list."; + reference "[MEF10.3] Section 8.3, Section 10.1. " + + "[MEF7.3] Section 12.1.2."; + } + leaf role { + type mef-types:evc-uni-role-type; + mandatory true; + description + "EVC Per UNI: The UNI Role MUST have the value " + + "of either 'root' or 'leaf'."; + reference "[MEF10.3] [R4], [R5], [R10], [R11], " + + "[R12]. [MEF7.3] Section 12.2.2."; + } + leaf admin-state-enabled { + type boolean; + default "true"; + description + "EVC Per UNI: Locked/Unlocked is inconsistent " + + "with Oper Status and will be confusing."; + reference "[MEF15]. [MEF7.3] Section 11.2.1."; + } + leaf color-id { + type mef-types:cos-color-identifier-type; + description + "EVC Per UNI: The Color Identifier for " + + "Service Frames."; + reference "[MEF10.3] Section 10.3. " + + "[MEF7.3] Section 12.1.2."; + } + leaf data-svc-frm-cos { + type leafref { + path "/mef-global:mef-global/mef-global:profiles/" + + "mef-global:cos/mef-global:cos-profile/" + + "mef-global:id"; + } + must "not(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:cos/" + + "mef-global:cos-profile" + + "[mef-global:id = current()]" + + "/mef-global:cos-pcp) or " + + "((/mef-global:mef-global/mef-global:" + + "profiles/mef-global:cos/" + + "mef-global:cos-profile" + + "[mef-global:id = current()]" + + "/mef-global:cos-pcp) and " + + "((../color-id = 'pcp') or " + + "(../color-id = 'dei')) )" { + error-message "When the Class of Service " + + "Identifier is based on PCP for a " + + "given EVC at a given UNI, the Color " + + "Identifier must be based on either " + + "DEI or PCP."; + description + "When the Class of Service Identifier is " + + "based on PCP for a given EVC at a given UNI, " + + "the Color Identifier must be based on either " + + "DEI or PCP."; + } + must "not(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:cos/mef-global:" + + "cos-profile" + + "[mef-global:id = current()]/mef-global:" + + "cos-dscp) or " + + "((/mef-global:mef-global/mef-global:" + + "profiles/mef-global:cos/mef-global:" + + "cos-profile" + + "[mef-global:id = current()]/mef-global:" + + "cos-dscp) and " + + "(../color-id = 'dscp'))" { + error-message "When the Class of Service " + + "Identifier is based on DSCP for a " + + "given EVC at a given UNI, the Color " + + "Identifier must be based DSCP."; description - "If more than one CE-VLAN ID is configured " + - "for a UNI as part of an EVC, every " + - "CE VLAN-ID mapped to that EVC must be " + - "configured for all UNIs within that EVC."; + "When the Class of Service Identifier is based " + + "on DSCP for a given EVC at a given UNI, the " + + "Color Identifier must be based DSCP."; } description - "VLAN Identifier."; + "EVC Per UNI: Ingress Data Service Frame " + + "CoS Profile."; + reference "[MEF10.3] Section 8.8, Section 10.2. " + + "[MEF7.3] Section 12.1.2."; } - } - } - container ingress-bwp-flows-per-cos { - presence "Use Ingress Bandwidth Profiles Per CoS"; - description - "EVC Per UNI Class of Service Identifiers " + - "corresponding to this EVC's Ingress Bandwidth " + - "Profile Flows."; - leaf coupling-enabled { - type boolean; - default "false"; - description - "EVC Per UNI Envelope Coupling Flag (CF) " + - "attribute."; - reference "[MEF10.3] Section 12.1."; - } - list bwp-flow-per-cos { - key "cos-name"; - description - "EVC Per UNI: The list of Class of Service " + - "Identifiers corresponding to this UNI's " + - "Ingress Bandwidth Profile Flow."; - leaf cos-name { + leaf l2cp-svc-frm-cos { type leafref { path "/mef-global:mef-global/mef-global:" + - "profiles/mef-global:cos-names/" + - "mef-global:cos-name/mef-global:name"; + "profiles/mef-global:l2cp-cos/mef-global:" + + "l2cp-profile/mef-global:id"; + } + description + "EVC Per UNI: Ingress Layer 2 Control Protocol " + + "Processing."; + reference "[MEF10.3] Section 8.8, Section 10.2. " + + "[MEF7.3] Section 12.1.2."; + } + leaf soam-svc-frm-cos { + type leafref { + path "/mef-global:mef-global/mef-global:profiles/" + + "mef-global:cos/mef-global:cos-profile/" + + "mef-global:id"; + } + must "(not(.) and not(../data-svc-frm-cos)) or " + + "(. = ../data-svc-frm-cos)" { + error-message "For a given EVC at a given UNI, " + + "the basis for the Class of Service " + + "Identifier for ingress SOAM Service " + + "Frames must be the same as that for " + + "ingress Data Service Frames."; + description + "For a given EVC at a given UNI, the basis " + + "for the Class of Service Identifier for " + + "ingress SOAM Service Frames must be the " + + "same as that for ingress Data Service Frames."; } description - "EVC Per UNI: Class of Service Identifier " + - "for this Bandwidth Profile Flow."; + "EVC Per UNI: Ingress SOAM Service Frames."; reference "[MEF7.3] Section 12.1.2."; } - leaf bw-profile { + leaf data-svc-frm-eec { type leafref { - path "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = " + - "current()/../../../uni-id]" + - "/mef-interfaces:ingress-envelopes/" + - "mef-interfaces:envelope/" + - "mef-interfaces:env-id"; + path "/mef-global:mef-global/mef-global:profiles/" + + "mef-global:eec/mef-global:eec-profile/" + + "mef-global:id"; + } + must "not(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:eec/mef-global:" + + "eec-profile" + + "[mef-global:id = current()]" + + "/mef-global:eec-pcp) or " + + "((/mef-global:mef-global/mef-global:" + + "profiles/mef-global:eec/mef-global:" + + "eec-profile" + + "[mef-global:id = current()]" + + "/mef-global:eec-pcp) and " + + "((../color-id = 'pcp') or " + + "(../color-id = 'dei')) )" { + error-message "When the Egress Equivalence " + + "Class Identifier is based on PCP " + + "for a given EVC at a given UNI, " + + "the Color Identifier must be based " + + "on either DEI or PCP."; + description + "When the Egress Equivalence Class Identifier " + + "is based on PCP for a given EVC at a " + + "given UNI, the Color Identifier must " + + "be based on either DEI or PCP."; + } + must "not(/mef-global:mef-global/mef-global:" + + "profiles/mef-global:eec/mef-global:" + + "eec-profile" + + "[mef-global:id = current()]" + + "/mef-global:eec-dscp) or " + + "((/mef-global:mef-global/mef-global:" + + "profiles/mef-global:eec/mef-global:" + + "eec-profile" + + "[mef-global:id = current()]" + + "/mef-global:eec-dscp) and " + + "(../color-id = 'dscp'))" { + error-message "When the Egress Equivalence " + + "Class Identifier is based on DSCP for " + + "a given EVC at a given UNI, the Color " + + "Identifier must be based DSCP."; + description + "When the Egress Equivalence Class Identifier " + + "is based on DSCP for a given EVC at a given " + + "UNI, the Color Identifier must be based DSCP."; } - mandatory true; description - "EVC Per UNI: Ingress Bandwidth Profile " + - "Envelope Per CoS ID. If this parameter " + - "is not configured (ie. 'No') this " + - "setting is configured else at the " + - "UNI Level."; - reference "[MEF10.3] Section 10.6, Table 28. " + - "[MEF7.3] Section 12.1.2."; + "EVC Per UNI: Egress Data Service Frame Processing."; + reference "[MEF10.3] Section 10.4. " + + "[MEF7.3] Section 12.1.2."; } - } - } - container egress-bwp-flows-per-eec { - presence "Using Egress Bandwidth Profiles Per " + - "Egress Equivalence Class"; - description - "EVC Per UNI: The Egress Equivalence Class " + - "Identifiers corresponding to this EVC's Egress " + - "Bandwidth Profile Flows."; - leaf coupling-enabled { - type boolean; - default "false"; - description - "EVC Per UNI: The Envelope Coupling Flag (CF) " + - "attribute."; - reference "[MEF10.3] Section 12.1."; - } - list bwp-flow-per-eec { - key "eec-name"; - description - "EVC Per UNI: The list of Egress Equivalence " + - "Class Identifiers corresponding to this " + - "EVC's Egress Bandwidth Profile Flow."; - leaf eec-name { + leaf l2cp-svc-frm-eec { + type leafref { + path "/mef-global:mef-global/mef-global:profiles/" + + "mef-global:l2cp-eec/mef-global:" + + "l2cp-profile/mef-global:id"; + } + description + "EVC Per UNI: Egress Layer 2 Control Protocol " + + "Processing."; + reference "[MEF10.3] Section 10.4. " + + "[MEF7.3] Section 12.1.2."; + } + leaf soam-svc-frm-eec { type leafref { path "/mef-global:mef-global/mef-global:" + - "profiles/mef-global:eec-names/" + - "mef-global:eec-name/mef-global:name"; + "profiles/mef-global:eec/mef-global:" + + "eec-profile/mef-global:id"; + } + must "(not(.) and not(../data-svc-frm-eec)) or " + + "(. = ../data-svc-frm-eec)" { + error-message "For a given EVC at a given UNI, " + + "the basis for the Egress Equivalence " + + "Class Identifier for egress SOAM " + + "Service Frames must be the same as " + + "that for egress Data Service Frames."; + description + "For a given EVC at a given UNI, the basis " + + "for the Egress Equivalence Class Identifier " + + "for egress SOAM Service Frames must be " + + "the same as that for egress Data " + + "Service Frames."; } description - "EVC Per UNI: Egress Equivalence Class " + - "Identifier for this Bandwidth Profile Flow."; - reference "[MEF7.3] Section 12.1.2."; + "EVC Per UNI: Egress SOAM Service Frames."; + reference "[MEF10.3] Section 10.4. " + + "[MEF7.3] Section 12.1.2."; } - leaf bw-profile { + leaf ingress-bw-profile-per-evc { type leafref { path "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = " + - "current()/../../../uni-id]" + - "/mef-interfaces:egress-envelopes/" + - "mef-interfaces:envelope/" + - "mef-interfaces:env-id"; + "mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = " + + "current()/../uni-id]" + + "/mef-interfaces:ingress-envelopes/" + + "mef-interfaces:envelope/" + + "mef-interfaces:env-id"; } - mandatory true; description - "EVC Per UNI: Egress Bandwidth Profile " + - "Envelope Per Equivance Class. If this " + - "parameter is not configured (ie. 'No') " + - "this setting is configured else at the " + - "UNI Level."; - reference "[MEF10.3] Section 10.6, Table 28. " + - "[MEF7.3] Section 12.1.2."; + "EVC Per UNI: Ingress Bandwidth Profile " + + "Envelope Per EVC. If this parameter is " + + "not configured (ie. 'No') this setting " + + "is configured else at the UNI Level."; + reference "[MEF10.3] Section 10.5. " + + "[MEF7.3] Section 12.1.2."; + } + leaf egress-bw-profile-per-evc { + type leafref { + path "/mef-interfaces:mef-interfaces/" + + "mef-interfaces:unis/" + + "mef-interfaces:uni" + + "[mef-interfaces:uni-id = " + + "current()/../uni-id]" + + "/mef-interfaces:egress-envelopes/" + + "mef-interfaces:envelope/mef-interfaces:" + + "env-id"; + } + description + "EVC Per UNI: Egress Bandwidth Profile Envelope " + + "Per EVC. If this parameter is not configured " + + "(ie. 'No') this setting is configured else at " + + "the UNI Level."; + reference "[MEF10.3] Section 10.7. " + + "[MEF7.3] Section 12.1.2."; + } + leaf src-mac-addr-limit-enabled { + type boolean; + default "false"; + description + "EVC Per UNI: Source MAC Address Limit " + + "Enable / Disable. If Enabled, the values " + + "for the Source MAC Address Limit and Source " + + "MAC Address Interval must be set."; + reference "[MEF10.3] Section 10.9. " + + "[MEF7.3] Section 12.1.2."; + } + leaf src-mac-addr-limit { + type uint32 { + range "1..max"; + } + description + "EVC Per UNI: Source MAC Address Limit. " + + "This value is used when the Source MAC Address " + + "Limit Enabled is true."; + reference "[MEF10.3] Section 10.9."; + } + leaf src-mac-addr-limit-interval { + type yang:timeticks; + default "0"; + description + "EVC Per UNI: Source MAC Address Limit " + + "Interval. This value is used when the " + + "Source MAC Address Limit Enabled is true."; + reference "[MEF10.3] Section 10.9."; + } + leaf test-meg-enabled { + type boolean; + default "false"; + description + "EVC Per UNI: Test MEG Enabled / Disabled."; + reference "[MEF10.3] Section 10.10. " + + "[MEF7.3] Section 12.1.2."; + } + leaf test-meg { + type mef-types:identifier45; + description + "EVC Per UNI: Test MEG Identifier."; + reference "[MEF7.3] Section 12.1.2."; + } + leaf subscriber-meg-mip-enabled { + type boolean; + default "false"; + description + "EVC Per UNI: Subscriber MEG MIP " + + "Enabled / Disabled."; + reference "[MEF10.3] Section 10.11. " + + "[MEF7.3] Section 12.1.2."; + } + leaf subscriber-meg-mip { + type mef-types:identifier45; + description + "EVC Per UNI: Subscriber MEG MIP Identifier."; + reference "[MEF7.3] Section 12.1.2."; } } } container status { description - "EVC Per UNI: This status group is related to " + - "the MEF 7.3 Service Endpoint"; + "This status group is related to the MEF 7.3 Virtual " + + "Connection"; leaf oper-state-enabled { type boolean; default "false"; config false; description - "EVC Per UNI: Operational Status of the " + - "Virtual Connection as Enabled/Disabled."; - reference "[MEF15]. [MEF7.3] Section 11.2.1."; + "EVC Operational Status of the Virtual Connection " + + "as Enabled/Disabled."; + reference "[MEF7.3] Section 11.1.1."; } leaf available-status { - type mef-types:svc-endpoint-availability-type; + type mef-types:virt-cx-availability-type; default "not-installed"; config false; description - "EVC Per UNI: Availability Status of the " + - "Virtual Connection."; - reference "[MEF15]. [MEF7.3] Section 11.2.1."; + "EVC Availability Status of the Virtual Connection."; + reference "[MEF7.3] Section 11.1.1."; } } - leaf uni-id { - type leafref { - path "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/mef-interfaces:uni/" + - "mef-interfaces:uni-id"; + container sls-inclusions-by-cos { + description + "SLS Inclusions by CoS: For this EVC, the following " + + "CoS Names/Labels are applicable."; + list sls-inclusion-by-cos { + key "cos-name"; + description + "CoS Name."; + leaf cos-name { + type leafref { + path "/mef-global:mef-global/mef-global:profiles/" + + "mef-global:cos-names/mef-global:" + + "cos-name/mef-global:name"; + } + description + "EVC: This attribute identifies the name of " + + "a class of service (CoS) instance to be used " + + "for EVC Performance."; + } } + } + container sls-uni-inclusions { + presence "EVC: Defines the EVC Flow Points (UNI) Pairs " + + "that must conform to the EVC's SLS Performance " + + "Metrics."; description - "EVC Per UNI: The UNI ID paired with the EVC ID " + - "in the containing list."; - reference "[MEF10.3] Section 8.3, Section 10.1. " + - "[MEF7.3] Section 12.1.2."; + "SLS UNI Inclusions List. The following pairs of UNI " + + "Interconnections are to required to meet the " + + "SLS Performance Objectives. Configing both SLS " + + "UNI Inclusions and SLS UNI Exclusions is not " + + "permitted."; + list sls-uni-inclusion-set { + must "uni-id1 != uni-id2" { + error-message "The two UNI IDs for a given " + + "inclusion cannot be the same."; + description + "The two UNI IDs for a given inclusion " + + "cannot be the same."; + } + must "(../../evc-type != 'rooted-multipoint') or " + + "((../../evc-type = 'rooted-multipoint') " + + "and " + + "not((../../unis/uni[uni-id = " + + "current()/uni-id1]/role = 'leaf') and " + + "(../../unis/uni[uni-id = current()/uni-id2]" + + "/role = 'leaf')))" { + error-message "If EVC Type is Rooted-Multipoint, " + + "sls-uni-inclusion UNI Pairs cannot both " + + "be role 'leaf'."; + description + "If EVC Type is Rooted-Multipoint, " + + "sls-uni-inclusion UNI Pairs cannot " + + "both be role 'leaf'."; + } + key "pm-type pm-id uni-id1 uni-id2"; + description + "EVC: Defines the EVC Flow Points (UNI) Pairs that " + + "must conform to the EVC's SLS Performance " + + "Metrics. Use of this list indicates that a " + + "complete set of UNI Pairs has been specified " + + "for the Performance Metrics defined in the " + + "selected SLS."; + leaf pm-type { + type leafref { + path "/mef-global:mef-global/mef-global:slss/" + + "mef-global:sls" + + "[mef-global:sls-id = current()/../../../" + + "evc-performance-sls]" + + "/mef-global:perf-objs/mef-global:" + + "perf-obj/mef-global:pm-type"; + } + description + "EVC: Performance Metric."; + reference "[MEF10.3] Section 8.8."; + } + leaf pm-id { + type leafref { + path "/mef-global:mef-global/mef-global:slss/" + + "mef-global:sls" + + "[mef-global:sls-id = current()/../../../" + + "evc-performance-sls]" + + "/mef-global:perf-objs/mef-global:perf-obj" + + "[mef-global:pm-type = current()/../" + + "pm-type]" + + "/mef-global:pm-id"; + } + description + "EVC: This is a friendly name for specific " + + "performance profile."; + } + leaf uni-id1 { + type leafref { + path "../../../unis/uni/uni-id"; + } + description + "EVC: The UNI ID paired with the EVC ID in the " + + "containing list."; + reference "[MEF10.3] Section 8.3, Section 10.1. " + + "[MEF7.3] Section 12.1.2."; + } + leaf uni-id2 { + type leafref { + path "../../../unis/uni/uni-id"; + } + description + "EVC: The UNI ID paired with the EVC ID in the " + + "containing list."; + reference "[MEF10.3] Section 8.3, Section 10.1. " + + "[MEF7.3] Section 12.1.2."; + } + } } - leaf role { - type mef-types:evc-uni-role-type; - mandatory true; + container sls-uni-exclusions { + presence "Not all EVC Flow Points (UNI) must conform " + + "to the EVC SLS Performance Metrics."; description - "EVC Per UNI: The UNI Role MUST have the value " + - "of either 'root' or 'leaf'."; - reference "[MEF10.3] [R4], [R5], [R10], [R11], " + - "[R12]. [MEF7.3] Section 12.2.2."; + "EVC: Not all EVC Flow Points (UNI) must conform to " + + "the EVC SLS Performance Metrics. Use of this " + + "list indicates that all UNI Pairs EXCEPT for " + + "the ones indicated (per Performance Metric) must " + + "conform to the SLS."; + list sls-uni-exclusion-set { + must "uni-id1 != uni-id2" { + error-message "The two UNI IDs for a given " + + "exclusion cannot be the same."; + description + "The two UNI IDs for a given exclusion cannot " + + "be the same as these pairs are invalid as " + + "defined in MEF 10.3."; + } + key "pm-type pm-id uni-id1 uni-id2"; + description + "SLS UNI Exclusions List. The following pairs " + + "of UNI Interconnections are not required " + + "meet the SLS Performance Objectives. " + + "Configing both SLS UNI Inclusions and SLS " + + "UNI Exclusions is not permitted."; + leaf pm-type { + type leafref { + path "/mef-global:mef-global/mef-global:" + + "slss/mef-global:sls" + + "[mef-global:sls-id = current()/../../../" + + "evc-performance-sls]" + + "/mef-global:perf-objs/mef-global:" + + "perf-obj/mef-global:pm-type"; + } + description + "EVC: Performance Metric."; + reference "[MEF10.3] Section 8.8."; + } + leaf pm-id { + type leafref { + path "/mef-global:mef-global/mef-global:slss/" + + "mef-global:sls" + + "[mef-global:sls-id = current()/../../../" + + "evc-performance-sls]" + + "/mef-global:perf-objs/mef-global:perf-obj" + + "[mef-global:pm-type = current()/../" + + "pm-type]" + + "/mef-global:pm-id"; + } + description + "EVC: This is a friendly name for specific " + + "performance profile."; + } + leaf uni-id1 { + type leafref { + path "../../../unis/uni/uni-id"; + } + description + "EVC: The UNI ID paired with the EVC ID in the " + + "containing list."; + reference "[MEF10.3] Section 8.3, Section 10.1. " + + "[MEF7.3] Section 12.1.2."; + } + leaf uni-id2 { + type leafref { + path "../../../unis/uni/uni-id"; + } + description + "EVC: The UNI ID paired with the EVC ID in the " + + "containing list."; + reference "[MEF10.3] Section 8.3, Section 10.1. " + + "[MEF7.3] Section 12.1.2."; + } + } } - leaf admin-state-enabled { - type boolean; - default "true"; + leaf evc-id { + type mef-types:evc-id-type; + mandatory true; description - "EVC Per UNI: Locked/Unlocked is inconsistent " + - "with Oper Status and will be confusing."; - reference "[MEF15]. [MEF7.3] Section 11.2.1."; + "The EVC ID must be unique across all EVCs in the CEN." + + " The EVC ID must be non-NULL."; + reference "[MEF10.3] Section 8.2 [R7]. " + + "[MEF7.3] Section 11.1.1, Section 12.2.2."; } - leaf color-id { - type mef-types:cos-color-identifier-type; + leaf evc-status { + type mef-types:evc-status-type; + config false; description - "EVC Per UNI: The Color Identifier for " + - "Service Frames."; - reference "[MEF10.3] Section 10.3. " + - "[MEF7.3] Section 12.1.2."; + "EVC Operational Status."; + reference "[MEF16] Section 5.3."; } - leaf data-svc-frm-cos { - type leafref { - path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:cos/mef-global:cos-profile/" + - "mef-global:id"; - } - must "not(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:cos/" + - "mef-global:cos-profile" + - "[mef-global:id = current()]" + - "/mef-global:cos-pcp) or " + - "((/mef-global:mef-global/mef-global:" + - "profiles/mef-global:cos/" + - "mef-global:cos-profile" + - "[mef-global:id = current()]" + - "/mef-global:cos-pcp) and " + - "((../color-id = 'pcp') or " + - "(../color-id = 'dei')) )" { - error-message "When the Class of Service " + - "Identifier is based on PCP for a " + - "given EVC at a given UNI, the Color " + - "Identifier must be based on either " + - "DEI or PCP."; + leaf evc-type { + type mef-types:evc-type; + must "(. != 'point-to-point') or " + + "((. = 'point-to-point') and " + + "(count(../unis/uni[role = 'leaf']) = 0))" { + error-message "If EVC Type is Point-to-Point, all " + + "UNI Roles must be root."; description - "When the Class of Service Identifier is " + - "based on PCP for a given EVC at a given UNI, " + - "the Color Identifier must be based on either " + - "DEI or PCP."; + "If EVC Type is Point-to-Point, all UNI Roles must " + + "be root."; } - must "not(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:cos/mef-global:" + - "cos-profile" + - "[mef-global:id = current()]/mef-global:" + - "cos-dscp) or " + - "((/mef-global:mef-global/mef-global:" + - "profiles/mef-global:cos/mef-global:" + - "cos-profile" + - "[mef-global:id = current()]/mef-global:" + - "cos-dscp) and " + - "(../color-id = 'dscp'))" { - error-message "When the Class of Service " + - "Identifier is based on DSCP for a " + - "given EVC at a given UNI, the Color " + - "Identifier must be based DSCP."; + must "(. != 'multipoint-to-multipoint') or " + + "((. = 'multipoint-to-multipoint') and " + + "(count(../unis/uni[role = 'leaf']) = 0))" { + error-message "If EVC Type is " + + "Multipoint-to-Multipoint, all UNI Roles " + + "must be root."; description - "When the Class of Service Identifier is based " + - "on DSCP for a given EVC at a given UNI, the " + - "Color Identifier must be based DSCP."; - } - description - "EVC Per UNI: Ingress Data Service Frame " + - "CoS Profile."; - reference "[MEF10.3] Section 8.8, Section 10.2. " + - "[MEF7.3] Section 12.1.2."; - } - leaf l2cp-svc-frm-cos { - type leafref { - path "/mef-global:mef-global/mef-global:" + - "profiles/mef-global:l2cp-cos/mef-global:" + - "l2cp-profile/mef-global:id"; + "If EVC Type is Multipoint-to-Multipoint, all UNI " + + "Roles must be root."; } - description - "EVC Per UNI: Ingress Layer 2 Control Protocol " + - "Processing."; - reference "[MEF10.3] Section 8.8, Section 10.2. " + - "[MEF7.3] Section 12.1.2."; - } - leaf soam-svc-frm-cos { - type leafref { - path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:cos/mef-global:cos-profile/" + - "mef-global:id"; - } - must "(not(.) and not(../data-svc-frm-cos)) or " + - "(. = ../data-svc-frm-cos)" { - error-message "For a given EVC at a given UNI, " + - "the basis for the Class of Service " + - "Identifier for ingress SOAM Service " + - "Frames must be the same as that for " + - "ingress Data Service Frames."; + must "(. != 'rooted-multipoint') or " + + "((. = 'rooted-multipoint') and " + + "(count(../unis/uni[role = 'root']) > 0) )" { + error-message "If EVC Type is Rooted-Multipoint, one " + + "or more UNI Roles must be root."; description - "For a given EVC at a given UNI, the basis " + - "for the Class of Service Identifier for " + - "ingress SOAM Service Frames must be the " + - "same as that for ingress Data Service Frames."; + "If EVC Type is Rooted-Multipoint, one or more " + + "UNI Roles must be root."; } - description - "EVC Per UNI: Ingress SOAM Service Frames."; - reference "[MEF7.3] Section 12.1.2."; - } - leaf data-svc-frm-eec { - type leafref { - path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:eec/mef-global:eec-profile/" + - "mef-global:id"; + must "(. != 'point-to-point') or " + + "((. = 'point-to-point') and " + + "(count(../unis/uni) = 2))" { + error-message "If EVC Type is Point-to-Point, there " + + "must be exactly 2 UNI configured for the EVC."; + description + "If EVC Type is Point-to-Point, there must be " + + "exactly 2 UNI configured for the EVC."; } - must "not(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:eec/mef-global:" + - "eec-profile" + - "[mef-global:id = current()]" + - "/mef-global:eec-pcp) or " + - "((/mef-global:mef-global/mef-global:" + - "profiles/mef-global:eec/mef-global:" + - "eec-profile" + - "[mef-global:id = current()]" + - "/mef-global:eec-pcp) and " + - "((../color-id = 'pcp') or " + - "(../color-id = 'dei')) )" { - error-message "When the Egress Equivalence " + - "Class Identifier is based on PCP " + - "for a given EVC at a given UNI, " + - "the Color Identifier must be based " + - "on either DEI or PCP."; + must "(. != 'multipoint-to-multipoint') or " + + "((. = 'multipoint-to-multipoint') and " + + "(count(../unis/uni) > 1) and " + + "(count(../unis/uni) <= ../max-uni-count))" { + error-message "If EVC Type is " + + "Multipoint-to-Multipoint, " + + "there must be 2 or more UNI configured " + + "for the EVC."; description - "When the Egress Equivalence Class Identifier " + - "is based on PCP for a given EVC at a " + - "given UNI, the Color Identifier must " + - "be based on either DEI or PCP."; + "If EVC Type is Multipoint-to-Multipoint, " + + "there must be 2 or more UNI configured for " + + "the EVC."; } - must "not(/mef-global:mef-global/mef-global:" + - "profiles/mef-global:eec/mef-global:" + - "eec-profile" + - "[mef-global:id = current()]" + - "/mef-global:eec-dscp) or " + - "((/mef-global:mef-global/mef-global:" + - "profiles/mef-global:eec/mef-global:" + - "eec-profile" + - "[mef-global:id = current()]" + - "/mef-global:eec-dscp) and " + - "(../color-id = 'dscp'))" { - error-message "When the Egress Equivalence " + - "Class Identifier is based on DSCP for " + - "a given EVC at a given UNI, the Color " + - "Identifier must be based DSCP."; + must "(. != 'rooted-multipoint') or " + + "((. = 'rooted-multipoint') and " + + "(count(../unis/uni) > 1) and " + + "(count(../unis/uni) <= ../max-uni-count))" { + error-message "If EVC Type is Rooted-Multipoint, " + + "there must be 2 or more UNI configured for the EVC."; description - "When the Egress Equivalence Class Identifier " + - "is based on DSCP for a given EVC at a given " + - "UNI, the Color Identifier must be based DSCP."; + "If EVC Type is Rooted-Multipoint, there must " + + "be 2 or more UNI configured for the EVC."; } - description - "EVC Per UNI: Egress Data Service Frame Processing."; - reference "[MEF10.3] Section 10.4. " + - "[MEF7.3] Section 12.1.2."; - } - leaf l2cp-svc-frm-eec { - type leafref { - path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:l2cp-eec/mef-global:" + - "l2cp-profile/mef-global:id"; + must "(. != 'point-to-point') or " + + "((. = 'point-to-point') and " + + "(../max-uni-count = 2))" { + error-message "If EVC Type is Point-to-Point, " + + "the value of max-uni-count must be 2."; + description + "If EVC Type is Point-to-Point, the value of " + + "max-uni-count must be 2."; } - description - "EVC Per UNI: Egress Layer 2 Control Protocol " + - "Processing."; - reference "[MEF10.3] Section 10.4. " + - "[MEF7.3] Section 12.1.2."; - } - leaf soam-svc-frm-eec { - type leafref { - path "/mef-global:mef-global/mef-global:" + - "profiles/mef-global:eec/mef-global:" + - "eec-profile/mef-global:id"; + must "(. != 'multipoint-to-multipoint') or " + + "((. = 'multipoint-to-multipoint') and " + + "(../max-uni-count > 2))" { + error-message "If EVC Type is " + + "Multipoint-to-Multipoint, the value of " + + "max-uni-count must be at least 3."; + description + "If EVC Type is Multipoint-to-Multipoint, the " + + "value of max-uni-count must be at least 3."; } - must "(not(.) and not(../data-svc-frm-eec)) or " + - "(. = ../data-svc-frm-eec)" { - error-message "For a given EVC at a given UNI, " + - "the basis for the Egress Equivalence " + - "Class Identifier for egress SOAM " + - "Service Frames must be the same as " + - "that for egress Data Service Frames."; + must "(. != 'rooted-multipoint') or " + + "((. = 'rooted-multipoint') and " + + "(../max-uni-count > 2))" { + error-message "If EVC Type is Rooted-Multipoint, " + + "the value of max-uni-count must be at " + + "least 3."; description - "For a given EVC at a given UNI, the basis " + - "for the Egress Equivalence Class Identifier " + - "for egress SOAM Service Frames must be " + - "the same as that for egress Data " + - "Service Frames."; + "If EVC Type is Rooted-Multipoint, the value " + + "of max-uni-count must be at least 3."; } + // mandatory true; description - "EVC Per UNI: Egress SOAM Service Frames."; - reference "[MEF10.3] Section 10.4. " + - "[MEF7.3] Section 12.1.2."; + "This EVC attribute describes the EVC as either " + + "Multipoint-To-Multipoint, Point-To-Point, or " + + "Rooted-Multipoint."; + reference "[MEF10.3] Section 8.1, [R4], [R5], " + + "[R10], [R11], [R12], [R13] and [R14]. " + + "[MEF7.3] Section 12.2.2."; } - leaf ingress-bw-profile-per-evc { - type leafref { - path "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = " + - "current()/../uni-id]" + - "/mef-interfaces:ingress-envelopes/" + - "mef-interfaces:envelope/" + - "mef-interfaces:env-id"; - } + leaf admin-state-enabled { + type boolean; + default "true"; description - "EVC Per UNI: Ingress Bandwidth Profile " + - "Envelope Per EVC. If this parameter is " + - "not configured (ie. 'No') this setting " + - "is configured else at the UNI Level."; - reference "[MEF10.3] Section 10.5. " + - "[MEF7.3] Section 12.1.2."; + "EVC: Locked/Unlocked is inconsistent with " + + "Oper Status and will be confusing."; + reference "[MEF15]. [MEF7.3] Section 11.1.1."; } - leaf egress-bw-profile-per-evc { - type leafref { - path "/mef-interfaces:mef-interfaces/" + - "mef-interfaces:unis/" + - "mef-interfaces:uni" + - "[mef-interfaces:uni-id = " + - "current()/../uni-id]" + - "/mef-interfaces:egress-envelopes/" + - "mef-interfaces:envelope/mef-interfaces:" + - "env-id"; - } + leaf elastic-enabled { + type boolean; + default "true"; description - "EVC Per UNI: Egress Bandwidth Profile Envelope " + - "Per EVC. If this parameter is not configured " + - "(ie. 'No') this setting is configured else at " + - "the UNI Level."; - reference "[MEF10.3] Section 10.7. " + - "[MEF7.3] Section 12.1.2."; + "EVC: Elastic Enabled/Disabled."; + reference "[MEF7.3] Section 11.1.1."; } - leaf src-mac-addr-limit-enabled { - type boolean; - default "false"; + leaf elastic-service { + type mef-types:identifier45; description - "EVC Per UNI: Source MAC Address Limit " + - "Enable / Disable. If Enabled, the values " + - "for the Source MAC Address Limit and Source " + - "MAC Address Interval must be set."; - reference "[MEF10.3] Section 10.9. " + - "[MEF7.3] Section 12.1.2."; + "EVC: Related to CE4Cloud Information Model."; + reference "[MEF7.3] Section 11.1.1."; } - leaf src-mac-addr-limit { + leaf max-uni-count { type uint32 { - range "1..max"; + range "2..max"; + } + must "(. > 2) or ((. = 2) and " + + "(../evc-type = 'point-to-point'))" { + error-message "If EVC Type is Point-to-Point, the " + + "max-uni-count value must be 2."; + description + "If EVC Type is Point-to-Point, the max-uni-count " + + "value must be 2."; } + must "(. = 2) or ((. > 2) and " + + "((../evc-type = 'multipoint-to-multipoint') or " + + "(../evc-type = 'rooted-multipoint')))" { + error-message "If EVC Type is " + + "Multipoint-to-Multipoint or " + + "Rooted-Multipoint, the max-uni-count value " + + "must be at least 3."; + description + "If EVC Type is Multipoint-to-Multipoint or " + + "Rooted-Multipoint, the max-uni-count value " + + "must be at least 3."; + } + default "2"; description - "EVC Per UNI: Source MAC Address Limit. " + - "This value is used when the Source MAC Address " + - "Limit Enabled is true."; - reference "[MEF10.3] Section 10.9."; + "EVC:The Maximum Number of UNIs this EVC can be " + + "configured for (Default 2).If EVC Type is " + + "Multipoint-to-Multipoint or Rooted-Multipoint, " + + "the max-uni-count value must be at least 3. " + + "This value must be 2 for point-to-point mode."; + reference "[MEF10.3] [R14]. [MEF7.3] Section 12.2.2."; } - leaf src-mac-addr-limit-interval { - type yang:timeticks; - default "0"; - description - "EVC Per UNI: Source MAC Address Limit " + - "Interval. This value is used when the " + - "Source MAC Address Limit Enabled is true."; - reference "[MEF10.3] Section 10.9."; + leaf preserved-vlan { + type uint32; } - leaf test-meg-enabled { + leaf preserve-ce-vlan-id { type boolean; default "false"; description - "EVC Per UNI: Test MEG Enabled / Disabled."; - reference "[MEF10.3] Section 10.10. " + - "[MEF7.3] Section 12.1.2."; + "EVC:An EVC with more than one CE-VLAN ID mapping " + + "to it must have the same list of CE-VLAN IDs " + + "mapping to the EVC at each UNI in the EVC."; + reference "[MEF10.3] Section 8.6.1, [R24] [R25], " + + "Section 9.10.2, Section 9.12, [R81], Figure 20. " + + "[MEF7.3] Section 12.2.2."; } - leaf test-meg { - type mef-types:identifier45; - description - "EVC Per UNI: Test MEG Identifier."; - reference "[MEF7.3] Section 12.1.2."; - } - leaf subscriber-meg-mip-enabled { + leaf cos-preserve-ce-vlan-id { type boolean; default "false"; description - "EVC Per UNI: Subscriber MEG MIP " + - "Enabled / Disabled."; - reference "[MEF10.3] Section 10.11. " + - "[MEF7.3] Section 12.1.2."; - } - leaf subscriber-meg-mip { - type mef-types:identifier45; - description - "EVC Per UNI: Subscriber MEG MIP Identifier."; - reference "[MEF7.3] Section 12.1.2."; - } - } - } - container status { - description - "This status group is related to the MEF 7.3 Virtual " + - "Connection"; - leaf oper-state-enabled { - type boolean; - default "false"; - config false; - description - "EVC Operational Status of the Virtual Connection " + - "as Enabled/Disabled."; - reference "[MEF7.3] Section 11.1.1."; - } - leaf available-status { - type mef-types:virt-cx-availability-type; - default "not-installed"; - config false; - description - "EVC Availability Status of the Virtual Connection."; - reference "[MEF7.3] Section 11.1.1."; - } - } - container sls-inclusions-by-cos { - description - "SLS Inclusions by CoS: For this EVC, the following " + - "CoS Names/Labels are applicable."; - list sls-inclusion-by-cos { - key "cos-name"; - description - "CoS Name."; - leaf cos-name { - type leafref { - path "/mef-global:mef-global/mef-global:profiles/" + - "mef-global:cos-names/mef-global:" + - "cos-name/mef-global:name"; - } - description - "EVC: This attribute identifies the name of " + - "a class of service (CoS) instance to be used " + - "for EVC Performance."; - } - } - } - container sls-uni-inclusions { - presence "EVC: Defines the EVC Flow Points (UNI) Pairs " + - "that must conform to the EVC's SLS Performance " + - "Metrics."; - description - "SLS UNI Inclusions List. The following pairs of UNI " + - "Interconnections are to required to meet the " + - "SLS Performance Objectives. Configing both SLS " + - "UNI Inclusions and SLS UNI Exclusions is not " + - "permitted."; - list sls-uni-inclusion-set { - must "uni-id1 != uni-id2" { - error-message "The two UNI IDs for a given " + - "inclusion cannot be the same."; - description - "The two UNI IDs for a given inclusion " + - "cannot be the same."; + "EVC: Preserve CE-VLAN ID for CoS."; + reference "[MEF10.3] Section 8.6.2, [R26]. " + + "[MEF7.3] Section 12.2.2."; } - must "(../../evc-type != 'rooted-multipoint') or " + - "((../../evc-type = 'rooted-multipoint') " + - "and " + - "not((../../unis/uni[uni-id = " + - "current()/uni-id1]/role = 'leaf') and " + - "(../../unis/uni[uni-id = current()/uni-id2]" + - "/role = 'leaf')))" { - error-message "If EVC Type is Rooted-Multipoint, " + - "sls-uni-inclusion UNI Pairs cannot both " + - "be role 'leaf'."; - description - "If EVC Type is Rooted-Multipoint, " + - "sls-uni-inclusion UNI Pairs cannot " + - "both be role 'leaf'."; - } - key "pm-type pm-id uni-id1 uni-id2"; - description - "EVC: Defines the EVC Flow Points (UNI) Pairs that " + - "must conform to the EVC's SLS Performance " + - "Metrics. Use of this list indicates that a " + - "complete set of UNI Pairs has been specified " + - "for the Performance Metrics defined in the " + - "selected SLS."; - leaf pm-type { + leaf evc-performance-sls { type leafref { path "/mef-global:mef-global/mef-global:slss/" + - "mef-global:sls" + - "[mef-global:sls-id = current()/../../../" + - "evc-performance-sls]" + - "/mef-global:perf-objs/mef-global:" + - "perf-obj/mef-global:pm-type"; + "mef-global:sls/mef-global:sls-id"; } description - "EVC: Performance Metric."; - reference "[MEF10.3] Section 8.8."; + "EVC: EVC-specific performance objectives and " + + "parameters. Note that an SLS can also specify " + + "performance objectives spanning more than one EVC. " + + "By default, all the UNI associated with the EVC " + + "have this SLS applied for them."; + reference "[MEF10.3] Section 8.8, Section 10. " + + "[MEF7.3] Section 12.2.2."; } - leaf pm-id { - type leafref { - path "/mef-global:mef-global/mef-global:slss/" + - "mef-global:sls" + - "[mef-global:sls-id = current()/../../../" + - "evc-performance-sls]" + - "/mef-global:perf-objs/mef-global:perf-obj" + - "[mef-global:pm-type = current()/../" + - "pm-type]" + - "/mef-global:pm-id"; - } - description - "EVC: This is a friendly name for specific " + - "performance profile."; - } - leaf uni-id1 { - type leafref { - path "../../../unis/uni/uni-id"; - } + leaf unicast-svc-frm-delivery { + type mef-types:data-svc-frame-delivery-type; + default "unconditional"; description - "EVC: The UNI ID paired with the EVC ID in the " + - "containing list."; - reference "[MEF10.3] Section 8.3, Section 10.1. " + - "[MEF7.3] Section 12.1.2."; + "EVC: Unicast Data Service Frame Delivery Mode " + + "(unconditional[default], conditional, or discard)."; + reference "[MEF10.3] Section 8.5.2,[R16], [R17], " + + "Section 8.8, Section 11. [MEF7.3] Section 12.2.2."; } - leaf uni-id2 { - type leafref { - path "../../../unis/uni/uni-id"; - } + leaf multicast-svc-frm-delivery { + type mef-types:data-svc-frame-delivery-type; + default "unconditional"; description - "EVC: The UNI ID paired with the EVC ID in the " + - "containing list."; - reference "[MEF10.3] Section 8.3, Section 10.1. " + - "[MEF7.3] Section 12.1.2."; + "EVC: Multicast Data Service Frame Delivery Mode " + + "(unconditional[default], conditional, or discard)."; + reference "[MEF10.3] Section 8.5.2, [R16], [R18], " + + "Section 8.8, Section 11. [MEF7.3] Section 12.2.2."; } - } - } - container sls-uni-exclusions { - presence "Not all EVC Flow Points (UNI) must conform " + - "to the EVC SLS Performance Metrics."; - description - "EVC: Not all EVC Flow Points (UNI) must conform to " + - "the EVC SLS Performance Metrics. Use of this " + - "list indicates that all UNI Pairs EXCEPT for " + - "the ones indicated (per Performance Metric) must " + - "conform to the SLS."; - list sls-uni-exclusion-set { - must "uni-id1 != uni-id2" { - error-message "The two UNI IDs for a given " + - "exclusion cannot be the same."; + leaf broadcast-svc-frm-delivery { + type mef-types:data-svc-frame-delivery-type; + default "unconditional"; description - "The two UNI IDs for a given exclusion cannot " + - "be the same as these pairs are invalid as " + - "defined in MEF 10.3."; + "EVC: Broadcast Data Service Frame Delivery Mode " + + "(unconditional[default], conditional, or discard)."; + reference "[MEF10.3] Section 8.5.2, [R16], [R19], " + + "Section 8.8, Section 11. [MEF7.3] Section 12.2.2."; } - key "pm-type pm-id uni-id1 uni-id2"; - description - "SLS UNI Exclusions List. The following pairs " + - "of UNI Interconnections are not required " + - "meet the SLS Performance Objectives. " + - "Configing both SLS UNI Inclusions and SLS " + - "UNI Exclusions is not permitted."; - leaf pm-type { - type leafref { - path "/mef-global:mef-global/mef-global:" + - "slss/mef-global:sls" + - "[mef-global:sls-id = current()/../../../" + - "evc-performance-sls]" + - "/mef-global:perf-objs/mef-global:" + - "perf-obj/mef-global:pm-type"; - } - description - "EVC: Performance Metric."; - reference "[MEF10.3] Section 8.8."; - } - leaf pm-id { - type leafref { - path "/mef-global:mef-global/mef-global:slss/" + - "mef-global:sls" + - "[mef-global:sls-id = current()/../../../" + - "evc-performance-sls]" + - "/mef-global:perf-objs/mef-global:perf-obj" + - "[mef-global:pm-type = current()/../" + - "pm-type]" + - "/mef-global:pm-id"; - } - description - "EVC: This is a friendly name for specific " + - "performance profile."; - } - leaf uni-id1 { - type leafref { - path "../../../unis/uni/uni-id"; - } + leaf evc-meg-id { + type mef-types:identifier45; description - "EVC: The UNI ID paired with the EVC ID in the " + - "containing list."; - reference "[MEF10.3] Section 8.3, Section 10.1. " + - "[MEF7.3] Section 12.1.2."; + "EVC: Identifies the Maintenance Entity Group (MEG) " + + "for this EVC."; + reference "[MEF7.3] Section 12.2.2. MEF 35.1."; } - leaf uni-id2 { - type leafref { - path "../../../unis/uni/uni-id"; - } + leaf max-svc-frame-size { + type mef-types:max-svc-frame-size-type; + default "1600"; description - "EVC: The UNI ID paired with the EVC ID in the " + - "containing list."; - reference "[MEF10.3] Section 8.3, Section 10.1. " + - "[MEF7.3] Section 12.1.2."; + "EVC: This attribute describes the maximum service " + + "frame size for the EVC."; + reference "[MEF10.3] Section 8.9, Section 9.7, [R71], " + + "[MEF6.2] Section 8.2.2 and MEF 22.1: [D2]. " + + "[MEF7.3] Section 12.2.2."; } } } - leaf evc-id { - type mef-types:evc-id-type; - mandatory true; - description - "The EVC ID must be unique across all EVCs in the CEN." + - " The EVC ID must be non-NULL."; - reference "[MEF10.3] Section 8.2 [R7]. " + - "[MEF7.3] Section 11.1.1, Section 12.2.2."; - } - leaf evc-status { - type mef-types:evc-status-type; - config false; - description - "EVC Operational Status."; - reference "[MEF16] Section 5.3."; - } - leaf evc-type { - type mef-types:evc-type; - must "(. != 'point-to-point') or " + - "((. = 'point-to-point') and " + - "(count(../unis/uni[role = 'leaf']) = 0))" { - error-message "If EVC Type is Point-to-Point, all " + - "UNI Roles must be root."; - description - "If EVC Type is Point-to-Point, all UNI Roles must " + - "be root."; - } - must "(. != 'multipoint-to-multipoint') or " + - "((. = 'multipoint-to-multipoint') and " + - "(count(../unis/uni[role = 'leaf']) = 0))" { - error-message "If EVC Type is " + - "Multipoint-to-Multipoint, all UNI Roles " + - "must be root."; - description - "If EVC Type is Multipoint-to-Multipoint, all UNI " + - "Roles must be root."; - } - must "(. != 'rooted-multipoint') or " + - "((. = 'rooted-multipoint') and " + - "(count(../unis/uni[role = 'root']) > 0) )" { - error-message "If EVC Type is Rooted-Multipoint, one " + - "or more UNI Roles must be root."; - description - "If EVC Type is Rooted-Multipoint, one or more " + - "UNI Roles must be root."; - } - must "(. != 'point-to-point') or " + - "((. = 'point-to-point') and " + - "(count(../unis/uni) = 2))" { - error-message "If EVC Type is Point-to-Point, there " + - "must be exactly 2 UNI configured for the EVC."; - description - "If EVC Type is Point-to-Point, there must be " + - "exactly 2 UNI configured for the EVC."; - } - must "(. != 'multipoint-to-multipoint') or " + - "((. = 'multipoint-to-multipoint') and " + - "(count(../unis/uni) > 1) and " + - "(count(../unis/uni) <= ../max-uni-count))" { - error-message "If EVC Type is " + - "Multipoint-to-Multipoint, " + - "there must be 2 or more UNI configured " + - "for the EVC."; - description - "If EVC Type is Multipoint-to-Multipoint, " + - "there must be 2 or more UNI configured for " + - "the EVC."; - } - must "(. != 'rooted-multipoint') or " + - "((. = 'rooted-multipoint') and " + - "(count(../unis/uni) > 1) and " + - "(count(../unis/uni) <= ../max-uni-count))" { - error-message "If EVC Type is Rooted-Multipoint, " + - "there must be 2 or more UNI configured for the EVC."; - description - "If EVC Type is Rooted-Multipoint, there must " + - "be 2 or more UNI configured for the EVC."; - } - must "(. != 'point-to-point') or " + - "((. = 'point-to-point') and " + - "(../max-uni-count = 2))" { - error-message "If EVC Type is Point-to-Point, " + - "the value of max-uni-count must be 2."; - description - "If EVC Type is Point-to-Point, the value of " + - "max-uni-count must be 2."; - } - must "(. != 'multipoint-to-multipoint') or " + - "((. = 'multipoint-to-multipoint') and " + - "(../max-uni-count > 2))" { - error-message "If EVC Type is " + - "Multipoint-to-Multipoint, the value of " + - "max-uni-count must be at least 3."; - description - "If EVC Type is Multipoint-to-Multipoint, the " + - "value of max-uni-count must be at least 3."; - } - must "(. != 'rooted-multipoint') or " + - "((. = 'rooted-multipoint') and " + - "(../max-uni-count > 2))" { - error-message "If EVC Type is Rooted-Multipoint, " + - "the value of max-uni-count must be at " + - "least 3."; - description - "If EVC Type is Rooted-Multipoint, the value " + - "of max-uni-count must be at least 3."; - } - mandatory true; - description - "This EVC attribute describes the EVC as either " + - "Multipoint-To-Multipoint, Point-To-Point, or " + - "Rooted-Multipoint."; - reference "[MEF10.3] Section 8.1, [R4], [R5], " + - "[R10], [R11], [R12], [R13] and [R14]. " + - "[MEF7.3] Section 12.2.2."; - } - leaf admin-state-enabled { - type boolean; - default "true"; - description - "EVC: Locked/Unlocked is inconsistent with " + - "Oper Status and will be confusing."; - reference "[MEF15]. [MEF7.3] Section 11.1.1."; - } - leaf elastic-enabled { - type boolean; - default "true"; - description - "EVC: Elastic Enabled/Disabled."; - reference "[MEF7.3] Section 11.1.1."; - } - leaf elastic-service { - type mef-types:identifier45; - description - "EVC: Related to CE4Cloud Information Model."; - reference "[MEF7.3] Section 11.1.1."; - } - leaf max-uni-count { - type uint32 { - range "2..max"; - } - must "(. > 2) or ((. = 2) and " + - "(../evc-type = 'point-to-point'))" { - error-message "If EVC Type is Point-to-Point, the " + - "max-uni-count value must be 2."; - description - "If EVC Type is Point-to-Point, the max-uni-count " + - "value must be 2."; - } - must "(. = 2) or ((. > 2) and " + - "((../evc-type = 'multipoint-to-multipoint') or " + - "(../evc-type = 'rooted-multipoint')))" { - error-message "If EVC Type is " + - "Multipoint-to-Multipoint or " + - "Rooted-Multipoint, the max-uni-count value " + - "must be at least 3."; - description - "If EVC Type is Multipoint-to-Multipoint or " + - "Rooted-Multipoint, the max-uni-count value " + - "must be at least 3."; - } - default "2"; - description - "EVC:The Maximum Number of UNIs this EVC can be " + - "configured for (Default 2).If EVC Type is " + - "Multipoint-to-Multipoint or Rooted-Multipoint, " + - "the max-uni-count value must be at least 3. " + - "This value must be 2 for point-to-point mode."; - reference "[MEF10.3] [R14]. [MEF7.3] Section 12.2.2."; - } - leaf preserved-vlan { - type uint32; - } - leaf preserve-ce-vlan-id { - type boolean; - default "false"; - description - "EVC:An EVC with more than one CE-VLAN ID mapping " + - "to it must have the same list of CE-VLAN IDs " + - "mapping to the EVC at each UNI in the EVC."; - reference "[MEF10.3] Section 8.6.1, [R24] [R25], " + - "Section 9.10.2, Section 9.12, [R81], Figure 20. " + - "[MEF7.3] Section 12.2.2."; - } - leaf cos-preserve-ce-vlan-id { - type boolean; - default "false"; - description - "EVC: Preserve CE-VLAN ID for CoS."; - reference "[MEF10.3] Section 8.6.2, [R26]. " + - "[MEF7.3] Section 12.2.2."; - } - leaf evc-performance-sls { - type leafref { - path "/mef-global:mef-global/mef-global:slss/" + - "mef-global:sls/mef-global:sls-id"; - } - description - "EVC: EVC-specific performance objectives and " + - "parameters. Note that an SLS can also specify " + - "performance objectives spanning more than one EVC. " + - "By default, all the UNI associated with the EVC " + - "have this SLS applied for them."; - reference "[MEF10.3] Section 8.8, Section 10. " + - "[MEF7.3] Section 12.2.2."; - } - leaf unicast-svc-frm-delivery { - type mef-types:data-svc-frame-delivery-type; - default "unconditional"; - description - "EVC: Unicast Data Service Frame Delivery Mode " + - "(unconditional[default], conditional, or discard)."; - reference "[MEF10.3] Section 8.5.2,[R16], [R17], " + - "Section 8.8, Section 11. [MEF7.3] Section 12.2.2."; - } - leaf multicast-svc-frm-delivery { - type mef-types:data-svc-frame-delivery-type; - default "unconditional"; - description - "EVC: Multicast Data Service Frame Delivery Mode " + - "(unconditional[default], conditional, or discard)."; - reference "[MEF10.3] Section 8.5.2, [R16], [R18], " + - "Section 8.8, Section 11. [MEF7.3] Section 12.2.2."; - } - leaf broadcast-svc-frm-delivery { - type mef-types:data-svc-frame-delivery-type; - default "unconditional"; - description - "EVC: Broadcast Data Service Frame Delivery Mode " + - "(unconditional[default], conditional, or discard)."; - reference "[MEF10.3] Section 8.5.2, [R16], [R19], " + - "Section 8.8, Section 11. [MEF7.3] Section 12.2.2."; - } - leaf evc-meg-id { - type mef-types:identifier45; - description - "EVC: Identifies the Maintenance Entity Group (MEG) " + - "for this EVC."; - reference "[MEF7.3] Section 12.2.2. MEF 35.1."; - } - leaf max-svc-frame-size { - type mef-types:max-svc-frame-size-type; - default "1600"; - description - "EVC: This attribute describes the maximum service " + - "frame size for the EVC."; - reference "[MEF10.3] Section 8.9, Section 9.7, [R71], " + - "[MEF6.2] Section 8.2.2 and MEF 22.1: [D2]. " + - "[MEF7.3] Section 12.2.2."; - } } leaf svc-id { type mef-types:retail-svc-id-type; description - "The MEF Service ID is a simple key used to " + - "distinguish MEF Service Configuration Groups."; + "The MEF Service ID is a simple key used to " + + "distinguish MEF Service Configuration Groups."; reference "[MEF10.3] Section 7."; } leaf sp-id { when "/mef-global:mef-global/mef-global:svc-providers" { description - "Only configure when the Global Service Providers " + - "list has been populated."; + "Only configure when the Global Service Providers " + + "list has been populated."; } type leafref { path "/mef-global:mef-global/mef-global:svc-providers/" + - "mef-global:svc-provider/mef-global:sp-id"; + "mef-global:svc-provider/mef-global:sp-id"; } description - "The MEF Service Provider ID must be globally unique " + - "as all CENs and Subscribers must be supported by a " + - "specific Service Provider(SP). A SP can support " + - "multiple CENs."; + "The MEF Service Provider ID must be globally unique " + + "as all CENs and Subscribers must be supported by a " + + "specific Service Provider(SP). A SP can support " + + "multiple CENs."; reference "[MEF10.3] Section 7."; } leaf svc-type { @@ -1584,10 +1623,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "svc-mux-enabled = 'true']) = 0))" { error-message "For EPL, Service Multiplexing must be " + - "disabled for all UNIs in the EVC UNI List."; + "disabled for all UNIs in the EVC UNI List."; description - "For EPL, Service Multiplexing must be disabled for " + - "all UNIs in the EVC UNI List."; + "For EPL, Service Multiplexing must be disabled for " + + "all UNIs in the EVC UNI List."; } must "(. != 'epl') or ((. = 'epl') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1598,10 +1637,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "bundling-enabled = 'true']) = 0))" { error-message "For EPL, Bundling must be disabled for " + - "all UNIs in the EVC UNI List."; + "all UNIs in the EVC UNI List."; description - "For EPL, Bundling must be disabled for all UNIs in " + - "the EVC UNI List."; + "For EPL, Bundling must be disabled for all UNIs in " + + "the EVC UNI List."; } must "(. != 'epl') or ((. = 'epl') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1612,10 +1651,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "all-to-one-bundling-enabled = 'false']) = 0))" { error-message "For EPL, All-to-One Bundling must be " + - "enabled for all UNIs in the EVC UNI List."; + "enabled for all UNIs in the EVC UNI List."; description - "For EPL, All-to-One Bundling must be enabled for " + - "all UNIs in the EVC UNI List."; + "For EPL, All-to-One Bundling must be enabled for " + + "all UNIs in the EVC UNI List."; } must "(. != 'epl') or ((. = 'epl') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1626,76 +1665,76 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "max-evc-count != 1]) = 0))" { error-message "For EPL, Max EVC Count must be 1 for " + - "all UNIs in the EVC UNI List."; + "all UNIs in the EVC UNI List."; description - "For EPL, Max EVC Count must be 1 for all UNIs " + - "in the EVC UNI List."; + "For EPL, Max EVC Count must be 1 for all UNIs " + + "in the EVC UNI List."; } must "(. != 'epl') or ((. = 'epl') and " + "(count(../evc/unis/uni/egress-bwp-flows-per-eec/" + "bwp-flow-per-eec) = 0))" { error-message "For EPL, Egress Bandwidth Profile per " + - "Egress Equivalence Class cannot be set for " + - "all UNIs in the EVC per UNI List."; + "Egress Equivalence Class cannot be set for " + + "all UNIs in the EVC per UNI List."; description - "For EPL, Egress Bandwidth Profile per Egress " + - "Equivalence Class cannot be set for all UNIs in the " + - "EVC per UNI List."; + "For EPL, Egress Bandwidth Profile per Egress " + + "Equivalence Class cannot be set for all UNIs in the " + + "EVC per UNI List."; } must "(. != 'epl') or ((. = 'epl') and " + "(count(../evc/unis/uni" + "[src-mac-addr-limit-enabled = 'true']) = 0) )" { error-message "For EPL, Source MAC Address Limit must " + - "be disabled."; + "be disabled."; description - "For EPL, Source MAC Address Limit must be disabled."; + "For EPL, Source MAC Address Limit must be disabled."; } must "(. != 'epl') or ((. = 'epl') and " + "(../evc/evc-type = 'point-to-point'))" { error-message "For EPL, EVC Type must be Point-to-Point."; description - "For EPL, EVC Type must be Point-to-Point."; + "For EPL, EVC Type must be Point-to-Point."; } must "(. != 'epl') or ((. = 'epl') and " + "(../evc/unicast-svc-frm-delivery = " + "'unconditional'))" { error-message "For EPL, unicast-svc-frm-delivery " + - "must be unconditional."; + "must be unconditional."; description - "For EPL, unicast-svc-frm-delivery must be " + - "unconditional."; + "For EPL, unicast-svc-frm-delivery must be " + + "unconditional."; } must "(. != 'epl') or ((. = 'epl') and " + "(../evc/multicast-svc-frm-delivery = " + "'unconditional'))" { error-message "For EPL, multicast-svc-frm-delivery " + - "must be unconditional."; + "must be unconditional."; description - "For EPL, multicast-svc-frm-delivery must be " + - "unconditional."; + "For EPL, multicast-svc-frm-delivery must be " + + "unconditional."; } must "(. != 'epl') or ((. = 'epl') and " + "(../evc/broadcast-svc-frm-delivery = " + "'unconditional'))" { error-message "For EPL, broadcast-svc-frm-delivery " + - "must be unconditional."; + "must be unconditional."; description - "For EPL, broadcast-svc-frm-delivery must be " + - "unconditional."; + "For EPL, broadcast-svc-frm-delivery must be " + + "unconditional."; } must "(. != 'epl') or ((. = 'epl') and " + "(../evc/preserve-ce-vlan-id = 'true'))" { error-message "For EPL, CE-VLAN ID Preservation " + - "must be enabled."; + "must be enabled."; description - "For EPL, CE-VLAN ID Preservation must be enabled."; + "For EPL, CE-VLAN ID Preservation must be enabled."; } must "(. != 'epl') or ((. = 'epl') and " + "(../evc/cos-preserve-ce-vlan-id = 'true'))" { error-message "For EPL, CE-VLAN ID CoS Preservation " + - "must be enabled."; + "must be enabled."; description - "For EPL, CE-VLAN ID CoS Preservation must be enabled."; + "For EPL, CE-VLAN ID CoS Preservation must be enabled."; } must "(. != 'evpl') or ((. = 'evpl') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1706,10 +1745,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "all-to-one-bundling-enabled = 'true']) = 0))" { error-message "For EVPL, All-to-One Bundling must be " + - "disabled for all UNIs in the EVC UNI List."; + "disabled for all UNIs in the EVC UNI List."; description - "For EVPL, All-to-One Bundling must be disabled for " + - "all UNIs in the EVC UNI List."; + "For EVPL, All-to-One Bundling must be disabled for " + + "all UNIs in the EVC UNI List."; } must "(. != 'evpl') or ((. = 'evpl') and " + "((../evc/unicast-svc-frm-delivery != " + @@ -1721,19 +1760,19 @@ module mef-services { "count(../evc/unis/uni" + "[src-mac-addr-limit-enabled = 'true']) = 0))" { error-message "For EVPL, Source MAC Address Limit must " + - "be disabled for all UNIs in the EVC per " + - "UNI List if all 3 -svc-frm-delivery values " + - "are unconditional."; + "be disabled for all UNIs in the EVC per " + + "UNI List if all 3 -svc-frm-delivery values " + + "are unconditional."; description - "For EVPL, Source MAC Address Limit must be disabled " + - "for all UNIs in the EVC per UNI List if all " + - "3 -svc-frm-delivery values are unconditional."; + "For EVPL, Source MAC Address Limit must be disabled " + + "for all UNIs in the EVC per UNI List if all " + + "3 -svc-frm-delivery values are unconditional."; } must "(. != 'evpl') or ((. = 'evpl') and " + "(../evc/evc-type = 'point-to-point'))" { error-message "For EVPL, EVC Type must be Point-to-Point."; description - "For EVPL, EVC Type must be Point-to-Point."; + "For EVPL, EVC Type must be Point-to-Point."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1744,10 +1783,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "svc-mux-enabled = 'true']) = 0))" { error-message "For EP-LAN, Service Multiplexing must " + - "be disabled for all UNIs in the EVC UNI List."; + "be disabled for all UNIs in the EVC UNI List."; description - "For EP-LAN, Service Multiplexing must be disabled " + - "for all UNIs in the EVC UNI List."; + "For EP-LAN, Service Multiplexing must be disabled " + + "for all UNIs in the EVC UNI List."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1758,10 +1797,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "bundling-enabled = 'true']) = 0))" { error-message "For EP-LAN, Bundling must be disabled " + - "for all UNIs in the EVC UNI List."; + "for all UNIs in the EVC UNI List."; description - "For EP-LAN, Bundling must be disabled for all UNIs " + - "in the EVC UNI List."; + "For EP-LAN, Bundling must be disabled for all UNIs " + + "in the EVC UNI List."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1772,11 +1811,11 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "all-to-one-bundling-enabled = 'false']) = 0))" { error-message "For EP-LAN, All-to-One Bundling " + - "must be enabled for all UNIs in the " + - "EVC UNI List."; + "must be enabled for all UNIs in the " + + "EVC UNI List."; description - "For EP-LAN, All-to-One Bundling must be enabled " + - "for all UNIs in the EVC UNI List."; + "For EP-LAN, All-to-One Bundling must be enabled " + + "for all UNIs in the EVC UNI List."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1787,41 +1826,41 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "max-evc-count != 1]) = 0))" { error-message "For EP-LAN, Max EVC Count must be 1 " + - "for all UNIs in the EVC UNI List."; + "for all UNIs in the EVC UNI List."; description - "For EP-LAN, Max EVC Count must be 1 for all UNIs in " + - "the EVC UNI List."; + "For EP-LAN, Max EVC Count must be 1 for all UNIs in " + + "the EVC UNI List."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(../evc/evc-type = 'multipoint-to-multipoint'))" { error-message "For EP-LAN, EVC Type must be " + - "Multipoint-to-Multipoint."; + "Multipoint-to-Multipoint."; description - "For EP-LAN, EVC Type must be " + - "Multipoint-to-Multipoint."; + "For EP-LAN, EVC Type must be " + + "Multipoint-to-Multipoint."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(../evc/preserve-ce-vlan-id = 'true'))" { error-message "For EP-LAN, CE-VLAN ID Preservation " + - "must be enabled."; + "must be enabled."; description - "For EP-LAN, CE-VLAN ID Preservation must be enabled."; + "For EP-LAN, CE-VLAN ID Preservation must be enabled."; } must "(. != 'eplan') or ((. = 'eplan') and " + "(../evc/cos-preserve-ce-vlan-id = 'true'))" { error-message "For EP-LAN, CE-VLAN ID CoS Preservation " + - "must be enabled."; + "must be enabled."; description - "For EP-LAN, CE-VLAN ID CoS Preservation must be " + - "enabled."; + "For EP-LAN, CE-VLAN ID CoS Preservation must be " + + "enabled."; } must "(. != 'evplan') or ((. = 'evplan') and " + "(../evc/evc-type = 'multipoint-to-multipoint'))" { error-message "For EVP-LAN, EVC Type must be " + - "Multipoint-to-Multipoint."; + "Multipoint-to-Multipoint."; description - "For EVP-LAN, EVC Type must be " + - "Multipoint-to-Multipoint."; + "For EVP-LAN, EVC Type must be " + + "Multipoint-to-Multipoint."; } must "(. != 'evplan') or ((. = 'evplan') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1832,10 +1871,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "all-to-one-bundling-enabled = 'true']) = 0))" { error-message "For EVP-LAN, All-to-One Bundling must " + - "be disabled for all UNIs in the EVC UNI List."; + "be disabled for all UNIs in the EVC UNI List."; description - "For EVP-LAN, All-to-One Bundling must be disabled " + - "for all UNIs in the EVC UNI List."; + "For EVP-LAN, All-to-One Bundling must be disabled " + + "for all UNIs in the EVC UNI List."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1846,11 +1885,11 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "svc-mux-enabled = 'true']) = 0))" { error-message "For EP-TREE, Service Multiplexing " + - "must be disabled for all UNIs in the " + - "EVC UNI List."; + "must be disabled for all UNIs in the " + + "EVC UNI List."; description - "For EP-TREE, Service Multiplexing must be disabled " + - "for all UNIs in the EVC UNI List."; + "For EP-TREE, Service Multiplexing must be disabled " + + "for all UNIs in the EVC UNI List."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1861,10 +1900,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "bundling-enabled = 'true']) = 0))" { error-message "For EP-TREE, Bundling must be disabled " + - "for all UNIs in the EVC UNI List."; + "for all UNIs in the EVC UNI List."; description - "For EP-TREE, Bundling must be disabled for all UNIs " + - "in the EVC UNI List."; + "For EP-TREE, Bundling must be disabled for all UNIs " + + "in the EVC UNI List."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1875,10 +1914,10 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "all-to-one-bundling-enabled = 'false']) = 0))" { error-message "For EP-TREE, All-to-One Bundling must " + - "be enabled for all UNIs in the EVC UNI List."; + "be enabled for all UNIs in the EVC UNI List."; description - "For EP-TREE, All-to-One Bundling must be enabled " + - "for all UNIs in the EVC UNI List."; + "For EP-TREE, All-to-One Bundling must be enabled " + + "for all UNIs in the EVC UNI List."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1889,32 +1928,32 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "max-evc-count != 1]) = 0))" { error-message "For EP-TREE, Max EVC Count must be 1 " + - "for all UNIs in the EVC UNI List."; + "for all UNIs in the EVC UNI List."; description - "For EP-TREE, Max EVC Count must be 1 for all UNIs " + - "in the EVC UNI List."; + "For EP-TREE, Max EVC Count must be 1 for all UNIs " + + "in the EVC UNI List."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(../evc/evc-type = 'rooted-multipoint'))" { error-message "For EP-TREE, EVC Type must be " + - "Rooted-Multipoint."; + "Rooted-Multipoint."; description - "For EP-TREE, EVC Type must be Rooted-Multipoint."; + "For EP-TREE, EVC Type must be Rooted-Multipoint."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(../evc/preserve-ce-vlan-id = 'true'))" { error-message "For EP-TREE, CE-VLAN ID Preservation " + - "must be enabled."; + "must be enabled."; description - "For EP-TREE, CE-VLAN ID Preservation must be enabled."; + "For EP-TREE, CE-VLAN ID Preservation must be enabled."; } must "(. != 'eptree') or ((. = 'eptree') and " + "(../evc/cos-preserve-ce-vlan-id = 'true'))" { error-message "For EP-TREE, CE-VLAN ID " + - "CoS Preservation must be enabled."; + "CoS Preservation must be enabled."; description - "For EP-TREE, CE-VLAN ID CoS Preservation must be " + - "enabled."; + "For EP-TREE, CE-VLAN ID CoS Preservation must be " + + "enabled."; } must "(. != 'evptree') or ((. = 'evptree') and " + "(count(/mef-interfaces:mef-interfaces/" + @@ -1925,39 +1964,39 @@ module mef-services { "[mef-interfaces:uni-id/../mef-interfaces:" + "all-to-one-bundling-enabled = 'true']) = 0))" { error-message "For EVP-TREE, All-to-One Bundling " + - "must be disabled for all UNIs in the EVC UNI List."; + "must be disabled for all UNIs in the EVC UNI List."; description - "For EVP-TREE, All-to-One Bundling must be disabled " + - "for all UNIs in the EVC UNI List."; + "For EVP-TREE, All-to-One Bundling must be disabled " + + "for all UNIs in the EVC UNI List."; } must "(. != 'evptree') or ((. = 'evptree') and " + "(../evc/evc-type = 'rooted-multipoint'))" { error-message "For EVP-TREE, EVC Type must be " + - "Rooted-Multipoint."; + "Rooted-Multipoint."; description - "For EVP-TREE, EVC Type must be Rooted-Multipoint."; + "For EVP-TREE, EVC Type must be Rooted-Multipoint."; } description - "The MEF Service Type."; + "The MEF Service Type."; } leaf user-label { type mef-types:identifier45; description - "This MEF user label is set by the user to a value " + - "that is easier to identify than the Service ID."; + "This MEF user label is set by the user to a value " + + "that is easier to identify than the Service ID."; } leaf svc-entity { type mef-types:service-entity-type; default "evc"; description - "MEF Service Entity."; + "MEF Service Entity."; reference "[MEF12.2] Table 3."; } leaf tenant-id { - type leafref{ - path "/mef-global:mef-global/mef-global:tenants-instances/mef-global:tenant-list/mef-global:name"; - } - } + type leafref { + path "/mef-global:mef-global/mef-global:tenants-instances/mef-global:tenant-list/mef-global:name"; + } + } } } -} \ No newline at end of file +} diff --git a/legato-api/src/main/yang/mef-topology.yang b/legato-api/src/main/yang/mef-topology.yang index a90fcffb..ce7cee6e 100644 --- a/legato-api/src/main/yang/mef-topology.yang +++ b/legato-api/src/main/yang/mef-topology.yang @@ -1,112 +1,89 @@ module mef-topology { namespace "http://metroethernetforum.org/ns/yang/mef-topology"; prefix mef-topology; - import mef-types { - prefix mef-types; - } + import mef-types { prefix mef-types; } organization "Metro Ethernet Forum"; contact - "Web URL: http://metroethernetforum.org/ \\ - E-mail: mibs@metroethernetforum.org \\ - Postal: Metro Ethernet Forum \\ - 6033 W. Century Boulevard, Suite 1107 \\ - Los Angeles, CA 90045 \\ - U.S.A. \\ - Phone: +1 310-642-2800 \\ - Fax: +1 310-642-2808"; + "Web URL: http://metroethernetforum.org/ \\ E-mail: mibs@metroethernetforum.org + \\ Postal: Metro Ethernet Forum \\ 6033 W. Century Boulevard, + Suite 1107 \\ Los Angeles, CA 90045 \\ U.S.A. \\ Phone: +1 310-642-2800 + \\ Fax: +1 310-642-2808"; description "This module models the NMS level view of the network devices, - their physical interfaces, and the network topology. - When the NMS discovers a network device,it is to pull the - device configuration and operational status as expected for - an NMS. Once the NMS has a network device's configuration, - it creates the /mef-topology/devices/device{} entry and - populates the list of physical interfaces. The Peers entries - are populated as configuration to reflect physical cabling - interconnections.Hints could be detected from LLDP Neighbor - information[802.1AB]. - - Reference Overview: - A number of base documents have been used to create - the MEF Topology YANG Module. The following are the - abbreviations for the baseline documents: - [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', - 2013-07-15 - [RFC 6643] refers to IETF RFC 6643 'Translation of Structure - of Management Information - Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 - [802.1AB] refers to 'Station and Media Access Control - Connectivity Discovery', IEEE 802.1AB-2009, September 2009 - [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard for Local - and metropolitan area networks --Media Access Control (MAC) - Bridges and Virtual Bridged Local Area Networks, August 2011 - [802-2001] refers to 'IEEE Standard for Local and Metropolitan - Area Networks: Overview and Architecture', IEEE 802-2001, - February 2002 - [MEF10.3] refers to MEF 10.3 - 'Ethernet Services Attributes Phase 3', October 2013 - [MEF6.2] refers to MEF 6.2 - 'EVC Ethernet Services Defintions Phase 3', August 2014 - [MEF40] refers to MEF 40 - 'UNI and EVC Definition of Managed Objects', April 2013 - [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014 - [MEF7.2] refers to MEF 7.2 - 'Carrier Ethernet Management Information Model', April 2013 - [MEF7.3] refers to MEF 7.3 - 'Carrier Ethernet Management Information Model', - Working Draft #1 2015 - [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version 2)', - December 1999 - [RFC 2863] refers to IETF RFC 2863 'The Interfaces Group MIB', - June 2000 - [RFC 3419] refers to IETF RFC 3419 - 'Textual Conventions for Transport Addresses', December 2002 - [Y.1731] refers to ITU-T Y.1731 - 'OAM functions and mechanisms for Ethernet based networks', - July 2011 - [Q.840.1] refers to ITU-T Q.840.1 - 'Requirements and analysis for NMS-EMS management interface - of Ethernet over Transport and Metro Ethernet - Network(EoT/MEN)' March 2007"; + their physical interfaces, and the network topology. When the + NMS discovers a network device,it is to pull the device configuration + and operational status as expected for an NMS. Once the NMS has + a network device's configuration, it creates the /mef-topology/devices/device{} + entry and populates the list of physical interfaces. The Peers + entries are populated as configuration to reflect physical cabling + interconnections.Hints could be detected from LLDP Neighbor information[802.1AB]. + Reference Overview: A number of base documents have been used + to create the MEF Topology YANG Module. The following are the + abbreviations for the baseline documents: [RFC 6991] refers to + IETF RFC 6991 'Common YANG Data Types', 2013-07-15 [RFC 6643] + refers to IETF RFC 6643 'Translation of Structure of Management + Information Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 + [802.1AB] refers to 'Station and Media Access Control Connectivity + Discovery', IEEE 802.1AB-2009, September 2009 [802.1q] refers + to IEEE 802.1Q-2011 'IEEE Standard for Local and metropolitan + area networks --Media Access Control (MAC) Bridges and Virtual + Bridged Local Area Networks, August 2011 [802-2001] refers to + 'IEEE Standard for Local and Metropolitan Area Networks: Overview + and Architecture', IEEE 802-2001, February 2002 [MEF10.3] refers + to MEF 10.3 'Ethernet Services Attributes Phase 3', October 2013 + [MEF6.2] refers to MEF 6.2 'EVC Ethernet Services Defintions Phase + 3', August 2014 [MEF40] refers to MEF 40 'UNI and EVC Definition + of Managed Objects', April 2013 [MEF45] refers to MEF 45 'Multi-CEN + L2CP', August 2014 [MEF7.2] refers to MEF 7.2 'Carrier Ethernet + Management Information Model', April 2013 [MEF7.3] refers to MEF + 7.3 'Carrier Ethernet Management Information Model', Working Draft + #1 2015 [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version + 2)', December 1999 [RFC 2863] refers to IETF RFC 2863 'The Interfaces + Group MIB', June 2000 [RFC 3419] refers to IETF RFC 3419 'Textual + Conventions for Transport Addresses', December 2002 [Y.1731] refers + to ITU-T Y.1731 'OAM functions and mechanisms for Ethernet based + networks', July 2011 [Q.840.1] refers to ITU-T Q.840.1 'Requirements + and analysis for NMS-EMS management interface of Ethernet over + Transport and Metro Ethernet Network(EoT/MEN)' March 2007"; revision 2015-05-26 { description - "Formal Project Review Draft 1."; + "Formal Project Review Draft 1."; reference "EVC Ethernet Services Definitions YANG Modules " + - "(MEF XX), TBD"; - } - + "(MEF XX), TBD"; + } + container mef-topology { description - "MEF Topology"; + "MEF Topology"; container devices { description - "Network Devices in the CEN."; + "Network Devices in the CEN."; list device { key "dev-id"; description - "Network Device List."; + "Network Device List."; container interfaces { description - "Physical Ports/Interfaces associated with this " + - "Network Device."; + "Physical Ports/Interfaces associated with this " + + "Network Device."; list interface { key "phy"; description - "External Interface for the Network Device."; + "External Interface for the Network Device."; leaf phy { type mef-types:identifier45; description - "The Phy Name for the Physical Port."; + "The Phy Name for the Physical Port."; } leaf ieee8023-phy { type identityref { base mef-types:ieee-8023-interface-type; } description - "The Physical Layer for each physical link " + - "implementing the UNI MUST be one of the PHYs " + - "listed in IEEE Std 802.3–2012 but excluding " + - "1000BASE-PX-D and 1000BASE-PX-U."; + "The Physical Layer for each physical link " + + "implementing the UNI MUST be one of the PHYs " + + "listed in IEEE Std 802.3–2012 but excluding " + + "1000BASE-PX-D and 1000BASE-PX-U."; reference "[MEF10.3] Section 9.2 [R60]."; } } @@ -115,21 +92,21 @@ module mef-topology { type mef-types:device-role; default "ce"; description - "The role of this device in the network."; + "The role of this device in the network."; } leaf dev-id { type mef-types:identifier45; description - "Device Identifier."; + "Device Identifier."; } leaf device-name { - type string; + type string; } } } container connections { description - "Physical Network Connections"; + "Physical Network Connections"; list connection { key "name"; leaf name { @@ -137,41 +114,41 @@ module mef-topology { } container endpoint-1 { description - "End Point 1"; + "End Point 1"; leaf device { type leafref { - path "../../../../devices/device/dev-id"; + path "../../../../devices/device/dev-id"; } description - "Hostname or IP Address for the End Point's Device."; + "Hostname or IP Address for the End Point's Device."; } leaf interface { type leafref { path "../../../../devices/device[dev-id = current()/../device]/interfaces/interface/phy"; } description - "The Phy Name for the End Point's Physical Port."; + "The Phy Name for the End Point's Physical Port."; } } container endpoint-2 { description - "End Point 2"; + "End Point 2"; leaf device { type leafref { path "../../../../devices/device/dev-id"; } description - "Hostname or IP Address for the End Point's Device."; + "Hostname or IP Address for the End Point's Device."; } leaf interface { type leafref { path "../../../../devices/device[dev-id = current()/../device]/interfaces/interface/phy"; } description - "The Phy Name for the End Point's Physical Port."; + "The Phy Name for the End Point's Physical Port."; } } } } } -} \ No newline at end of file +} diff --git a/legato-api/src/main/yang/mef-types.yang b/legato-api/src/main/yang/mef-types.yang index 258b3cbf..82025053 100644 --- a/legato-api/src/main/yang/mef-types.yang +++ b/legato-api/src/main/yang/mef-types.yang @@ -3,281 +3,262 @@ module mef-types { prefix mef-types; organization "Metro Ethernet Forum"; contact - "Web URL: http://metroethernetforum.org/ - E-mail: mibs@metroethernetforum.org - Postal: Metro Ethernet Forum - 6033 W. Century Boulevard, Suite 1107 - Los Angeles, CA 90045 - U.S.A. - Phone: +1 310-642-2800 - Fax: +1 310-642-2808"; + "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org + Postal: Metro Ethernet Forum 6033 W. Century Boulevard, Suite + 1107 Los Angeles, CA 90045 U.S.A. Phone: +1 310-642-2800 Fax: + +1 310-642-2808"; description - "This module defines the YANG Type Definitions and shared - (templated) groupings of data elementsused by MEF YANG Modules. - - Reference Overview: - A number of base documents have been used to create - the MEF Types YANG Module. The following are the - abbreviations for the baseline documents: - [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', - 2013-07-15 - [RFC 6643] refers to IETF RFC 6643 'Translation of Structure - of Management Information - Version 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 - [802.1AB] refers to 'Station and Media Access Control - Connectivity Discovery', IEEE 802.1AB-2009, September 2009 - [802.1q] refers to IEEE 802.1Q-2011 'IEEE Standard for Local - and metropolitan area networks --Media Access Control (MAC) - Bridges and Virtual Bridged Local Area Networks, August 2011 - [802-2001] refers to 'IEEE Standard for Local and Metropolitan - Area Networks: Overview and Architecture', IEEE 802-2001, - February 2002 - [MEF10.3] refers to MEF 10.3 - 'Ethernet Services Attributes Phase 3', October 2013 - [MEF6.2] refers to MEF 6.2 - 'EVC Ethernet Services Defintions Phase 3', August 2014 - [MEF40] refers to MEF 40 - 'UNI and EVC Definition of Managed Objects', April 2013 - [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014 - [MEF7.2] refers to MEF 7.2 - 'Carrier Ethernet Management Information Model', April 2013 - [MEF7.3] refers to MEF 7.3 - 'Carrier Ethernet Management Information Model', - Working Draft #1 2015 - [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version 2)', - December 1999 - [RFC 2863] refers to IETF RFC 2863 'The Interfaces Group MIB', - June 2000 - [RFC 3419] refers to IETF RFC 3419 - 'Textual Conventions for Transport Addresses', December 2002 - [Y.1731] refers to ITU-T Y.1731 - 'OAM functions and mechanisms for Ethernet based networks', - July 2011 - [Q.840.1] refers to ITU-T Q.840.1 - 'Requirements and analysis for NMS-EMS management interface - of Ethernet over Transport and Metro Ethernet - Network(EoT/MEN)' March 2007"; + "This module defines the YANG Type Definitions and shared (templated) + groupings of data elementsused by MEF YANG Modules. Reference + Overview: A number of base documents have been used to create + the MEF Types YANG Module. The following are the abbreviations + for the baseline documents: [RFC 6991] refers to IETF RFC 6991 + 'Common YANG Data Types', 2013-07-15 [RFC 6643] refers to IETF + RFC 6643 'Translation of Structure of Management Information Version + 2 (SMIv2) MIB Modules to YANG Modules', 2011-11-25 [802.1AB] refers + to 'Station and Media Access Control Connectivity Discovery', + IEEE 802.1AB-2009, September 2009 [802.1q] refers to IEEE 802.1Q-2011 + 'IEEE Standard for Local and metropolitan area networks --Media + Access Control (MAC) Bridges and Virtual Bridged Local Area Networks, + August 2011 [802-2001] refers to 'IEEE Standard for Local and + Metropolitan Area Networks: Overview and Architecture', IEEE 802-2001, + February 2002 [MEF10.3] refers to MEF 10.3 'Ethernet Services + Attributes Phase 3', October 2013 [MEF6.2] refers to MEF 6.2 'EVC + Ethernet Services Defintions Phase 3', August 2014 [MEF40] refers + to MEF 40 'UNI and EVC Definition of Managed Objects', April 2013 + [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014 [MEF7.2] + refers to MEF 7.2 'Carrier Ethernet Management Information Model', + April 2013 [MEF7.3] refers to MEF 7.3 'Carrier Ethernet Management + Information Model', Working Draft #1 2015 [RFC 2737] refers to + IETF RFC 2737 'Entity MIB (Version 2)', December 1999 [RFC 2863] + refers to IETF RFC 2863 'The Interfaces Group MIB', June 2000 + [RFC 3419] refers to IETF RFC 3419 'Textual Conventions for Transport + Addresses', December 2002 [Y.1731] refers to ITU-T Y.1731 'OAM + functions and mechanisms for Ethernet based networks', July 2011 + [Q.840.1] refers to ITU-T Q.840.1 'Requirements and analysis for + NMS-EMS management interface of Ethernet over Transport and Metro + Ethernet Network(EoT/MEN)' March 2007"; revision 2015-05-26 { description - "Formal Project Review Draft 1."; + "Formal Project Review Draft 1."; reference "EVC Ethernet Services Definitions YANG Modules " + - "(MEF XX), TBD"; + "(MEF XX), TBD"; } identity ieee-8023-interface-type { description - "Base identity from which specific IEEE 802.3-2012 " + - "interface types are derived. This list was taken " + - "from Section 1.4 'Definitions'."; + "Base identity from which specific IEEE 802.3-2012 " + + "interface types are derived. This list was taken " + + "from Section 1.4 'Definitions'."; } identity ieee8023-10BASE2 { base ieee-8023-interface-type; description - "10BASE2"; + "10BASE2"; } identity ieee8023-10BASE5 { base ieee-8023-interface-type; description - "10BASE5"; + "10BASE5"; } identity ieee8023-10BASE-F { base ieee-8023-interface-type; description - "10BASEF"; + "10BASEF"; } identity ieee8023-10BASE-FB { base ieee-8023-interface-type; description - "10BASE-FB"; + "10BASE-FB"; } identity ieee8023-1000BASE-PX-D { base ieee-8023-interface-type; description - "1000BASE-PX-D"; + "1000BASE-PX-D"; } identity ieee8023-1000BASE-PX-U { base ieee-8023-interface-type; description - "1000BASE-PX-U"; + "1000BASE-PX-U"; } identity ieee8023-10BASE-FL { base ieee-8023-interface-type; description - "10BASE-FL"; + "10BASE-FL"; } identity ieee8023-10BASE-FP { base ieee-8023-interface-type; description - "10BASE-FP"; + "10BASE-FP"; } identity ieee8023-10BASE-T { base ieee-8023-interface-type; description - "10BASE-T"; + "10BASE-T"; } identity ieee8023-10BASE-Te { base ieee-8023-interface-type; description - "10BASE-Te"; + "10BASE-Te"; } identity ieee8023-10BROAD36 { base ieee-8023-interface-type; description - "10BROAD36"; + "10BROAD36"; } identity ieee8023-10PASS-TS { base ieee-8023-interface-type; description - "10PASS-TS"; + "10PASS-TS"; } identity ieee8023-100BASE-BX10 { base ieee-8023-interface-type; description - "100BASE-BX10"; + "100BASE-BX10"; } identity ieee8023-100BASE-FX { base ieee-8023-interface-type; description - "100BASE-FX"; + "100BASE-FX"; } identity ieee8023-100BASE-LX10 { base ieee-8023-interface-type; description - "100BASE-LX10"; + "100BASE-LX10"; } identity ieee8023-100BASE-T { base ieee-8023-interface-type; description - "100BASE-T"; + "100BASE-T"; } identity ieee8023-100BASE-T2 { base ieee-8023-interface-type; description - "100BASE-T2"; + "100BASE-T2"; } identity ieee8023-100BASE-T4 { base ieee-8023-interface-type; description - "100BASE-T4"; + "100BASE-T4"; } identity ieee8023-100BASE-TX { base ieee-8023-interface-type; description - "100BASE-TX"; + "100BASE-TX"; } identity ieee8023-100BASE-X { base ieee-8023-interface-type; description - "100BASE-X"; + "100BASE-X"; } identity ieee8023-1000BASE-BX10 { base ieee-8023-interface-type; description - "1000BASE-BX10"; + "1000BASE-BX10"; } identity ieee8023-1000BASE-CX { base ieee-8023-interface-type; description - "1000BASE-CX"; + "1000BASE-CX"; } identity ieee8023-1000BASE-KX { base ieee-8023-interface-type; description - "1000BASE-KX"; + "1000BASE-KX"; } identity ieee8023-1000BASE-LX { base ieee-8023-interface-type; description - "1000BASE-LX"; + "1000BASE-LX"; } identity ieee8023-1000BASE-LX10 { base ieee-8023-interface-type; description - "1000BASE-LX10"; + "1000BASE-LX10"; } identity ieee8023-1000BASE-PX10 { base ieee-8023-interface-type; description - "1000BASE-PX10"; + "1000BASE-PX10"; } identity ieee8023-1000BASE-PX20 { base ieee-8023-interface-type; description - "1000BASE-PX20"; + "1000BASE-PX20"; } identity ieee8023-1000BASE-SX { base ieee-8023-interface-type; description - "1000BASE-SX"; + "1000BASE-SX"; } identity ieee8023-1000BASE-T { base ieee-8023-interface-type; description - "1000BASE-T"; + "1000BASE-T"; } identity ieee8023-1000BASE-X { base ieee-8023-interface-type; description - "1000BASE-X"; + "1000BASE-X"; } identity ieee8023-10GBASE-CX4 { base ieee-8023-interface-type; description - "10GBASE-CX4"; + "10GBASE-CX4"; } identity ieee8023-10GBASE-E { base ieee-8023-interface-type; description - "10GBASE-E"; + "10GBASE-E"; } identity ieee8023-10GBASE-ER { base ieee-8023-interface-type; description - "10GBASE-ER"; + "10GBASE-ER"; } identity ieee8023-10GBASE-EW { base ieee-8023-interface-type; description - "10GBASE-EW"; + "10GBASE-EW"; } identity ieee8023-10GBASE-KR { base ieee-8023-interface-type; description - "10GBASE-KR"; + "10GBASE-KR"; } identity ieee8023-10GBASE-KX4 { base ieee-8023-interface-type; description - "10GBASE-KX4"; + "10GBASE-KX4"; } identity ieee8023-10GBASE-L { base ieee-8023-interface-type; description - "10GBASE-L"; + "10GBASE-L"; } identity ieee8023-10GBASE-LR { base ieee-8023-interface-type; description - "10GBASE-LR"; + "10GBASE-LR"; } identity ieee8023-10GBASE-LRM { base ieee-8023-interface-type; description - "10GBASE-LRM"; + "10GBASE-LRM"; } identity ieee8023-10GBASE-LW { base ieee-8023-interface-type; description - "10GBASE-LW"; + "10GBASE-LW"; } identity ieee8023-10GBASE-LX4 { base ieee-8023-interface-type; description - "10GBASE-LX4"; + "10GBASE-LX4"; } identity ieee8023-10GBASE-PR { base ieee-8023-interface-type; description - "10GBASE-PR"; + "10GBASE-PR"; } typedef identifier45 { type string { @@ -285,12 +266,12 @@ module mef-types { pattern "[ -~]+"; } description - "This type definition accepts any visible ASCII character " + - "plus the character.The string must be an RFC 2579 " + - "Display String (RFC 854 ASCII 0.00-0.7f) but not contain " + - "the characters 0.00 through 0.1f. It does not accept " + - "the character (0.7f) despite the current MEF " + - "specification not disallowing it."; + "This type definition accepts any visible ASCII character " + + "plus the character.The string must be an RFC 2579 " + + "Display String (RFC 854 ASCII 0.00-0.7f) but not contain " + + "the characters 0.00 through 0.1f. It does not accept " + + "the character (0.7f) despite the current MEF " + + "specification not disallowing it."; reference "[MEF10.3] [R8], [R9]. [RFC2579]. [RFC854]."; } typedef max-svc-frame-size-type { @@ -299,40 +280,40 @@ module mef-types { } units "bytes"; description - "Max Frame Size Type in bytes. Service Frames larger than " + - "this size will be discarded."; + "Max Frame Size Type in bytes. Service Frames larger than " + + "this size will be discarded."; reference "[MEF 10.3] Section 8.9 and Section 9.7."; } typedef retail-svc-id-type { type uint32; description - "General ID used by higher level applications that " + - "connect Subscribers information and SLA's with " + - "configured Ethernet Services."; + "General ID used by higher level applications that " + + "connect Subscribers information and SLA's with " + + "configured Ethernet Services."; reference "[MEF10.3]."; } typedef svc-provider-type { type identifier45; description - "Service Provider Type"; + "Service Provider Type"; reference "[MEF10.3]."; } typedef cen-type { type identifier45; description - "CEN Type"; + "CEN Type"; reference "[MEF10.3]."; } typedef subscriber-type { type identifier45; description - "Subscriber Type"; + "Subscriber Type"; reference "[MEF10.3]."; } typedef evc-id-type { type identifier45; description - "EVC ID Type"; + "EVC ID Type"; reference "[MEF10.3]."; } typedef simple-percent { @@ -347,422 +328,435 @@ module mef-types { range "1..4094"; } description - "The VLAN-ID that uniquely identifies a VLAN. This is the " + - "12-bit VLAN-ID used in the VLAN Tag header. The range " + - "is defined by the REFERENCED specification. VLAN ID 0 is " + - "used for VLAN Unaware Mode."; + "The VLAN-ID that uniquely identifies a VLAN. This is the " + + "12-bit VLAN-ID used in the VLAN Tag header. The range " + + "is defined by the REFERENCED specification. VLAN ID 0 is " + + "used for VLAN Unaware Mode."; reference "IEEE Std 802.1Q 2003 Edition, Virtual Bridged " + - "Local Area Networks."; + "Local Area Networks."; } typedef vlan-id-or-none-type { type uint32 { range "0..4094"; } description - "The VLAN-ID that uniquely identifies a VLAN. This is the " + - "12-bit VLAN-ID used in the VLAN Tag header. The range is " + - "defined by the REFERENCED specification. VLAN ID 0 is " + - "used for VLAN Unaware (ie. None) Mode"; + "The VLAN-ID that uniquely identifies a VLAN. This is the " + + "12-bit VLAN-ID used in the VLAN Tag header. The range is " + + "defined by the REFERENCED specification. VLAN ID 0 is " + + "used for VLAN Unaware (ie. None) Mode"; reference "IEEE Std 802.1Q 2003 Edition, Virtual Bridged " + - "Local Area Networks."; + "Local Area Networks."; } typedef vlan-id-or-all-type { type uint32 { range "1..4095"; } description - "The VLAN-ID that uniquely identifies a VLAN. This is the " + - "12-bit VLAN-ID used in the VLAN Tag header. The range " + - "is defined by the REFERENCED specification. VLAN ID 4095 " + - "is used for VLAN Any Mode"; + "The VLAN-ID that uniquely identifies a VLAN. This is the " + + "12-bit VLAN-ID used in the VLAN Tag header. The range " + + "is defined by the REFERENCED specification. VLAN ID 4095 " + + "is used for VLAN Any Mode"; reference "IEEE Std 802.1Q 2003 Edition, Virtual Bridged " + - "Local Area Networks."; + "Local Area Networks."; } typedef vlan-id-any-none-type { type uint32 { range "0..4095"; } description - "The VLAN-ID that uniquely identifies a VLAN. This is the " + - "12-bit VLAN-ID used in the VLAN Tag header. The range " + - "is defined by the REFERENCED specification. This " + - "typedef is for use with Operational Status information " + - "where VLAN ID 0 may be used for VLAN Unaware Mode and " + - "use of 4095 is Reserved / None."; + "The VLAN-ID that uniquely identifies a VLAN. This is the " + + "12-bit VLAN-ID used in the VLAN Tag header. The range " + + "is defined by the REFERENCED specification. This " + + "typedef is for use with Operational Status information " + + "where VLAN ID 0 may be used for VLAN Unaware Mode and " + + "use of 4095 is Reserved / None."; reference "IEEE Std 802.1Q 2003 Edition, Virtual Bridged " + - "Local Area Networks."; + "Local Area Networks."; } typedef ieee-8021-priority { type uint8 { range "0..7"; } description - "An 802.1Q user priority value."; + "An 802.1Q user priority value."; reference "IEEE 802.1Q"; } typedef entity-admin-state-type { type enumeration { enum "unknown" { description - "Unknown"; + "Unknown"; } enum "locked" { description - "Locked"; + "Locked"; } enum "shutting-down" { description - "Shutting Down"; + "Shutting Down"; } enum "unlocked" { description - "Unlocked"; + "Unlocked"; } } description - "Represents the various possible administrative states. " + - "A value of 'locked' means the resource is " + - "administratively prohibited from use. A value of " + - "'shuttingDown' means that usage is administratively " + - "limited to current instances of use.A value of " + - "'unlocked' means the resource is not administratively " + - "prohibited from use.A value of 'unknown' means that " + - "this resource is unable to report administrative state."; + "Represents the various possible administrative states. " + + "A value of 'locked' means the resource is " + + "administratively prohibited from use. A value of " + + "'shuttingDown' means that usage is administratively " + + "limited to current instances of use.A value of " + + "'unlocked' means the resource is not administratively " + + "prohibited from use.A value of 'unknown' means that " + + "this resource is unable to report administrative state."; reference "ENTITY-STATE-TC-MIB"; } typedef performance-metric-type { type enumeration { enum "one-way-frame-delay-performance" { description - "One-way Frame Delay Performance."; + "One-way Frame Delay Performance."; } enum "one-way-frame-delay-range-performance" { description - "One-way Frame Delay Range Performance."; + "One-way Frame Delay Range Performance."; } enum "one-way-mean-frame-delay-performance" { description - "One-way Mean Frame Delay Performance."; + "One-way Mean Frame Delay Performance."; } enum "one-way-inter-frame-delay-variation-performance" { description - "One-way Inter-Frame Delay Variation Performance."; + "One-way Inter-Frame Delay Variation Performance."; } enum "one-way-frame-loss-ratio-performance" { description - "One-way Frame Loss Ratio Performance."; + "One-way Frame Loss Ratio Performance."; } enum "one-way-availability-performance" { description - "One-way Availability Performance."; + "One-way Availability Performance."; } enum "one-way-resiliency-performance-hli" { description - "One-way Resiliency Performance expressed as High " + - "Loss Intervals."; + "One-way Resiliency Performance expressed as High " + + "Loss Intervals."; } enum "one-way-resiliency-performance-chli" { description - "One-way Resiliency Performance expressed as " + - "Consecutive High Loss Intervals."; + "One-way Resiliency Performance expressed as " + + "Consecutive High Loss Intervals."; } enum "one-way-group-availability-performance" { description - "One-way Group Availability Performance."; + "One-way Group Availability Performance."; } enum "one-way-multiple-evc-group-availability-performance" { description - "One-way Multiple EVC Group Availability Performance."; + "One-way Multiple EVC Group Availability Performance."; } } description - "Performance Metrics."; + "Performance Metrics."; reference "[MEF10.3] Section 8.8 and Section 11."; } typedef evc-type { type enumeration { enum "point-to-point" { description - "Point to Point."; + "Point to Point."; } enum "multipoint-to-multipoint" { description - "Multipoint to Multipoint."; + "Multipoint to Multipoint."; } enum "rooted-multipoint" { description - "Rooted Multipoint."; + "Rooted Multipoint."; } } description - "EVC Type"; + "EVC Type"; reference "[MEF10.3] Section 8.1."; } + typedef ipvc-type { + type enumeration { + enum "multipoint" { + description + "Multipoint."; + } + enum "cloud-access" { + description + "Cloud-access."; + } + enum "rooted-multipoint" { + description + "Rooted Multipoint."; + } + } + description + "IPVC Type"; + } typedef evc-status-type { type enumeration { enum "new" { description - "New."; + "New."; } enum "active" { description - "Active."; + "Active."; } enum "inactive" { description - "Inactive (Not Active)."; + "Inactive (Not Active)."; } enum "partially-active" { description - "PartiallyActive."; + "PartiallyActive."; } } description - "EVC Status Type"; + "EVC Status Type"; reference "[MEF16] Section 5.3."; } typedef evc-uni-role-type { type enumeration { enum "root" { description - "Root Role for UNI. Valid setting for all service " + - "types. A UNI set to this value may send frames " + - "to UNIs configured as 'root' or 'leaf'."; + "Root Role for UNI. Valid setting for all service " + + "types. A UNI set to this value may send frames " + + "to UNIs configured as 'root' or 'leaf'."; } enum "leaf" { description - "Leaf Role for UNI. Valid setting for Root-Multipoint " + - "EVCs only. A UNI set to this value may send frames " + - "to UNIs 'root'."; + "Leaf Role for UNI. Valid setting for Root-Multipoint " + + "EVCs only. A UNI set to this value may send frames " + + "to UNIs 'root'."; } } description - "This object configures UNI type on an EVC."; + "This object configures UNI type on an EVC."; reference "[MEF10.3] Section 8.1.2.1."; } typedef data-svc-frame-delivery-type { type enumeration { enum "discard" { description - "Service Frames are discarded."; + "Service Frames are discarded."; } enum "unconditional" { description - "Service Frames are unconditionally - delivered no matter the content of the - Service Frame. An example of this is - a Point-to-Point EVC"; + "Service Frames are unconditionally delivered no matter the content + of the Service Frame. An example of this is a Point-to-Point EVC"; } enum "conditional" { description - "Service Frame are conditionally - delivered to the destination UNI. The - condition is specified, for example via a - bandwidth profile or unicast MAC address - learning."; + "Service Frame are conditionally delivered to the destination + UNI. The condition is specified, for example via a bandwidth profile + or unicast MAC address learning."; } } description - "A MEF service can have one of three different " + - "delivery types."; + "A MEF service can have one of three different " + + "delivery types."; } typedef uni-resiliency-type { type enumeration { enum "none" { description - "No protection mechanism defined."; + "No protection mechanism defined."; } enum "dual-link-aggregation" { description - "Protection mechanism is Link Aggreg- - ation as specified in [802.3], with one link in - active mode and one link in standby mode."; + "Protection mechanism is Link Aggreg- ation as specified in [802.3], + with one link in active mode and one link in standby mode."; } enum "other" { description - "Protection method defined that is not - Link Aggregation active/standby mode."; + "Protection method defined that is not Link Aggregation active/standby + mode."; } } description - "This object type of resiliency mechanism for a " + - "specific UNI."; + "This object type of resiliency mechanism for a " + + "specific UNI."; } typedef svc-frame-format-type { type enumeration { enum "no-tag" { description - "No-tag indicates that all data on the interface is " + - "as untagged data."; + "No-tag indicates that all data on the interface is " + + "as untagged data."; } enum "ctag" { description - "Ctag indicates that tagged data is associated with " + - "CE-VLAN ID or a C-TAG."; + "Ctag indicates that tagged data is associated with " + + "CE-VLAN ID or a C-TAG."; } enum "stag" { description - "Stag indicates that tagged data is associated with " + - "a provider tag or S-TAG."; + "Stag indicates that tagged data is associated with " + + "a provider tag or S-TAG."; } enum "stag-ctag" { description - "Stag-ctag indicates that service traffic identified " + - "with both an S-TAG (outer tag) and a C-TAG (inner tag)."; + "Stag-ctag indicates that service traffic identified " + + "with both an S-TAG (outer tag) and a C-TAG (inner tag)."; } } description - "The format must be that of a MAC Frame specified in " + - "IEEE Std 802.3-2012 Clause 3."; + "The format must be that of a MAC Frame specified in " + + "IEEE Std 802.3-2012 Clause 3."; reference "[MEF10.3] Section 9.6. [MEF15]. [MEF7.2]. " + - "[MEF7.3] Section 10.1.1. MEF-UNI-EVC-MIB.yang."; + "[MEF7.3] Section 10.1.1. MEF-UNI-EVC-MIB.yang."; } typedef uni-mode-type { type enumeration { enum "uni" { description - "UNI Mode."; + "UNI Mode."; } enum "vuni" { description - "VUNI Mode."; + "VUNI Mode."; } } description - "This setting is used to configure a UNI as either a " + - "UNI or a VUNI"; + "This setting is used to configure a UNI as either a " + + "UNI or a VUNI"; reference "[MEF7.3] Section 10.2.2."; } typedef evc-cos-identifier-type { type enumeration { enum "evc" { description - "The EVC ID, depends on the CE-VLAN ID / EVC Mapping " + - "at the UNI, will be used to map Service Frames to " + - "CoS Names/Labels."; + "The EVC ID, depends on the CE-VLAN ID / EVC Mapping " + + "at the UNI, will be used to map Service Frames to " + + "CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.1 for " + "Data Service Frames."; } enum "pcp" { description - "The Priority Code Point(PCP) value within the " + - "CE-VLAN Tag will be used to map Service Frames " + - "to CoS Names/Labels."; + "The Priority Code Point(PCP) value within the " + + "CE-VLAN Tag will be used to map Service Frames " + + "to CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.2: Priority Code " + "Point (PCP) Field in the Customer VLAN Tag " + "in a Tagged Service Frame. "; } enum "dscp" { description - "The Differentiated Services Code Point(DSCP) value " + - "from the IP Packet's IP Header Differentiated " + - "Services Group, associated with the Service Frame, " + - "will be used to map Service Frames to CoS Names/Labels."; + "The Differentiated Services Code Point(DSCP) value " + + "from the IP Packet's IP Header Differentiated " + + "Services Group, associated with the Service Frame, " + + "will be used to map Service Frames to CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.3: AKA Internet " + "Protocol. For a Data Service Frame carrying an " + "IPv4 or and IPv6 packet."; } } description - "[MEF10.3] Section 10.2.1."; + "[MEF10.3] Section 10.2.1."; } typedef evc-eec-identifier-type { type enumeration { enum "pcp" { description - "The Priority Code Point(PCP) value within the " + - "CE-VLAN Tag will be used to map Service Frames " + - "to CoS Names/Labels."; + "The Priority Code Point(PCP) value within the " + + "CE-VLAN Tag will be used to map Service Frames " + + "to CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.2: Priority Code " + "Point (PCP) Field in the Customer VLAN Tag " + "in a Tagged Service Frame."; } enum "dscp" { description - "The Differentiated Services Code Point(DSCP) value " + - "from the IP Packet's IP Header Differentiated " + - "Services Group, associated with the Service Frame, " + - "will be used to map Service Frames to CoS Names/Labels."; + "The Differentiated Services Code Point(DSCP) value " + + "from the IP Packet's IP Header Differentiated " + + "Services Group, associated with the Service Frame, " + + "will be used to map Service Frames to CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.3: AKA Internet " + "Protocol. For a Data Service Frame carrying " + "an IPv4 or and IPv6 packet."; } } description - "[MEF10.3] Section 10.2.1."; + "[MEF10.3] Section 10.2.1."; } typedef cos-color-identifier-type { type enumeration { enum "evc" { description - "The EVC ID, depends on the CE-VLAN ID / EVC Mapping " + - "at the UNI, will be used to map Service Frames to " + - "CoS Names/Labels."; + "The EVC ID, depends on the CE-VLAN ID / EVC Mapping " + + "at the UNI, will be used to map Service Frames to " + + "CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.1 for Data " + "Service Frames."; } enum "pcp" { description - "The Priority Code Point(PCP) value within the " + - "CE-VLAN Tag will be used to map Service Frames " + - "to CoS Names/Labels."; + "The Priority Code Point(PCP) value within the " + + "CE-VLAN Tag will be used to map Service Frames " + + "to CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.2: Priority Code " + "Point (PCP) Field in the Customer VLAN Tag " + "in a Tagged Service Frame. "; } enum "dei" { description - "Drop Eligible Indicator(DEI) field of the CE-VLAN Tag."; + "Drop Eligible Indicator(DEI) field of the CE-VLAN Tag."; } enum "dscp" { description - "The Differentiated Services Code Point(DSCP) value " + - "from the IP Packet's IP Header Differentiated " + - "Services Group, associated with the Service " + - "Frame, will be used to map Service Frames to " + - "CoS Names/Labels."; + "The Differentiated Services Code Point(DSCP) value " + + "from the IP Packet's IP Header Differentiated " + + "Services Group, associated with the Service " + + "Frame, will be used to map Service Frames to " + + "CoS Names/Labels."; reference "MEF 10.3 Section 10.2.1.3: AKA Internet " + "Protocol. For a Data Service Frame carrying " + "an IPv4 or and IPv6 packet."; } } description - "CoS Color Identification Type."; + "CoS Color Identification Type."; reference "[MEF23.1]."; } typedef cos-color-type { type enumeration { enum "green" { description - "Green."; + "Green."; } enum "yellow" { description - "Yellow."; + "Yellow."; } } description - "CoS Color."; + "CoS Color."; reference "[MEF23.1]."; } typedef bwp-cir-type { type uint32; description - "Bandwidth Profile Committed Information Rate in " + - "Kilobits Per Second."; + "Bandwidth Profile Committed Information Rate in " + + "Kilobits Per Second."; reference "[MEF10.3] [R143], [R144]."; } typedef bwp-cbs-type { type uint32; description - "Bandwidth Profile Committed Burst Size in Bytes."; + "Bandwidth Profile Committed Burst Size in Bytes."; reference "[MEF10.3] [R145]."; } typedef bwp-eir-type { type uint32; description - "Bandwidth Profile Excess Information Rate in " + - "Kilobits Per Second."; + "Bandwidth Profile Excess Information Rate in " + + "Kilobits Per Second."; reference "[MEF10.3] [R146], [R147]."; } typedef bwp-ebs-type { @@ -770,11 +764,11 @@ module mef-types { range "0 .. 10000000"; } description - "Excess Burst Size (EBS) in bytes: This parameter limits " + - "the maximum number of bytes available for a burst " + - "of Service Frames sent at the UNI line rate that " + - "will be declared Yellow by the Bandwidth Profile. " + - "If this value is 0, then no limit is assumed."; + "Excess Burst Size (EBS) in bytes: This parameter limits " + + "the maximum number of bytes available for a burst " + + "of Service Frames sent at the UNI line rate that " + + "will be declared Yellow by the Bandwidth Profile. " + + "If this value is 0, then no limit is assumed."; reference "[MEF10.3] [R146], [R147]."; } typedef elmi-polling-counter-type { @@ -782,7 +776,7 @@ module mef-types { range "1 .. max"; } description - "ELMI Polling Counter."; + "ELMI Polling Counter."; reference "[MEF16] Section 5.6.1."; } typedef elmi-status-error-threshold-type { @@ -790,8 +784,8 @@ module mef-types { range "2 .. 10"; } description - "The count of consecutive ELMI status polling errors " + - "before raising an error."; + "The count of consecutive ELMI status polling errors " + + "before raising an error."; reference "[MEF16] Section 5.6.1."; } typedef elmi-polling-timer-type { @@ -799,10 +793,10 @@ module mef-types { range "5 .. 30"; } description - "The type used for a timer started after tranmitting " + - "a Status Enquiry. If the timer expires, record " + - "the error if a STATUS message not received and " + - "resend Status Enquiry."; + "The type used for a timer started after tranmitting " + + "a Status Enquiry. If the timer expires, record " + + "the error if a STATUS message not received and " + + "resend Status Enquiry."; reference "[MEF16] Section 5.6.1."; } typedef elmi-polling-verification-timer-type { @@ -810,169 +804,169 @@ module mef-types { range "5 .. 30"; } description - "The type used for a timer started after tranmitting " + - "a Status Message. If a Status Enquiry is recieved before " + - "this timer expires, record the error."; + "The type used for a timer started after tranmitting " + + "a Status Message. If a Status Enquiry is recieved before " + + "this timer expires, record the error."; reference "[MEF16] Section 5.6.1."; } typedef bwp-color-mode-type { type enumeration { enum "color-blind" { description - "Color Blind. Do not use CoS Color Configuration for " + - "this Bandwidth Profile."; + "Color Blind. Do not use CoS Color Configuration for " + + "this Bandwidth Profile."; } enum "color-aware" { description - "Color Aware. Use CoS Color Configuration for this " + - "Bandwidth Profile."; + "Color Aware. Use CoS Color Configuration for this " + + "Bandwidth Profile."; } } description - "This attribute describes the color mode (CM) to be " + - "applied as \"color-blind mode\" or \"color-aware mode\"."; + "This attribute describes the color mode (CM) to be " + + "applied as \"color-blind mode\" or \"color-aware mode\"."; reference "[MEF10.3] Section 10.3, [R151]."; } typedef bwp-coupling-flag-type { type enumeration { enum "yellow-eir-only" { description - "When CF is set to \"yellow-eir-only\", the volume of " + - "the yellow service frames admitted to the network " + - "cannot exceed EIR."; + "When CF is set to \"yellow-eir-only\", the volume of " + + "the yellow service frames admitted to the network " + + "cannot exceed EIR."; } enum "yellow-eir-plus-cir" { description - "When CF is set to \"yellow-eir-plus-cir\", the " + - "volume of the yellow service frames admitted to " + - "the network is bounded by CIR + EIR depending on " + - "volume of the offered green Service Frames."; + "When CF is set to \"yellow-eir-plus-cir\", the " + + "volume of the yellow service frames admitted to " + + "the network is bounded by CIR + EIR depending on " + + "volume of the offered green Service Frames."; } } description - "The Bandwidth Profile parameter that determines whether " + - "or not overflow tokens not used for Service Frames " + - "declared Green can be used as Yellow tokens."; + "The Bandwidth Profile parameter that determines whether " + + "or not overflow tokens not used for Service Frames " + + "declared Green can be used as Yellow tokens."; reference "[MEF10.3] Section 12.1. [MEF23.1] Section 8.1."; } typedef auto-negotiation-type { type enumeration { enum "on" { description - "Phy Auto-negotiation Enabled."; + "Phy Auto-negotiation Enabled."; } enum "off" { description - "Phy Auto-negotiation Disabled."; + "Phy Auto-negotiation Disabled."; } } description - "Phy Auto-negotiation Enabled/Disabled."; + "Phy Auto-negotiation Enabled/Disabled."; reference "[MEF20]."; } typedef service-entity-type { type enumeration { enum "evc" { description - "EVC."; + "EVC."; } enum "tunnel-1" { description - "Tunnel Type 1."; + "Tunnel Type 1."; } enum "tunnel-2" { description - "Tunnel Type 2."; + "Tunnel Type 2."; } enum "ovc" { description - "OVC."; + "OVC."; } } description - "MEF Service Entity Type."; + "MEF Service Entity Type."; reference "[MEF12.2] Section 7.3, Table 3."; } typedef l2cp-handling-type { type enumeration { enum "discard" { description - "Discard - An action taken at a L2CP Decision Point " + - "where a L2CP frame is neither delivered to a protocol " + - "entity, nor delivered to the External Interface " + - "where the L2CP Decision Point is located, nor " + - "propagated to L2CP Decision Points at other " + - "External Interfaces."; + "Discard - An action taken at a L2CP Decision Point " + + "where a L2CP frame is neither delivered to a protocol " + + "entity, nor delivered to the External Interface " + + "where the L2CP Decision Point is located, nor " + + "propagated to L2CP Decision Points at other " + + "External Interfaces."; } enum "pass" { description - "Pass(Tunnel) - An action taken at a L2CP Decision " + - "Point where a L2CP frame is either delivered to " + - "the External Interface where the L2CP Decision Point " + - "is located, or propagated to the L2CP Decision " + - "Points located at all other External Interfaces " + - "associated by the EVC or OVC."; + "Pass(Tunnel) - An action taken at a L2CP Decision " + + "Point where a L2CP frame is either delivered to " + + "the External Interface where the L2CP Decision Point " + + "is located, or propagated to the L2CP Decision " + + "Points located at all other External Interfaces " + + "associated by the EVC or OVC."; } enum "peer" { description - "Peer - An action taken at a L2CP Decision Point " + - "where a L2CP frame is delivered to a protocol " + - "entity determined by the Protocol Identifier " + - "in the L2CP Frame."; + "Peer - An action taken at a L2CP Decision Point " + + "where a L2CP frame is delivered to a protocol " + + "entity determined by the Protocol Identifier " + + "in the L2CP Frame."; } } description - "L2CP Service Frame handling option."; + "L2CP Service Frame handling option."; reference "[MEF45] Table 8."; } typedef l2cp-address-set-type { type enumeration { enum "aware-cta" { description - "C-VLAN Tag Aware (CTA), for VLAN-based services where" + - " the CE-VLAN ID is used to map a frame to a service."; + "C-VLAN Tag Aware (CTA), for VLAN-based services where" + + " the CE-VLAN ID is used to map a frame to a service."; } enum "blind-ctb" { description - "C-VLAN Tag Blind (CTB), for Port-based services where " + - "the CE-VLAN ID is not used to map a frame to a service."; + "C-VLAN Tag Blind (CTB), for Port-based services where " + + "the CE-VLAN ID is not used to map a frame to a service."; } enum "option2-blind-ctb2" { description - "C-VLAN Tag Blind Option 2 (CTB-2), for point-to-point " + - "Port-based services that support the EPL Option 2 " + - "L2CP processing."; + "C-VLAN Tag Blind Option 2 (CTB-2), for point-to-point " + + "Port-based services that support the EPL Option 2 " + + "L2CP processing."; } } description - "The L2CP Address Set Service Attribute specifies the " + - "subset of the Bridge Reserved Addresses that are " + - "filtered (i.e. L2CP Frames with this destination " + - "address are Peered or Discarded but not Passed) " + - "at a L2CP Decision Point."; + "The L2CP Address Set Service Attribute specifies the " + + "subset of the Bridge Reserved Addresses that are " + + "filtered (i.e. L2CP Frames with this destination " + + "address are Peered or Discarded but not Passed) " + + "at a L2CP Decision Point."; reference "[MEF10.3] Section 9.19. [MEF45] Section 8.1, " + - "[R2] through [R9]. [MEF6.2] Section 8.2.2, [R1]. " + - "[MEF45] Section 8.1."; + "[R2] through [R9]. [MEF6.2] Section 8.2.2, [R1]. " + + "[MEF45] Section 8.1."; } typedef l2cp-peering-protocol-type { type enumeration { enum "ethertype" { description - "Ethertype."; + "Ethertype."; } enum "llc" { description - "LLC."; + "LLC."; } enum "other" { description - "Other: Not using LLC nor Ethertype to specify " + - "the Protocol ID."; + "Other: Not using LLC nor Ethertype to specify " + + "the Protocol ID."; } } description - "The Peering Protocol Identifier is one of Ethertype, " + - "LLC, or Other."; + "The Peering Protocol Identifier is one of Ethertype, " + + "LLC, or Other."; reference "[MEF45] Section 7."; } typedef ieee8021p-priority-type { @@ -980,180 +974,180 @@ module mef-types { range "0 .. 7"; } description - "IEEE 802.1p VLAN Header Class of Service field. Used for " + - "Priority Code Point(PCP) configurations."; + "IEEE 802.1p VLAN Header Class of Service field. Used for " + + "Priority Code Point(PCP) configurations."; reference "[MEF10.3] Section 10.2.1."; } typedef mef-service-type { type enumeration { enum "epl" { description - "Ethernet Private Line Service (EPL) Point-to-Point " + - "EVC, all to one bundling"; + "Ethernet Private Line Service (EPL) Point-to-Point " + + "EVC, all to one bundling"; } enum "evpl" { description - "Ethernet Virtual Private Line (EVPL) Point-to-Point " + - "EVC, bundling and/or multiplexing"; + "Ethernet Virtual Private Line (EVPL) Point-to-Point " + + "EVC, bundling and/or multiplexing"; } enum "eplan" { description - "Ethernet Private LAN Service (EP-LAN) " + - "Multipoint-to-Multipoint EVC, all to one bundling"; + "Ethernet Private LAN Service (EP-LAN) " + + "Multipoint-to-Multipoint EVC, all to one bundling"; } enum "evplan" { description - "Ethernet Virtual Private LAN Service (EVP-LAN) " + - "Multipoint-to-Multipoint EVC, bundling and/or " + - "multiplexing"; + "Ethernet Virtual Private LAN Service (EVP-LAN) " + + "Multipoint-to-Multipoint EVC, bundling and/or " + + "multiplexing"; } enum "eptree" { description - "Ethernet Private Tree Service (EP-Tree) " + - "Rooted-Multipoint EVC, all to one bundling"; + "Ethernet Private Tree Service (EP-Tree) " + + "Rooted-Multipoint EVC, all to one bundling"; } enum "evptree" { description - "Ethernet Virtual Private Tree Service (EVP-Tree) " + - "Rooted-Multipoint EVC, bundling and/or multiplexing"; + "Ethernet Virtual Private Tree Service (EVP-Tree) " + + "Rooted-Multipoint EVC, bundling and/or multiplexing"; } } description - "This object indicates the specific Ethernet service type."; + "This object indicates the specific Ethernet service type."; } typedef ext-if-availability-type { type enumeration { enum "in-test" { description - "In-test is equivalent to the IETF RFC 2883 " + - "ifOperStatus 'testing' state."; + "In-test is equivalent to the IETF RFC 2883 " + + "ifOperStatus 'testing' state."; } enum "failed" { description - "Failed is to be interpretted along with " + - "Operational State."; + "Failed is to be interpretted along with " + + "Operational State."; } enum "power-off" { description - "Power-off indicates the phy is down."; + "Power-off indicates the phy is down."; } enum "degraded" { description - "Degraded is to be interpretted along with " + - "Operational State.."; + "Degraded is to be interpretted along with " + + "Operational State.."; } enum "not-installed" { description - "Not-installed is equivalent to the " + - "IETF RFC 2883 ifOperStatus 'notPresent' state."; + "Not-installed is equivalent to the " + + "IETF RFC 2883 ifOperStatus 'notPresent' state."; } } description - "Availability of the Physical Interface. The " + - "availability status type indicates that the Phy " + - "is functioning properly. May be mapped to " + - "RFC 2863, The Interfaces Group MIB " + - "IfOperstatus. Values for availability status " + - "include: inTest, failed, powerOff, degraded, " + - "notInstalled."; + "Availability of the Physical Interface. The " + + "availability status type indicates that the Phy " + + "is functioning properly. May be mapped to " + + "RFC 2863, The Interfaces Group MIB " + + "IfOperstatus. Values for availability status " + + "include: inTest, failed, powerOff, degraded, " + + "notInstalled."; reference "[ITU-T X.731]. [MEF7.3] Section 10.1.1, " + - "[MEF15], [MEF7.2] Appendix II."; + "[MEF15], [MEF7.2] Appendix II."; } typedef virt-cx-availability-type { type enumeration { - enum "in-test" { - description - "In-test is equivalent to the " + - "IETF RFC 2883 ifOperStatus 'testing' state."; - } - enum "failed" { - description - "Failed is to be interpretted along " + - "with Operational State."; - } - enum "degraded" { - description - "Degraded is to be interpretted along " + - "with Operational State.."; - } - enum "not-installed" { - description - "Not-installed is equivalent to the " + - "IETF RFC 2883 ifOperStatus 'notPresent' state."; - } + enum "in-test" { + description + "In-test is equivalent to the " + + "IETF RFC 2883 ifOperStatus 'testing' state."; + } + enum "failed" { + description + "Failed is to be interpretted along " + + "with Operational State."; + } + enum "degraded" { + description + "Degraded is to be interpretted along " + + "with Operational State.."; + } + enum "not-installed" { + description + "Not-installed is equivalent to the " + + "IETF RFC 2883 ifOperStatus 'notPresent' state."; + } } description - "Availability of the Virtual Connection. The " + - "availability status type indicates that the " + - "Virtual Connection is functioning properly. " + - "May be mapped to RFC 2863, The Interfaces Group MIB " + - "IfOperstatus. Values for availability status include: inTest," + - " failed, powerOff, degraded, notInstalled."; + "Availability of the Virtual Connection. The " + + "availability status type indicates that the " + + "Virtual Connection is functioning properly. " + + "May be mapped to RFC 2863, The Interfaces Group MIB " + + "IfOperstatus. Values for availability status include: inTest," + + " failed, powerOff, degraded, notInstalled."; reference "[ITU-T X.731]. [MEF7.3] Section 10.1.1, " + - "[MEF15], [MEF7.2] Appendix II."; + "[MEF15], [MEF7.2] Appendix II."; } typedef svc-endpoint-availability-type { type enumeration { - enum "in-test" { - description - "In-test is equivalent to the " + - "IETF RFC 2883 ifOperStatus 'testing' state."; - } - enum "failed" { - description - "Failed is to be interpretted along " + - "with Operational State."; - } - enum "degraded" { - description - "Degraded is to be interpretted along " + - "with Operational State.."; - } - enum "not-installed" { - description - "Not-installed is equivalent to the " + - "IETF RFC 2883 ifOperStatus 'notPresent' state."; - } + enum "in-test" { + description + "In-test is equivalent to the " + + "IETF RFC 2883 ifOperStatus 'testing' state."; + } + enum "failed" { + description + "Failed is to be interpretted along " + + "with Operational State."; + } + enum "degraded" { + description + "Degraded is to be interpretted along " + + "with Operational State.."; + } + enum "not-installed" { + description + "Not-installed is equivalent to the " + + "IETF RFC 2883 ifOperStatus 'notPresent' state."; + } } description - "Availability of the Service Endpoint. The " + - "availability status type indicates that the " + - "Service Endpoint is functioning properly. " + - "May be mapped to RFC 2863. The Interfaces Group MIB " + - "IfOperstatus. Values for availability status include: " + - "inTest, failed, powerOff, degraded, notInstalled."; + "Availability of the Service Endpoint. The " + + "availability status type indicates that the " + + "Service Endpoint is functioning properly. " + + "May be mapped to RFC 2863. The Interfaces Group MIB " + + "IfOperstatus. Values for availability status include: " + + "inTest, failed, powerOff, degraded, notInstalled."; reference "[ITU-T X.731]. [MEF7.3] Section 10.1.1, " + - "[MEF15], [MEF7.2] Appendix II."; + "[MEF15], [MEF7.2] Appendix II."; } typedef ext-if-physical-layer-type { type enumeration { enum "10M" { description - "10M bits-per-second."; + "10M bits-per-second."; } enum "100M" { description - "100M bits-per-second."; + "100M bits-per-second."; } enum "1G" { description - "1G bits-per-second."; + "1G bits-per-second."; } enum "10G" { description - "10G bits-per-second."; + "10G bits-per-second."; } enum "40G" { description - "40G bits-per-second."; + "40G bits-per-second."; } enum "100G" { description - "100G bits-per-second."; + "100G bits-per-second."; } } description - "The maximum theoretical bandwidth for the phy."; + "The maximum theoretical bandwidth for the phy."; reference "MEF 7.3 Section 10.1.1, MEF 6.2, MEF 10.3, MEF 26.1"; } typedef device-role { @@ -1167,6 +1161,6 @@ module mef-types { enum "p" { description "Core Router"; } - } - } -} \ No newline at end of file + } + } +} diff --git a/netvirt/pom.xml b/netvirt/pom.xml index e38613a5..a06d5af4 100644 --- a/netvirt/pom.xml +++ b/netvirt/pom.xml @@ -66,6 +66,16 @@ org.opendaylight.netvirt elanmanager-api ${vpnservices.version} + + + org.opendaylight.genius + arputil-api + ${genius.version} + + + org.opendaylight.netvirt + vpnmanager-api + ${vpnservices.version} ${project.groupId} @@ -114,16 +124,14 @@ org.opendaylight.mdsal.model ietf-yang-types-20130715 - - - + com.google.guava guava - - + + commons-net + commons-net + diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/ElanInterfaceListener.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/ElanInterfaceListener.java index d6951ae2..72e42a3f 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/ElanInterfaceListener.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/ElanInterfaceListener.java @@ -20,15 +20,15 @@ import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.unimgr.api.UnimgrDataTreeChangeListener; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.Evc; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.Unis; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.UnisBuilder; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.UniBuilder; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.UniKey; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.EvcUniCeVlansBuilder; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlanBuilder; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlanKey; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.Evc; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.Unis; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.UnisBuilder; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.UniBuilder; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.UniKey; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.EvcUniCeVlansBuilder; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlanBuilder; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlanKey; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.EvcUniRoleType; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.Identifier45; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcListener.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcListener.java index 6ad67514..8be48f5e 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcListener.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcListener.java @@ -18,10 +18,10 @@ import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.unimgr.api.UnimgrDataTreeChangeListener; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.links.Link; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.Evc; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.EvcUniCeVlans; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlan; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.Evc; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.EvcUniCeVlans; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlan; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.EvcType; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.EvcUniRoleType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface; @@ -197,86 +197,24 @@ public class EvcListener extends UnimgrDataTreeChangeListener { } private void createInterface(String instanceName, Uni uni, boolean isEtree) { - EvcUniUtils.addUni(dataBroker, uni); - - String uniId = uni.getUniId().getValue(); - - Link link = EvcUniUtils.getLink(dataBroker, uni); - String interfaceName = uniId; - - boolean result = waitForGeniusToUpdateInterface(interfaceName); - if (!result) { - log.error("State interface {} is not configured (missing ifIndex)", interfaceName); - return; - } - + String interfaceName = uni.getUniId().getValue(); EvcUniRoleType role = uni.getRole(); - EvcUniCeVlans evcUniCeVlans = uni.getEvcUniCeVlans(); if (evcUniCeVlans != null && evcUniCeVlans.getEvcUniCeVlan() != null && !evcUniCeVlans.getEvcUniCeVlan().isEmpty()) { for (EvcUniCeVlan x : evcUniCeVlans.getEvcUniCeVlan()) { - interfaceName = NetvirtUtils.getInterfaceNameForVlan(interfaceName, x.getVid().toString()); - log.info("Adding {} interface: {}", isEtree ? "etree" : "elan", interfaceName); - - if (isEtree) { - NetvirtUtils.createEtreeInterface(dataBroker, instanceName, interfaceName, - RoleToInterfaceType(role)); - } else { - NetvirtUtils.createElanInterface(dataBroker, instanceName, interfaceName); - } + NetvirtUtils.createInterface(dataBroker, instanceName, interfaceName, RoleToInterfaceType(role), + isEtree); } } else { - log.info("Adding {} interface: {}", isEtree ? "etree" : "elan", interfaceName); - if (isEtree) { - NetvirtUtils.createEtreeInterface(dataBroker, instanceName, interfaceName, RoleToInterfaceType(role)); - } else { - NetvirtUtils.createElanInterface(dataBroker, instanceName, interfaceName); - } + NetvirtUtils.createInterface(dataBroker, instanceName, interfaceName, RoleToInterfaceType(role), isEtree); } } - private boolean waitForGeniusToUpdateInterface(String interfaceName) { - int retries = 10; - - while (retries > 0) { - Optional optional = MdsalUtils.read(dataBroker, LogicalDatastoreType.OPERATIONAL, - NetvirtUtils.getStateInterfaceIdentifier(interfaceName)); - - if (!optional.isPresent()) { - log.info("State interface {} doesn't exist", interfaceName); - return false; - } - - Interface stateInterface = optional.get(); - - if (stateInterface.getIfIndex() != null) { - log.info("State interface configured with ifIndex {}", stateInterface.getIfIndex()); - - // Wait a bit, because if we continue too soon this will not - // work. - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - } - - return true; - } - - retries -= 1; - try { - Thread.sleep(1500); - } catch (InterruptedException e) { - } - } - - return false; - } - private static EtreeInterfaceType RoleToInterfaceType(EvcUniRoleType role) { if (role == EvcUniRoleType.Root) { return EtreeInterfaceType.Root; @@ -290,8 +228,6 @@ public class EvcListener extends UnimgrDataTreeChangeListener { String uniId = uni.getUniId().getValue(); EvcUniCeVlans evcUniCeVlans = uni.getEvcUniCeVlans(); - - Link link = EvcUniUtils.getLink(dataBroker, uni); String interfaceName = uniId; if (evcUniCeVlans != null && !evcUniCeVlans.getEvcUniCeVlan().isEmpty()) { diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcUniUtils.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcUniUtils.java index 68e7cf87..0fde190f 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcUniUtils.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/EvcUniUtils.java @@ -18,9 +18,9 @@ import org.opendaylight.genius.interfacemanager.globals.IfmConstants; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.PhysicalLayers; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.Links; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.links.Link; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.EvcUniCeVlans; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlan; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.EvcUniCeVlans; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlan; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey; @@ -35,13 +35,12 @@ public class EvcUniUtils { private static final Logger logger = LoggerFactory.getLogger(EvcUniUtils.class); - public static Link getLink(DataBroker dataBroker, Uni evcUni) { + public static Link getLink(DataBroker dataBroker, String uniId) { Optional optional = MdsalUtils - .read(dataBroker, LogicalDatastoreType.CONFIGURATION, - MefUtils.getUniInstanceIdentifier(evcUni.getUniId().getValue())); + .read(dataBroker, LogicalDatastoreType.CONFIGURATION, MefUtils.getUniInstanceIdentifier(uniId)); if (!optional.isPresent()) { - logger.error("A matching Uni doesn't exist for EvcUni {}", evcUni.getUniId()); + logger.error("A matching Uni doesn't exist for EvcUni {}", uniId); return null; } @@ -50,13 +49,13 @@ public class EvcUniUtils { PhysicalLayers physicalLayers = uni.getPhysicalLayers(); if (physicalLayers == null) { - logger.warn("Uni {} is missing PhysicalLayers", evcUni.getUniId()); + logger.warn("Uni {} is missing PhysicalLayers", uniId); return null; } Links links = physicalLayers.getLinks(); if (links == null || links.getLink() == null) { - logger.warn("Uni {} is has no links", evcUni.getUniId()); + logger.warn("Uni {} is has no links", uniId); return null; } @@ -69,11 +68,9 @@ public class EvcUniUtils { String uniId = data.getUniId().getValue(); WriteTransaction tx = createTransaction(dataBroker); - Link link = EvcUniUtils.getLink(dataBroker, data); - logger.info("Removing trunk {}", uniId); - delete(uniId, tx); + NetvirtUtils.delete(uniId, tx); Optional> ceVlansOptional = getCeVlans(data); if (!ceVlansOptional.isPresent()) { @@ -91,9 +88,9 @@ public class EvcUniUtils { try { String uniId = data.getUniId().getValue(); WriteTransaction tx = createTransaction(dataBroker); - Link link = EvcUniUtils.getLink(dataBroker, data); + Link link = EvcUniUtils.getLink(dataBroker, uniId); String interfaceName = uniId; - addTrunkInterface(interfaceName, getTrunkParentName(link), tx); + addTrunkInterface(interfaceName, MefUtils.getTrunkParentName(link), tx); Optional> ceVlansOptional = getCeVlans(data); if (ceVlansOptional.isPresent()) { @@ -109,7 +106,7 @@ public class EvcUniUtils { private static void addTrunkInterface(String interfaceName, String parentInterfaceName, WriteTransaction tx) { logger.info("Adding VLAN trunk {} ParentRef {}", interfaceName, parentInterfaceName); Interface trunkInterface = NetvirtUtils.createTrunkInterface(interfaceName, parentInterfaceName); - write(trunkInterface, tx); + NetvirtUtils.write(trunkInterface, tx); } private static void addTrunkMemberInterfaces(String parentInterfaceName, Iterable ceVlans, @@ -127,7 +124,7 @@ public class EvcUniUtils { logger.info("Adding VLAN trunk-member {} ParentRef {}", interfaceName, parentInterfaceName); Interface trunkMemberInterface = NetvirtUtils.createTrunkMemberInterface(interfaceName, parentInterfaceName, vlanId.intValue()); - write(trunkMemberInterface, tx); + NetvirtUtils.write(trunkMemberInterface, tx); } } @@ -144,15 +141,10 @@ public class EvcUniUtils { Long vlanId = (Long) vid; String interfaceName = NetvirtUtils.getInterfaceNameForVlan(parentInterfaceName, vlanId.toString()); logger.info("Removing VLAN trunk-member {}", interfaceName); - delete(interfaceName, tx); + NetvirtUtils.delete(interfaceName, tx); } } - private static InstanceIdentifier createInterfaceIdentifier(String interfaceName) { - return InstanceIdentifier.builder(Interfaces.class).child(Interface.class, new InterfaceKey(interfaceName)) - .build(); - } - private static WriteTransaction createTransaction(DataBroker dataBroker) { WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); return tx; @@ -167,23 +159,6 @@ public class EvcUniUtils { } } - private static void write(Interface iface, WriteTransaction tx) { - String interfaceName = iface.getName(); - InstanceIdentifier interfaceIdentifier = createInterfaceIdentifier(interfaceName); - tx.put(LogicalDatastoreType.CONFIGURATION, interfaceIdentifier, iface, true); - } - - private static void delete(String interfaceName, WriteTransaction tx) { - InstanceIdentifier interfaceIdentifier = createInterfaceIdentifier(interfaceName); - tx.delete(LogicalDatastoreType.CONFIGURATION, interfaceIdentifier); - } - - private static String getTrunkParentName(Link link) { - String deviceName = link.getDevice().getValue(); - String interfaceName = link.getInterface().toString(); - return interfaceName; - } - private static Optional> getCeVlans(Uni uni) { EvcUniCeVlans ceVlans = uni.getEvcUniCeVlans(); if (ceVlans == null) { @@ -192,8 +167,4 @@ public class EvcUniUtils { return Optional.fromNullable(ceVlans.getEvcUniCeVlan()); } - - public static String getDeviceInterfaceName(String deviceName, String interfaceName) { - return deviceName + IfmConstants.OF_URI_SEPARATOR + interfaceName; - } } diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/IpvcListener.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/IpvcListener.java new file mode 100644 index 00000000..ee8e302f --- /dev/null +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/IpvcListener.java @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2016 Hewlett Packard Enterprise, Co. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.unimgr.mef.netvirt; + +import java.util.ArrayList; +import java.util.List; + +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; +import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.unimgr.api.UnimgrDataTreeChangeListener; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.ip.unis.IpUni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.ip.unis.ip.uni.subnets.Subnet; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.ipvc.choice.Ipvc; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.ipvc.choice.ipvc.unis.Uni; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress; +import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.OdlArputilService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.etree.rev160614.EtreeInterface.EtreeInterfaceType; +import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class IpvcListener extends UnimgrDataTreeChangeListener { + private static final Logger Log = LoggerFactory.getLogger(IpvcListener.class); + private ListenerRegistration ipvcListenerRegistration; + private final NotificationPublishService notificationPublishService; + private final OdlArputilService arpUtilService; + + public IpvcListener(final DataBroker dataBroker, final NotificationPublishService notPublishService, + final OdlArputilService arputilService) { + super(dataBroker); + this.notificationPublishService = notPublishService; + this.arpUtilService = arputilService; + registerListener(); + } + + public void registerListener() { + try { + final DataTreeIdentifier dataTreeIid = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, + MefUtils.getIpvcInstanceIdentifier()); + ipvcListenerRegistration = dataBroker.registerDataTreeChangeListener(dataTreeIid, this); + Log.info("IpvcDataTreeChangeListener created and registered"); + } catch (final Exception e) { + Log.error("Ipvc DataChange listener registration failed !", e); + throw new IllegalStateException("Ipvc registration Listener failed.", e); + } + } + + @Override + public void close() throws Exception { + ipvcListenerRegistration.close(); + } + + @Override + public void add(DataTreeModification newDataObject) { + if (newDataObject.getRootPath() != null && newDataObject.getRootNode() != null) { + Log.info("ipvc {} created", newDataObject.getRootNode().getIdentifier()); + addIpvc(newDataObject); + } + } + + @Override + public void remove(DataTreeModification removedDataObject) { + if (removedDataObject.getRootPath() != null && removedDataObject.getRootNode() != null) { + Log.info("ipvc {} deleted", removedDataObject.getRootNode().getIdentifier()); + removeIpvc(removedDataObject); + } + } + + @Override + public void update(DataTreeModification modifiedDataObject) { + if (modifiedDataObject.getRootPath() != null && modifiedDataObject.getRootNode() != null) { + Log.info("ipvc {} updated", modifiedDataObject.getRootNode().getIdentifier()); + updateIpvc(modifiedDataObject); + } + } + + private void addIpvc(DataTreeModification newDataObject) { + try { + Ipvc data = newDataObject.getRootNode().getDataAfter(); + String instanceName = data.getIpvcId().getValue(); + final String vpnName = NetvirtVpnUtils.getUUidFromString(instanceName); + + Log.info("Adding vpn instance: " + instanceName); + NetvirtVpnUtils.createVpnInstance(dataBroker, vpnName); + + // Create elan interfaces + for (Uni uni : data.getUnis().getUni()) { + createInterfaces(vpnName, uni); + } + } catch (final Exception e) { + Log.error("Add ipvc failed !", e); + } + } + + private void updateIpvc(DataTreeModification modifiedDataObject) { + try { + Ipvc original = modifiedDataObject.getRootNode().getDataBefore(); + Ipvc update = modifiedDataObject.getRootNode().getDataAfter(); + + String instanceName = original.getIpvcId().getValue(); + + Log.info("Updating elan instance: " + instanceName); + + List originalUni = original.getUnis().getUni(); + List updateUni = update.getUnis().getUni(); + if (updateUni != null && !updateUni.isEmpty()) { + List existingClonedUni = new ArrayList<>(); + if (originalUni != null && !originalUni.isEmpty()) { + existingClonedUni.addAll(0, originalUni); + originalUni.removeAll(updateUni); + updateUni.removeAll(existingClonedUni); + // removing the Uni which are not presented in the updated + // List + for (Uni uni : originalUni) { + removeElanInterface(instanceName, uni); + } + } + + // Adding the new Uni which are presented in the updated List + if (updateUni.size() > 0) { + for (Uni uni : updateUni) { + createInterfaces(original, uni); + } + } + } else if (originalUni != null && !originalUni.isEmpty()) { + for (Uni uni : originalUni) { + removeElanInterface(instanceName, uni); + } + } + } catch (final Exception e) { + Log.error("Update ipvc failed !", e); + } + } + + private void removeIpvc(DataTreeModification removedDataObject) { + try { + Ipvc data = removedDataObject.getRootNode().getDataBefore(); + + String instanceName = data.getIpvcId().getValue(); + + for (Uni uni : data.getUnis().getUni()) { + removeElanInterface(instanceName, uni); + } + + Log.info("Removing elan instance: " + instanceName); + NetvirtUtils.deleteElanInstance(dataBroker, instanceName); + } catch (final Exception e) { + Log.error("Remove ipvc failed !", e); + } + } + + private void createInterfaces(Ipvc ipvc, Uni uni) { + String instanceName = ipvc.getIpvcId().getValue(); + createInterfaces(instanceName, uni); + } + + private void createInterfaces(String vpnName, Uni uniInService) { + String uniId = uniInService.getUniId().getValue(); + String ipUniId = uniInService.getIpUniId().getValue(); + + org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.Uni uni = IpvcUniUtils + .getUni(dataBroker, uniId); + if (uni == null) { + Log.error("Couldn't find uni {} for ipvc-uni", uniId); + throw new UnsupportedOperationException(); + } + IpUni ipUni = IpvcUniUtils.getIpUni(dataBroker, uniId, ipUniId); + Integer vlan = (ipUni.getVlan()) != null ? ipUni.getVlan().getValue() : null; + + Log.info("Adding/updating elan instance: " + uniId); + String elanName = NetvirtVpnUtils.getElanNameForVpnPort(uniId); + Log.info("Adding elan instance: " + elanName); + NetvirtUtils.updateElanInstance(dataBroker, elanName); + + String interfaceName = NetvirtVpnUtils.getInterfaceNameForVlan(ipUniId, vlan); + Log.info("Adding trunk interface: " + interfaceName); + IpvcUniUtils.addUni(dataBroker, uniInService, interfaceName, vlan); + + Log.info("Adding elan interface: " + interfaceName); + NetvirtUtils.createInterface(dataBroker, elanName, interfaceName, EtreeInterfaceType.Root, false); + + Log.info("Adding vpn interface: " + interfaceName); + NetvirtVpnUtils.createUpdateVpnInterface(dataBroker, vpnName, interfaceName, ipUni.getIpAddress(), + uni.getMacAddress(), true, null); + NetvirtVpnUtils.createVpnPortFixedIp(dataBroker, vpnName, interfaceName, ipUni.getIpAddress(), + uni.getMacAddress()); + + Log.info("Adding connected network for interface : " + interfaceName); + NetvirtVpnUtils.addDirectSubnetToVpn(dataBroker, notificationPublishService, vpnName, elanName, + ipUni.getIpAddress(), interfaceName); + + if (ipUni.getSubnets() != null) { + for (Subnet subnet : ipUni.getSubnets().getSubnet()) { + MacAddress gwMacAddress = NetvirtVpnUtils.resolveGwMac(dataBroker, arpUtilService, vpnName, + ipUni.getIpAddress(), subnet.getGateway(), interfaceName); // trunk + if (gwMacAddress == null) { + continue; + } + NetvirtVpnUtils.createUpdateVpnInterface(dataBroker, vpnName, interfaceName, subnet.getSubnet(), + gwMacAddress, false, ipUni.getIpAddress()); + } + } + } + + private void removeElanInterface(String instanceName, Uni uni) { + String uniId = uni.getIpUniId().getValue(); + String interfaceName = uniId; + Log.info("Removing elan interface: " + uniId); + NetvirtUtils.deleteElanInterface(dataBroker, instanceName, interfaceName); + } +} diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/IpvcUniUtils.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/IpvcUniUtils.java new file mode 100644 index 00000000..29357ab0 --- /dev/null +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/IpvcUniUtils.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2016 Hewlett Packard Enterprise, Co. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.unimgr.mef.netvirt; + +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; +import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.ip.unis.IpUni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.links.Link; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.ipvc.choice.ipvc.unis.Uni; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.base.Optional; +import com.google.common.util.concurrent.CheckedFuture; + +public class IpvcUniUtils { + + private static final Logger logger = LoggerFactory.getLogger(IpvcUniUtils.class); + + public static void addUni(DataBroker dataBroker, Uni data, String interfaceName, Integer vlanId) { + try { + String uniId = data.getUniId().getValue(); + WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); + Link link = EvcUniUtils.getLink(dataBroker, uniId); + addTrunkInterface(interfaceName, MefUtils.getTrunkParentName(link), vlanId, tx); + commitTransaction(tx); + } catch (final Exception e) { + logger.error("Add uni failed !", e); + } + } + + private static void addTrunkInterface(String interfaceName, String parentInterfaceName, Integer vlanId, + WriteTransaction tx) { + logger.info("Adding VLAN trunk {} ParentRef {}", interfaceName, parentInterfaceName); + Interface trunkInterface = null; + if (vlanId != null) { + trunkInterface = NetvirtUtils.createTrunkMemberInterface(interfaceName, parentInterfaceName, vlanId); + } else { + trunkInterface = NetvirtUtils.createTrunkInterface(interfaceName, parentInterfaceName); + } + NetvirtUtils.writeInterface(trunkInterface, tx); + } + + public static org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.Uni getUni( + DataBroker dataBroker, String uniId) { + Optional optional = MdsalUtils + .read(dataBroker, LogicalDatastoreType.CONFIGURATION, MefUtils.getUniInstanceIdentifier(uniId)); + if (!optional.isPresent()) { + logger.error("Couldn't find uni {} for ipvc-uni", uniId); + return null; + } + return optional.get(); + } + + public static IpUni getIpUni(DataBroker dataBroker, String uniId, String ipUniId) { + Optional optional = MdsalUtils.read(dataBroker, LogicalDatastoreType.CONFIGURATION, + MefUtils.getIpUniInstanceIdentifier(uniId, ipUniId)); + + if (!optional.isPresent()) { + logger.error("A matching IpUni doesn't exist Uni {} IpUni {}", uniId, ipUniId); + return null; + } + + return optional.get(); + } + + private static void commitTransaction(WriteTransaction tx) { + try { + CheckedFuture futures = tx.submit(); + futures.get(); + } catch (Exception e) { + logger.error("failed to commit transaction due to exception ", e); + } + } +} diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/MefUtils.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/MefUtils.java index c08da4bc..6790051e 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/MefUtils.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/MefUtils.java @@ -14,18 +14,19 @@ import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.inte import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.Unis; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.Uni; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.UniKey; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.IpUnis; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.PhysicalLayers; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.ip.unis.IpUni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.ip.unis.IpUniKey; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.Links; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.links.Link; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.interfaces.rev150526.mef.interfaces.unis.uni.physical.layers.links.LinkKey; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.MefServices; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.MefService; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.MefServiceKey; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.Evc; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.EvcBuilder; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.EvcUniCeVlans; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlan; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.uni.evc.uni.ce.vlans.EvcUniCeVlanBuilder; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.Evc; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.EvcBuilder; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.ipvc.choice.Ipvc; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.topology.rev150526.MefTopology; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.topology.rev150526.mef.topology.Devices; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.topology.rev150526.mef.topology.devices.Device; @@ -37,7 +38,8 @@ import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.type import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.EvcType; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.Identifier45; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.RetailSvcIdType; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.types.rev150526.EvcStatusType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,20 +66,20 @@ public final class MefUtils { return InstanceIdentifier.builder(MefInterfaces.class).child(Unis.class).child(Uni.class).build(); } - public static InstanceIdentifier getUnisInstanceIdentifier( + public static InstanceIdentifier getUnisInstanceIdentifier( String evcId) { return InstanceIdentifier.builder(MefServices.class) .child(MefService.class, new MefServiceKey(RetailSvcIdType.getDefaultInstance(evcId))).child(Evc.class) - .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.Unis.class) + .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.Unis.class) .build(); } - public static InstanceIdentifier getEvcUniInstanceIdentifier( + public static InstanceIdentifier getEvcUniInstanceIdentifier( String uniId) { return InstanceIdentifier.builder(MefServices.class).child(MefService.class).child(Evc.class) - .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.Unis.class) - .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni.class, - new org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.UniKey( + .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.Unis.class) + .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni.class, + new org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.UniKey( new Identifier45(uniId))) .build(); } @@ -89,6 +91,12 @@ public final class MefUtils { .child(Link.class, new LinkKey(new Identifier45(deviceId), interfaceId)).build(); } + public static InstanceIdentifier getIpUniInstanceIdentifier(String uniId, String ipUniId) { + return InstanceIdentifier.builder(MefInterfaces.class).child(Unis.class) + .child(Uni.class, new UniKey(new Identifier45(uniId))).child(IpUnis.class) + .child(IpUni.class, new IpUniKey(new Identifier45(ipUniId))).build(); + } + public static InstanceIdentifier getEvcInstanceIdentifier() { return getMefServiceInstanceIdentifier().child(Evc.class); } @@ -97,8 +105,7 @@ public final class MefUtils { return InstanceIdentifier.create(MefServices.class).child(MefService.class); } - public static InstanceIdentifier getMefServiceInstanceIdentifier( - RetailSvcIdType retailSvcIdType) { + public static InstanceIdentifier getMefServiceInstanceIdentifier(RetailSvcIdType retailSvcIdType) { return InstanceIdentifier.create(MefServices.class).child(MefService.class, new MefServiceKey(retailSvcIdType)); } @@ -119,14 +126,14 @@ public final class MefUtils { .child(Evc.class).build(); } - private static InstanceIdentifier getEvcUniInstanceIdentifier( + private static InstanceIdentifier getEvcUniInstanceIdentifier( String serviceName, String uniId) { return InstanceIdentifier.builder(MefServices.class) .child(MefService.class, new MefServiceKey(RetailSvcIdType.getDefaultInstance(serviceName))) .child(Evc.class) - .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.Unis.class) - .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni.class, // - new org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.UniKey( + .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.Unis.class) + .child(org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni.class, // + new org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.UniKey( Identifier45.getDefaultInstance(uniId))) .build(); } @@ -158,7 +165,7 @@ public final class MefUtils { public static Boolean EvcUniExists(DataBroker dataBroker, String instanceName, String uniId) { logger.info("searching for uni id {} in service {}", uniId, instanceName); - Optional uni = MdsalUtils + Optional uni = MdsalUtils .read(dataBroker, LogicalDatastoreType.CONFIGURATION, getEvcUniInstanceIdentifier(instanceName, uniId)); if (uni.isPresent()) { logger.info("found uni"); @@ -168,4 +175,34 @@ public final class MefUtils { return uni.isPresent(); } + public static String getTrunkParentName(Link link) { + String interfaceName = link.getInterface().toString(); + return interfaceName; + } + + public static String getInterfaceName(Link link, String uniId) { + String device = link.getDevice().getValue(); + return NetvirtUtils.getDeviceInterfaceName(device, uniId); + } + + public static InstanceIdentifier getIpvcInstanceIdentifier() { + return InstanceIdentifier.create(MefServices.class).child(MefService.class).child(Ipvc.class); + } + + public static String ipPrefixToString(IpPrefix ipAddress) { + if (ipAddress.getIpv4Prefix() != null) { + return ipAddress.getIpv4Prefix().getValue(); + } + + return ipAddress.getIpv6Prefix().getValue(); + } + + public static String ipAddressToString(IpAddress ipAddress) { + if (ipAddress.getIpv4Address() != null) { + return ipAddress.getIpv4Address().getValue(); + } + + return ipAddress.getIpv6Address().getValue(); + } + } diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtUtils.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtUtils.java index 1095a7ab..6d1a9d9f 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtUtils.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtUtils.java @@ -9,7 +9,17 @@ package org.opendaylight.unimgr.mef.netvirt; import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.genius.interfacemanager.globals.IfmConstants; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceBuilder; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceBuilder; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.L2vlan; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState; @@ -34,12 +44,17 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterface; import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterfaceBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.interfaces.ElanInterfaceKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.Adjacencies; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.base.Optional; public class NetvirtUtils { + private static final Logger logger = LoggerFactory.getLogger(MdsalUtils.class); + public final static String VLAN_SEPARATOR = "."; public static void createElanInstance(DataBroker dataBroker, String instanceName, boolean isEtree) { @@ -182,4 +197,84 @@ public class NetvirtUtils { public static Optional getIetfInterface(DataBroker dataBroker, String interfaceName) { return MdsalUtils.read(dataBroker, LogicalDatastoreType.CONFIGURATION, getInterfaceIdentifier(interfaceName)); } + + public static String getDeviceInterfaceName(String deviceName, String interfaceName) { + return deviceName + IfmConstants.OF_URI_SEPARATOR + interfaceName; + } + + public static void writeInterface(Interface iface, WriteTransaction tx) { + String interfaceName = iface.getName(); + InstanceIdentifier interfaceIdentifier = createInterfaceIdentifier(interfaceName); + tx.put(LogicalDatastoreType.CONFIGURATION, interfaceIdentifier, iface, true); + } + + public static void write(Interface iface, WriteTransaction tx) { + String interfaceName = iface.getName(); + InstanceIdentifier interfaceIdentifier = createInterfaceIdentifier(interfaceName); + tx.put(LogicalDatastoreType.CONFIGURATION, interfaceIdentifier, iface, true); + } + + public static void delete(String interfaceName, WriteTransaction tx) { + InstanceIdentifier interfaceIdentifier = createInterfaceIdentifier(interfaceName); + tx.delete(LogicalDatastoreType.CONFIGURATION, interfaceIdentifier); + } + + public static boolean waitForGeniusToUpdateInterface(DataBroker dataBroker, String interfaceName) { + int retries = 10; + + while (retries > 0) { + Optional optional = MdsalUtils + .read(dataBroker, LogicalDatastoreType.OPERATIONAL, getStateInterfaceIdentifier(interfaceName)); + + if (!optional.isPresent()) { + logger.info("State interface {} doesn't exist", interfaceName); + } else { + org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface stateInterface = optional + .get(); + + if (stateInterface.getIfIndex() != null) { + logger.info("State interface configured with ifIndex {}", stateInterface.getIfIndex()); + + // Wait a bit, because if we continue too soon this will not + // work. + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + } + + return true; + } + } + + retries -= 1; + try { + Thread.sleep(1500); + } catch (InterruptedException e) { + } + } + + return false; + } + + private static InstanceIdentifier createInterfaceIdentifier(String interfaceName) { + return InstanceIdentifier.builder(Interfaces.class).child(Interface.class, new InterfaceKey(interfaceName)) + .build(); + } + + public static void createInterface(DataBroker dataBroker, String instanceName, String interfaceName, + EtreeInterfaceType etreeInterfaceType, boolean isEtree) { + boolean result = NetvirtUtils.waitForGeniusToUpdateInterface(dataBroker, interfaceName); + if (!result) { + logger.error("State interface {} is not configured (missing ifIndex)", interfaceName); + return; + } + + logger.info("Adding {} interface: {}", isEtree ? "etree" : "elan", interfaceName); + + if (isEtree) { + NetvirtUtils.createEtreeInterface(dataBroker, instanceName, interfaceName, etreeInterfaceType); + } else { + NetvirtUtils.createElanInterface(dataBroker, instanceName, interfaceName); + } + } } diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtVpnUtils.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtVpnUtils.java new file mode 100644 index 00000000..5d855358 --- /dev/null +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NetvirtVpnUtils.java @@ -0,0 +1,406 @@ +/* + * Copyright (c) 2016 Hewlett Packard Enterprise, Co. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.unimgr.mef.netvirt; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import org.apache.commons.net.util.SubnetUtils; +import org.apache.commons.net.util.SubnetUtils.SubnetInfo; +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; +import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.genius.mdsalutil.MDSALUtil; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargetsBuilder; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceBuilder; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4FamilyBuilder; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceBuilder; +import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid; +import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.OdlArputilService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.SendArpRequestInput; +import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.SendArpRequestInputBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.interfaces.InterfaceAddress; +import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.interfaces.InterfaceAddressBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.Adjacencies; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.AdjacenciesBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.adjacency.list.Adjacency; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.adjacency.list.AdjacencyBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkMaps; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NeutronVpnPortipPortData; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.SubnetAddedToVpnBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.Subnetmaps; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.networkmaps.NetworkMap; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.networkmaps.NetworkMapBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.networkmaps.NetworkMapKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPort; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPortBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPortKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.SubnetmapBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.SubnetmapKey; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.google.common.base.Optional; + +public class NetvirtVpnUtils { + private static final Logger logger = LoggerFactory.getLogger(NetvirtVpnUtils.class); + private final static String ELAN_PREFIX = "elan."; + private final static String TRUNK_SUFFIX = "-trunk"; + private final static String VLAN_SEPARATOR = "."; + private final static String IP_ADDR_SUFFIX = "/32"; + private final static String IP_MUSK_SEPARATOR = "/"; + private final static int MaxRetries = 10; + + public static void createVpnInstance(DataBroker dataBroker, String instanceName) { + VpnInstanceBuilder builder = new VpnInstanceBuilder(); + builder.setVpnInstanceName(instanceName); + Ipv4FamilyBuilder ipv4FamilyBuilder = new Ipv4FamilyBuilder(); + ipv4FamilyBuilder.setVpnTargets(new VpnTargetsBuilder().build()); + // WA till netvirt will allow creation of VPN without RD + UUID vpnId = UUID.fromString(instanceName); + String rd = String.valueOf(Math.abs(vpnId.getLeastSignificantBits())); + ipv4FamilyBuilder.setRouteDistinguisher(rd); + builder.setIpv4Family(ipv4FamilyBuilder.build()); + + MdsalUtils.syncUpdate(dataBroker, LogicalDatastoreType.CONFIGURATION, + getVpnInstanceInstanceIdentifier(instanceName), builder.build()); + } + + public static void createUpdateVpnInterface(DataBroker dataBroker, String vpnName, String interfaceName, + IpPrefix ifPrefix, MacAddress macAddress, boolean primary, IpPrefix gwIpAddress) { + synchronized (interfaceName.intern()) { + String ipAddress = null; + String nextHopIp = null; + if (primary) { + ipAddress = getPrefixFromSubnet(MefUtils.ipPrefixToString(ifPrefix)); + } else { + ipAddress = MefUtils.ipPrefixToString(ifPrefix); + nextHopIp = getIpAddressFromPrefix(MefUtils.ipPrefixToString(gwIpAddress)); + } + + Adjacencies adjancencies = buildInterfaceAdjacency(ipAddress, macAddress, primary, nextHopIp); + VpnInterfaceBuilder einterfaceBuilder = createVpnInterface(vpnName, interfaceName, adjancencies); + + MdsalUtils.syncUpdate(dataBroker, LogicalDatastoreType.CONFIGURATION, + getVpnInterfaceInstanceIdentifier(interfaceName), einterfaceBuilder.build()); + } + } + + private static Adjacencies buildInterfaceAdjacency(String ipAddress, MacAddress macAddress, boolean primary, + String nextHopIp) { + AdjacenciesBuilder builder = new AdjacenciesBuilder(); + List list = new ArrayList(); + + AdjacencyBuilder aBuilder = new AdjacencyBuilder(); + aBuilder.setIpAddress(ipAddress); + aBuilder.setMacAddress(macAddress.getValue()); + aBuilder.setPrimaryAdjacency(primary); + if (nextHopIp != null) { + aBuilder.setNextHopIpList(Arrays.asList(nextHopIp)); + } + list.add(aBuilder.build()); + + builder.setAdjacency(list); + return builder.build(); + } + + private static VpnInterfaceBuilder createVpnInterface(String instanceName, String interfaceName, + Adjacencies adjacencies) { + VpnInterfaceBuilder einterfaceBuilder = new VpnInterfaceBuilder(); + einterfaceBuilder.setVpnInstanceName(instanceName); + einterfaceBuilder.setName(interfaceName); + einterfaceBuilder.addAugmentation(Adjacencies.class, adjacencies); + return einterfaceBuilder; + } + + private static InstanceIdentifier getVpnInstanceInstanceIdentifier(String instanceName) { + return InstanceIdentifier.builder(VpnInstances.class).child(VpnInstance.class, new VpnInstanceKey(instanceName)) + .build(); + } + + private static InstanceIdentifier getVpnInterfaceInstanceIdentifier(String interfaceName) { + return InstanceIdentifier.builder(VpnInterfaces.class) + .child(VpnInterface.class, new VpnInterfaceKey(interfaceName)).build(); + } + + public static void createVpnPortFixedIp(DataBroker dataBroker, String vpnName, String portName, IpPrefix ipAddress, + MacAddress macAddress) { + String fixedIpPrefix = MefUtils.ipPrefixToString(ipAddress); + String fixedIp = getIpAddressFromPrefix(fixedIpPrefix); + createVpnPortFixedIp(dataBroker, vpnName, portName, fixedIp, macAddress); + } + + public static void createVpnPortFixedIp(DataBroker dataBroker, String vpnName, String portName, IpAddress ipAddress, + MacAddress macAddress) { + String fixedIp = MefUtils.ipAddressToString(ipAddress); + createVpnPortFixedIp(dataBroker, vpnName, portName, fixedIp, macAddress); + } + + public static void createVpnPortFixedIp(DataBroker dataBroker, String vpnName, String portName, String fixedIp, + MacAddress macAddress) { + synchronized ((vpnName + fixedIp).intern()) { + InstanceIdentifier id = buildVpnPortipToPortIdentifier(vpnName, fixedIp); + VpnPortipToPortBuilder builder = new VpnPortipToPortBuilder() + .setKey(new VpnPortipToPortKey(fixedIp, vpnName)).setVpnName(vpnName).setPortFixedip(fixedIp) + .setPortName(portName).setMacAddress(macAddress.getValue()).setSubnetIp(true).setConfig(true) + .setLearnt(false); + MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.OPERATIONAL, id, builder.build()); + logger.debug( + "Interface to fixedIp added: {}, vpn {}, interface {}, mac {} added to " + "VpnPortipToPort DS", + fixedIp, vpnName, portName, macAddress); + } + } + + static InstanceIdentifier buildNetworkMapIdentifier(Uuid networkId) { + InstanceIdentifier id = InstanceIdentifier.builder(NetworkMaps.class) + .child(NetworkMap.class, new NetworkMapKey(networkId)).build(); + return id; + } + + private static void createSubnetToNetworkMapping(DataBroker dataBroker, Uuid subnetId, Uuid networkId) { + InstanceIdentifier networkMapIdentifier = buildNetworkMapIdentifier(networkId); + Optional optionalNetworkMap = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, + networkMapIdentifier); + NetworkMapBuilder nwMapBuilder = null; + if (optionalNetworkMap.isPresent()) { + nwMapBuilder = new NetworkMapBuilder(optionalNetworkMap.get()); + } else { + nwMapBuilder = new NetworkMapBuilder().setKey(new NetworkMapKey(networkId)).setNetworkId(networkId); + logger.debug("Adding a new network node in NetworkMaps DS for network {}", networkId.getValue()); + } + List subnetIdList = nwMapBuilder.getSubnetIdList(); + if (subnetIdList == null) { + subnetIdList = new ArrayList<>(); + } + subnetIdList.add(subnetId); + nwMapBuilder.setSubnetIdList(subnetIdList); + MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.CONFIGURATION, networkMapIdentifier, nwMapBuilder.build()); + logger.debug("Created subnet-network mapping for subnet {} network {}", subnetId.getValue(), + networkId.getValue()); + } + + private static InstanceIdentifier buildVpnPortipToPortIdentifier(String vpnName, String fixedIp) { + InstanceIdentifier id = InstanceIdentifier.builder(NeutronVpnPortipPortData.class) + .child(VpnPortipToPort.class, new VpnPortipToPortKey(fixedIp, vpnName)).build(); + return id; + } + + public static void addDirectSubnetToVpn(DataBroker dataBroker, + final NotificationPublishService notificationPublishService, String vpnName, String subnetName, + IpPrefix subnetIpPrefix, String interfaceName) { + InstanceIdentifier elanIdentifierId = InstanceIdentifier.builder(ElanInstances.class) + .child(ElanInstance.class, new ElanInstanceKey(subnetName)).build(); + Optional elanInstance = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, + elanIdentifierId); + if (!elanInstance.isPresent()) { + logger.error("Trying to add invalid elan {} to vpn {}", subnetName, vpnName); + return; + } + Long elanTag = elanInstance.get().getElanTag(); + + Uuid subnetId = new Uuid(subnetName); + logger.info("Adding subnet {} {} to elan map", subnetId); + createSubnetToNetworkMapping(dataBroker, subnetId, subnetId); + + String subnetIp = getSubnetFromPrefix(MefUtils.ipPrefixToString(subnetIpPrefix)); + logger.info("Adding subnet {} {} to vpn {}", subnetName, subnetIp, vpnName); + updateSubnetNode(dataBroker, new Uuid(vpnName), subnetId, subnetIp); + + logger.info("Adding port {} to subnet {}", interfaceName, subnetName); + updateSubnetmapNodeWithPorts(dataBroker, subnetId, new Uuid(interfaceName)); + + logger.info("Publish subnet {}", subnetName); + publishSubnetAddNotification(notificationPublishService, subnetId, subnetIp, vpnName, elanTag); + + } + + protected static void updateSubnetNode(DataBroker dataBroker, Uuid vpnId, Uuid subnetId, String subnetIp) { + Subnetmap subnetmap = null; + SubnetmapBuilder builder = null; + InstanceIdentifier id = InstanceIdentifier.builder(Subnetmaps.class) + .child(Subnetmap.class, new SubnetmapKey(subnetId)).build(); + + synchronized (subnetId.getValue().intern()) { + Optional sn = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, id); + if (sn.isPresent()) { + builder = new SubnetmapBuilder(sn.get()); + logger.debug("updating existing subnetmap node for subnet ID {}", subnetId.getValue()); + } else { + builder = new SubnetmapBuilder().setKey(new SubnetmapKey(subnetId)).setId(subnetId); + logger.debug("creating new subnetmap node for subnet ID {}", subnetId.getValue()); + } + + builder.setSubnetIp(subnetIp); + builder.setNetworkId(subnetId); + builder.setVpnId(vpnId); + + subnetmap = builder.build(); + logger.debug("Creating/Updating subnetMap node: {} ", subnetId.getValue()); + MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.CONFIGURATION, id, subnetmap); + } + } + + private static void updateSubnetmapNodeWithPorts(DataBroker dataBroker, Uuid subnetId, Uuid portId) { + Subnetmap subnetmap = null; + InstanceIdentifier id = InstanceIdentifier.builder(Subnetmaps.class) + .child(Subnetmap.class, new SubnetmapKey(subnetId)).build(); + synchronized (subnetId.getValue().intern()) { + Optional sn = MDSALUtil.read(dataBroker, LogicalDatastoreType.CONFIGURATION, id); + if (sn.isPresent()) { + SubnetmapBuilder builder = new SubnetmapBuilder(sn.get()); + if (null != portId) { + List portList = builder.getPortList(); + if (null == portList) { + portList = new ArrayList(); + } + portList.add(portId); + builder.setPortList(portList); + logger.debug("Updating subnetmap node {} with port {}", subnetId.getValue(), portId.getValue()); + } + subnetmap = builder.build(); + MDSALUtil.syncWrite(dataBroker, LogicalDatastoreType.CONFIGURATION, id, subnetmap); + } else { + logger.error("Trying to update non-existing subnetmap node {} ", subnetId.getValue()); + } + } + } + + private static void publishSubnetAddNotification(final NotificationPublishService notificationPublishService, + Uuid subnetId, String subnetIp, String vpnName, Long elanTag) { + SubnetAddedToVpnBuilder builder = new SubnetAddedToVpnBuilder(); + + logger.info("publish notification called"); + + builder.setSubnetId(subnetId); + builder.setSubnetIp(subnetIp); + builder.setVpnName(vpnName); + builder.setExternalVpn(true); + builder.setElanTag(elanTag); + + try { + notificationPublishService.putNotification(builder.build()); + } catch (InterruptedException e) { + logger.error("Fail to publish notification {}", builder, e); + throw new RuntimeException(e.getMessage()); + } + } + + private static String getIpAddressFromPrefix(String prefix) { + return prefix.split(IP_MUSK_SEPARATOR)[0]; + } + + private static String getMaskFromPrefix(String prefix) { + return prefix.split(IP_MUSK_SEPARATOR)[1]; + } + + private static String getSubnetFromPrefix(String prefix) { + SubnetInfo subnet = new SubnetUtils(prefix).getInfo(); + return subnet.getNetworkAddress() + IP_MUSK_SEPARATOR + getMaskFromPrefix(prefix); + } + + private static String getPrefixFromSubnet(String prefix) { + String myAddress = getIpAddressFromPrefix(prefix); + return myAddress + IP_ADDR_SUFFIX; + } + + public static String getElanNameForVpnPort(String portName) { + return getUUidFromString(ELAN_PREFIX + portName); + } + + public static String getInterfaceNameForVlan(String interfaceName, Integer vlan) { + final StringBuilder s = new StringBuilder(); + s.append(interfaceName); + if (vlan != null) { + s.append(VLAN_SEPARATOR).append(vlan); + } + s.append(TRUNK_SUFFIX); + return getUUidFromString(s.toString()); + } + + public static String getUUidFromString(String key) { + return java.util.UUID.nameUUIDFromBytes(key.getBytes()).toString(); + } + + public static MacAddress resolveGwMac(DataBroker dataBroker, OdlArputilService arpUtilService, String vpnName, + IpPrefix srcIpPrefix, IpAddress dstIpAddress, String interf) { + + String srcTpAddressStr = getIpAddressFromPrefix(MefUtils.ipPrefixToString(srcIpPrefix)); + IpAddress srcIpAddress = new IpAddress(srcTpAddressStr.toCharArray()); + + if (srcIpAddress == null || dstIpAddress == null) { + logger.error("Can't send ARP to srcIp {} dstIp {}", srcIpAddress, dstIpAddress); + throw new RuntimeException("Can't send ARP for dstIp " + dstIpAddress); + } + + MacAddress macAddress = null; + int retries = MaxRetries; + while (retries > 0 && macAddress == null) { + sendArpRequest(arpUtilService, srcIpAddress, dstIpAddress, interf); + macAddress = waitForArpReplyProcessing(dataBroker, vpnName, dstIpAddress, MaxRetries); + retries--; + } + return macAddress; + } + + private static void sendArpRequest(OdlArputilService arpUtilService, IpAddress srcIpAddress, IpAddress dstIpAddress, + String interf) { + try { + List interfaceAddresses = new ArrayList<>(); + interfaceAddresses + .add(new InterfaceAddressBuilder().setInterface(interf).setIpAddress(srcIpAddress).build()); + + SendArpRequestInput sendArpRequestInput = new SendArpRequestInputBuilder().setIpaddress(dstIpAddress) + .setInterfaceAddress(interfaceAddresses).build(); + arpUtilService.sendArpRequest(sendArpRequestInput); + } catch (Exception e) { + logger.error("Failed to send ARP request to IP {} from interfaces {}", + dstIpAddress.getIpv4Address().getValue(), interf, e); + throw new RuntimeException(e.getMessage()); + } + } + + public static MacAddress waitForArpReplyProcessing(DataBroker dataBroker, String vpnName, IpAddress dstIpAddress, + int retries) { + while (retries > 0) { + InstanceIdentifier optionalPortIpId = buildVpnPortipToPortIdentifier(vpnName, + MefUtils.ipAddressToString(dstIpAddress)); + Optional optionalPortIp = MdsalUtils.read(dataBroker, LogicalDatastoreType.OPERATIONAL, + optionalPortIpId); + + if (optionalPortIp.isPresent()) { + return new MacAddress(optionalPortIp.get().getMacAddress()); + } else { + sleep(); + } + } + return null; + } + + private static void sleep() { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + } + } +} diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NodeConnectorListener.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NodeConnectorListener.java index 48a705a5..d58f3232 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NodeConnectorListener.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/NodeConnectorListener.java @@ -45,7 +45,6 @@ import com.google.common.util.concurrent.CheckedFuture; public class NodeConnectorListener extends UnimgrDataTreeChangeListener { private static final Logger log = LoggerFactory.getLogger(NodeConnectorListener.class); - private static final Logger logger = LoggerFactory.getLogger(NodeConnectorListener.class); private static boolean handleRemovedNodeConnectors = false; private ListenerRegistration evcListenerRegistration; @@ -158,9 +157,9 @@ public class NodeConnectorListener extends UnimgrDataTreeChangeListener { if (!optionalServices.isPresent()) { return; } + for (MefService service : optionalServices.get().getMefService()) { - for (org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni serviceUni : service - .getEvc().getUnis().getUni()) { + for (org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni serviceUni : TenantEnhancerUtils + .GetEvc(service).getUnis().getUni()) { if (!TenantEnhancerUtils.isServiceTenanted(service) && serviceUni.getUniId().equals(uni.getUniId())) { log.info("instance identifier is {}", MefUtils.getMefServiceInstanceIdentifier(service.getSvcId())); TenantEnhancerUtils.updateService(dataBroker, tenant, service); diff --git a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/TenantlessEvcListener.java b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/TenantlessEvcListener.java index 8579c9e8..4ba3f4a4 100644 --- a/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/TenantlessEvcListener.java +++ b/netvirt/src/main/java/org/opendaylight/unimgr/mef/netvirt/TenantlessEvcListener.java @@ -15,9 +15,9 @@ import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier; import org.opendaylight.controller.md.sal.binding.api.DataTreeModification; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.unimgr.api.UnimgrDataTreeChangeListener; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.Evc; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.Evc; import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.MefService; -import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.evc.unis.Uni; +import org.opendaylight.yang.gen.v1.http.metroethernetforum.org.ns.yang.mef.services.rev150526.mef.services.mef.service.mef.service.choice.evc.choice.evc.unis.Uni; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,7 +77,7 @@ public class TenantlessEvcListener extends UnimgrDataTreeChangeListener - + + + @@ -23,11 +27,18 @@ - - + + + + + + + + + + + + - - - \ No newline at end of file