new legato models from Mahesh 25/67025/1
authorBartosz Michalik <bartosz.michalik@amartus.com>
Thu, 21 Dec 2017 14:11:38 +0000 (15:11 +0100)
committerBartosz Michalik <Bartosz.Michalik@amartus.com>
Wed, 10 Jan 2018 17:45:10 +0000 (18:45 +0100)
I have changed relation between yangs to reflect revision data as this is needed
to support multiple versions for these modules

Change-Id: Iabc3de4f73fd711bf93c35a0d2c046e9da648870
Signed-off-by: Bartosz Michalik <Bartosz.Michalik@amartus.com>
legato-api/src/main/yang/mef-global.yang
legato-api/src/main/yang/mef-global@2017-12-15.yang [new file with mode: 0644]
legato-api/src/main/yang/mef-interfaces.yang
legato-api/src/main/yang/mef-legato-interfaces@2017-12-15.yang [new file with mode: 0644]
legato-api/src/main/yang/mef-legato-services@2017-12-15.yang [new file with mode: 0644]
legato-api/src/main/yang/mef-services.yang
legato-api/src/main/yang/mef-topology.yang
legato-api/src/main/yang/mef-types@2017-12-15.yang [new file with mode: 0644]
legato-api/src/main/yang/unimgr-dhcp.yang

index 68af42954b61e4106a120bfe4227eb43a1f3bbca..423179e760b39a018f200a3cf2ae18d3d788b5bf 100644 (file)
@@ -3,7 +3,10 @@ module mef-global {
   prefix mef-global;\r
   import ietf-yang-types { prefix yang; }\r
   import ietf-inet-types { prefix inet; }\r
-  import mef-types { prefix mef-types; }\r
+  import mef-types {\r
+    prefix mef-types;\r
+    revision-date 2015-05-26;\r
+  }\r
   organization "Metro Ethernet Forum";\r
   contact\r
     "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org\r
diff --git a/legato-api/src/main/yang/mef-global@2017-12-15.yang b/legato-api/src/main/yang/mef-global@2017-12-15.yang
new file mode 100644 (file)
index 0000000..6eb0fb8
--- /dev/null
@@ -0,0 +1,1517 @@
+module mef-global {
+  namespace "urn:mef:yang:mef-global";
+  prefix mef-global;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+  import ietf-inet-types {
+    prefix inet;
+  }
+  import mef-types {
+    prefix mef-types;
+    revision-date 2017-12-15;
+  }
+
+  organization "MEF Forum";
+  contact
+    "Web URL: http://mef.net/
+     E-mail:  namespace@mef.net
+     Postal:  MEF 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:
+     [MEF10.3] refers to MEF 10.3
+     'Ethernet Services Attributes Phase 3', October 2013
+     [MEF10.3.1] refers to MEF 10.3.1
+     'Composite Performance Metric (CPM) Amendment to MEF 10.3',
+     February 2015
+     [MEF6.2] refers to MEF 6.2
+     'EVC Ethernet Services Defintions Phase 3', August 2014
+     [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014
+     [MEF7.3] refers to MEF 7.3
+     'Carrier Ethernet Management Information Model', February 2017";
+
+  revision 2017-12-15 {
+    description
+      "Initial Version.";
+    reference
+      "Legato - Services YANG SCA (MEF XX)";
+  }
+
+  container mef-global {
+    description
+      "MEF Global Profiles. This container includes
+       profiles for SLSs, CoS Name, Bandwidth Profile
+       parameter Sets, CoS and EEC ID Mappings etc.
+       These can be refered to from individual services
+       to save repeating the same information for each
+       service.";
+
+    container sls-profiles {
+      description
+        "Container for a list of SLS Profiles";
+      list profile {
+        key "id";
+        description
+          "List of SLS profiles.";
+        leaf id {
+          type mef-types:identifier1024;
+          description
+            "The SLS profile ID identifies an SLS profile
+             that can be referenced from one or more specific
+             services.";
+        }
+        leaf time-interval {
+          type uint64;
+          units "seconds";
+          mandatory true;
+          description
+            "The time period, in seconds, over which SLS
+             performance metrics are evaluated.  This is
+             often denoted 'T'.";
+          reference
+             "[MEF10.3], Section 8.8, [R32]";
+        }
+        container pm-cos-name-entries {
+          description
+            "Container for a list of CoS-Name-specific SLS
+             parameters";
+          list pm-cos-name-entry {
+            key "cos-name";
+            min-elements 1;
+            description
+              "List of Performance Metrics based SLS entries
+               by Class of Service Names";
+            leaf cos-name {
+              type leafref {
+                path "/mef-global:mef-global/cos-names-profiles/" +
+                     "profile/name";
+              }
+              description
+                "CoS Name Identifier.";
+            }
+            leaf delta-t {
+              type uint64;
+              units "ms";
+              mandatory true;
+              description
+                "The time interval over which loss is measured
+                 for the purpose of calculating Availability and
+                 related performance metrics.  This is much smaller
+                 than the time period over which SLS objectives are
+                 evaluated ('T').";
+              reference
+                "[MEF10.3] Section 8.8";
+            }
+            leaf threshold-c {
+              type mef-types:simple-percent;
+              units "percent";
+              mandatory true;
+              description
+                "Unavailability frame loss ratio threshold expressed
+                 in percentage.";
+              reference
+                "[MEF10.3] Section 8.8";
+            }
+            leaf consecutive-interval-n {
+              type uint8;
+              mandatory true;
+              description
+                "Number of consecutive small time intervals to assess.";
+              reference
+                "[MEF10.3] Section 8.8";
+            }
+            container pm-entries {
+              description
+                "Container for a list of performance objectives for
+                 this CoS Name and SLS Profile.";
+              list pm-entry {
+                key "id";
+                min-elements 1;
+                description
+                  "List of performance objectives for this CoS Name that
+                   form part of this SLS Profile.  Each performance
+                   objective pertains to a particular Performance Metric
+                   and has a number of other parameters.  Zero, one or
+                   more performance objectives may be specified for each
+                   Performance Metric, but two objectives for the same
+                   metric must not be functionally identical.";
+                reference
+                  "[MEF10.3] Section 8.8";
+                leaf id {
+                  type mef-types:identifier1024;
+                  description
+                    "Identifier for specific performance profile.";
+                }
+                choice one-way-performance-metric {
+                  mandatory true;
+                  description
+                    "Choice of different One-Way Performance
+                     Objectives";
+                  case fd {
+                    container one-way-frame-delay-pm {
+                      description
+                        "One-Way Frame Delay (FD).";
+                      reference
+                         "[MEF10.3] Section 8.8.1";
+                      leaf percentile {
+                        type mef-types:simple-percent;
+                        units "percent";
+                        mandatory true;
+                        description
+                          "Frame Delay Performance Percentile.";
+                        reference
+                          "[MEF10.3] Section 8.8.1";
+                      }
+                      leaf objective {
+                        type uint64;
+                        units "ms";
+                        mandatory true;
+                        description
+                          "Frame Delay Performance Objective.";
+                        reference
+                          "[MEF10.3] Section 8.8.1";
+                      }
+                    }
+                  }
+                  case mfd {
+                    container one-way-mean-frame-delay-pm {
+                      description
+                        "One-Way Mean Frame Delay (MFD).";
+                      reference
+                        "[MEF10.3] Section 8.8.1.";
+                      leaf objective {
+                        type uint64;
+                        units "ms";
+                        mandatory true;
+                        description
+                          "Mean Frame Delay Performance Objective.";
+                      }
+                    }
+                  }
+                  case fdr {
+                    container one-way-frame-delay-range-pm {
+                      description
+                        "One-Way Frame Delay Range (FDR)";
+                      reference
+                        "[MEF10.3] Section 8.8.1";
+                      leaf percentile {
+                        type mef-types:simple-percent;
+                        units "percent";
+                        mandatory true;
+                        description
+                          "Frame Delay Range Performance Percentile.";
+                        reference
+                          "[MEF10.3] Section 8.8.1";
+                      }
+                      leaf objective {
+                        type uint64;
+                        units "ms";
+                        mandatory true;
+                        description
+                          "Frame Delay Range Performance Objective.";
+                        reference
+                          "[MEF10.3] Section 8.8.1";
+                      }
+                    }
+                  }
+                  case ifdv {
+                    container one-way-inter-frame-delay-variation-pm {
+                      description
+                        "One-Way Inter-Frame Delay Variation (IFDV).";
+                      reference
+                        "[MEF10.3] Section 8.8.2";
+                      leaf percentile {
+                        type mef-types:simple-percent;
+                        units "percent";
+                        mandatory true;
+                        description
+                          "Inter-Frame Delay Variation Performance
+                           Percentile.";
+                        reference
+                          "[MEF10.3] Section 8.8.2";
+                      }
+                      leaf frame-pair-separation {
+                        type uint64;
+                        units "ms";
+                        mandatory true;
+                        description
+                          "Inter-Frame Delay Variation frame pair
+                           separation interval.";
+                        reference
+                          "[MEF10.3] Section 8.8.2";
+                      }
+                      leaf objective {
+                        type uint64;
+                        units "ms";
+                        mandatory true;
+                        description
+                          "Inter-Frame Delay Variation Performance
+                           Objective.";
+                        reference
+                          "[MEF10.3] Section 8.8.2";
+                      }
+                    }
+                  }
+                  case flr {
+                    container one-way-frame-loss-ratio-pm {
+                      description
+                        "One-Way Frame Loss Ration (FLR)";
+                      reference
+                         "[MEF10.3] Section 8.8.3.";
+                      leaf objective {
+                        type mef-types:simple-percent;
+                        units "percent";
+                        mandatory true;
+                        description
+                          "Frame Loss Ratio Performance Objective";
+                        reference
+                          "[MEF10.3] Section 8.8.3.";
+                      }
+                    }
+                  }
+                  case availability {
+                    container one-way-availability-pm {
+                      description
+                        "One-Way Availability";
+                      leaf objective {
+                        type mef-types:simple-percent;
+                        units "percent";
+                        mandatory true;
+                        description
+                          "Availability Performance Metric Objective";
+                        reference
+                          "[MEF10.3] Section 8.8.4.";
+                      }
+                    }
+                  }
+                  case hli {
+                    container one-way-high-loss-interval-pm {
+                      description
+                        "One-Way High Loss Intervals Count (HLI).";
+                      leaf objective {
+                        type uint64;
+                        mandatory true;
+                        description
+                          "HLI Performance Objective expressed as an
+                           integer.";
+                        reference
+                          "[MEF10.3] Section 8.8.5.";
+                      }
+                    }
+                  }
+                  case chli {
+                    container one-way-consecutive-high-loss-interval-pm {
+                      description
+                        "One-Way Consecutive High Loss Intervals Count
+                         (CHLI)";
+                      reference
+                        "[MEF10.3] Section 8.8.5.";
+                      leaf consecutive-number-p {
+                        type uint8;
+                        must ". < ../../../../consecutive-interval-n" {
+                          error-message
+                            "The value of
+                             chli-consecutive-small-time-intervals must
+                             be less than
+                             consecutive-small-time-intervals (p < n) if
+                             both are defined.";
+                          description
+                            "The value of
+                             chli-consecutive-small-time-intervals must
+                             be less than
+                             consecutive-small-time-intervals (p < n) if
+                             both are defined.";
+                          reference
+                            "[MEF10.3] Section 8.8.5";
+                        }
+                        mandatory true;
+                        description
+                          "Number of consecutive small time intervals
+                           for assessing CHLI.";
+                        reference
+                          "[MEF10.3] Table 10.";
+                      }
+                      leaf objective {
+                        type uint64;
+                        mandatory true;
+                        description
+                          "Consecutive HLI Performance Objective
+                           expressed as an integer.";
+                        reference
+                          "[MEF10.3] Section 8.8.5.";
+                      }
+                    }
+                  }
+                  case cpm {
+                    container one-way-composite-pm {
+                      description
+                        "One-Way Composite Peformance Metric (CPM)";
+                      reference
+                         "[MEF10.3.1] Section 8.8.7";
+                      leaf cpi-threshold-u {
+                        type uint8 {
+                           range "0..1";
+                        }
+                        mandatory true;
+                        description
+                          "The Composite Performance Indicator threshold
+                           which if exceeded suggests a severe errored
+                           time interval.";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                      leaf frame-loss-indicator {
+                        type boolean;
+                        mandatory true;
+                        description
+                          "The indicator for frame loss
+                           characteristics";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                      leaf frame-delay-indicator {
+                        type boolean;
+                        mandatory true;
+                        description
+                          "The indicator for frame delay
+                           characteristics";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                      leaf ifdv-indicator {
+                        type boolean;
+                        mandatory true;
+                        description
+                          "The indicator for inter-frame delay variation
+                           characteristics";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                      leaf one-way-fd-threshold {
+                        type uint64;
+                        mandatory true;
+                        description
+                          "One way frame delay threshold";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                      leaf one-way-ifdv-threshold {
+                        type uint64;
+                        mandatory true;
+                        description
+                          "One way inter-frame delay threshold";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                      leaf objective {
+                        type mef-types:simple-percent;
+                        mandatory true;
+                        description
+                          "Composite Performance Metric Objective
+                           expressed as a percentage";
+                        reference
+                          "[MEF10.3.1], Section 3";
+                      }
+                    }
+                  }
+                  case group-avail {
+                    container one-way-group-availability-pm {
+                      description
+                        "One-Way Group Availability";
+                      reference
+                        "[MEF10.3] Section 8.8.6.";
+                      leaf min-number-of-uni-pair-sets {
+                        type uint16;
+                        mandatory true;
+                        description
+                          "Minimum number of sets of ordered UNI
+                           pairs that must be available";
+                        reference
+                          "[MEF10.3] Section 8.8.6.";
+                      }
+                      leaf objective {
+                        type mef-types:simple-percent;
+                        units "percent";
+                        mandatory true;
+                        description
+                          "Group Availability Performance Objective
+                           expressed as a percentage.";
+                        reference
+                          "[MEF10.3] Section 8.8.6.";
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    container cos-names-profiles {
+      description
+        "Container for global list of CoS names.";
+      list profile {
+        key "name";
+        description
+          "List of all CoS Names used in any EVC.  This list is
+           referred to in many other places in the model.";
+        leaf name {
+          type mef-types:identifier1024;
+          description
+           "CoS Name.";
+        }
+      }
+    }
+
+    container bwp-flow-parameter-profiles {
+      description
+        "Container for a list of Bandwidth Profile Flow parameter
+         sets.";
+      list profile {
+          key "id";
+          description
+            "Bandwidth Profile parameter set.";
+          reference
+            "[MEF10.3] Section 12.1.";
+          leaf id {
+            type mef-types:identifier1024;
+            description
+              "Identifier for a Bandwidth Profile Parameter Set.";
+          }
+          leaf cir {
+            type mef-types:bwp-ir-type;
+            units "bits-per-sec";
+            mandatory true;
+            description
+              "This attribute identifies the Committed Information
+               Rate (CIR) in bits per second for one BWP flow.";
+            reference
+              "[MEF10.3] Section 12.1.";
+          }
+          leaf cir-max {
+            type mef-types:bwp-ir-type;
+            units "bits-per-sec";
+            mandatory true;
+            description
+              "This attribute identifies the Maximum Committed
+               Information Rate (CIR). This parameter limits
+               the rate of tokens added to the committed token bucket.";
+            reference
+              "[MEF10.3] Section 12.1.";
+          }
+          leaf cbs {
+            type mef-types:bwp-bs-type;
+            units "bytes";
+            mandatory true;
+            description
+              "This attribute identifies the Committed Burst Size (CBS)
+               in bytes for one BWP flow. 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.";
+            reference
+              "[MEF10.3] Section 12.1.";
+          }
+          leaf eir {
+            type mef-types:bwp-ir-type;
+            units "bits-per-sec";
+            mandatory true;
+            description
+              "This attribute identifies the Excess Information
+               Rate (EIR) in bits per second for one BWP flow.
+               This parameter limits the average rate in bits
+               per second of Service Frames that will be declared
+               Yellow by the Bandwidth Profile.";
+            reference
+              "[MEF10.3] Section 12.1.";
+          }
+          leaf eir-max {
+            type mef-types:bwp-ir-type;
+            units "bits-per-sec";
+            mandatory true;
+            description
+              "This attribute identifies the Maximum Excess
+               Information Rate (EIR) in bits per second for
+               one BWP flow. This parameter limits the rate of
+               tokens added to the excess token bucket.";
+            reference
+              "[MEF10.3] Section 12.1.";
+          }
+          leaf ebs {
+            type mef-types:bwp-bs-type;
+            units "bytes";
+            mandatory true;
+            description
+              "This attribute identifies the Excess Burst Size
+               (EBS) in bytes for one BWP flow.
+               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.";
+             reference
+               "[MEF10.3] Section 12.1.";
+          }
+          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.
+
+               A value of 'false' corresponds to setting the coupling
+               flag to 0, i.e. unused green tokens flow down to the
+               Bandwidth Profile Flow at the next lowest rank
+               within the same Bandwidth Profile Envelope.
+               A value of 'true' corresponds to setting the coupling
+               flag to 1, i.e. unused green tokens are converted to
+               yellow tokens for the same Bandwidth Profile Flow.";
+            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'.";
+            reference
+              "[MEF10.3] Section 12.1, [R151].";
+          }
+      }
+    }
+
+    container l2cp-cos-map-profiles {
+      description
+        "Container for L2CP CoS Profiles that map L2CP Protocols to CoS
+         Names.";
+      list profile {
+        key "id";
+        description
+          "Profiles for the Ingress map from L2CP Protocol to CoS
+           names.";
+        reference
+          "[MEF10.3] Section 10.2.2";
+
+        leaf id {
+          type mef-types:identifier1024;
+          description
+            "Identifies a specific profile for mapping L2CP protocols to
+             CoS names.";
+        }
+        container map-entries {
+          description
+            "Layer 2 Control Protocol (L2CP) Classes of Service (CoS).";
+          list map-entry {
+            key "protocol protocol-id";
+            min-elements 1;
+            description
+              "List of mapping entries that map L2CP protocols to CoS
+               Names. This map is applied to ingress L2CP Frames in
+               order to determine the correct CoS Name to apply.";
+            reference
+              "[MEF10.3] Section 10.2.2. [MEF45] Section 6.2.";
+            leaf protocol {
+              type mef-types:l2cp-peering-protocol-field-type;
+              description
+                "The Protocol is one of Ethertype, LLC, or Other.";
+            }
+            leaf protocol-id {
+              type uint16;
+              description
+                "The Protocol Identifier is the protocol specific value
+                 associated with the protocol and take the form of a
+                 uint16 value such as 0x8100 or 0x88a8.";
+            }
+            choice simple-or-subtypes {
+              mandatory true;
+              description
+                "Simple or subtype choice.  In the simple case, there
+                 are no subtypes and the protocol and protocol-id map
+                 directly to a CoS Name.  Otherwise, a list of subtypes
+                 is given where each subtype can map to a different CoS
+                 Name.";
+              case subtypes-option {
+                container subtypes {
+                  list subtype {
+                    key "id";
+                    min-elements 1;
+                    leaf id {
+                      type uint8;
+                      description
+                        "L2CP Subtype for this protocol and protocol
+                         ID.";
+                    }
+                    leaf cos-name {
+                      type leafref {
+                        path "/mef-global:mef-global/" +
+                             "cos-names-profiles/profile/name";
+                      }
+                      mandatory true;
+                      description
+                        "The Class of Service (CoS) Name to which L2CP
+                         frames with the given protocol ID and subtype 
+                         are mapped.";
+                    }
+                    description
+                      "List of mapping from subtypes to cos-name for a
+                       given protocol and protocol-id.";
+                  }
+                  description
+                    "Container for list of subtypes configured.";
+                }
+              }
+              case simple-option {
+                leaf cos-name {
+                  type leafref {
+                    path "/mef-global:mef-global/cos-names-profiles/" +
+                         "profile/name";
+                  }
+                  mandatory true;
+                  description
+                    "The Class of Service (CoS) Name to which L2CP frames
+                     with the given protocol ID are mapped.";
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    container l2cp-eec-profiles {
+      description
+        "Container for L2CP EEC Profiles that map L2CP Protocols to EEC
+         Names.";
+      list profile {
+        key "id";
+        description
+          "Profiles for the Egress map from L2CP Protocols to
+           Egress Equivalance Class (EEC) names.";
+        reference
+          "[MEF10.3] Section 10.4.2";
+
+        leaf id {
+          type mef-types:identifier1024;
+          description
+            "Identifies a specific profile for mapping L2CP protocols to
+             EEC names.";
+        }
+        container map-entries {
+          description
+            "Layer 2 Control Protocol (L2CP)
+             Egress Equivalance Class (EEC) Mappings.";
+          list map-entry {
+            key "protocol protocol-id";
+            min-elements 1;
+            description
+              "List of mapping entries that map L2CP protocols to EEC
+               Names. This map is applied to egress L2CP Frames in order
+               to determine the correct EEC Name to apply.";
+
+            reference
+              "[MEF10.3] Section 10.4.2. [MEF6.2] Section 6.2.";
+            leaf protocol {
+              type mef-types:l2cp-peering-protocol-field-type;
+              description
+                "The Protocol is one of Ethertype, LLC, or Other.";
+            }
+            leaf protocol-id {
+              type uint16;
+              description
+                "The Protocol Identifier is the protocol specific value
+                 associated with the protocol and take the form of a
+                 uint16 value such as 0x08100 or 0x88a8.";
+            }
+            choice simple-or-subtypes {
+              mandatory true;
+              description
+                "Simple or subtype choice.  In the simple case, there
+                 are no subtypes and the protocol and protocol-id map
+                 directly to an EEC Name.  Otherwise, a list of subtypes
+                 is given where each subtype can map to a different EEC
+                 Name.";
+              case subtypes-option {
+                container subtypes {
+                  list subtype {
+                    key "id";
+                    min-elements 1;
+                    leaf id {
+                      type uint8;
+                      description
+                        "L2CP Subtype for this protocol and protocol
+                         ID.";
+                    }
+                    leaf eec-name {
+                      type string;
+                      mandatory true;
+                      description
+                        "The Egress Equivalance Class (EEC) Name to
+                         which L2CP frames with the given protocol ID
+                         and subtype are mapped.";
+                    }
+                    description
+                      "List of mapping from subtypes to EEC names for a
+                       given protocol and protocol-id.";
+                  }
+                  description
+                    "Container for list of subtypes configured.";
+                }
+              }
+              case simple-option {
+                leaf eec-name {
+                  type string;
+                  mandatory true;
+                  description
+                    "The EEC Name to which L2CP frames with the
+                     given protocol ID are mapped.";
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    container l2cp-peering-profiles {
+      description
+        "Conatiner for profiles for Layer 2 Control Protocol (L2CP)
+         Peering Configuration.";
+      list profile {
+        key "id";
+        description
+          "A list of global profiles for Layer 2 Control Protocol
+           Peering.";
+        reference
+          "[MEF10.3] Section 8.5. [MEF45] Section 8.2.";
+        leaf id {
+          type mef-types:identifier1024;
+          description
+            "The L2CP ID identifies a specific profile for Layer 2
+            Control Protocol Peering.";
+        }
+        container l2cp-peerings {
+          description
+            "An L2CP Peering profile containing a list of Destination
+             MACs and protocols to be peered.";
+          list l2cp-peering {
+            key "dest-mac-addr protocol protocol-id";
+            min-elements 1;
+            description
+              "List of Destination MAC Addresses and Protocol IDs
+               (and optionally Subtypes) that specifies L2CP protocols
+               to be peered.";
+            reference
+              "[MEF10.3] Section 8.5. [MEF45] Section 8.2.";
+            leaf dest-mac-addr {
+              type yang:mac-address;
+              description
+                "The Destination MAC Address for the Layer 2 Control
+                 Protocol.";
+            }
+            leaf protocol {
+              type mef-types:l2cp-peering-protocol-field-type;
+              description
+                "The Protocol is one of Ethertype, LLC, or Other.";
+            }
+            leaf protocol-id {
+              type uint16;
+              description
+                "The Protocol Identifier is the protocol specific value
+                 associated with the protocol in a uint16 format such as
+                 0x8100.";
+            }
+            leaf-list subtype {
+              type uint8;
+              description
+                "If one or more Subtypes are specified, only L2CP frames
+                 with the given Destination MAC, Protocol ID and Subtype
+                 are peered.  If this list is empty, all L2CP frames
+                 with the given Destination MAC and Protocol ID are
+                 peered.";
+            }
+          }
+        }
+      }
+    }
+
+    container eec-profiles {
+      description
+        "Egress Equivalence Class (EEC) Profiles.";
+      list profile {
+        key "id";
+        description
+          "List of EEC profile";
+        leaf id {
+          type mef-types:identifier1024;
+          description
+            "This attribute identifies the EEC profile.";
+        }
+        leaf l2cp-eec-id {
+          type leafref {
+            path "/mef-global:mef-global/l2cp-eec-profiles/profile/id";
+          }
+          description
+            "L2CP EEC mapping profile identifier.  If set, this
+             identifies a profile that specifies how certain L2CP
+             frames are mapped to EEC Names within this EEC Profile.
+             If unset, it is treated as if the mapping were empty,
+             i.e. all L2CP frames are mapped to EEC Names as if
+             they were data frames.";
+          reference
+            "[MEF10.3] Section 10.4.2";
+        }
+        choice eec-id {
+          mandatory true;
+          description
+            "EEC Identifier, which specifies how Data Service Frames are
+             mapped to EEC Names.";
+          reference
+            "[MEF10.3] Section 10.4.1.";
+          case pcp {
+            description
+              "If this case is selected, the EEC ID is based on the
+               PCP.";
+            reference
+              "[MEF10.3] Section 10.4.1.1, [MEF7.3] Section 7.12.2.";
+            container eec-pcp {
+              must "default-pcp-eec-name or count(pcp) = 8" {
+                error-message
+                  "An EEC Name must be specified for all 8 PCP values if
+                   no default EEC name is specified.";
+                description
+                  "An EEC Name must be specified for all 8 PCP values if
+                   no default EEC name is specified.";
+                reference
+                  "[MEF10.3] [R115]";
+              }
+              description
+                "Parameters for mapping Data Service Frames to EEC Names
+                 when the mapping is based on the CE-VLAN PCP field.";
+              reference
+                "[MEF10.3] Section 10.4.1.1.";
+              leaf default-pcp-eec-name {
+                type string;
+                description
+                  "Default value for EEC Name for PCP when it has not
+                   been explicitly configured.";
+              }
+              list pcp {
+                key "pcp-value";
+                description
+                  "List of mappings from PCP values to EEC Names.";
+                reference
+                  "[MEF10.3] Section 10.4.1.1.";
+                leaf pcp-value {
+                  type mef-types:ieee8021p-priority-type;
+                  description
+                    "PCP value to map to the given EEC Name.";
+                  reference
+                    "[MEF10.3] Section 10.4.1.1.";
+                }
+                leaf eec-name {
+                  type string;
+                  mandatory true;
+                  description
+                    "This attribute identifies the name of a Egress
+                     Equivalence Class instance.";
+                }
+              }
+            }
+          }
+          case dscp {
+            description
+              "If this case is selected, the EEC ID is based on the
+               DSCP.";
+            reference
+              "[MEF10.3] Section 10.4.1.2, [MEF7.3] Section 7.12.3.";
+            container eec-dscp {
+              must "(default-ipv4-eec-name or " +
+                               "count(ipv4-dscp) = 64) and " +
+                   "(default-ipv6-eec-name or " +
+                               "count(ipv6-dscp) = 64)" {
+                error-message
+                  "An EEC Name must be specified for all 64 DSCP values
+                   if no default EEC name is specified.";
+                description
+                  "An EEC Name must be specified for all 64 DSCP values
+                   if no default EEC name is specified.";
+                reference
+                  "[MEF10.3] [R117] and [R118]";
+              }
+              description
+                "Parameters for mapping Data Service Frames to EEC Names
+                 when the mapping is based on the IP DS field.";
+              reference
+                "[MEF10.3] Section 10.4.1.2.";
+              leaf default-ipv4-eec-name {
+                type string;
+                description
+                  "Default EEC Name for Data Service Frames carrying
+                   IPv4 packets when the DSCP value has not been
+                   explicitly configured in the EEC map.";
+              }
+              leaf default-ipv6-eec-name {
+                type string;
+                description
+                  "Default EEC Name for Data Service Frames carrying
+                   IPv6 packets when the DSCP value has not been
+                   explicitly configured in the EEC map.";
+              }
+              list ipv4-dscp {
+                key "dscp-value";
+                description
+                  "List of mappings from DSCP values to EEC Names for
+                   Data Service Frames carrying an IPv4 packet.";
+                leaf dscp-value {
+                  type inet:dscp;
+                  description
+                    "DSCP value to map to the given EEC Name.";
+                  reference
+                    "[MEF10.3] Section 10.4.1.2.";
+                }
+                leaf eec-name {
+                  type string;
+                  mandatory true;
+                  description
+                    "This attribute identifies the name of a Egress
+                     Equivalence Class instance.";
+                }
+              }
+              list ipv6-dscp {
+                key "dscp-value";
+                description
+                  "List of mappings from DSCP values to EEC Names for
+                   Data Service Frames carrying an IPv6 packet.";
+                leaf dscp-value {
+                  type inet:dscp;
+                  description
+                    "DSCP value to map to the given EEC Name.";
+                  reference
+                    "[MEF10.3] Section 10.4.1.2.";
+                }
+                leaf eec-name {
+                  type string;
+                  mandatory true;
+                  description
+                    "This attribute identifies the name of a Egress
+                     Equivalence Class instance.";
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    container cos-profiles {
+      description
+        "Class of Service (CoS) Profiles.";
+      list profile {
+        key "id";
+        description
+          "List of CoS Profiles.  Each profile specifies how to assign a
+           CoS Name to ingress frames.";
+        reference
+          "[MEF10.3] Section 10.2.";
+        leaf id {
+          type mef-types:identifier1024;
+          description
+            "This attribute identifies the CoS profile.";
+        }
+        leaf l2cp-cos-id {
+          type leafref {
+            path "/mef-global:mef-global/l2cp-cos-map-profiles/" +
+                 "profile/id";
+          }
+          description
+            "L2CP CoS mapping profile identifier.  If set, this
+             identifies a profile that specifies how certain L2CP
+             frames are mapped to CoS Names within this CoS Profile.
+             If unset, it is treated as if the mapping were empty,
+             i.e. all L2CP frames are mapped to CoS Names as if
+             they were data frames.";
+          reference
+            "[MEF10.3] Section 10.2.2.";
+        }
+        choice cos-id {
+          mandatory true;
+          description
+            "CoS Identifier, which specifies how Data Service Frames are
+             mapped to CoS Names.";
+          reference
+            "[MEF10.3] Section 10.2.1.";
+          case evc {
+            description
+              "If this case is selected, the CoS ID is based on the
+               EVC.";
+            reference
+              "[MEF10.3] Section 10.2.1.1, [MEF7.3] Section 7.11.1.";
+            container cos-evc {
+              description
+                "Parameters used when all Data Service Frames for the
+                 EVC are mapped to the same CoS Name.";
+              reference
+                "[MEF10.3] Section 10.2.1.1.";
+              leaf evc-cos-name {
+                type leafref {
+                  path "/mef-global:mef-global/cos-names-profiles/" +
+                       "profile/name";
+                }
+                mandatory true;
+                description
+                  "CoS Name to which all ingress Data Service Frames for
+                   the EVC are mapped.";
+              }
+            }
+          }
+          case pcp {
+            description
+              "If this case is selected, the CoS ID is based on the
+               PCP.";
+            reference
+              "[MEF10.3] Section 10.2.1.2, [MEF7.3] Section 7.11.1.";
+            container cos-pcp {
+              must "default-pcp-cos-name or count(pcp) = 8" {
+                error-message
+                  "A CoS Name must be specified for all 8 PCP values if
+                   no default CoS name is specified.";
+                description
+                  "A CoS Name must be specified for all 8 PCP values if
+                   no default CoS name is specified.";
+                reference
+                  "[MEF10.3] [R93]";
+              }
+              description
+                "Parameters for mapping Data Service Frames to CoS Names
+                 when the mapping is based on the CE-VLAN PCP field.";
+              reference
+                "[MEF10.3] Section 10.2.1.2.";
+              leaf default-pcp-cos-name {
+                type leafref {
+                   path "/mef-global:mef-global/cos-names-profiles/" +
+                        "profile/name";
+                }
+                description
+                  "Default value for CoS Name for PCP when it has not
+                   been explicitly configured.";
+              }
+              list pcp {
+                key "pcp-value";
+                description
+                  "List of mappings from PCP values to CoS Names.";
+                reference
+                  "[MEF10.3] Section 10.2.1.2.";
+                leaf pcp-value {
+                  type mef-types:ieee8021p-priority-type;
+                  description
+                    "PCP value to map to the given CoS Name.";
+                  reference
+                    "[MEF10.3] Section 10.2.1.2.";
+                }
+                choice discard-or-cos-name {
+                  mandatory true;
+                  description
+                    "Choice between discarding frames that match the PCP
+                     value or mapping them to the given CoS Name.";
+                  case discard {
+                    leaf discard {
+                      type empty;
+                      description
+                        "If set, discard Service Frames that have
+                         this PCP value.";
+                    }
+                  }
+                  case cos-name {
+                    leaf cos-name {
+                      type leafref {
+                        path "/mef-global:mef-global/" +
+                             "cos-names-profiles/profile/name";
+                      }
+                      description
+                        "If selected, the CoS Name that frames with this
+                         PCP value are mapped to.";
+                    }
+                  }
+                }
+              }
+            }
+          }
+          case dscp {
+            description
+              "If this case is selected, the CoS ID is based on the
+               DSCP.";
+            reference
+              "[MEF10.3] Section 10.2.1.3, [MEF7.3] Section 7.11.3.";
+            container cos-dscp {
+              must "(default-ipv4-cos-name or " +
+                               "count(ipv4-dscp) = 64) and " +
+                   "(default-ipv6-cos-name or " +
+                               "count(ipv6-dscp) = 64)" {
+                error-message
+                  "A CoS Name must be specified for all 64 DSCP values
+                   if no default CoS name is specified.";
+                description
+                  "An CoS Name must be specified for all 64 DSCP values
+                   if no default CoS name is specified.";
+                reference
+                  "[MEF10.3] [R95] and [R96]";
+              }
+              description
+                "Parameters for mapping Data Service Frames to CoS Names
+                 when the mapping is based on the IP DS field.";
+              reference
+                "[MEF10.3] Section 10.2.1.3.";
+              leaf default-ipv4-cos-name {
+                type leafref {
+                  path "/mef-global:mef-global/cos-names-profiles/" +
+                       "profile/name";
+                }
+                description
+                  "Default CoS Name for Data Service Frames carrying
+                   IPv4 packets when the DSCP value has not been
+                   explicitly configured in the CoS map.";
+              }
+              leaf default-ipv6-cos-name {
+                type leafref {
+                  path "/mef-global:mef-global/cos-names-profiles/" +
+                       "profile/name";
+                }
+                description
+                  "Default CoS Name for Data Service Frames carrying
+                   IPv6 packets when the DSCP value has not been
+                   explicitly configured in the CoS map.";
+              }
+              list ipv4-dscp {
+                key "dscp-value";
+                description
+                  "List of mappings from DSCP values to CoS Names for
+                   Data Service Frames carrying an IPv4 packet.";
+                reference
+                  "[MEF10.3] Section 10.2.1.3.";
+                leaf dscp-value {
+                  type inet:dscp;
+                  description
+                    "DSCP value to map to the given CoS Name.";
+                  reference
+                    "[MEF10.3] Section 10.2.1.3.";
+                }
+                choice discard-or-cos-name {
+                  mandatory true;
+                  description
+                   "Choice between discarding frames that match a DSCP
+                    value or mapping them to a given CoS Name.";
+                  case discard {
+                    leaf discard {
+                      type empty;
+                      description
+                        "If set, discard Service Frames that match
+                         this DSCP value.";
+                    }
+                  }
+                  case cos-name {
+                    leaf cos-name {
+                      type leafref {
+                        path "/mef-global:mef-global/" +
+                             "cos-names-profiles/profile/name";
+                      }
+                      description
+                        "If selected, the CoS Name that frames with this
+                         DSCP value are mapped to.";
+                    }
+                  }
+                }
+              }
+              list ipv6-dscp {
+                key "dscp-value";
+                description
+                  "List of mappings from DSCP values to CoS Names for
+                   Data Service Frames carrying an IPv6 packet.";
+                reference
+                  "[MEF10.3] Section 10.2.1.3.";
+                leaf dscp-value {
+                  type inet:dscp;
+                  description
+                    "DSCP value to map to the given CoS Name.";
+                  reference
+                    "[MEF10.3] Section 10.2.1.3.";
+                }
+                choice discard-or-cos-name {
+                  mandatory true;
+                  description
+                    "Choice between discarding frames that match a DSCP
+                     value or mapping them to a given CoS Name.";
+                  case discard {
+                    leaf discard {
+                      type empty;
+                      description
+                        "If set, discard Service Frames that match
+                         this DSCP value.";
+                    }
+                  }
+                  case cos-name {
+                    leaf cos-name {
+                      type leafref {
+                        path "/mef-global:mef-global/" +
+                             "cos-names-profiles/profile/name";
+                      }
+                      description
+                        "If selected, the CoS Name that frames with this
+                         DSCP value are mapped to.";
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+
+    container color-mapping-profiles {
+      description
+        "Color Mapping Profiles, for mapping Service Frames to a Color
+         ID.";
+      list profile {
+        key "id";
+        description
+          "List of Color Mapping Profiles";
+        reference
+          "[MEF10.3] section 10.3, [MEF7.3] section 7.13";
+        leaf id {
+          type string;
+          description
+            "This attribute identifies a Color Mapping Profile.";
+        }
+
+        choice color-id {
+          mandatory true;
+          description
+            "Color identifier, which specifies how Service Frames
+             are mapped to a color, i.e. to Green or Yellow.";
+          reference
+            "[MEF10.3] section 10.3, [MEF7.3] section 7.13";
+
+          case evc {
+            description
+              "If this case is selected, the Color ID is based on the
+               EVC.";
+            reference
+              "[MEF10.3] section 10.3.1, [MEF7.3] section 7.13.1";
+            container color-evc {
+              description
+                "Parameters used when all Service Frames for the EVC
+                 are mapped to the same color.";
+              leaf evc-color-name {
+                type mef-types:color-type;
+                mandatory true;
+                description
+                  "Color to which all Service Frames for the EVC are
+                   mapped.";
+                reference
+                  "[MEF10.3] section 10.3.1, [MEF7.3] section 7.13.1";
+              }
+            }
+          }
+
+          case dei {
+            description
+              "If this case is selected, the Color ID is based on the
+               DEI. Frames with DEI 0 are mapped to green and frames
+               with DEI 1 are mapped to yellow.";
+            reference
+              "[MEF10.3] section 10.3.2, [MEF7.3] section 7.13.3";
+            container color-dei {
+              description
+                "Parameters used when Service Frames for the EVC
+                 are mapped to a color based on the DEI.";
+              leaf dei {
+                type empty;
+                mandatory true;
+                description
+                  "When set, the Color ID is based on the DEI.";
+                reference
+                  "[MEF10.3] section 10.3.2, [MEF7.3] section 7.13.3";
+              }
+            }
+          }
+
+          case pcp {
+            description
+              "If this case is selected, the Color ID is based on the
+               PCP.";
+            reference
+              "[MEF10.3] section 10.3.3, [MEF7.3] section 7.13.2";
+            container color-pcp {
+              must "default-pcp-color-name or count(pcps/pcp) = 8" {
+                error-message
+                  "When the Color Identifier is based on the
+                   CE-VLAN PCP, each possible PCP value must
+                   map to exactly one color.";
+                description
+                  "When the Color Identifier is based on the
+                   CE-VLAN PCP, each possible PCP value must
+                   map to exactly one color.";
+                reference
+                  "[MEF10.3] R107";
+              }
+
+              leaf default-pcp-color-name {
+                type mef-types:color-type;
+                description
+                  "Default value for color when it has not been
+                   explicitly configured.";
+              }
+              container pcps {
+                description
+                  "Mappings from PCP values to colors";
+                list pcp {
+                  key "pcp-value";
+                  description
+                    "List of mappings from PCP values to colors.";
+                  reference
+                    "[MEF10.3] section 10.3.3, [MEF7.3] section 7.13.2";
+                  leaf pcp-value {
+                    type mef-types:ieee8021p-priority-type;
+                    description
+                      "PCP value to map to the given color";
+                  }
+                  leaf color {
+                    type mef-types:color-type;
+                    mandatory true;
+                    description
+                      "Color to which to map frames with the given PCP
+                       value.";
+                  }
+                }
+              }
+              description
+                "Parameters used when Service Frames for the EVC
+                 are mapped to a color based on the CE-VLAN PCP field.";
+              reference
+                "[MEF10.3] section 10.3.3, [MEF7.3] section 7.13.2";
+            }
+          }
+
+          case dscp {
+            description
+              "If this case is selected, the Color ID is based on the
+               DSCP.";
+            reference
+              "[MEF10.3] section 10.3.4, [MEF7.3] section 7.13.4";
+            container color-dscp {
+              must "default-dscp-color-name or " +
+                   "count(ipv6-dscps/ipv6-dscp) = 64" {
+                error-message
+                  "When the Color Identifier is based on the
+                   CE-VLAN DSCP, each possible DSCP value must
+                   map to exactly one color for IPv6.";
+                description
+                  "When the Color Identifier is based on the
+                   CE-VLAN DSCP, each possible DSCP value must
+                   map to exactly one color for IPv6.";
+                reference
+                  "[MEF10.3] R109";
+              }
+              must "default-dscp-color-name or " +
+                   "count(ipv4-dscps/ipv4-dscp) = 64" {
+                error-message
+                  "When the Color Identifier is based on the
+                   CE-VLAN DSCP, each possible DSCP value must
+                   map to exactly one color for IPv4.";
+                description
+                   "When the Color Identifier is based on the
+                    CE-VLAN DSCP, each possible DSCP value must
+                    map to exactly one color for IPv4.";
+                reference
+                  "[MEF10.3] R108";
+              }
+              description
+                "Parameters used when Service Frames for the EVC
+                 are mapped to a color based on the IP DS field.";
+              reference
+                "[MEF10.3] section 10.3.4, [MEF7.3] section 7.13.4";
+              leaf default-dscp-color-name {
+                type mef-types:color-type;
+                description
+                  "Default value for color for Service Frames carrying
+                   an IP Packet when the DSCP has not been
+                   explicitly configured in the color map.";
+              }
+              container ipv4-dscps {
+                description
+                  "Mappings from DSCP values to colors for Service
+                   Frames carrying an IPv4 packet.";
+                list ipv4-dscp {
+                  key "dscp-value";
+                  description
+                    "List of mappings from DSCP values to colors for
+                     Service Frames carrying an IPv4 packet.";
+                  reference
+                    "[MEF10.3] section 10.3.4, [MEF7.3] section 7.13.4";
+                  leaf dscp-value {
+                    type inet:dscp;
+                    description
+                      "DSCP value to map to the given color";
+                  }
+                  leaf color {
+                    type mef-types:color-type;
+                    mandatory true;
+                    description
+                      "Color to which to map frames with the given DSCP
+                       value.";
+                  }
+                }
+              }
+              container ipv6-dscps {
+                description
+                  "Mappings from DSCP values to colors for Service
+                   Frames carrying an IPv6 packet.";
+                list ipv6-dscp {
+                  key "dscp-value";
+                  description
+                    "List of mappings from DSCP values to colors for
+                     Service Frames carrying an IPv6 packet.";
+                  reference
+                    "[MEF10.3] section 10.3.4, [MEF7.3] section 7.13.4";
+                  leaf dscp-value {
+                    type inet:dscp;
+                    description
+                      "DSCP value to map to the given color";
+                  }
+                  leaf color {
+                    type mef-types:color-type;
+                    mandatory true;
+                    description
+                      "Color to which to map frames with the given DSCP
+                       value.";
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
index 7c43c67bab66db5584feeb088afdfd058e2c05cf..7e5ef8c133ad783d21bda00d65696291e4d459eb 100644 (file)
@@ -3,9 +3,18 @@ module mef-interfaces {
   prefix mef-interfaces;
   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 mef-types {
+    prefix mef-types;
+    revision-date 2015-05-26;
+   }
+  import mef-global {
+    prefix mef-global;
+    revision-date 2015-05-26;
+  }
+  import mef-topology {
+    prefix mef-topology;
+    revision-date 2015-05-26;
+   }
   import yang-ext {prefix ext; revision-date "2013-07-09";}
 
   import opendaylight-l2-types { prefix ethertype; }
diff --git a/legato-api/src/main/yang/mef-legato-interfaces@2017-12-15.yang b/legato-api/src/main/yang/mef-legato-interfaces@2017-12-15.yang
new file mode 100644 (file)
index 0000000..aa4e343
--- /dev/null
@@ -0,0 +1,906 @@
+module mef-legato-interfaces {
+  namespace "urn:mef:yang:mef-legato-interfaces";
+  prefix mef-interfaces;
+
+  import mef-types {
+    prefix mef-types;
+    revision-date 2017-12-15;
+  }
+  import mef-global {
+    prefix mef-global;
+    revision-date 2017-12-15;
+  }
+
+  organization "MEF Forum";
+  contact
+    "Web URL: http://mef.net/
+     E-mail:  namespace@mef.net
+     Postal:  MEF 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 and MEF 6.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:
+     [MEF10.3] refers to MEF 10.3
+     'Ethernet Services Attributes Phase 3', October 2013
+     [MEF10.3.2] refers to MEF 10.3.2
+     'Amendment to MEF 10.3 - UNI Resiliency Enhancement',
+     October 2015
+     [MEF6.2] refers to MEF 6.2
+     'EVC Ethernet Services Defintions Phase 3', August 2014
+     [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014
+     [MEF7.3] refers to MEF 7.3
+     'Carrier Ethernet Management Information Model', February 2017";
+
+  revision 2017-12-15 {
+    description
+      "Initial Version.";
+    reference
+      "Legato - Services YANG SCA (MEF XX)";
+  }
+
+  container mef-interfaces {
+    description
+      "MEF Interfaces";
+    container carrier-ethernet {
+      description
+       "Carrier Ethernet Services within MEF Interfaces.";
+      container subscriber-interfaces {
+        description
+          "Subscriber view of the MEF Interfaces supporting
+           Carrier Ethernet Services.";
+        list uni {
+          key "uni-id";
+          description
+            "List of User Network Interfaces (UNI).";
+          reference
+            "[MEF10.3] Section 9.";
+          container physical-layers {
+            description
+              "Physical Layer configuration";
+            reference
+              "[MEF10.3] Section 9.2.";
+            container links {
+              description
+                "Container for a list of physical links that are part of
+                 the UNI";
+              reference
+                "[MEF10.3] Section 9.2.";
+              list link {
+                key "link-number";
+                min-elements 1;
+                description
+                  "A list of all the physical ports associated with this
+                   Link Layer.";
+                leaf link-number {
+                  type uint32;
+                  description
+                    "Unique link number for a physical link
+                     implementing the UNI.";
+                }
+                leaf ieee8023-phy {
+                  type identityref {
+                    base mef-types:ieee-8023-interface-type;
+                  }
+                  must ". != 'mef-types: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.";
+                    description
+                      "The Physical Layer for each physical link
+                       implementing the UNI cannot be 1000BASE-PX-D and
+                       1000BASE-PX-U.";
+                    reference
+                      "[MEF10.3] [R60].";
+                  }
+                  mandatory true;
+                  description
+                    "The Physical Layer for each physical link that is
+                     part of the UNI.";
+                  reference
+                    "[MEF10.3] Section 9.2, [MEF7.3] Section 7.7.";
+                }
+                leaf sync-mode {
+                  type boolean;
+                  default "false";
+                  description
+                    "Indicates whether Synchronous mode is Enabled (if
+                     the value is true) or Disabled (if the value is
+                     false) for the physical link.";
+                  reference
+                    "[MEF10.3] Section 9.3, [MEF7.3] Section 7.8.";
+                }
+              }
+            }
+          }
+
+          container ingress-envelopes {
+            description
+              "List of Bandwidth Profile Envelopes used on this UNI for
+               Ingress Bandwidth Profiles.";
+            reference
+              "[MEF10.3] Section 12.1, [MEF6.2] Section 8.2.2,
+               [MEF7.3] Section 7.8, 7.16.";
+            list envelope {
+              must "../../token-share-enabled = 'true' or " +
+                   "count(bwp-flows/bwp-flow) = 1" {
+                error-message
+                  "A UNI with Token Share 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.";
+                reference
+                  "[MEF6.2] [R3].";
+              }
+              key "id";
+              description
+                "List of Bandwidth Profile Envelopes used on this UNI
+                 for Ingress Bandwidth Profiles.  Note that Envelopes
+                 that contain only a single Bandwidth Profile Flow might
+                 or might not be included in this list (but must not be
+                 included, in the case of MEF 6.2 services, per MEF 6.2
+                 R5).";
+              reference
+                "[MEF10.3] Section 12.1, [MEF6.2] Section 8.2.2,
+                 [MEF7.3] Section 7.8, 7.16.";
+
+              leaf id {
+                type mef-types:identifier45;
+                description
+                  "Bandwidth Profile Envelope ID";
+                reference
+                  "[MEF10.3] Section 12.1.";
+              }
+
+              leaf type {
+                type mef-types:envelope-type;
+                mandatory true;
+                description
+                  "Indicates what type of Bandwidth Profile Flows this
+                   Envelope contains.";
+              }
+
+              leaf coupling-enabled {
+                type boolean;
+                must "(../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.";
+                  description
+                    "When only one Bandwidth Profile Flow is mapped to
+                     an Envelope, Envelope Coupling must be Disabled.";
+                  reference
+                    "[MEF10.3] [R142].";
+                }
+                mandatory true;
+                description
+                  "The Envelope Coupling Flag (CF^0).  A value of
+                   'false' corresponds to setting the coupling flag to
+                   0, i.e. unused green tokens from the lowest ranked
+                   flow are discarded.  A value of 'true' corresponds to
+                   setting the coupling flag to 1, i.e. unused green
+                   tokens from the lowest ranked flow are converted to
+                   yellow tokens for the highest ranked flow.";
+                reference
+                  "[MEF10.3] Section 12.1.";
+              }
+
+              container bwp-flows {
+                description
+                  "Ingress Bandwidth Profile Flows in this Envelope.";
+                reference
+                  "[MEF10.3] Section 12.1, [MEF7.3] Section 7.16.";
+                list bwp-flow {
+                  must "../../coupling-enabled = 'false' or " +
+                       "/mef-global:mef-global/" +
+                       "mef-global:bwp-flow-parameter-profiles/" +
+                       "mef-global:profile[" +
+                       "mef-global:id = current()/parameters]/" +
+                       "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.";
+                    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.";
+                    reference
+                      "[MEF10.3] [R150].";
+                  }
+
+                  must "../../type != 'per-uni' or " +
+                       "(../../../../ingress-bwp-per-uni/" +
+                       "envelope-id = ../../id and " +
+                       "../../../../ingress-bwp-per-uni/" +
+                       "rank = ./rank)" {
+                    error-message
+                      "If there is a per-UNI Ingress Bandwidth Profile
+                       Envelope, then there must be an Ingress Bandwidth
+                       Profile per UNI that references it.";
+                    description
+                      "If there is a per-UNI Ingress Bandwidth Profile
+                       Envelopes, then there must be an Ingress
+                       Bandwidth Profile per UNI that references it.
+                       This is part of enforcing MEF 10.3 R134.";
+                    reference
+                      "[MEF10.3] [R134]";
+                  }
+                  key "rank";
+                  min-elements 1;
+                  description
+                    "List of Ingress Bandwidth Profile Flows in this
+                     Envelope.";
+                  reference
+                    "[MEF10.3] Section 12.1. [MEF7.3] Section 7.16.";
+
+                  leaf rank {
+                    type uint8;
+                    must ". >= 1 and . <= count(..)" {
+                      error-message
+                        "The rank of a Bandwidth Profile Flow must be
+                         between 1 and n, where n is the number of flows
+                         in the Envelope";
+                      description
+                        "The rank of a Bandwidth Profile Flow must be
+                         between 1 and n, where n is the number of flows
+                         in the Envelope";
+                      reference
+                        "[MEF10.3] [R152]";
+                    }
+                    description
+                      "Rank of the Bandwidth Profile flow within the
+                       Envelope. Rank 1 is the lowest priority flow,
+                       rank n is the highest priority, where n is the
+                       number of flows in the Envelope.";
+                    reference
+                      "[MEF10.3] Section 12.1. [MEF7.3] Section 7.16.";
+                  }
+
+                  leaf parameters {
+                    type leafref {
+                      path "/mef-global:mef-global/" +
+                           "mef-global:bwp-flow-parameter-profiles/" +
+                           "mef-global:profile/mef-global:id";
+                    }
+                    mandatory true;
+                    description
+                      "A reference to the set of Bandwidth Profile Flow
+                       parameters that are used for this Bandwidth
+                       Profile Flow.";
+                    reference
+                      "[MEF10.3] Section 12.1, [R84], [R134],
+                       [MEF7.3] Section 7.16.2.";
+                  }
+                }
+              }
+            }
+          }
+
+          container egress-envelopes {
+            description
+              "List of Bandwidth Profile Envelopes used on this UNI for
+               Egress Bandwidth Profiles.";
+            reference
+              "[MEF10.3] Section 12.1, [MEF6.2] Section 8.2.2,
+               [MEF7.3] Section 7.8, 7.16.";
+            list envelope {
+              must "../../token-share-enabled = 'true' or " +
+                   "count(bwp-flows/bwp-flow) = 1" {
+                error-message
+                  "A UNI with Token Share 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.";
+                reference
+                  "[MEF6.2] [R3].";
+              }
+              key "id";
+              description
+                "List of Bandwidth Profile Envelopes used on this UNI
+                 for Egress Bandwidth Profiles.  Note that Envelopes
+                 that contain only a single Bandwidth Profile Flow might
+                 or might not be included in this list (but must not be
+                 included, in the case of MEF 6.2 services, per MEF 6.2
+                 R5).";
+              reference
+                "[MEF10.3] Section 12.1, [MEF6.2] Section 8.2.2,
+                 [MEF7.3] Section 7.8, 7.16.";
+
+              leaf id {
+                type mef-types:identifier45;
+                description
+                  "Bandwidth Profile Envelope ID";
+                reference
+                  "[MEF10.3] Section 12.1.";
+              }
+
+              leaf type {
+                type mef-types:envelope-type;
+                mandatory true;
+                description
+                  "Indicates what type of Bandwidth Profile Flows this
+                   Envelope contains.";
+              }
+
+              leaf coupling-enabled {
+                type boolean;
+                must "(../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.";
+                  description
+                    "When only one Bandwidth Profile Flow is mapped to
+                     an Envelope, Envelope Coupling must be Disabled.";
+                  reference
+                    "[MEF10.3] [R142].";
+                }
+                mandatory true;
+                description
+                  "The Envelope Coupling Flag (CF^0).  A value of
+                   'false' corresponds to setting the coupling flag to
+                   0, i.e. unused green tokens from the lowest ranked
+                   flow are discarded.  A value of 'true' corresponds to
+                   setting the coupling flag to 1, i.e. unused green
+                   tokens from the lowest ranked flow are converted to
+                   yellow tokens for the highest ranked flow.";
+                reference
+                  "[MEF10.3] Section 12.1.";
+              }
+
+              container bwp-flows {
+                description
+                  "Egress Bandwidth Profile Flows in this Envelope.";
+                reference
+                  "[MEF10.3] Section 12.1, [MEF7.3] Section 7.16.";
+                list bwp-flow {
+                  must "../../coupling-enabled = 'false' or " +
+                       "/mef-global:mef-global/" +
+                       "mef-global:bwp-flow-parameter-profiles/" +
+                       "mef-global:profile[" +
+                       "mef-global:id = current()/parameters]/" +
+                       "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.";
+                    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.";
+                    reference
+                      "[MEF10.3] [R150].";
+                  }
+
+                  must "../../type != 'per-uni' or " +
+                       "(../../../../egress-bw-profile-per-uni/" +
+                       "envelope-id = ../../id and " +
+                       "../../../../egress-bw-profile-per-uni/" +
+                       "rank = ./rank)" {
+                    error-message
+                      "If there is a per-UNI Engress Bandwidth Profile
+                       Envelope, then there must be an Egress Bandwidth
+                       Profile per UNI that references it.";
+                    description
+                      "If there is a per-UNI Egress Bandwidth Profile
+                       Envelopes, then there must be an Egress Bandwidth
+                       Profile per UNI that references it.  This is part
+                       of enforcing MEF 10.3 R134.";
+                    reference
+                      "[MEF10.3] [R134]";
+                  }
+                  key "rank";
+                  min-elements 1;
+                  description
+                    "List of Egress Bandwidth Profile Flows in this
+                     Envelope.";
+                  reference
+                    "[MEF10.3] Section 12.1. [MEF7.3] Section 7.16.";
+
+                  leaf rank {
+                    type uint8;
+                    must ". >= 1 and . <= count(..)" {
+                      error-message
+                        "The rank of a Bandwidth Profile Flow must be
+                         between 1 and n, where n is the number of flows
+                         in the Envelope";
+                      description
+                        "The rank of a Bandwidth Profile Flow must be
+                         between 1 and n, where n is the number of flows
+                         in the Envelope";
+                      reference
+                        "[MEF10.3] [R152]";
+                    }
+                    description
+                      "Rank of the Bandwidth Profile flow within the
+                       Envelope. Rank 1 is the lowest priority flow,
+                       rank n is the highest priority, where n is the
+                       number of flows in the Envelope.";
+                    reference
+                      "[MEF10.3] Section 12.1. [MEF7.3] Section 7.16.";
+                  }
+
+                  leaf parameters {
+                    type leafref {
+                      path "/mef-global:mef-global/" +
+                           "mef-global:bwp-flow-parameter-profiles/" +
+                           "mef-global:profile/mef-global:id";
+                    }
+                    mandatory true;
+                    description
+                      "A reference to the set of Bandwidth Profile Flow
+                       parameters that are used for this Bandwidth
+                       Profile Flow.";
+                    reference
+                      "[MEF10.3] Section 12.1, [R84], [R134],
+                       [MEF7.3] Section 7.16.2.";
+                  }
+                }
+              }
+            }
+          }
+
+          container ingress-bwp-per-uni {
+            description
+              "Ingress Bandwidth Profile per UNI";
+            choice options {
+              description
+                "This choice can be used to specify either a standalone
+                 Bandwidth Profile Flow, or a Bandwidth Profile Flow
+                 within a specified Bandwidth Profile Envelope.  Note
+                 that in the former case, the Bandwidth Profile Flow can
+                 be thought of as being in an Envelope that contains no
+                 other Bandwidth Profile Flows, has no Envelope ID and
+                 does not appear in the list of Bandwidth Profile
+                 Envelopes for the UNI
+                 (../../../../ingress-envelopes/envelope).";
+              reference
+                "[MEF10.3] sections 9.15 and 12.
+                 [MEF7.3] sections 7.8.1 and 7.16.";
+              case standalone {
+                description
+                  "A standalone Bandwidth Profile Flow is being
+                   specified. Note that this case allows for backwards
+                   compatibility with MEF 10.2 (see MEF 10.3 section
+                   12.2)";
+                leaf bw-profile-flow-parameters {
+                  type leafref {
+                    path "/mef-global:mef-global/" +
+                         "mef-global:bwp-flow-parameter-profiles/" +
+                         "mef-global:profile/mef-global:id";
+                  }
+                  mandatory true;
+                  description
+                    "Reference to a global set of Bandwidth Profile Flow
+                     parameters for this Bandwidth Profile Flow.";
+                }
+              }
+              case envelope {
+                description
+                  "An Ingress Bandwidth Profile per UNI is being
+                   specified with reference to a Bandwidth Profile
+                   Envelope in the UNI List of Ingress Bandwidth Profile
+                   Envelopes.";
+                leaf envelope-id {
+                  type leafref {
+                    path "/mef-interfaces/carrier-ethernet/" +
+                         "subscriber-interfaces/uni/ingress-envelopes/" +
+                         "envelope/id";
+                  }
+                  must "/mef-interfaces/carrier-ethernet/ " +
+                      "subscriber-interfaces/uni/ingress-envelopes/" +
+                       "envelope[id = current()]/type = 'per-uni'" {
+                    error-message
+                      "A bandwidth profile per UNI can only refer to an
+                       Envelope with type per-uni.";
+                    description
+                      "A bandwidth profile per UNI can only refer to an
+                       Envelope with type per-uni.  This is used to
+                       enforce MEF 10.3 R135.";
+                    reference
+                      "[MEF10.3] [R135]";
+                  }
+                  mandatory true;
+                  description
+                    "Reference to an ingress Bandwidth Profile Envelope
+                     on the UNI";
+                }
+                leaf rank {
+                  type leafref {
+                    path "/mef-interfaces/carrier-ethernet/" +
+                         "subscriber-interfaces/uni/" +
+                         "ingress-envelopes/envelope[id = " +
+                        "current()/../envelope-id]/" +
+                         "bwp-flows/bwp-flow/rank";
+                  }
+                  mandatory true;
+                  description
+                    "Reference to a Bandwidth Profile Flow the given
+                     Envelope.";
+                }
+              }
+            }
+          }
+
+          container egress-bw-profile-per-uni {
+            description
+              "Egress Bandwidth Profile per UNI";
+            choice options {
+              description
+                "This choice can be used to specify either a standalone
+                 Bandwidth Profile Flow, or a Bandwidth Profile Flow
+                 within a specified Bandwidth Profile Envelope.  Note
+                 that in the former case, the Bandwidth Profile Flow can
+                 be thought of as being in an Envelope that contains no
+                 other Bandwidth Profile Flows, has no Envelope ID and
+                 does not appear in the list of Bandwidth Profile
+                 Envelopes for the UNI
+                 (../../../../egress-envelopes/envelope).";
+              reference
+                "[MEF10.3] sections 9.15 and 12.
+                 [MEF7.3] sections 7.8.1 and 7.16.";
+              case standalone {
+                description
+                  "A standalone Bandwidth Profile Flow is being
+                   specified. Note that this case allows for backwards
+                   compatibility with MEF 10.2 (see MEF 10.3 section
+                   12.2)";
+                leaf bw-profile-flow-parameters {
+                  type leafref {
+                    path "/mef-global:mef-global/" +
+                         "mef-global:bwp-flow-parameter-profiles/" +
+                         "mef-global:profile/mef-global:id";
+                  }
+                  mandatory true;
+                  description
+                    "Reference to a global set of Bandwidth Profile Flow
+                     parameters for this Bandwidth Profile Flow.";
+                }
+              }
+              case envelope {
+                description
+                  "An Egress Bandwidth Profile per UNI is being
+                   specified with reference to a Bandwidth Profile
+                   Envelope in the UNI List of Egress Bandwidth Profile
+                   Envelopes.";
+                leaf envelope-id {
+                  type leafref {
+                    path "/mef-interfaces/carrier-ethernet/" +
+                         "subscriber-interfaces/uni/" +
+                         "egress-envelopes/envelope/id";
+                  }
+                  must "/mef-interfaces/carrier-ethernet/" +
+                       "subscriber-interfaces/uni/" +
+                       "egress-envelopes/envelope[id = " +
+                      "current()]/type = 'per-uni'" {
+                    error-message
+                      "A bandwidth profile per UNI can only refer to an
+                       Envelope with type per-uni.";
+                    description
+                      "A bandwidth profile per UNI can only refer to an
+                       Envelope with type per-uni.  This is used to
+                       enforce MEF 10.3 R135.";
+                    reference
+                      "[MEF10.3] [R135]";
+                  }
+                  mandatory true;
+                  description
+                    "Reference to an egress Bandwidth Profile Envelope
+                     on the UNI";
+                }
+                leaf rank {
+                  type leafref {
+                    path "/mef-interfaces/carrier-ethernet/" +
+                        "subscriber-interfaces/uni/egress-envelopes/" +
+                         "envelope[id = current()/../envelope-id]/" +
+                         "bwp-flows/bwp-flow/rank";
+                  }
+                  mandatory true;
+                  description
+                    "Reference to a Bandwidth Profile Flow the given
+                     Envelope.";
+                }
+              }
+            }
+          }
+
+          container status {
+            config false;
+            description
+              "Operational status for the UNI";
+            leaf operational-state {
+              type boolean;
+              default "false";
+              description
+                "Operational Status of the UNI: either Enabled (if the
+                 value is 'true') or Disabled (if the value is
+                 'false').";
+              reference
+                "[MEF7.3] Section 7.7, 7.8.";
+            }
+          }
+
+          leaf uni-id {
+            type mef-types:identifier45;
+            description
+              "A unique identifier for the UNI.";
+            reference
+              "[MEF10.3] Section 9.1, [MEF7.3] Section 7.8.1.";
+          }
+
+          leaf admin-state {
+            type boolean;
+            default "true";
+            description
+              "Indicates whether the UNI is administratively
+               locked (if the value is false) or unlocked (if the value
+               is true).";
+            reference
+              "[MEF7.3] Section 7.7, 7.8.";
+          }
+
+          leaf link-aggregation {
+            type mef-types:interface-resiliency-type;
+            must ". = 'none' or " +
+                 "count(../physical-layers/links/link) > 1" {
+              error-message
+                "If there is one link, link-aggregation must be
+                 'none'.";
+              description
+                "If there is one link, link-aggregation must be
+                 'none'.";
+              reference
+                "[MEF10.3.2] [A1-R1].";
+            }
+            must ". != 'none' or " +
+                 "count(../physical-layers/links/link) = 1" {
+              error-message
+                "If there are two (or more) links, link-aggregation
+                 must not be 'none'.";
+              description
+                "If there are two (or more) links, link-aggregation
+                 must not be 'none'.";
+              reference
+                "[MEF10.3.2] [A1-R2].";
+            }
+            must ". = 'all-active' or . = 'other' or " +
+                 "count(../physical-layers/links/link) <= 2" {
+              error-message
+                "If there are three (or more) links, link-aggregation
+                 must be 'all-active' or 'other'.";
+              description
+                "If there are three (or more) links, link-aggregation
+                 must be 'all-active' or 'other'.";
+              reference
+                "[MEF10.3.2] [A1-R3].";
+            }
+            default "none";
+            description
+              "UNI Resiliency.";
+            reference
+              "[MEF10.3.2] Section 6, [MEF7.3] Section 7.7, 7.8.";
+          }
+          leaf max-frame-size {
+            type mef-types:max-frame-size-type;
+            mandatory true;
+            description
+              "This attribute describes the maximum service frame size
+               for the UNI.";
+            reference
+              "[MEF10.3] Section 9.7, [MEF7.3] Section 7.8.";
+          }
+          leaf service-multiplexing-enabled {
+            type boolean;
+            default "false";
+            description
+              "Indicates whether Service Multiplexing is enabled (if the
+               value is true) or disabled (if the value is false).  When
+               enabled, more than one EVC End Point can be associated
+               with the UNI.";
+            reference
+              "[MEF10.3] Section 9.8. [MEF7.3] Section 7.8.";
+          }
+          leaf bundling-enabled {
+            type boolean;
+            default "false";
+            description
+              "Indicates whether Bundling is enabled (if the value is
+               true) or disabled (if the value is false).  When enabled,
+               more than one CE-VLAN ID can be mapped to each EVC End
+               Point associated with this UNI.";
+            reference
+              "[MEF10.3] Section 9.12, [MEF7.3] Section 7.8.";
+          }
+          leaf all-to-one-bundling-enabled {
+            type boolean;
+            default "false";
+            description
+              "Indicates whether All-to-one Bundling is enabled (if the
+               value is true) or disabled (if the value is false).  When
+               enabled, all CE-VLAN IDs are mapped to a single EVC End
+               Point at this UNI.";
+            reference
+              "[MEF10.3] Section 9.13, [MEF7.3] Section 7.8.";
+          }
+          leaf default-ce-vlan-id {
+            when "../all-to-one-bundling-enabled = 'false'";
+            type mef-types:vlan-id-type;
+            mandatory true;
+            description
+              "The default CE-VLAN ID is the CE-VLAN ID to which
+               untagged and priority-tagged Service Frames are
+               considered to belong at this UNI, for the purpose of
+               mapping them to an EVC End Point.  Note that it is not
+               relevant when all-to-one bundling is enabled, because in
+               that case all Service Frames are mapped to the same EVC
+               End Point.";
+            reference
+              "[MEF10.3] Section 9.9, [MEF7.3] Section 7.8.";
+          }
+          leaf max-num-of-evcs {
+            type uint32 {
+              range "1..max";
+            }
+            mandatory true;
+            description
+              "The Maximum Number of EVCs that can be supported by this
+               UNI.";
+            reference
+              "[MEF10.3] Section 9.11. [MEF7.3] Section 7.8.";
+          }
+          leaf token-share-enabled {
+            type boolean;
+            default "true";
+            description
+              "Indicates whether token sharing is enabled (if the value
+               is 'true') or disabled (if the value is 'false').  When
+               token sharing is disabled, Bandwidth Profile envelopes
+               can each contain only a single bandwidth profile flow.";
+            reference
+              "[MEF6.2] Section 8.2.1, [MEF7.3] Section 7.8.";
+          }
+          leaf link-oam-enabled {
+            type boolean;
+            default "false";
+            description
+              "Link OAM Enabled/Disabled.";
+            reference
+              "[MEF10.3] Section 9.16, [MEF7.3] Section 7.8.";
+          }
+          leaf uni-meg-enabled {
+            type boolean;
+            default "false";
+            description
+              "Indicates that a SOAM Maintenance Entity Group (MEG) is
+               enabled (if true) or disabled (if false) across the
+               UNI.";
+            reference
+              "[MEF10.3] Section 9.17, [MEF7.3] Section 7.8.";
+          }
+          leaf elmi-enabled {
+            type boolean;
+            default "false";
+            description
+              "Ethernet Local Management Interface(ELMI) Enabled /
+               Disabled.";
+            reference
+              "[MEF10.3] Section 9.18, [MEF7.3] Section 7.8.";
+          }
+          leaf l2cp-address-set {
+            type mef-types:l2cp-address-set-type;
+            mandatory true;
+            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.";
+            reference
+              "[MEF10.3] Section 9.19, [MEF45] Section 8.1 and Table 4,
+               [MEF7.3] Section 7.8.";
+          }
+          leaf l2cp-peering {
+            type leafref {
+              path "/mef-global:mef-global/" +
+                   "mef-global:l2cp-peering-profiles/" +
+                   "mef-global: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).";
+            reference
+              "[MEF10.3] Section 9.19. [MEF45] Section 8.2 and Table 4.
+               [MEF7.3] Section 7.8.";
+          }
+
+          container port-convid-to-agglink-map {
+            when "../link-aggregation = 'all-active'";
+            description
+              "Port Conversation ID to Aggregation Link Map.  This
+               contains a list of mappings from VLAN IDs to physical
+               links.";
+            reference
+              "[MEF10.3.2] Section 6, [MEF7.3] Sections 7.7 and 7.8";
+            container default-links {
+              description
+                "Ordered list of links to use for all VLAN IDs not
+                 explicitly listed in the map below.";
+              reference
+                "[MEF10.3.2] Section 6, [MEF7.3] Sections 7.7 and 7.8";
+              leaf-list default-link {
+                type leafref {
+                  path ../../../physical-layers/links/link/link-number;
+                }
+                min-elements 1;
+                ordered-by user;
+                description
+                  "Ordered list of links to use for all VLAN IDs not
+                   explicitly listed in the map below.  The first
+                   element in the list has the highest priority.";
+                reference
+                  "[MEF10.3.2] Section 6.
+                   [MEF7.3] Sections 7.7 and 7.8.";
+              }
+            }
+
+            container portconv-map-entries {
+              description
+                "Contains a list of mappings from VLAN IDs to physical
+                 links.";
+              reference
+                "[MEF10.3.2] Section 6, [MEF7.3] Sections 7.7 and 7.8";
+              list portconv-map-entry {
+                key vid;
+                description
+                  "List of mappings from VLAN ID to physical links";
+                reference
+                  "[MEF10.3.2] Section 6.
+                   [MEF7.3] Sections 7.7 and 7.8.";
+                leaf vid {
+                  type mef-types:vlan-id-type;
+                  description
+                    "The CE-VLAN ID (used as a port conversation ID) to
+                     map.";
+                }
+
+                container links {
+                  description
+                    "Ordered list of links to use for the given VLAN
+                     ID.";
+                  leaf-list link {
+                    type leafref {
+                      path "../../../../../physical-layers/links/" +
+                           "link/link-number";
+                    }
+                    min-elements 1;
+                    ordered-by user;
+                    description
+                      "Ordered list of links to use for the given VLAN
+                       ID. The first element in the list has the highest
+                       priority.";
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/legato-api/src/main/yang/mef-legato-services@2017-12-15.yang b/legato-api/src/main/yang/mef-legato-services@2017-12-15.yang
new file mode 100644 (file)
index 0000000..8c9d54c
--- /dev/null
@@ -0,0 +1,2973 @@
+module mef-legato-services {
+  namespace "urn:mef:yang:mef-legato-services";
+  prefix mef-services;
+
+  import ietf-yang-types {
+    prefix yang;
+  }
+  import mef-types {
+    prefix mef-types;
+    revision-date 2017-12-15;
+  }
+  import mef-global {
+    prefix mef-global;
+    revision-date 2017-12-15;
+  }
+  import mef-legato-interfaces {
+    prefix mef-interfaces;
+    revision-date 2017-12-15;
+  }
+
+  organization "MEF Forum";
+  contact
+    "Web URL: http://mef.net/
+     E-mail:  namespace@mef.net
+     Postal:  MEFForum
+              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 and MEF 6.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:
+
+      [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
+      [MEF7.3] refers to MEF 7.3
+      'Carrier Ethernet Management Information Model',
+      February 2017
+      [MEF10.3.1] refers to MEF 10.3.1
+      'Composite Performance Metric (CPM) Amendment to MEF 10.3',
+      February 2015";
+
+  revision 2017-12-15 {
+    description
+      "Initial Version.";
+    reference
+      "Legato - Services YANG SCA (MEF XX)";
+  }
+
+  container mef-services {
+    description
+      "Container for all MEF Services (including configuration
+       and status)";
+    container carrier-ethernet {
+      description
+        "MEF Services for Carrier Ethernet Configuration
+         and Status";
+      container subscriber-services {
+        description
+          "MEF Subscriber Services Configuration and Status";
+        list evc {
+          key "evc-id";
+          description
+            "List of Ethernet Virtual Connection services (EVCs).";
+          leaf evc-id {
+            type mef-types:evc-id-type;
+            description
+              "An identifier for the EVC, that is unique across all
+               the EVCs in the Service Provider's CEN";
+            reference
+              "[MEF10.3] Section 8.2. [MEF7.3] Section 7.2.";
+          }
+          container cos-names {
+            description
+              "CoS Names for use by this EVC.";
+            list cos-name {
+              key "name";
+              min-elements 1;
+              description
+                "List of CoS Names used in this EVC.";
+              reference
+                "[MEF7.3] Section 7.1";
+              leaf name {
+                type leafref {
+                  path "/mef-global:mef-global/" +
+                        "mef-global:cos-names-profiles/" +
+                        "mef-global:profile/mef-global:name";
+                }
+                description
+                  "CoS Name from the global list, that is used in this
+                   EVC.";
+              }
+            }
+          }
+          container end-points {
+            description
+              "EVC End Point configuration and status. Note that
+               EVC End Points contain the EVC per UNI attributes
+               from MEF 10.3.";
+            reference
+              "[MEF10.3] Section 10, [MEF7.3] Section 7.4 and 7.5";
+            list end-point {
+              must "not(ce-vlans/ce-vlan[2]) or " +
+                   "../../ce-vlan-id-preservation = '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.";
+                reference
+                  "[MEF10.3] [R25].";
+              }
+              must "(/mef-interfaces:mef-interfaces/" +
+                    "mef-interfaces:carrier-ethernet/" +
+                    "mef-interfaces:subscriber-interfaces/" +
+                    "mef-interfaces:uni" +
+                      "[mef-interfaces:uni-id = current()/uni-id]" +
+                      "[mef-interfaces:uni-id/../" +
+                       "mef-interfaces:bundling-enabled = " +
+                           "'true']) or " +
+                   "(/mef-interfaces:mef-interfaces/" +
+                    "mef-interfaces:carrier-ethernet/" +
+                    "mef-interfaces:subscriber-interfaces/" +
+                    "mef-interfaces:uni" +
+                      "[mef-interfaces:uni-id = current()/uni-id]" +
+                      "[mef-interfaces:uni-id/../" +
+                       "mef-interfaces:all-to-one-bundling-enabled = " +
+                           "'true']) or " +
+                   "not(ce-vlans/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.";
+                reference
+                  "[MEF10.3] [R77].";
+              }
+              must "(/mef-interfaces:mef-interfaces/" +
+                     "mef-interfaces:carrier-ethernet/" +
+                     "mef-interfaces:subscriber-interfaces/" +
+                     "mef-interfaces:uni" +
+                       "[mef-interfaces:uni-id = current()/uni-id]" +
+                       "[mef-interfaces:uni-id/../" +
+                        "mef-interfaces:all-to-one-bundling-enabled = " +
+                                                       "'false']) or " +
+                   "(count(ce-vlans/ce-vlan) = 4094)" {
+                error-message
+                  "If All-to-One Bundling is enabled for any UNI in an
+                   EVC, all CE-VLAN IDs for that UNI must map to a
+                   single EVC.";
+                description
+                  "If All-to-One Bundling is enabled for any UNI in an
+                   EVC, all CE-VLAN IDs for that UNI must map to a
+                   single EVC.";
+                reference
+                  "[MEF10.3] [R82].";
+              }
+
+              must "(count(ingress-bwp-per-cos/" +
+                          "bwp-flow-per-cos) = 0 and " +
+                    "not(ingress-bwp-per-evc/" +
+                        "bw-profile-flow-parameters) and "+
+                    "not(ingress-bwp-per-evc/envelope-id)) or " +
+                   "(not(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:ingress-bwp-per-uni/" +
+                         "mef-interfaces:bw-profile-flow-parameters) " +
+                    "and " +
+                    "not(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:ingress-bwp-per-uni/" +
+                         "mef-interfaces:envelope-id))" {
+                error-message
+                  "If there is an Ingress Bandwidth Profile per CoS Name
+                   or an Ingress Bandwidth Profile per EVC, there must
+                   not be an Ingress Bandwidth Profile per UNI.";
+                description
+                  "If there is an Ingress Bandwidth Profile per CoS Name
+                   or an Ingress Bandwidth Profile per EVC, there must
+                   not be an Ingress Bandwidth Profile per UNI.";
+                reference
+                  "[MEF10.3] [R137]";
+              }
+
+              must "(count(egress-bwp-per-eec/" +
+                          "bwp-flow-per-eec) = 0 and " +
+                    "not(egress-bwp-per-evc/" +
+                        "bw-profile-flow-parameters) and "+
+                    "not(egress-bwp-per-evc/envelope-id)) or " +
+                   "(not(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:egress-bw-profile-per-uni/" +
+                         "mef-interfaces:bw-profile-flow-parameters) " +
+                    "and " +
+                    "not(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:egress-bw-profile-per-uni/" +
+                         "mef-interfaces:envelope-id))" {
+                error-message
+                  "If there is an Egress Bandwidth Profile per EEC Name
+                   or an Egress Bandwidth Profile per EVC, there must
+                   not be an Egress Bandwidth Profile per UNI.";
+                description
+                  "If there is an Egress Bandwidth Profile per EEC Name
+                   or an Egress Bandwidth Profile per EVC, there must
+                   not be an Egress Bandwidth Profile per UNI.";
+                reference
+                  "[MEF10.3] [R137]";
+              }
+
+              must "count(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:ingress-envelopes/" +
+                         "mef-interfaces:envelope[" +
+                           "mef-interfaces:type = 'per-evc']/" +
+                         "mef-interfaces:bwp-flows/" +
+                         "mef-interfaces:bwp-flow) = " +
+                   "count(/mef-services/carrier-ethernet/" +
+                          "subscriber-services/evc/end-points/" +
+                          "end-point" +
+                            "[uni-id = current()/uni-id]" +
+                            "[ingress-bwp-per-evc/envelope-id])" {
+                error-message
+                  "For an Ingress Bandwidth Profile Envelope with type
+                   'per-evc' every flow must be referenced by an
+                   Ingress Bandwidth Profile per EVC";
+                description
+                  "This must statement, in combination with others,
+                   ensures that every BWP flow in an Ingress Bandwidth
+                   Profile Envelope with type 'per-evc' is referenced
+                   from an EVC End Point.  This is done by checking that
+                   the number of BWP flows in envelopes of this type is
+                   equal to the number of EVC EPs on the UNI that have
+                   an ingress bandwidth profile per EVC that refers to
+                   an envelope.  Note that there are other must
+                   statements that ensure each BWP flow is refered to at
+                   most once, so from this it can be deduced that each
+                   BWP flow is also refered to at least once.  This is
+                   part of enforcing MEF 10.3 R134, and also enforces
+                   MEF 6.2 R4.";
+                 reference
+                   "[MEF10.3] [R134], [MEF6.2] [R4]";
+              }
+
+              must "count(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:ingress-envelopes/" +
+                         "mef-interfaces:envelope[" +
+                           "mef-interfaces:type = 'per-cos-or-eec']/" +
+                         "mef-interfaces:bwp-flows/" +
+                         "mef-interfaces:bwp-flow) = " +
+                   "count(/mef-services/carrier-ethernet/" +
+                          "subscriber-services/evc/end-points/" +
+                          "end-point[uni-id = current()/uni-id]/" +
+                          "ingress-bwp-per-cos/" +
+                            "bwp-flow-per-cos[envelope-id])" {
+                error-message
+                  "For an Ingress Bandwidth Profile Envelope with type
+                   'per-cos-or-eec' every flow must be referenced by an
+                   Ingress Bandwidth Profile per CoS Name";
+                description
+                  "This must statement, in combination with others,
+                   ensures that every BWP flow in an Ingress Bandwidth
+                   Profile Envelope with type 'per-cos-or-eec' is
+                   referenced from a Bandwidth Profile per CoS Name on
+                   an EVC End Point.  This is done by checking that the
+                   number of BWP flows in envelopes of this type is
+                   equal to the number of BWPs per CoS Name on EVC EPs
+                   on the UNI that refers to an envelope.  Note that
+                   there are other must statements that ensure each BWP
+                   flow is refered to at most once, so from this it can
+                   be deduced that each BWP flow is also refered to at
+                   least once.  This is part of enforcing MEF 10.3 R134,
+                   and also enforces MEF 6.2 R4.";
+                 reference
+                   "[MEF10.3] [R134], [MEF6.2] [R4]";
+              }
+
+              must "count(/mef-interfaces:mef-interfaces/" +
+                         "mef-interfaces:carrier-ethernet/" +
+                         "mef-interfaces:subscriber-interfaces/" +
+                         "mef-interfaces:uni[" +
+                           "mef-interfaces:uni-id = " +
+                             "current()/uni-id]/" +
+                         "mef-interfaces:egress-envelopes/" +
+                         "mef-interfaces:envelope[" +
+                           "mef-interfaces:type = 'per-evc']/" +
+                         "mef-interfaces:bwp-flows/" +
+                         "mef-interfaces:bwp-flow) = " +
+                   "count(/mef-services/carrier-ethernet/" +
+                          "subscriber-services/evc/end-points/" +
+                          "end-point" +
+                            "[uni-id = current()/uni-id]" +
+                            "[egress-bwp-per-evc/envelope-id])" {
+                error-message
+                  "For an Egress Bandwidth Profile Envelope with type
+                   'per-evc' every flow must be referenced by an
+                   Egress Bandwidth Profile per EVC";
+                description
+                  "This must statement, in combination with others,
+                   ensures that every BWP flow in an Egress Bandwidth
+                   Profile Envelope with type 'per-evc' is referenced
+                   from an EVC End Point.  This is done by checking that
+                   the number of BWP flows in envelopes of this type is
+                   equal to the number of EVC EPs on the UNI that have
+                   an egress bandwidth profile per EVC that refers to an
+                   envelope.  Note that there are other must statements
+                   that ensure each BWP flow is refered to at most once,
+                   so from this it can be deduced that each BWP flow is
+                   also refered to at least once.  This is part of
+                   enforcing MEF 10.3 R134, and also enforces MEF 6.2
+                   R4.";
+                reference
+                  "[MEF10.3] [R134], [MEF6.2] [R4]";
+              }
+
+              must "count(/mef-interfaces:mef-interfaces/" +
+                          "mef-interfaces:carrier-ethernet/" +
+                          "mef-interfaces:subscriber-interfaces/" +
+                          "mef-interfaces:uni[" +
+                            "mef-interfaces:uni-id = " +
+                              "current()/uni-id]/" +
+                          "mef-interfaces:egress-envelopes/" +
+                          "mef-interfaces:envelope[" +
+                            "mef-interfaces:type = 'per-cos-or-eec']/" +
+                          "mef-interfaces:bwp-flows/" +
+                          "mef-interfaces:bwp-flow) = " +
+                   "count(/mef-services/carrier-ethernet/" +
+                          "subscriber-services/evc/end-points/" +
+                          "end-point[uni-id = current()/uni-id]/" +
+                          "egress-bwp-per-eec/" +
+                          "bwp-flow-per-eec[envelope-id])" {
+                error-message
+                  "For an Egress Bandwidth Profile Envelope with type
+                   'per-cos-or-eec' every flow must be referenced by an
+                   Egress Bandwidth Profile per EEC Name";
+                description
+                  "This must statement, in combination with others,
+                   ensures that every BWP flow in an Egress Bandwidth
+                   Profile Envelope with type 'per-cos-or-eec' is
+                   referenced from a Bandwidth Profile per EEC Name on
+                   an EVC End Point.  This is done by checking that the
+                   number of BWP flows in envelopes of this type is
+                   equal to the number of BWPs per EEC Name on EVC EPs
+                   on the UNI that refers to an envelope.  Note that
+                   there are other must statements that ensure each BWP
+                   flow is refered to at most once, so from this it can
+                   be deduced that each BWP flow is also refered to at
+                   least once.  This is part of enforcing MEF 10.3 R134,
+                   and also enforces MEF 6.2 R4.";
+                reference
+                  "[MEF10.3] [R134], [MEF6.2] [R4]";
+              }
+
+              key "uni-id";
+              description
+                "List of EVC End Points for the EVC. Each EVC End Point
+                 in the EVC is associated with a distinct UNI, and
+                 contains the EVC per UNI attributes described in MEF
+                 10.3.";
+              reference
+                "[MEF10.3] Section 10,
+                 [MEF7.3] Section 7.4 and Section 7.5.";
+              leaf uni-id {
+                type leafref {
+                  path "/mef-interfaces:mef-interfaces/" +
+                       "mef-interfaces:carrier-ethernet/" +
+                       "mef-interfaces:subscriber-interfaces/" +
+                       "mef-interfaces:uni/mef-interfaces:uni-id";
+                }
+                description
+                  "UNI ID of the UNI where this EVC End
+                   Point is located.";
+                reference
+                  "[MEF10.3] Section 8.3, Section 10.1.
+                   [MEF7.3] Section 7.5.";
+              }
+              leaf role {
+                type mef-types:evc-uni-role-type;
+                default "root";
+                description
+                  "The role of the EVC End Point in the EVC.  For
+                   point-to-point and multipoint-to-multipoint EVCs, the
+                   role is always root.  In a rooted-multipoint EVC, the
+                   role may be root or leaf, to indicate which other EVC
+                   End Points this one may communicate with.";
+                reference
+                  "[MEF10.3] Section 8.3. [MEF7.3] Section 7.5.";
+              }
+              leaf admin-state {
+                type boolean;
+                default "true";
+                description
+                  "Indicates whether the EVC End Point is
+                   adminstratively locked (if the value is false) or
+                   unlocked (if the value if true).";
+                reference
+                  "[MEF7.3] Section 7.4.";
+              }
+              leaf color-identifier {
+                type leafref {
+                  path "/mef-global:mef-global/" +
+                        "mef-global:color-mapping-profiles/" +
+                        "mef-global:profile/mef-global:id";
+                }
+                mandatory true;
+                description
+                  "The Color Identifier for Service Frames.";
+                reference
+                  "[MEF10.3] Section 10.3.
+                   [MEF7.3] Section 7.4 and Section 7.13.";
+              }
+              leaf cos-identifier {
+                type leafref {
+                  path "/mef-global:mef-global/" +
+                        "mef-global:cos-profiles/" +
+                        "mef-global:profile/mef-global:id";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-pcp) or " +
+                     "count(/mef-global:mef-global/" +
+                            "mef-global:cos-profiles/" +
+                            "mef-global:profile[mef-global:id = " +
+                                                        "current()]/" +
+                            "mef-global:cos-pcp/mef-global:pcp[" +
+                               "not(mef-global:cos-name = " +
+                                      "current()/../../../cos-names/" +
+                                      "cos-name/name)]) = 0" {
+                  error-message
+                    "When the Class of Service Identifier is
+                     based on PCP for a given EVC at a given UNI, all
+                     cos-pcp CoS Names must be in the the EVC Cos
+                     Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     PCP for a given EVC at a given UNI, all cos-pcp
+                     CoS Names must be in the the EVC Cos Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-dscp) or " +
+                     "count(/mef-global:mef-global/" +
+                            "mef-global:cos-profiles/" +
+                            "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                            "mef-global:cos-dscp/" +
+                            "mef-global:ipv4-dscp[" +
+                               "not(mef-global:cos-name = " +
+                                      "current()/../../../cos-names/" +
+                                      "cos-name/name)]) = 0" {
+                  error-message
+                    "When the Class of Service Identifier is
+                     based on DSCP for a given EVC at a given UNI, all
+                     IPv4 cos-dscp CoS Names must be in the the EVC
+                     Cos Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     DSCP for a given EVC at a given UNI, all IPv4
+                     cos-dscp CoS Names must be in the the EVC Cos Names
+                     List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-dscp) or " +
+                     "count(/mef-global:mef-global/" +
+                            "mef-global:cos-profiles/" +
+                            "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                            "mef-global:cos-dscp/" +
+                            "mef-global:ipv6-dscp[" +
+                               "not(mef-global:cos-name = " +
+                                      "current()/../../../cos-names/" +
+                                      "cos-name/name)]) = 0" {
+                  error-message
+                    "When the Class of Service Identifier is
+                     based on DSCP for a given EVC at a given UNI, all
+                     IPv6 cos-dscp CoS Names must be in the the EVC
+                     Cos Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     DSCP for a given EVC at a given UNI, all IPv6
+                     cos-dscp CoS Names must be in the the EVC
+                     Cos Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-pcp) or " +
+                     "(../../../cos-names/cos-name[" +
+                          "name = /mef-global:mef-global/" +
+                                  "mef-global:cos-profiles/" +
+                                  "mef-global:profile[" +
+                                    "mef-global:id = current()]/" +
+                                  "mef-global:cos-pcp/" +
+                                  "mef-global:default-pcp-cos-name])" {
+                  error-message
+                    "When the Class of Service Identifier is based on
+                     PCP for a given EVC at a given UNI, the
+                     default-pcp-cos-name must be in the the
+                     EVC Cos Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     PCP for a given EVC at a given UNI, the
+                     default-pcp-cos-name must be in the the EVC Cos
+                     Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-evc) or " +
+                     "(../../../cos-names/cos-name[" +
+                          "name = /mef-global:mef-global/" +
+                                  "mef-global:cos-profiles/" +
+                                  "mef-global:profile[" +
+                                    "mef-global:id = current()]/" +
+                                  "mef-global:cos-evc/" +
+                                  "mef-global:evc-cos-name])" {
+                  error-message
+                    "When the Class of Service Identifier is based on
+                     EVC for a given EVC at a given UNI, the EVC CoS
+                     Name must be in the the EVC Cos Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     EVC for a given EVC at a given UNI, the EVC CoS
+                     Name must be in the the EVC Cos Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-dscp) or " +
+                     "(../../../cos-names/cos-name[" +
+                          "name = /mef-global:mef-global/" +
+                                  "mef-global:cos-profiles/" +
+                                  "mef-global:profile[" +
+                                    "mef-global:id = current()]/" +
+                                  "mef-global:cos-dscp/" +
+                                  "mef-global:default-ipv4-cos-name])" {
+                  error-message
+                    "When the Class of Service Identifier is
+                     based on DSCP for a given EVC at a given UNI,
+                     the default-ipv4-cos-name must be in the the
+                     EVC Cos Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     DSCP for a given EVC at a given UNI, the
+                     default-ipv4-cos-name must be in the the EVC Cos
+                     Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-dscp) or " +
+                     "(../../../cos-names/cos-name[" +
+                          "name = /mef-global:mef-global/" +
+                                  "mef-global:cos-profiles/" +
+                                  "mef-global:profile[" +
+                                    "mef-global:id = current()]/" +
+                                  "mef-global:cos-dscp/" +
+                                  "mef-global:default-ipv6-cos-name])" {
+                  error-message
+                    "When the Class of Service Identifier is based
+                     on DSCP for a given EVC at a given UNI, the
+                     default-ipv6-cos-name must be in the the EVC Cos
+                     Names List.";
+                  description
+                    "When the Class of Service Identifier is based on
+                     DSCP for a given EVC at a given UNI, the
+                     default-ipv6-cos-name must be in the the EVC Cos
+                     Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:l2cp-cos-id) or " +
+                     "count(/mef-global:mef-global/" +
+                            "mef-global:l2cp-cos-map-profiles/" +
+                            "mef-global:profile[mef-global:id = " +
+                               "/mef-global:mef-global/" +
+                                "mef-global:cos-profiles/" +
+                                "mef-global:profile[" +
+                                    "mef-global:id = current()]/" +
+                                "mef-global:l2cp-cos-id]/" +
+                                "mef-global:map-entries/" +
+                                "mef-global:map-entry" +
+                                 "[mef-global:cos-name]" +
+                                  "[not(mef-global:cos-name = " +
+                                        "current()/../../../" +
+                                        "cos-names/cos-name/" +
+                                        "name)]) = 0" {
+                  error-message
+                    "When the Class of Service Identifier includes an
+                     L2CP CoS map, the CoS Names used in the L2CP CoS
+                     map must be in the the EVC Cos Names List.";
+                  description
+                    "When the Class of Service Identifier includes an
+                     L2CP CoS map, the CoS Names used in the L2CP CoS
+                     map must be in the the EVC Cos Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:l2cp-cos-id) or " +
+                     "count(/mef-global:mef-global/" +
+                            "mef-global:l2cp-cos-map-profiles/" +
+                            "mef-global:profile[mef-global:id = " +
+                               "/mef-global:mef-global/" +
+                                "mef-global:cos-profiles/" +
+                                "mef-global:profile[" +
+                                    "mef-global:id = current()]/" +
+                                "mef-global:l2cp-cos-id]/" +
+                                "mef-global:map-entries/" +
+                                "mef-global:map-entry" +
+                                 "[mef-global:subtypes]/" +
+                                "mef-global:subtypes/" +
+                                 "mef-global:subtype" +
+                                  "[not(mef-global:cos-name = " +
+                                        "current()/../../../" +
+                                        "cos-names/cos-name/" +
+                                        "name)]) = 0" {
+                  error-message
+                    "When the Class of Service Identifier includes an
+                     L2CP CoS map, the CoS Names used in the L2CP CoS
+                     map must be in the the EVC Cos Names List.";
+                  description
+                    "When the Class of Service Identifier includes an
+                     L2CP CoS map, the CoS Names used in the L2CP CoS
+                     map must be in the the EVC Cos Names List.";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-pcp) or " +
+                     "/mef-global:mef-global/" +
+                      "mef-global:color-mapping-profiles/" +
+                      "mef-global:profile[" +
+                        "mef-global:id = " +
+                            "current()/../color-identifier]/" +
+                      "mef-global:color-pcp/" +
+                      "mef-global:default-pcp-color-name or " +
+                     "/mef-global:mef-global/" +
+                      "mef-global:color-mapping-profiles/" +
+                      "mef-global:profile[" +
+                           "mef-global:id = " +
+                               "current()/../color-identifier]/" +
+                      "mef-global:color-pcp/" +
+                      "mef-global:pcps/mef-global:pcp[0] or " +
+                     "/mef-global:mef-global/" +
+                      "mef-global:color-mapping-profiles/" +
+                      "mef-global:profile[" +
+                           "mef-global:id = " +
+                               "current()/../color-identifier]/" +
+                      "mef-global:color-dei/mef-global: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.";
+                  reference
+                    "[MEF10.3] [R111].";
+                }
+                must "not(/mef-global:mef-global/" +
+                          "mef-global:cos-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                                                         "current()]/" +
+                          "mef-global:cos-dscp) or " +
+                     "/mef-global:mef-global/" +
+                      "mef-global:color-mapping-profiles/" +
+                      "mef-global:profile[" +
+                        "mef-global:id = " +
+                           "current()/../color-identifier]/" +
+                      "mef-global:color-dscp/" +
+                      "mef-global:default-dscp-color-name or " +
+                     "/mef-global:mef-global/" +
+                      "mef-global:color-mapping-profiles/" +
+                      "mef-global:profile[" +
+                        "mef-global:id = " +
+                            "current()/../color-identifier]/" +
+                      "mef-global:color-dscp/mef-global:ipv4-dscps/" +
+                      "mef-global:ipv4-dscp[0] or " +
+                     "/mef-global:mef-global/" +
+                      "mef-global:color-mapping-profiles/" +
+                      "mef-global:profile[" +
+                        "mef-global:id = " +
+                            "current()/../color-identifier]/" +
+                      "mef-global:color-dscp/mef-global:ipv6-dscps/" +
+                      "mef-global:ipv6-dscp[0]" {
+                  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
+                    "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.";
+                  reference
+                    "[MEF10.3] [R112].";
+                }
+                mandatory true;
+                description
+                  "Reference to a global CoS Profile that
+                   specifies how to assign CoS Names to ingress frames
+                   at this EVC End Point based on fields in the frame.";
+                reference
+                  "[MEF10.3] Section 10.2. [MEF7.3] Section 7.11.";
+              }
+              leaf eec-identifier {
+                type leafref {
+                  path "/mef-global:mef-global/" +
+                        "mef-global:eec-profiles/" +
+                        "mef-global:profile/mef-global:id";
+                }
+                mandatory true;
+                description
+                  "Reference to a global EEC Profile that specifies how
+                   to assign EEC Names to egress frames at this EVC End
+                   Point, based on fields in the frame.";
+                reference
+                  "[MEF10.3] Section 10.4. [MEF7.3] Section 7.12.";
+              }
+              leaf source-mac-address-limit {
+                type uint32 {
+                  range "1..max";
+                }
+                description
+                  "Source MAC Address Limit.";
+                reference
+                  "[MEF10.3] Section 10.9. [MEF7.3] Section 7.4.";
+              }
+              leaf source-mac-address-limit-time-interval {
+                when "../source-mac-address-limit";
+                type yang:timeticks {
+                  range "1..241920000";
+                }
+                mandatory true;
+                description
+                  "Source MAC Address Limit Interval. This
+                   value is used when the Source MAC Address Limit has
+                   been configured.";
+                reference
+                  "[MEF10.3] Section 10.9. [MEF7.3] Section 8.1.13.";
+              }
+              leaf test-meg-enabled {
+                type boolean;
+                default "false";
+                description
+                  "Test MEG Enabled / Disabled.";
+                reference
+                  "[MEF10.3] Section 10.10. [MEF7.3] Section 7.5.";
+              }
+              leaf user-label {
+                type mef-types:identifier1024;
+                description
+                  "User Label.";
+                reference
+                  "[MEF7.3] Section 7.5.";
+              }
+              leaf subscriber-meg-mip-enabled {
+                type boolean;
+                default "false";
+                description
+                  "Subscriber MEG MIP Enabled / Disabled.";
+                reference
+                  "[MEF10.3] Section 10.11. [MEF7.3] Section 7.5";
+              }
+              container ce-vlans {
+                description
+                  "Container for the list of CE-VLAN IDs that map to
+                   this EVC End Point.";
+                reference
+                  "[MEF10.3] Section 9.10, [MEF7.3] Section 7.5";
+                leaf-list ce-vlan {
+                  type mef-types:vlan-id-type;
+
+                  must "not(current()/../../ce-vlans/ce-vlan[2]) or " +
+                       "count(../../../../end-points/end-point/" +
+                             "ce-vlans/ce-vlan[. = current()]) = " +
+                       "count(../../../../end-points/end-point)" {
+                    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.";
+                    reference
+                      "[MEF10.3] [R81].";
+                  }
+
+                  must "count(/mef-services/carrier-ethernet/" +
+                              "subscriber-services/evc/end-points/" +
+                              "end-point[uni-id = " +
+                                  "current()/../../uni-id]/" +
+                              "ce-vlans/ce-vlan[. = current()]) = 1" {
+                    error-message
+                      "At each UNI there MUST be a mapping of each
+                       CE-VLAN ID to at most one EVC.";
+                    description
+                      "At each UNI there MUST be a mapping of each
+                       CE-VLAN ID to at most one EVC.";
+                    reference
+                      "[MEF10.3] [R76].";
+                  }
+
+                  min-elements 1;
+                  description
+                    "The leaf-list of CE-VLAN IDs that map to this EVC
+                     End Point - that is, that map to this EVC at the
+                     associated UNI.";
+                  reference
+                    "[MEF10.3] Section 9.10. [MEF7.3] Section 7.5.";
+                }
+              }
+
+              choice ingress-bwp-choices {
+                description
+                  "Choice to ensure one cannot configure BWP per-cos and
+                   per-evc at the same time.";
+                case ingress-bwp-per-cos-option {
+                  container ingress-bwp-per-cos {
+                    description
+                      "EVC Ingress Bandwidth Profiles per Class of
+                       Service Name";
+                    reference
+                      "[MEF10.3] Section 10.6,
+                       [MEF7.3] Section 7.4, 7.11";
+                    list bwp-flow-per-cos {
+                      must "(../../../../svc-type = 'other') or " +
+                           "not(envelope-id) or " +
+                           "count(/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                     "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                        "current()/../../uni-id]/" +
+                                  "mef-interfaces:ingress-envelopes/" +
+                                  "mef-interfaces:envelope[" +
+                                    "mef-interfaces:id = " +
+                                        "current()/envelope-id]/" +
+                                  "mef-interfaces:bwp-flows/" +
+                                  "mef-interfaces:bwp-flow) >= 2" {
+                        error-message
+                          "For a MEF 6.2 service, every Envelope must
+                           contain at least 2 Bandwidth Profile Flows.";
+                        description
+                          "For a MEF 6.2 service, every Envelope must
+                           contain at least 2 Bandwidth Profile Flows.";
+                        reference
+                          "[MEF6.2] [R5]";
+                      }
+                      key "cos-name";
+                      description
+                        "The list of Ingress Bandwidth Profile Flows per
+                         CoS Name for this EVC End Point";
+                      reference
+                        "[MEF10.3] Section 10.6,
+                         [MEF7.3] Section 7.4, 7.11";
+                      leaf cos-name {
+                        type leafref {
+                          path "/mef-services/carrier-ethernet/" +
+                              "subscriber-services/evc/cos-names/" +
+                               "cos-name/name";
+                        }
+                        description
+                          "Class of Service Name for this Bandwidth
+                           Profile Flow.";
+                        reference
+                          "[MEF10.3] Section 10.6,
+                           [MEF7.3] Section 7.4, 7.11";
+                      }
+
+                      choice ingress-bw-profile-per-cos {
+                        mandatory true;
+                        description
+                          "This choice can be used to specify either a
+                           standalone Bandwidth Profile Flow, or a
+                           Bandwidth Profile Flow within a specified
+                           Bandwidth Profile Envelope.  Note that in the
+                           former case, the Bandwidth Profile Flow can
+                           be thought of as being in an Envelope that
+                           contains no other Bandwidth Profile Flows,
+                           has no Envelope ID and does not appear in the
+                           list of Bandwidth Profile Envelopes for the
+                           UNI (/mef-interfaces/carrier-ethernet/
+                           subscriber-interfaces/uni/ingress-envelopes/
+                           envelope).";
+                        reference
+                          "[MEF10.3] sections 10.6 and 12.
+                           [MEF7.3] sections 7.4, 7.11, 7.16.";
+                        case standalone {
+                          description
+                            "A standalone Bandwidth Profile Flow is
+                             being specified. Note that this case allows
+                             for backwards compatibility with MEF 10.2
+                             (see MEF 10.3 section 12.2)";
+                          leaf bw-profile-flow-parameters {
+                            type leafref {
+                              path "/mef-global:mef-global/" +
+                                    "mef-global:" +
+                                      "bwp-flow-parameter-profiles/" +
+                                    "mef-global:profile/" +
+                                    "mef-global:id";
+                            }
+                            mandatory true;
+                            description
+                              "Reference to a global set of Bandwidth
+                               Profile Flow parameters for this
+                               Bandwidth Profile Flow.";
+                          }
+                        }
+                        case envelope {
+                          description
+                            "An Ingress Bandwidth Profile per CoS Name
+                             is being specified with reference to a
+                             Bandwidth Profile Envelope in the UNI List
+                             of Ingress Bandwidth Profile Envelopes.";
+                          leaf envelope-id {
+                            type leafref {
+                              path "/mef-interfaces:mef-interfaces/" +
+                                    "mef-interfaces:carrier-ethernet/" +
+                                    "mef-interfaces:" +
+                                      "subscriber-interfaces/" +
+                                    "mef-interfaces:uni[" +
+                                      "mef-interfaces:uni-id = " +
+                                         "current()/../../../uni-id]/" +
+                                    "mef-interfaces:" +
+                                      "ingress-envelopes/" +
+                                    "mef-interfaces:envelope/" +
+                                    "mef-interfaces:id";
+                            }
+
+                            must "/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                        "current()/../../../uni-id]/" +
+                                  "mef-interfaces:ingress-envelopes/" +
+                                  "mef-interfaces:envelope[" +
+                                    "mef-interfaces:id = current()]/" +
+                                  "mef-interfaces:type = " +
+                                      "'per-cos-or-eec'" {
+                              error-message
+                                "A bandwidth profile per CoS Name can
+                                 only refer to an Envelope with type
+                                 per-cos-or-eec.";
+                              description
+                                "A bandwidth profile per CoS Name can
+                                 only refer to an Envelope with type
+                                 per-cos-or-eec.  This is used to
+                                 enforce MEF 10.3 R135.";
+                              reference
+                                "[MEF10.3] [R135]";
+                            }
+
+                            must "count(/mef-services/" +
+                                        "carrier-ethernet/" +
+                                        "subscriber-services/" +
+                                        "evc/end-points/" +
+                                        "end-point[uni-id = " +
+                                            "current()/../../../" +
+                                            "uni-id]/" +
+                                        "ingress-bwp-per-cos/" +
+                                        "bwp-flow-per-cos" +
+                                          "[envelope-id = current()]" +
+                                          "[rank = " +
+                                             "current()/../rank]) = 1" {
+                              error-message
+                                "For an ingress envelope with type
+                                 per-cos-or-eec, there must be exactly
+                                 one Ingress Bandwidth Profile per CoS
+                                 Name that refers to each Bandwidth
+                                 Profile Flow in the Envelope.";
+                              description
+                                "This must statement enforces MEF 10.3
+                                 R134 by ensuring that the
+                                 number of ingress Bandwidth Profiles
+                                 per CoS Name, across all the EVC End
+                                 Points on this UNI, that refer to the
+                                 same envelope and rank as this one is
+                                 one, i.e. this one is the only one.";
+                              reference
+                                "[MEF10.3] [R134]";
+                            }
+                            mandatory true;
+                            description
+                              "Reference to an ingress Bandwidth Profile
+                               Envelope on the UNI.";
+                          }
+
+                          leaf rank {
+                            type leafref {
+                              path "/mef-interfaces:mef-interfaces/" +
+                                    "mef-interfaces:carrier-ethernet/" +
+                                    "mef-interfaces:" +
+                                      "subscriber-interfaces/" +
+                                    "mef-interfaces:uni[" +
+                                      "mef-interfaces:uni-id = " +
+                                      "current()/../../../uni-id]/" +
+                                    "mef-interfaces:" +
+                                      "ingress-envelopes/" +
+                                    "mef-interfaces:envelope[" +
+                                       "mef-interfaces:id = " +
+                                       "current()/../envelope-id]/" +
+                                    "mef-interfaces:bwp-flows/" +
+                                    "mef-interfaces:bwp-flow/" +
+                                    "mef-interfaces:rank";
+                            }
+                            mandatory true;
+                            description
+                              "Reference to a Bandwidth Profile Flow in
+                               the given Envelope.";
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+                case ingress-bwp-per-evc-option{
+                  container ingress-bwp-per-evc {
+                    description
+                      "Ingress Bandwidth Profile per EVC.";
+                    reference
+                      "[MEF10.3] Section 10.5, [MEF7.3] Section 7.4";
+                    choice ingress-bw-profile-per-evc {
+                      description
+                        "This choice can be used to specify either a
+                         standalone Bandwidth Profile Flow, or a
+                         Bandwidth Profile Flow within a specified
+                         Bandwidth Profile Envelope.  Note that in the
+                         former case, the Bandwidth Profile Flow can be
+                         thought of as being in an Envelope that
+                         contains no other Bandwidth Profile Flows, has
+                         no Envelope ID and does not appear in the list
+                         of Bandwidth Profile Envelopes for the UNI
+                         (/mef-interfaces/carrier-ethernet/
+                         subscriber-interfaces/uni/ingress-envelopes/
+                         envelope).";
+                      reference
+                        "[MEF10.3] sections 10.5 and 12.
+                         [MEF7.3] sections 7.4 and 7.16.";
+                      case standalone {
+                        description
+                          "A standalone Bandwidth Profile Flow is
+                           being specified. Note that this case allows
+                           for backwards compatibility with MEF 10.2
+                           (see MEF 10.3 section 12.2)";
+                        leaf bw-profile-flow-parameters {
+                          type leafref {
+                            path "/mef-global:mef-global/" +
+                                 "mef-global:" +
+                                   "bwp-flow-parameter-profiles/" +
+                                 "mef-global:profile/" +
+                                 "mef-global:id";
+                          }
+                          mandatory true;
+                          description
+                            "Reference to a global set of Bandwidth
+                             Profile Flow parameters for this Bandwidth
+                             Profile Flow.";
+                        }
+                      }
+                      case envelope {
+                        description
+                          "An Ingress Bandwidth Profile per EVC is being
+                           specified with reference to a Bandwidth
+                           Profile Envelope in the UNI List of Ingress
+                           Bandwidth Profile Envelopes.";
+                         leaf envelope-id {
+                          type leafref {
+                            path "/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                    "current()/../../uni-id]/" +
+                                  "mef-interfaces:ingress-envelopes/" +
+                                  "mef-interfaces:envelope/" +
+                                  "mef-interfaces:id";
+                          }
+
+                          must "/mef-interfaces:mef-interfaces/" +
+                                "mef-interfaces:carrier-ethernet/" +
+                                "mef-interfaces:" +
+                                  "subscriber-interfaces/" +
+                                "mef-interfaces:uni[" +
+                                  "mef-interfaces:uni-id = " +
+                                      "current()/../../uni-id]/" +
+                                "mef-interfaces:ingress-envelopes/" +
+                                "mef-interfaces:envelope[" +
+                                  "mef-interfaces:id = current()]/" +
+                                "mef-interfaces:type = 'per-evc'" {
+                            error-message
+                              "A bandwidth profile per EVC can
+                               only refer to an Envelope with type
+                               per-evc.";
+                            description
+                              "A bandwidth profile per EVC can
+                               only refer to an Envelope with type
+                               per-evc.  This is used to
+                               enforce MEF 10.3 R135.";
+                            reference
+                              "[MEF10.3] [R135]";
+                          }
+                          must "count(/mef-services/carrier-ethernet/" +
+                                      "subscriber-services/evc/" +
+                                      "end-points/end-point" +
+                                        "[uni-id = " +
+                                            "current()/../../uni-id]" +
+                                        "[ingress-bwp-per-evc/" +
+                                         "envelope-id = current()]" +
+                                        "[ingress-bwp-per-evc/rank = " +
+                                            "current()/../rank]) = 1" {
+                            error-message
+                              "For an ingress envelope with type
+                               per-evc, there must be exactly
+                               one Ingress Bandwidth Profile per EVC
+                               that refers to each Bandwidth
+                               Profile Flow in the Envelope.";
+                            description
+                              "This must statement enforces MEF 10.3
+                               R134 by ensuring that the
+                               number of ingress Bandwidth Profiles
+                               per EVC, across all the EVC End
+                               Points on this UNI, that refer to the
+                               same envelope and rank as this one is
+                               one, i.e. this one is the only one.";
+                            reference
+                              "[MEF10.3] [R134]";
+                          }
+                          mandatory true;
+                          description
+                            "Reference to an ingress Bandwidth Profile
+                             Envelope on the UNI.";
+                        }
+                        leaf rank {
+                          type leafref {
+                            path "/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                     "mef-interfaces:uni-id = " +
+                                     "current()/../../uni-id]/" +
+                                  "mef-interfaces:ingress-envelopes/" +
+                                  "mef-interfaces:envelope[" +
+                                     "mef-interfaces:id = " +
+                                     "current()/../envelope-id]/" +
+                                  "mef-interfaces:bwp-flows/" +
+                                  "mef-interfaces:bwp-flow/" +
+                                  "mef-interfaces:rank";
+                          }
+                          mandatory true;
+                          description
+                            "Reference to a Bandwidth Profile Flow in
+                             the given Envelope.";
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+
+              choice egress-bwp-choices {
+                description
+                  "Choice to ensure one cannot configure BWP per-EEC and
+                   per-EVC at the same time.";
+                case egress-bwp-per-eec-option {
+                  container egress-bwp-per-eec {
+                    description
+                      "EVC Egress Bandwidth Profiles per Egress
+                       Equivalence Class Name";
+                    reference
+                      "[MEF10.3] Section 10.8,
+                       [MEF7.3] Section 7.4, 7.12";
+                    list bwp-flow-per-eec {
+                      must "(../../../../svc-type = 'other') or " +
+                           "not(envelope-id) or " +
+                           "count(/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                        "current()/../../uni-id]/" +
+                                  "mef-interfaces:egress-envelopes/" +
+                                  "mef-interfaces:envelope[" +
+                                    "mef-interfaces:id = " +
+                                        "current()/envelope-id]/" +
+                                  "mef-interfaces:bwp-flows/" +
+                                  "mef-interfaces:bwp-flow) >= 2" {
+                        error-message
+                          "For a MEF 6.2 service, every Envelope must
+                           contain at least 2 Bandwidth Profile Flows.";
+                        description
+                          "For a MEF 6.2 service, every Envelope must
+                           contain at least 2 Bandwidth Profile Flows.";
+                        reference
+                          "[MEF6.2] [R5]";
+                      }
+                      key "eec-name";
+                      description
+                        "The list of Egress Bandwidth Profile Flows per
+                         EEC Name for this EVC End Point";
+                      reference
+                        "[MEF10.3] Section 10.8,
+                         [MEF7.3] Section 7.4, 7.12";
+                      leaf eec-name {
+                        type string;
+                        description
+                          "Egress Equivalence Class Name for this
+                           Bandwidth Profile Flow.";
+                        reference
+                          "[MEF10.3] Section 10.8,
+                           [MEF7.3] Section 7.4, 7.12";
+                      }
+
+                      choice egress-bw-profile-per-eec {
+                        mandatory true;
+                        description
+                          "This choice can be used to specify either a
+                           standalone Bandwidth Profile Flow, or a
+                           Bandwidth Profile Flow within a specified
+                           Bandwidth Profile Envelope.  Note that in the
+                           former case, the Bandwidth Profile Flow can
+                           be thought of as being in an Envelope that
+                           contains no other Bandwidth Profile Flows,
+                           has no Envelope ID and does not appear in the
+                           list of Bandwidth Profile Envelopes for the
+                           UNI (/mef-interfaces/carrier-ethernet/
+                           subscriber-interfaces/uni/egress-envelopes/
+                           envelope).";
+                        reference
+                          "[MEF10.3] sections 10.8 and 12.
+                           [MEF7.3] sections 7.4, 7.12, 7.16.";
+                        case standalone {
+                          description
+                            "A standalone Bandwidth Profile Flow is
+                             being specified. Note that this case allows
+                             for backwards compatibility with MEF 10.2
+                             (see MEF 10.3 section 12.2)";
+                          leaf bw-profile-flow-parameters {
+                            type leafref {
+                              path "/mef-global:mef-global/" +
+                                    "mef-global:" +
+                                      "bwp-flow-parameter-profiles/" +
+                                    "mef-global:profile/" +
+                                    "mef-global:id";
+                            }
+                            mandatory true;
+                            description
+                              "Reference to a global set of Bandwidth
+                               Profile Flow parameters for this
+                               Bandwidth Profile Flow.";
+                          }
+                        }
+                        case envelope {
+                          description
+                            "An Egress Bandwidth Profile per EEC Name is
+                             being specified with reference to a
+                             Bandwidth Profile Envelope in the UNI List
+                             of Egress Bandwidth Profile Envelopes.";
+                          leaf envelope-id {
+                            type leafref {
+                              path "/mef-interfaces:mef-interfaces/" +
+                                    "mef-interfaces:carrier-ethernet/" +
+                                    "mef-interfaces:" +
+                                      "subscriber-interfaces/" +
+                                    "mef-interfaces:uni[" +
+                                      "mef-interfaces:uni-id = " +
+                                      "current()/../../../uni-id]/" +
+                                    "mef-interfaces:egress-envelopes/" +
+                                    "mef-interfaces:envelope/" +
+                                    "mef-interfaces:id";
+                            }
+
+                            must "/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                        "current()/../../../uni-id]/" +
+                                  "mef-interfaces:egress-envelopes/" +
+                                  "mef-interfaces:envelope[" +
+                                    "mef-interfaces:id = current()]/" +
+                                  "mef-interfaces:type = " +
+                                      "'per-cos-or-eec'" {
+                              error-message
+                                "A bandwidth profile per EEC Name can
+                                 only refer to an Envelope with type
+                                 per-cos-or-eec.";
+                              description
+                                "A bandwidth profile per EEC Name can
+                                 only refer to an Envelope with type
+                                 per-cos-or-eec.  This is used to
+                                 enforce MEF 10.3 R135.";
+                              reference
+                                "[MEF10.3] [R135]";
+                            }
+                            must "count(/mef-services/" +
+                                        "carrier-ethernet/" +
+                                        "subscriber-services/evc/" +
+                                        "end-points/end-point[" +
+                                          "uni-id = " +
+                                              "current()/../../../" +
+                                              "uni-id]/" +
+                                        "egress-bwp-per-eec/" +
+                                        "bwp-flow-per-eec" +
+                                          "[envelope-id = current()]" +
+                                          "[rank = " +
+                                             "current()/../rank]) = 1" {
+                              error-message
+                                "For an egress envelope with type
+                                 per-cos-or-eec, there must be exactly
+                                 one Egress Bandwidth Profile per EEC
+                                 Name that refers to each Bandwidth
+                                 Profile Flow in the Envelope.";
+                              description
+                                "This must statement enforces MEF 10.3
+                                 R134 by ensuring that the
+                                 number of egress Bandwidth Profiles
+                                 per EEC Name, across all the EVC End
+                                 Points on this UNI, that refer to the
+                                 same envelope and rank as this one is
+                                 one, i.e. this one is the only one.";
+                              reference
+                                "[MEF10.3] [R134]";
+                            }
+                            mandatory true;
+                            description
+                              "Reference to an egress Bandwidth Profile
+                               Envelope on the UNI.";
+                          }
+                          leaf rank {
+                            type leafref {
+                              path "/mef-interfaces:mef-interfaces/" +
+                                    "mef-interfaces:carrier-ethernet/" +
+                                    "mef-interfaces:" +
+                                      "subscriber-interfaces/" +
+                                    "mef-interfaces:uni[" +
+                                      "mef-interfaces:uni-id = " +
+                                          "current()/../../../" +
+                                          "uni-id]/" +
+                                    "mef-interfaces:egress-envelopes/" +
+                                    "mef-interfaces:envelope[" +
+                                      "mef-interfaces:id = " +
+                                          "current()/../envelope-id]/" +
+                                    "mef-interfaces:bwp-flows/" +
+                                    "mef-interfaces:bwp-flow/" +
+                                    "mef-interfaces:rank";
+                            }
+                            mandatory true;
+                            description
+                              "Reference to a Bandwidth Profile Flow in
+                               the given Envelope.";
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+                case egress-bwp-per-evc-option{
+                  container egress-bwp-per-evc {
+                    description
+                      "Egress Bandwidth Profile per EVC.";
+                    reference
+                      "[MEF10.3] Section 10.7, [MEF7.3] Section 7.4";
+                    choice egress-bw-profile-per-evc {
+                      description
+                        "This choice can be used to specify either a
+                         standalone Bandwidth Profile Flow, or a
+                         Bandwidth Profile Flow within a specified
+                         Bandwidth Profile Envelope.  Note that in the
+                         former case, the Bandwidth Profile Flow can be
+                         thought of as being in an Envelope that
+                         contains no other Bandwidth Profile Flows, has
+                         no Envelope ID and does not appear in the list
+                         of Bandwidth Profile Envelopes for the UNI
+                         (/mef-interfaces/carrier-ethernet/
+                         subscriber-interfaces/uni/egress-envelopes/
+                         envelope).";
+                      reference
+                        "[MEF10.3] sections 10.7 and 12.
+                         [MEF7.3] sections 7.4 and 7.16.";
+                      case standalone {
+                        description
+                          "A standalone Bandwidth Profile Flow is
+                           being specified. Note that this case allows
+                           for backwards compatibility with MEF 10.2
+                           (see MEF 10.3 section 12.2)";
+                        leaf bw-profile-flow-parameters {
+                          type leafref {
+                            path "/mef-global:mef-global/" +
+                                  "mef-global:" +
+                                    "bwp-flow-parameter-profiles/" +
+                                  "mef-global:profile/" +
+                                  "mef-global:id";
+                          }
+                          mandatory true;
+                          description
+                            "Reference to a global set of Bandwidth
+                             Profile Flow parameters for this Bandwidth
+                             Profile Flow.";
+                        }
+                      }
+                      case envelope {
+                        description
+                          "An Egress Bandwidth Profile per EVC is being
+                           specified with reference to a Bandwidth
+                           Profile Envelope in the UNI List of Egress
+                           Bandwidth Profile Envelopes.";
+                        leaf envelope-id {
+                          type leafref {
+                            path "/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                        "current()/../../uni-id]/" +
+                                  "mef-interfaces:egress-envelopes/" +
+                                  "mef-interfaces:envelope/" +
+                                  "mef-interfaces:id";
+                          }
+
+                          must "/mef-interfaces:mef-interfaces/" +
+                                "mef-interfaces:carrier-ethernet/" +
+                                "mef-interfaces:" +
+                                  "subscriber-interfaces/" +
+                                "mef-interfaces:uni[" +
+                                  "mef-interfaces:uni-id = " +
+                                      "current()/../../uni-id]/" +
+                                "mef-interfaces:egress-envelopes/" +
+                                "mef-interfaces:envelope[" +
+                                  "mef-interfaces:id = current()]/" +
+                                "mef-interfaces:type = 'per-evc'" {
+                            error-message
+                              "A bandwidth profile per EVC can
+                               only refer to an Envelope with type
+                               per-evc.";
+                            description
+                              "A bandwidth profile per EVC can
+                               only refer to an Envelope with type
+                               per-evc.  This is used to
+                               enforce MEF 10.3 R135.";
+                            reference
+                              "[MEF10.3] [R135]";
+                          }
+                          must "count(/mef-services/carrier-ethernet/" +
+                                      "subscriber-services/evc/" +
+                                      "end-points/end-point" +
+                                        "[uni-id = " +
+                                            "current()/../../uni-id]" +
+                                        "[egress-bwp-per-evc/" +
+                                         "envelope-id = current()]" +
+                                        "[egress-bwp-per-evc/rank = " +
+                                            "current()/../rank]) = 1" {
+                            error-message
+                              "For an egress envelope with type
+                               per-evc, there must be exactly
+                               one Egress Bandwidth Profile per EVC
+                               that refers to each Bandwidth
+                               Profile Flow in the Envelope.";
+                            description
+                              "This must statement enforces MEF 10.3
+                               R134 by ensuring that the
+                               number of egress Bandwidth Profiles
+                               per EVC, across all the EVC End
+                               Points on this UNI, that refer to the
+                               same envelope and rank as this one is
+                               one, i.e. this one is the only one.";
+                            reference
+                              "[MEF10.3] [R134]";
+                          }
+                          mandatory true;
+                          description
+                            "Reference to an egress Bandwidth Profile
+                             Envelope on the UNI.";
+                        }
+
+                        leaf rank {
+                          type leafref {
+                            path "/mef-interfaces:mef-interfaces/" +
+                                  "mef-interfaces:carrier-ethernet/" +
+                                  "mef-interfaces:" +
+                                    "subscriber-interfaces/" +
+                                  "mef-interfaces:uni[" +
+                                    "mef-interfaces:uni-id = " +
+                                        "current()/../../uni-id]/" +
+                                  "mef-interfaces:egress-envelopes/" +
+                                  "mef-interfaces:envelope[" +
+                                    "mef-interfaces:id = " +
+                                        "current()/../envelope-id]/" +
+                                  "mef-interfaces:bwp-flows/" +
+                                  "mef-interfaces:bwp-flow/" +
+                                  "mef-interfaces:rank";
+                          }
+                          mandatory true;
+                          description
+                            "Reference to a Bandwidth Profile Flow in
+                             the given Envelope.";
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+
+              container status {
+                config false;
+                description
+                  "This container reflects the operational state of the
+                   EVC End Point.";
+                leaf operational-state {
+                  type boolean;
+                  default "false";
+                  description
+                    "Operational Status of the EVC End Point, which
+                     is either Enabled (if the value is true) or
+                     Disabled (if the value is false).";
+                  reference
+                    "[MEF7.3] Section 7.4.";
+                }
+                leaf evc-end-point-id {
+                  type mef-types:identifier90;
+                  description
+                    "This string contains the concatenation of the
+                     evc-id and uni-id keys for this EVC end-point";
+                  reference
+                    "[MEF10.3] Section 10.1, [MEF7.3] Section 7.5";
+                }
+              }
+            }
+          }
+          container status {
+            config false;
+            description
+              "This container reflects the operational state of the
+               EVC.";
+            leaf operational-state {
+              type boolean;
+              default "false";
+              description
+                "Operational Status of the EVC: either Enabled
+                 (if the value is 'true') or Disabled
+                 (if the value is 'false').";
+              reference
+                "[MEF7.3] Section 7.1.";
+            }
+            leaf service-state {
+              type mef-types:service-state-type;
+              default "pending";
+              description
+                "EVC Service State.";
+              reference
+                "[MEF7.3] Section 7.1.";
+            }
+          }
+          container carrier-ethernet-sls {
+            description
+              "Carrier Ethernet Service Level Specification";
+            leaf sls-id {
+              type leafref {
+                path "/mef-global:mef-global/" +
+                     "mef-global:sls-profiles/mef-global:profile/" +
+                     "mef-global:id";
+              }
+              description
+                "The ID for an SLS profile in the global list of SLS
+                 profiles. The CoS Entries and corresponding SLS
+                 objectives in the specified profile are applied to this
+                 EVC if (and only if) they are further referenced below.
+                 In each case, a set of ordered End Point pairs (which
+                 are specific to this EVC) must be specified.  If this
+                 leaf is not set, the EVC does not have any SLS
+                 objectives.";
+            }
+            leaf start-time {
+              when "../sls-id";
+              type yang:date-and-time;
+              mandatory true;
+              description
+                "The start time on which intervals over which the SLS
+                 objectives are evaluated is based. This leaf is used
+                 in conjunction with the time-interval leaf in the given
+                 SLS profile, to specify an infinite series of time
+                 intervals starting at the start time and each
+                 having duration equal to the time interval. The SLS
+                 objectives are evaluated and reported independently for
+                 each such time interval.";
+              reference
+                "[MEF7.3] Section 7.17.1.";
+            }
+            container cos-entries {
+              when "../sls-id";
+              description
+                "Container for the list of SLS CoS Entries that apply to
+                 this EVC.";
+              reference
+                "[MEF7.3] Section 7.17.";
+              list cos-entry {
+                key "cos-name";
+                min-elements 1;
+                description
+                  "The list of SLS CoS entries that apply to this EVC.";
+                reference
+                  "[MEF7.3] Section 7.17.2.";
+                leaf cos-name {
+                  type leafref {
+                    path "/mef-global:mef-global/" +
+                          "mef-global:sls-profiles/" +
+                          "mef-global:profile[mef-global:id = " +
+                              "current()/../../../sls-id]/" +
+                          "mef-global:pm-cos-name-entries/" +
+                          "mef-global:pm-cos-name-entry/" +
+                          "mef-global:cos-name";
+                  }
+                  must "../../../../cos-names/" +
+                       "cos-name[name = current()]" {
+                    error-message
+                      "A CoS Name refer to in the SLS must exist in the
+                       EVC List of CoS Names.";
+                    description
+                      "A CoS Name refer to in the SLS must exist in the
+                       EVC List of CoS Names.";
+                  }
+                  description
+                    "This leaf specifies an SLS CoS Entry in the SLS
+                     Profile identified by the sls-id leaf above.  SLS
+                     Objectives specified within the CoS Entry may be
+                     applied to this EVC if they are referenced below
+                     and associated with a set of ordered end point
+                     pairs.";
+                  reference
+                    "[MEF7.3] Section 7.17.2.";
+                }
+                container pm-entries {
+                  description
+                    "Container for a list of SLS objectives and
+                     associated parameters, that will apply to this
+                     EVC.";
+                  reference
+                    "[MEF7.3] Section 7.17.3, [MEF10.3] Section 8.8,
+                     [MEF10.3.1].";
+                  list pm-entry {
+                    key "pm-entry-id";
+                    min-elements 1;
+                    description
+                      "List of SLS objectives and associated parameters,
+                       that will apply to this EVC.";
+                    reference
+                      "[MEF7.3] Section 7.17.3, [MEF10.3] Section 8.8,
+                       [MEF10.3.1].";
+                    leaf pm-entry-id {
+                      type leafref {
+                        path "/mef-global:mef-global/" +
+                              "mef-global:sls-profiles/" +
+                              "mef-global:profile[mef-global:id = " +
+                                  "current()/../../../../../sls-id]/" +
+                              "mef-global:pm-cos-name-entries/" +
+                              "mef-global:pm-cos-name-entry[" +
+                                "mef-global:cos-name = " +
+                                    "current()/../../../cos-name]/" +
+                              "mef-global:pm-entries/" +
+                              "mef-global:pm-entry/mef-global:id";
+                      }
+                      description
+                        "This leaf identifies a specific SLS performance
+                         objective and associated parameters, within the
+                         SLS Profile and CoS entry specified above. The
+                         objective and parameters are applied to the set
+                         of ordered end point pairs (or the set of sets
+                         of ordered end point pairs in the case of group
+                         availability) specified below.";
+                    }
+                    container sets-of-end-point-pairs {
+                      when "/mef-global:mef-global/" +
+                            "mef-global:sls-profiles/" +
+                            "mef-global:profile[" +
+                              "mef-global:id = " +
+                                  "current()/../../../../../sls-id]/" +
+                            "mef-global:pm-cos-name-entries/" +
+                            "mef-global:pm-cos-name-entry[" +
+                              "mef-global:cos-name = " +
+                                  "current()/../../../cos-name]/" +
+                            "mef-global:pm-entries/" +
+                            "mef-global:pm-entry[" +
+                              "mef-global:id = " +
+                                  "current()/../pm-entry-id]/" +
+                            "mef-global:one-way-group-availability-pm" {
+                        description
+                          "Only visible when
+                           one-way-group-availability-pm is being
+                           configured.";
+                      }
+                      description
+                        "Set of sets of end point pairs.";
+                      reference
+                        "[MEF7.3] Section 7.17.5.12,
+                         [MEF10.3] Section 8.8.6.";
+                      list set-of-end-point-pairs {
+                        must "(../../../../../../../" +
+                              "connection-type != " +
+                                            "'rooted-multipoint') or " +
+                             "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.";
+                          reference
+                            "[MEF10.3] Section 8.8.";
+                        }
+                        key "index";
+                        min-elements 1;
+                        description
+                          "This list contains sets of end point pairs.
+                           Each set is described either by listing
+                           ordered pairs of end points that are included
+                           in the set, or by considering the set of all
+                           possible ordered end point pairs in the EVC
+                           and listing ordered end point pairs that are
+                           excluded from this set.";
+                        leaf index {
+                          type uint32;
+                          description
+                            "An index value to identify this set of
+                             end-point pairs";
+                        }
+                        choice sls-uni {
+                          mandatory true;
+                          description
+                            "The set of ordered end point pairs can be
+                             specified either by listing the ordered end
+                             point pairs to include, or by considering
+                             the set or all ordered end point pairs, and
+                             listing those to exclude (if any).";
+                          case inclusions {
+                            container sls-uni-inclusions {
+                              description
+                                "Container for a list of ordered end
+                                 point pairs.  This list is used to
+                                 specify all of the end point pairs that
+                                 are included in one of the sets over
+                                 which the Group Availability metric is
+                                 calculated.";
+                              list end-point-pair {
+                                must "end-point1 != end-point2" {
+                                  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 "(../../../../../../../../../" +
+                                      "connection-type != " +
+                                            "'rooted-multipoint') or " +
+                                     "not((../../../../../../../../" +
+                                          "../end-points/end-point[" +
+                                            "uni-id = " +
+                                              "current()/end-point1]/" +
+                                          "role = 'leaf') and " +
+                                         "(../../../../../../../../" +
+                                          "../end-points/end-point[" +
+                                            "uni-id = " +
+                                              "current()/end-point2]/" +
+                                          "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'.";
+                                  reference
+                                    "[MEF10.3] [R54].";
+                                }
+                                key "end-point1 end-point2";
+                                min-elements 1;
+                                description
+                                  "List of ordered end point pairs. This
+                                   list is used to specify all of the
+                                   end point pairs that are included in
+                                   one of the sets over which the Group
+                                   Availability metric is calculated.";
+                                leaf end-point1 {
+                                  type leafref {
+                                    path "/mef-services/carrier-ethernet/" +
+                                         "subscriber-services/evc/" +
+                                         "end-points/end-point/uni-id";
+                                  }
+                                  description
+                                    "The first end point in an ordered
+                                     end point pair.";
+                                  reference
+                                    "[MEF10.3] Section 8.8.6,
+                                     [MEF7.3] Section 7.17.5.11 and
+                                     7.17.5.12.";
+                                }
+                                leaf end-point2 {
+                                  type leafref {
+                                    path "/mef-services/carrier-ethernet/" +
+                                         "subscriber-services/evc/" +
+                                         "end-points/end-point/uni-id";
+                                  }
+                                  description
+                                    "The second end point in an ordered
+                                     end point pair.";
+                                  reference
+                                    "[MEF10.3] Section 8.8.6,
+                                     [MEF7.3] Section 7.17.5.11 and
+                                     7.17.5.12.";
+                                }
+                              }
+                            }
+                          }
+                          case exclusions {
+                            container sls-uni-exclusions {
+                              presence
+                                "The presence of this container
+                                 indicates that all possible ordered end
+                                 point pairs in the EVC are included in
+                                 this set of end point pairs, other than
+                                 the ordered end point pairs in the list
+                                 within this container (see below).  If
+                                 the list is empty, then all ordered end
+                                 point pairs are included in the set.
+                                 Note that in an EVC with n end points,
+                                 there are n * (n - 1) possible ordered
+                                 end point pairs.";
+                              description
+                                "Container for a list of ordered end
+                                 point pairs that are excluded from this
+                                 set of ordered end point pairs.  The
+                                 set that is described by taking all the
+                                 possible ordered end point pairs and
+                                 removing those contained in the list
+                                 below is used as one of the sets over
+                                 which One-way Group Availability is
+                                 calculated.";
+                              list end-point-pair {
+                                must "end-point1 != end-point2" {
+                                  error-message
+                                    "The two UNI IDs for a given
+                                     exclusion cannot be the same.";
+                                  description
+                                    "The two end points for a given
+                                     exclusion cannot be the same.";
+                                  reference
+                                    "[MEF10.3] [R32].";
+                                }
+                                key "end-point1 end-point2";
+                                description
+                                  "List of ordered end point pairs. This
+                                   list is used to specify all of the
+                                   end point pairs that are excluded
+                                   from the set of all possible ordered
+                                   end point pairs for the EVC.  The
+                                   result is used as one of the sets
+                                   over which the Group Availability
+                                   metric is calculated.";
+                                leaf end-point1 {
+                                  type leafref {
+                                    path "/mef-services/carrier-ethernet/" +
+                                         "subscriber-services/evc/" +
+                                         "end-points/end-point/uni-id";
+                                  }
+                                  description
+                                    "The first end point in an ordered
+                                     end point pair.";
+                                  reference
+                                    "[MEF10.3] Section 8.8.6,
+                                     [MEF7.3] Sections 7.17.5.11 and
+                                     7.17.5.12.";
+                                }
+                                leaf end-point2 {
+                                  type leafref {
+                                    path "/mef-services/carrier-ethernet/" +
+                                         "subscriber-services/evc/" +
+                                         "end-points/end-point/uni-id";
+                                  }
+                                  description
+                                    "The second end point in an ordered
+                                     end point pair.";
+                                  reference
+                                    "[MEF10.3] Section 8.8.6,
+                                     [MEF7.3] Sections 7.17.5.11 and
+                                     7.17.5.12.";
+                                }
+                              }
+                            }
+                          }
+                        }
+                      }
+                    }
+                    container end-point-pairs {
+                      when "not(/mef-global:mef-global/" +
+                                "mef-global:sls-profiles/" +
+                                "mef-global:profile[" +
+                                  "mef-global:id = " +
+                                      "current()/../../../../../" +
+                                      "sls-id]/" +
+                                "mef-global:pm-cos-name-entries/" +
+                                "mef-global:pm-cos-name-entry[" +
+                                  "mef-global:cos-name = " +
+                                      "current()/../../../cos-name]/" +
+                                "mef-global:pm-entries/" +
+                                "mef-global:pm-entry[" +
+                                  "mef-global:id = " +
+                                      "current()/../pm-entry-id]/" +
+                                "mef-global:" +
+                                  "one-way-group-availability-pm)" {
+                        description
+                          "Only visible when
+                           one-way-group-availability-pm is not
+                           being configured.";
+                      }
+                      must "(../../../../../../connection-type != " +
+                                            "'rooted-multipoint') or " +
+                           "(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
+                        "Set of end point pairs. The set is described
+                         either by listing ordered pairs of end points
+                         that are included in the set, or by considering
+                         the set of all possible ordered end point pairs
+                         in the EVC and listing ordered end point pairs
+                         that are excluded from this set.";
+                      reference
+                        "[MEF7.3] Section 7.17.5.11,
+                         [MEF10.3] Section 8.8.";
+                      choice sls-uni {
+                        mandatory true;
+                        description
+                          "The set of ordered end point pairs can be
+                           specified either by listing the ordered end
+                           point pairs to include, or by considering the
+                           set or all ordered end point pairs, and
+                           listing those to exclude (if any).";
+                        case inclusions {
+                          container sls-uni-inclusions {
+                            description
+                              "Container for a list of ordered end point
+                               pairs.  This list is used to specify all
+                               of the end point pairs that are included
+                               in the set over which the performance
+                               metric is calculated.";
+                            list end-point-pair {
+                              must "end-point1 != end-point2" {
+                                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.";
+                                reference
+                                  "[MEF10.3] Section 8.8.";
+                              }
+                              must "(../../../../../../../../" +
+                                    "connection-type != " +
+                                        "'rooted-multipoint') or " +
+                                   "not((/mef-services/carrier-ethernet/" +
+                                         "subscriber-services/evc/" +
+                                         "end-points/end-point[" +
+                                          "uni-id = " +
+                                              "current()/end-point1]/" +
+                                        "role = 'leaf') and " +
+                                       "(/mef-services/carrier-etherent/" +
+                                         "subscriber-services/evc/" +
+                                          "end-points/end-point[" +
+                                          "uni-id = " +
+                                              "current()/end-point2]/" +
+                                        "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'.";
+                                reference
+                                  "[MEF10.3] R37, R40, R43, R46 and R51,
+                                   [MEF10.3.1] R4A.";
+                              }
+                              key "end-point1 end-point2";
+                              min-elements 1;
+                              description
+                                "List of ordered end point pairs.  This
+                                 list is used to specify all of the end
+                                 point pairs that are included in the
+                                 set over which the performance metric
+                                 is calculated.";
+                              leaf end-point1 {
+                                type leafref {
+                                  path "/mef-services/carrier-ethernet/" +
+                                       "subscriber-services/evc/" +
+                                       "end-points/end-point/uni-id";
+                                }
+                                description
+                                  "The first end point in an ordered end
+                                   point pair.";
+                                reference
+                                  "[MEF10.3] Section 8.8 and
+                                   [MEF7.3] Section 7.17.5.11.";
+                              }
+                              leaf end-point2 {
+                                type leafref {
+                                  path "/mef-services/carrier-ethernet/" +
+                                       "subscriber-services/evc/" +
+                                       "end-points/end-point/uni-id";
+                                }
+                                description
+                                  "The second end point in an ordered
+                                   end point pair.";
+                                reference
+                                  "[MEF10.3] Section 8.8,
+                                   [MEF7.3] Section 7.17.5.11.";
+                              }
+                            }
+                          }
+                        }
+                        case exclusions {
+                          container sls-uni-exclusions {
+                            presence
+                              "The presence of this container indicates
+                               that all possible ordered end point pairs
+                               in the EVC are included in this set of
+                               end point pairs, other than the ordered
+                               end point pairs in the list within this
+                               container (see below).  If the list is
+                               empty, then all ordered end point pairs
+                               are included in the set.  Note that in an
+                               EVC with n end points, there are n * (n -
+                               1) possible ordered end point pairs.";
+                            description
+                              "Container for a list of ordered end point
+                               pairs that are excluded from this set of
+                               ordered end point pairs.  The set that is
+                               described by taking all the possible
+                               ordered end point pairs and removing
+                               those contained in the list below is used
+                               as the set over which the performance
+                               metric is calculated.";
+                            list end-point-pair {
+                              must "end-point1 != end-point2" {
+                                error-message
+                                  "The two UNI IDs for a given exclusion
+                                   cannot be the same.";
+                                description
+                                  "The two end points for a given
+                                   exclusion cannot be the same.";
+                                reference
+                                  "[MEF10.3] Section 8.8.";
+                              }
+                              key "end-point1 end-point2";
+                              description
+                                "List of ordered end point pairs.  This
+                                 list is used to specify all of the end
+                                 point pairs that are excluded from the
+                                 set of all possible ordered end point
+                                 pairs for the EVC.  The result is used
+                                 as the set over which the performance
+                                 metric is calculated.";
+                              leaf end-point1 {
+                                type leafref {
+                                  path "/mef-services/carrier-ethernet/" +
+                                       "subscriber-services/evc/" +
+                                       "end-points/end-point/uni-id";
+                                }
+                                description
+                                  "The first end point in an ordered end
+                                   point pair.";
+                                reference
+                                  "[MEF10.3] Section 8.8,
+                                   [MEF7.3] Section 7.17.5.11.";
+                              }
+                              leaf end-point2 {
+                                type leafref {
+                                  path "/mef-services/carrier-ethernet/" +
+                                       "subscriber-services/evc/" +
+                                       "end-points/end-point/uni-id";
+                                }
+                                description
+                                  "The second end point in an ordered
+                                   end point pair.";
+                                reference
+                                  "[MEF10.3] Section 8.8,
+                                   [MEF7.3] Section 7.17.5.11.";
+                              }
+                            }
+                          }
+                        }
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+          leaf connection-type {
+            type mef-types:connection-type;
+            must ". = 'rooted-multipoint' or " +
+                 "count(../end-points/end-point[role != 'root']) = 0" {
+              error-message
+                "If EVC Type is not Rooted Multipoint, all UNI Roles
+                 must be root.";
+              description
+                "If EVC Type is not Rooted Multipoint, all UNI Roles
+                 must be root.";
+              reference
+                "[MEF10.3] [R12].";
+            }
+            must ". != 'rooted-multipoint' or " +
+                 "count(../end-points/end-point[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.";
+              reference
+                "[MEF10.3] [R4].";
+            }
+            must ". != 'point-to-point' or " +
+                 "count(../end-points/end-point) = 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.";
+              reference
+                "[MEF10.3] Section 8.1.1.";
+            }
+            must ". != 'multipoint-to-multipoint' or " +
+                 "(count(../end-points/end-point) > 1 and " +
+                  "count(../end-points/end-point) <= " +
+                                    "../max-num-of-evc-end-point)" {
+              error-message
+                "If EVC Type is Multipoint-to-Multipoint, there must be
+                 2 or more End Points configured for the EVC, up to the
+                 maximum specified by the max-num-of-evc-end-points
+                 leaf.";
+              description
+                "If EVC Type is Multipoint-to-Multipoint, there must be
+                 2 or more UNI configured for the EVC.";
+              reference
+                "[MEF10.3] Section 8.1.2.2 and 8.4.";
+            }
+            must ". != 'rooted-multipoint' or " +
+                 "(count(../end-points/end-point) > 1 and " +
+                  "count(../end-points/end-point) <= " +
+                                       "../max-num-of-evc-end-point)" {
+              error-message
+                "If EVC Type is Rooted-Multipoint, there must be 2 or
+                 more End Points configured for the EVC, up to the
+                 maximum specified by the max-num-of-evc-end-points
+                 leaf.";
+              description
+                "If EVC Type is Rooted-Multipoint, there must be 2
+                 or more UNI configured for the EVC.";
+              reference
+                "[MEF10.3] Section 8.1.2.1 and 8.4.";
+            }
+            must ". != 'point-to-point' or " +
+                 "../max-num-of-evc-end-point = 2" {
+              error-message
+                "If EVC Type is Point-to-Point,
+                 the value of max-num-of-evc-end-point must be 2.";
+              description
+                "If EVC Type is Point-to-Point, the value of
+                 max-num-of-evc-end-point must be 2.";
+              reference
+                "[MEF10.3] [R13].";
+            }
+            must ". != 'multipoint-to-multipoint' or " +
+                 "../max-num-of-evc-end-point > 2" {
+              error-message
+                "If EVC Type is Multipoint-to-Multipoint,
+                 the value of max-num-of-evc-end-point must be at least
+                 3.";
+              description
+                "If EVC Type is Multipoint-to-Multipoint,
+                 the value of max-num-of-evc-end-point must be at least
+                 3.";
+              reference
+                "[MEF10.3] [R14].";
+            }
+            must ". != 'rooted-multipoint' or " +
+                 "../max-num-of-evc-end-point > 2" {
+              error-message
+                "If EVC Type is Rooted-Multipoint, the value of
+                 max-num-of-evc-end-point must be at least 3.";
+              description
+                "If EVC Type is Rooted-Multipoint,
+                 the value of max-num-of-evc-end-point must be at least
+                 3.";
+              reference
+                "[MEF10.3] [R14], [MEF6.2] [R54]";
+            }
+            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, [MEF7.3] Section 7.1.";
+          }
+          leaf admin-state {
+            type boolean;
+            default "true";
+            description
+              "Indicates whether the EVC is administratively locked (if
+               the value is false) or unlocked (if the value is true).";
+            reference
+              "[MEF7.3] Section 7.1.";
+          }
+          leaf user-label {
+            type mef-types:identifier1024;
+            description
+              "User Label.";
+            reference
+              "[MEF7.3] Section 7.1.";
+          }
+          leaf max-frame-size {
+            type mef-types:max-frame-size-type;
+            must "current() <= " +
+                      "/mef-interfaces:mef-interfaces/" +
+                       "mef-interfaces:carrier-ethernet/" +
+                       "mef-interfaces:subscriber-interfaces/" +
+                       "mef-interfaces:uni[mef-interfaces:uni-id = " +
+                           "current()/../end-points/end-point/" +
+                           "uni-id]/" +
+                       "mef-interfaces:max-frame-size" {
+              error-message
+                "The EVC Maximum Frame Size must be less than or equal
+                 to the UNI Maximum Frame Size for every UNI where this
+                 EVC has an EVC End Point.";
+              description
+                "The EVC Maximum Frame Size must be less than or equal
+                 to the UNI Maximum Frame Size for every UNI where this
+                 EVC has an EVC End Point.";
+              reference
+                "[MEF10.3] [R56]";
+            }
+            mandatory true;
+            description
+              "EVC Maximum Frame Size in bytes.";
+            reference
+              "[MEF10.3] Section 8.9. [MEF7.3] Section 7.1.";
+          }
+          leaf max-num-of-evc-end-point {
+            type uint32 {
+              range "2..max";
+            }
+            mandatory true;
+            description
+              "The Maximum Number of UNIs this EVC can be configured
+               for. If EVC Type is Multipoint-to-Multipoint or
+               Rooted-Multipoint, the max-num-of-evc-end-point value
+               must be at least 3. This value must be 2 for
+               point-to-point mode.";
+            reference
+              "[MEF10.3] Section 8.4, [MEF7.3] Section 7.2.";
+          }
+          leaf ce-vlan-id-preservation {
+            type boolean;
+            default "false";
+            description
+              "Preserve CE-VLAN ID.";
+            reference
+              "[MEF10.3] Section 8.6.1, [MEF7.3] Section 7.2.";
+          }
+          leaf ce-vlan-pcp-preservation {
+            type boolean;
+            default "false";
+            description
+              "Enables CE-VLAN PCP (CoS) preservation for the EVC.";
+            reference
+              "[MEF10.3] Section 8.6.2, [MEF7.3] Section 7.1.";
+          }
+          leaf ce-vlan-dei-preservation {
+            type boolean;
+            default "false";
+            description
+              "Enables CE-VLAN DEI preservation for the EVC.
+               When this is enabled, if a C-tagged ingress Service frame
+               results in a C-tagged egress Service frame, the DEI bit
+               in the egress frame has the same value as the DEI bit in
+               the ingress frame.";
+            reference
+              "[MEF7.3] Section 7.1.";
+          }
+          leaf unicast-frame-delivery {
+            type mef-types:data-svc-frame-delivery-type;
+            default "unconditional";
+            description
+              "Unicast Data Service Frame Delivery Mode
+               (unconditional[default], conditional, or discard).";
+            reference
+              "[MEF10.3] Section 8.5.2, [MEF7.3] Section 7.1.";
+          }
+          leaf multicast-frame-delivery {
+            type mef-types:data-svc-frame-delivery-type;
+            default "unconditional";
+            description
+              "Multicast Data Service Frame Delivery Mode
+               (unconditional[default], conditional, or discard).";
+            reference
+              "[MEF10.3] Section 8.5.2, [MEF7.3] Section 7.1.";
+          }
+          leaf broadcast-frame-delivery {
+            type mef-types:data-svc-frame-delivery-type;
+            default "unconditional";
+            description
+              "Broadcast Data Service Frame Delivery Mode
+               (unconditional[default], conditional, or discard).";
+            reference
+              "[MEF10.3] Section 8.5.2, [MEF7.3] Section 7.1.";
+          }
+          leaf svc-type {
+            type mef-types:mef-service-type;
+
+            must "(. = 'other') or " +
+                 "(not(/mef-interfaces:mef-interfaces/" +
+                       "mef-interfaces:carrier-ethernet/" +
+                       "mef-interfaces:subscriber-interfaces/" +
+                       "mef-interfaces:uni[mef-interfaces:uni-id = " +
+                         "current()/../end-points/end-point/uni-id]/" +
+                       "mef-interfaces:ingress-bwp-per-uni/" +
+                       "mef-interfaces:bw-profile-flow-parameters) " +
+                  "and " +
+                  "not(/mef-interfaces:mef-interfaces/" +
+                       "mef-interfaces:carrier-ethernet/" +
+                       "mef-interfaces:subscriber-interfaces/" +
+                       "mef-interfaces:uni[mef-interfaces:uni-id = " +
+                         "current()/../end-points/end-point/uni-id]/" +
+                       "mef-interfaces:ingress-bwp-per-uni/" +
+                       "mef-interfaces:envelope-id) and " +
+                  "not(/mef-interfaces:mef-interfaces/" +
+                       "mef-interfaces:carrier-ethernet/" +
+                       "mef-interfaces:subscriber-interfaces/" +
+                       "mef-interfaces:uni[mef-interfaces:uni-id = " +
+                         "current()/../end-points/end-point/uni-id]/" +
+                       "mef-interfaces:egress-bw-profile-per-uni/" +
+                       "mef-interfaces:bw-profile-flow-parameters) " +
+                  "and " +
+                  "not(/mef-interfaces:mef-interfaces/" +
+                       "mef-interfaces:carrier-ethernet/" +
+                       "mef-interfaces:subscriber-interfaces/" +
+                       "mef-interfaces:uni[mef-interfaces:uni-id = " +
+                         "current()/../end-points/end-point/uni-id]/" +
+                       "mef-interfaces:egress-bw-profile-per-uni/" +
+                       "mef-interfaces:envelope-id))" {
+              error-message
+                "Ingress or Egress BWP per UNI must not be specified
+                 when there is a MEF 6.2 service associated with the
+                 UNI.";
+              description
+                "Ingress or Egress BWP per UNI must not be specified
+                 when there is a MEF 6.2 service associated with the
+                 UNI.";
+              reference
+                "[MEF6.2] [R6] and [R7]";
+            }
+
+            must "(. = 'other') or " +
+                 "(not(../end-points/end-point/ingress-bwp-per-evc/" +
+                       "bw-profile-flow-parameters) and " +
+                  "not(../end-points/end-point/ingress-bwp-per-evc/" +
+                       "envelope-id) and " +
+                  "not(../end-points/end-point/egress-bwp-per-evc/" +
+                       "bw-profile-flow-parameters) and " +
+                  "not(../end-points/end-point/egress-bwp-per-evc/" +
+                       "envelope-id))" {
+              error-message
+                "Ingress or Egress BWP per EVC must not be specified
+                 when there is a MEF 6.2 service associated with the
+                 UNI.";
+              description
+                "Ingress or Egress BWP per EVC must not be specified
+                 when there is a MEF 6.2 service associated with the
+                 UNI.";
+              reference
+                "[MEF6.2] [R8] and [R9]";
+            }
+
+            must ". != 'epl' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                               "current()/../end-points/end-point/" +
+                               "uni-id]" +
+                          "[mef-interfaces:uni-id/../" +
+                           "mef-interfaces:" +
+                             "service-multiplexing-enabled = " +
+                                 "'true']) = 0" {
+              error-message
+                "For EPL, Service Multiplexing must be
+                 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.";
+              reference
+                "[MEF6.2] [R19].";
+            }
+            must ". != 'epl' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                               "current()/../end-points/end-point/" +
+                               "uni-id]" +
+                          "[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.";
+              description
+                "For EPL, Bundling must be disabled for all UNIs
+                 in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R20].";
+            }
+            must ". != 'epl' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[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.";
+              description
+                "For EPL, All-to-One Bundling must be enabled
+                 for all UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R21].";
+            }
+            must ". != 'epl' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[mef-interfaces:uni-id/../" +
+                           "mef-interfaces:max-num-of-evcs != 1]) = 0" {
+              error-message
+                "For EPL, Max EVC Count must be 1
+                 for all UNIs in the EVC UNI List.";
+              description
+                "For EPL, Max EVC Count must be 1 for all
+                 UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R22].";
+            }
+            must ". != 'epl' or " +
+                 "count(../end-points/end-point/egress-bwp-per-eec/" +
+                       "bwp-flow-per-eec) = 0" {
+              error-message
+                "For EPL, Egress Bandwidth Profile per Egress
+                 Equivalence Class cannot be set for any UNIs in the EVC
+                 per UNI List.";
+              description
+                "For EPL, Egress Bandwidth Profile per Egress
+                 Equivalence Class cannot be set for any UNIs in the EVC
+                 per UNI List.";
+              reference
+                "[MEF6.2] [R23].";
+            }
+            must ". != 'epl' or " +
+                 "count(../end-points/" +
+                       "end-point[source-mac-address-limit]) = 0" {
+              error-message
+                "For EPL, Source MAC Address Limit must be disabled.";
+              description
+                "For EPL, Source MAC Address Limit must be disabled.";
+              reference
+                "[MEF6.2] [R24].";
+            }
+            must ". != 'epl' or " +
+                 "../connection-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.";
+              reference
+                "[MEF6.2] [R25].";
+            }
+            must ". != 'epl' or " +
+                 "../unicast-frame-delivery = 'unconditional'" {
+              error-message
+                "For EPL, unicast-frame-delivery must be
+                 unconditional.";
+              description
+                "For EPL, unicast-frame-delivery must be
+                 unconditional.";
+              reference
+                "[MEF6.2] [R26].";
+            }
+            must ". != 'epl' or " +
+                 "../multicast-frame-delivery = 'unconditional'" {
+              error-message
+                "For EPL, multicast-frame-delivery must be
+                 unconditional.";
+              description
+                "For EPL, multicast-frame-delivery must be
+                 unconditional.";
+              reference
+                "[MEF6.2] [R27].";
+            }
+            must ". != 'epl' or " +
+                 "../broadcast-frame-delivery = 'unconditional'" {
+              error-message
+                "For EPL, broadcast-frame-delivery
+                 must be unconditional.";
+              description
+                "For EPL, broadcast-frame-delivery must be
+                 unconditional.";
+              reference
+                "[MEF6.2] [R28].";
+            }
+            must ". != 'epl' or " +
+                 "../ce-vlan-id-preservation = 'true'" {
+              error-message
+                "For EPL, CE-VLAN ID Preservation must be enabled.";
+              description
+                "For EPL, CE-VLAN ID Preservation must be enabled.";
+              reference
+                "[MEF6.2] [R29]";
+            }
+            must ". != 'epl' or " +
+                 "../ce-vlan-pcp-preservation = 'true'" {
+              error-message
+                "For EPL, CE-VLAN ID CoS Preservation must be enabled.";
+              description
+                "For EPL, CE-VLAN ID CoS Preservation must be enabled.";
+              reference
+                "[MEF6.2] [R30].";
+            }
+            must ". != 'evpl' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[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.";
+              description
+                "For EVPL, All-to-One Bundling must be disabled for
+                 all UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R31].";
+            }
+            must ". != 'evpl' or " +
+                 "../unicast-frame-delivery != 'unconditional' or " +
+                 "../multicast-frame-delivery != 'unconditional' or " +
+                 "../broadcast-frame-delivery != 'unconditional' or " +
+                 "count(../end-points/" +
+                       "end-point[source-mac-address-limit]) = 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.";
+              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.";
+              reference
+                "[MEF6.2] [R32].";
+            }
+            must ". != 'evpl' or " +
+                 "../connection-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.";
+              reference
+                "[MEF6.2] [R33].";
+            }
+            must ". != 'eplan' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[mef-interfaces:uni-id/../" +
+                           "mef-interfaces:" +
+                             "service-multiplexing-enabled = " +
+                                "'true']) = 0" {
+              error-message
+                "For EP-LAN, Service Multiplexing must
+                 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.";
+              reference
+                "[MEF6.2] [R34].";
+            }
+            must ". != 'eplan' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                               "current()/../end-points/end-point/" +
+                               "uni-id]" +
+                          "[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.";
+              description
+                "For EP-LAN, Bundling must be disabled for all
+                 UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R35].";
+            }
+            must ". != 'eplan' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                               "current()/../end-points/end-point/" +
+                               "uni-id]" +
+                          "[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.";
+              description
+                "For EP-LAN, All-to-One Bundling must be enabled
+                 for all UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R36].";
+            }
+            must ". != 'eplan' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[mef-interfaces:uni-id/../" +
+                           "mef-interfaces:max-num-of-evcs != 1]) = 0" {
+              error-message
+                "For EP-LAN, Max EVC Count must be 1
+                 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.";
+              reference
+                "[MEF6.2] [R37].";
+            }
+            must ". != 'eplan' or " +
+                 "../connection-type = 'multipoint-to-multipoint'" {
+              error-message
+                "For EP-LAN, EVC Type must be
+                 Multipoint-to-Multipoint.";
+              description
+                "For EP-LAN, EVC Type must be
+                 Multipoint-to-Multipoint.";
+              reference
+                "[MEF6.2] [R38].";
+            }
+            must ". != 'eplan' or " +
+                 "../ce-vlan-id-preservation = 'true'" {
+              error-message
+                "For EP-LAN, CE-VLAN ID Preservation must be enabled.";
+              description
+                "For EP-LAN, CE-VLAN ID Preservation must be enabled.";
+              reference
+                "[MEF6.2] [R39].";
+            }
+            must ". != 'eplan' or " +
+                 "../ce-vlan-pcp-preservation = 'true'" {
+              error-message
+                "For EP-LAN, CE-VLAN ID CoS Preservation must be
+                 enabled.";
+              description
+                "For EP-LAN, CE-VLAN ID CoS Preservation must be
+                 enabled.";
+              reference
+                "[MEF6.2] [R40].";
+            }
+            must ". != 'evplan' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[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.";
+              description
+                "For EVP-LAN, All-to-One Bundling must be disabled
+                 for all UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R41].";
+            }
+            must ". != 'evplan' or " +
+                 "../connection-type = 'multipoint-to-multipoint'" {
+              error-message
+                "For EVP-LAN, EVC Type must be
+                 Multipoint-to-Multipoint.";
+              description
+                "For EVP-LAN, EVC Type must be
+                 Multipoint-to-Multipoint.";
+              reference
+                "[MEF6.2] [R42].";
+            }
+            must ". != 'eptree' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[mef-interfaces:uni-id/../" +
+                           "mef-interfaces:" +
+                             "service-multiplexing-enabled = " +
+                                 "'true']) = 0" {
+              error-message
+                "For EP-TREE, Service Multiplexing 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.";
+              reference
+                "[MEF6.2] [R43].";
+            }
+            must ". != 'eptree' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[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.";
+              description
+                "For EP-TREE, Bundling must be disabled for all UNIs in
+                 the EVC UNI List.";
+              reference
+                "[MEF6.2] [R44].";
+            }
+            must ". != 'eptree' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[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.";
+              description
+                "For EP-TREE, All-to-One Bundling must be enabled
+                 for all UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R45].";
+            }
+            must ". != 'eptree' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[mef-interfaces:uni-id/../" +
+                           "mef-interfaces:max-num-of-evcs != 1]) = 0" {
+              error-message
+                "For EP-TREE, Max EVC Count must be 1
+                 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.";
+              reference
+                "[MEF6.2] [R46].";
+            }
+            must ". != 'eptree' or " +
+                 "../connection-type = 'rooted-multipoint'" {
+              error-message
+                "For EP-TREE, EVC Type must be Rooted-Multipoint.";
+              description
+                "For EP-TREE, EVC Type must be Rooted-Multipoint.";
+              reference
+                "[MEF6.2] [R47].";
+            }
+            must ". != 'eptree' or " +
+                 "../ce-vlan-id-preservation = 'true'" {
+              error-message
+                "For EP-TREE, CE-VLAN ID Preservation must be enabled.";
+              description
+                "For EP-TREE, CE-VLAN ID Preservation must be enabled.";
+              reference
+                "[MEF6.2] [R49].";
+            }
+            must ". != 'eptree' or " +
+                 "../ce-vlan-pcp-preservation = 'true'" {
+              error-message
+                "For EP-TREE, CE-VLAN ID CoS Preservation must be
+                 enabled.";
+              description
+                "For EP-TREE, CE-VLAN ID CoS Preservation must be
+                 enabled.";
+              reference
+                "[MEF6.2] [R50].";
+            }
+            must ". != 'evptree' or " +
+                 "count(/mef-interfaces:mef-interfaces/" +
+                        "mef-interfaces:carrier-ethernet/" +
+                        "mef-interfaces:subscriber-interfaces/" +
+                        "mef-interfaces:uni" +
+                          "[mef-interfaces:uni-id = " +
+                              "current()/../end-points/end-point/" +
+                              "uni-id]" +
+                          "[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.";
+              description
+                "For EVP-TREE, All-to-One Bundling must be disabled
+                 for all UNIs in the EVC UNI List.";
+              reference
+                "[MEF6.2] [R51].";
+            }
+            must ". != 'evptree' or " +
+                 "../connection-type = 'rooted-multipoint'" {
+              error-message
+                "For EVP-TREE, EVC Type must be Rooted-Multipoint.";
+              description
+                "For EVP-TREE, EVC Type must be Rooted-Multipoint.";
+              reference
+                "[MEF6.2] [R52].";
+            }
+            default "other";
+            description
+              "The MEF Service Type. This is one of the types of service
+               defined in MEF 6.2, or the value 'other' to indicate that
+               this service does not conform to any of the types defined
+               in MEF 6.2.  The six types defined in MEF 6.2 are EPL,
+               EVPL, EP-LAN, EVP-LAN, EP-Tree and EVP-Tree.";
+          }
+        }
+      }
+    }
+  }
+}
index 869fb24a458e3356471497ae7fd3ebc3ccde3b92..8f4b4ff56c4c0e36485356d5ce209b019ed6ee8e 100644 (file)
@@ -3,9 +3,18 @@ module mef-services {
   prefix mef-services;
   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; }
+  import mef-types {
+    prefix mef-types;
+    revision-date 2015-05-26;
+  }
+  import mef-global {
+    prefix mef-global;
+    revision-date 2015-05-26;
+   }
+  import mef-interfaces {
+    prefix mef-interfaces;
+    revision-date 2015-05-26;
+   }
   import yang-ext {prefix ext; revision-date "2013-07-09";}
 
   organization "Metro Ethernet Forum";
index ce7cee6ee0651b338ec3919a924e8436ac8dcb85..7f35418e8a858704e69802912de7428a825fef81 100644 (file)
@@ -1,7 +1,10 @@
 module mef-topology {\r
   namespace "http://metroethernetforum.org/ns/yang/mef-topology";\r
   prefix mef-topology;\r
-  import mef-types { prefix mef-types; }\r
+  import mef-types {\r
+    prefix mef-types;\r
+    revision-date 2015-05-26;\r
+   }\r
   organization "Metro Ethernet Forum";\r
   contact\r
     "Web URL: http://metroethernetforum.org/ \\ E-mail: mibs@metroethernetforum.org\r
diff --git a/legato-api/src/main/yang/mef-types@2017-12-15.yang b/legato-api/src/main/yang/mef-types@2017-12-15.yang
new file mode 100644 (file)
index 0000000..778d48c
--- /dev/null
@@ -0,0 +1,690 @@
+module mef-types {
+  namespace "urn:mef:yang:mef-types";
+  prefix mef-types;
+
+  organization "MEF Forum";
+  contact
+    "Web URL: http://mef.net/
+     E-mail:  namespace@mef.net
+     Postal:  MEF 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 elements used by MEF Services
+     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:
+     [802.1Q] refers to IEEE 802.1Q-2014 'IEEE Standard for Local
+     and metropolitan area networks -- Bridges and Bridged Networks',
+     November 2014
+     [802.1AX] refers to IEEE 802.1AX-2014 'IEEE Standard for
+     Local and metropolitan area networks -- Link Aggregation',
+     December 2014
+     [802.3] refers to IEEE 802.3-2012 'IEEE Standard for Ethernet',
+     August 2012
+     [MEF10.3] refers to MEF 10.3
+     'Ethernet Services Attributes Phase 3', October 2013
+     [MEF10.3.2] refers to MEF 10.3.2 'Amendment to MEF 10.3 - UNI
+     Resiliency Enhancement', October 2015
+     [MEF6.2] refers to MEF 6.2
+     'EVC Ethernet Services Defintions Phase 3', August 2014
+     [MEF45] refers to MEF 45 'Multi-CEN L2CP', August 2014
+     [MEF7.3] refers to MEF 7.3
+     'Carrier Ethernet Management Information Model', February 2017
+     [RFC2579] refers to IETF RFC 2579 'Textual Conventions for SMIv2',
+     April 1999";
+
+  revision 2017-12-15 {
+    description
+      "Initial Version.";
+    reference
+      "Legato - Services YANG SCA (MEF XX)";
+  }
+
+  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'.";
+    reference "[802.3]";
+  }
+
+  identity ieee8023-10BASE2 {
+    base ieee-8023-interface-type;
+    description
+      "10BASE2";
+  }
+
+  identity ieee8023-10BASE5 {
+    base ieee-8023-interface-type;
+    description
+      "10BASE5";
+  }
+
+  identity ieee8023-10BASE-F {
+    base ieee-8023-interface-type;
+    description
+      "10BASEF";
+  }
+
+  identity ieee8023-10BASE-FB {
+    base ieee-8023-interface-type;
+    description
+      "10BASE-FB";
+  }
+
+  identity ieee8023-1000BASE-PX-D {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-PX-D";
+  }
+
+  identity ieee8023-1000BASE-PX-U {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-PX-U";
+  }
+
+  identity ieee8023-10BASE-FL {
+    base ieee-8023-interface-type;
+    description
+      "10BASE-FL";
+  }
+
+  identity ieee8023-10BASE-FP {
+    base ieee-8023-interface-type;
+    description
+      "10BASE-FP";
+  }
+
+  identity ieee8023-10BASE-T {
+    base ieee-8023-interface-type;
+    description
+      "10BASE-T";
+  }
+
+  identity ieee8023-10BASE-Te {
+    base ieee-8023-interface-type;
+    description
+      "10BASE-Te";
+  }
+
+  identity ieee8023-10BROAD36 {
+    base ieee-8023-interface-type;
+    description
+      "10BROAD36";
+  }
+
+  identity ieee8023-10PASS-TS {
+    base ieee-8023-interface-type;
+    description
+      "10PASS-TS";
+  }
+
+  identity ieee8023-100BASE-BX10 {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-BX10";
+  }
+
+  identity ieee8023-100BASE-FX {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-FX";
+  }
+
+  identity ieee8023-100BASE-LX10 {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-LX10";
+  }
+
+  identity ieee8023-100BASE-T {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-T";
+  }
+
+  identity ieee8023-100BASE-T2 {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-T2";
+  }
+
+  identity ieee8023-100BASE-T4 {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-T4";
+  }
+
+  identity ieee8023-100BASE-TX {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-TX";
+  }
+
+  identity ieee8023-100BASE-X {
+    base ieee-8023-interface-type;
+    description
+      "100BASE-X";
+  }
+
+  identity ieee8023-1000BASE-BX10 {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-BX10";
+  }
+
+  identity ieee8023-1000BASE-CX {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-CX";
+  }
+
+  identity ieee8023-1000BASE-KX {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-KX";
+  }
+
+  identity ieee8023-1000BASE-LX {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-LX";
+  }
+
+  identity ieee8023-1000BASE-LX10 {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-LX10";
+  }
+
+  identity ieee8023-1000BASE-PX10 {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-PX10";
+  }
+
+  identity ieee8023-1000BASE-PX20 {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-PX20";
+  }
+
+  identity ieee8023-1000BASE-SX {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-SX";
+  }
+
+  identity ieee8023-1000BASE-T {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-T";
+  }
+
+  identity ieee8023-1000BASE-X {
+    base ieee-8023-interface-type;
+    description
+      "1000BASE-X";
+  }
+
+  identity ieee8023-10GBASE-CX4 {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-CX4";
+  }
+
+  identity ieee8023-10GBASE-E {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-E";
+  }
+
+  identity ieee8023-10GBASE-ER {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-ER";
+  }
+
+  identity ieee8023-10GBASE-EW {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-EW";
+  }
+
+  identity ieee8023-10GBASE-KR {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-KR";
+  }
+
+  identity ieee8023-10GBASE-KX4 {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-KX4";
+  }
+
+  identity ieee8023-10GBASE-L {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-L";
+  }
+
+  identity ieee8023-10GBASE-LR {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-LR";
+  }
+
+  identity ieee8023-10GBASE-LRM {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-LRM";
+  }
+
+  identity ieee8023-10GBASE-LW {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-LW";
+  }
+
+  identity ieee8023-10GBASE-LX4 {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-LX4";
+  }
+
+  identity ieee8023-10GBASE-PR {
+    base ieee-8023-interface-type;
+    description
+      "10GBASE-PR";
+  }
+
+  typedef identifier45 {
+    type string {
+      length "min..45";
+      pattern "[ -~]+";
+    }
+    description
+      "This type definition accepts any visible ASCII character plus the
+       <space> character. The string must be an RFC 2579 Display String
+       (RFC 854 ASCII 0x00-0x7f) but not contain the characters 0x00
+       through 0x1f. It does not accept the <delete> character (0x7f)
+       despite the current MEF specification not disallowing it.";
+    reference "[MEF10.3] [R8], [R9], [R58], [R59], [R138], [R140];
+               [RFC2579]";
+  }
+
+  typedef identifier90 {
+    type string {
+      length "min..90";
+      pattern "[ -~]+";
+    }
+    description
+      "This type definition is intended for use EVC End Point ID. This
+       type definition accepts any visible ASCII character plus the
+       <space> character. The string must be an RFC 2579 Display String
+       (RFC 854 ASCII 0x00-0x7f) but not contain the characters 0x00
+       through 0x1f. It does not accept the <delete> character (0x7f)
+       despite the current MEF specification not disallowing it.";
+    reference "[RFC2579]";
+  }
+
+  typedef identifier1024 {
+    type string {
+      length "min..1024";
+      pattern "[ -~]+";
+    }
+    description
+      "This type definition is intended for use with user-labels. This
+       type definition accepts any visible ASCII character plus the
+       <space> character. The string must be an RFC 2579 Display String
+       (RFC 854 ASCII 0x00-0x7f) but not contain the characters 0x00
+       through 0x1f. It does not accept the <delete> character (0x7f)
+       despite the current MEF specification not disallowing it.";
+    reference "[RFC2579]";
+  }
+
+  typedef max-frame-size-type {
+    type uint16 {
+      range "1522..16384";
+    }
+    units "bytes";
+    description
+      "Max Frame Size Type in bytes. Service Frames larger than this
+       size will be discarded. For OVC, the minimum value is 1526.";
+    reference "[MEF10.3] Sections 8.9 and 9.7. [MEF7.3] Section 7.1.";
+  }
+
+  typedef evc-id-type {
+    type identifier45;
+    description
+      "EVC ID Type";
+    reference "[MEF10.3].";
+  }
+
+  typedef simple-percent {
+    type decimal64 {
+      fraction-digits 5;
+      range "0.00000 .. 100.00000";
+    }
+    description
+      "Percent.";
+  }
+
+  typedef vlan-id-type {
+    type uint16 {
+      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.";
+    reference "[802.1Q]";
+  }
+
+  typedef ieee8021p-priority-type {
+    type uint8 {
+      range "0..7";
+    }
+    description
+      "An 802.1Q user priority value.";
+    reference "[802.1Q]";
+  }
+
+  typedef connection-type {
+    type enumeration {
+      enum "point-to-point" {
+        description
+          "Point to Point.";
+      }
+      enum "multipoint-to-multipoint" {
+        description
+          "Multipoint to Multipoint.";
+      }
+      enum "rooted-multipoint" {
+        description
+          "Rooted Multipoint.";
+      }
+    }
+    description
+      "EVC Type";
+    reference "[MEF10.3] Section 8.1.";
+  }
+
+  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'.";
+      }
+      enum "leaf" {
+        description
+          "Leaf Role for UNI. Valid setting for Rooted-Multipoint EVCs
+           only. A UNI set to this value may send frames to UNIs
+           'root'.";
+      }
+    }
+    description
+      "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.";
+      }
+      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";
+      }
+      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.";
+      }
+    }
+    description
+      "A MEF service can have one of three different delivery types.";
+    reference "[MEF10.3] section 8.5";
+  }
+
+  typedef interface-resiliency-type {
+    type enumeration {
+      enum "none" {
+        description
+          "No protection mechanism defined.";
+      }
+      enum "two-link-active-standby" {
+        description
+          "Protection mechanism is Link Aggregation as specified in
+           [802.1AX], with one link in active mode and one link in
+           standby mode.";
+      }
+      enum "all-active" {
+        description
+          "Protection mechanism is Link Aggregation as specified in
+           [802.1AX], with all links in active mode.";
+      }
+      enum "other" {
+        description
+          "Protection method defined that is not
+           Link Aggregation active/standby mode.";
+      }
+    }
+    description
+      "This object type of resiliency mechanism for a specific UNI.";
+    reference "[MEF10.3.2], [802.1AX]";
+  }
+
+  typedef service-state-type {
+    type enumeration {
+      enum "pending" {
+        description
+          "Pending.";
+      }
+      enum "active" {
+        description
+          "Active.";
+      }
+      enum "inactive" {
+        description
+          "Inactive.";
+      }
+    }
+    description
+      "This type reflects the dynamic state of specific EVC.";
+    reference "[MEF7.3]";
+  }
+
+  typedef color-type {
+    type enumeration {
+      enum "green" {
+        description
+          "Green.";
+      }
+      enum "yellow" {
+        description
+          "Yellow.";
+      }
+    }
+    description
+      "CoS Color.";
+    reference "[MEF10.3].";
+  }
+
+  typedef bwp-ir-type {
+    type uint64;
+    units "bps";
+    description
+      "Bandwidth Profile Information Rate in Bits Per Second.";
+    reference "[MEF10.3] [R143], [R144].";
+  }
+
+  typedef bwp-bs-type {
+    type uint32;
+    units "bytes";
+    description
+      "Bandwidth Profile Burst Size in Bytes.";
+    reference "[MEF10.3] [R145].";
+  }
+
+  typedef bwp-color-mode-type {
+    type enumeration {
+      enum "color-blind" {
+        description
+          "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.";
+      }
+    }
+    description
+      "This attribute describes the color mode (CM) to be applied as
+       \"color-blind mode\" or \"color-aware mode\".";
+    reference "[MEF10.3] Section 12.1";
+  }
+
+  typedef bwp-coupling-flag-type {
+    type boolean;
+    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.";
+    reference "[MEF10.3] Section 12.1";
+  }
+
+  typedef l2cp-address-set-type {
+    type enumeration {
+      enum "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.";
+      }
+      enum "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.";
+      }
+      enum "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.";
+      }
+    }
+    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.";
+    reference "[MEF45] Section 8.1";
+  }
+
+  typedef l2cp-peering-protocol-field-type {
+    type enumeration {
+      enum "ethertype" {
+        description
+          "Ethertype.";
+      }
+      enum "llc" {
+        description
+          "LLC.";
+      }
+      enum "other" {
+        description
+          "Other: Not using LLC nor Ethertype to specify the Protocol
+           ID.";
+      }
+    }
+    description
+      "The Peering Protocol Identifier is one of Ethertype, LLC, or
+       Other.";
+    reference "[MEF45] Section 7.";
+  }
+
+  typedef mef-service-type {
+    type enumeration {
+      enum "epl" {
+        description
+          "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";
+      }
+      enum "eplan" {
+        description
+          "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";
+      }
+      enum "eptree" {
+        description
+          "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";
+      }
+      enum "other" {
+        description
+          "Use Other MEF Service if one of the existing enumerations
+           does not apply";
+      }
+    }
+    description
+      "This object indicates the specific Ethernet service type.";
+    reference "[MEF6.2]";
+  }
+
+  typedef envelope-type {
+    type enumeration {
+      enum "per-uni" {
+        description
+          "The envelope contains Bandwidth Profile flows per UNI";
+      }
+      enum "per-evc" {
+        description
+          "The envelope contains Bandwidth Profile flows per EVC End
+           Point.";
+      }
+      enum "per-cos-or-eec" {
+        description
+          "The envelope contains Bandwidth Profile flows per CoS
+           Name or per Egress Equivalence Class Name.";
+      }
+    }
+    description
+      "Type that describes the sort of bandwidth profile flows that
+       can be contained in a particular envelope.";
+  }
+}
index 73694f936ea663c2d14e5fc35c45e5607e27c362..6a1253ff77376771161b2163fdaa5069f03b093b 100644 (file)
@@ -4,7 +4,7 @@ module unimgr-dhcp {
 
     import ietf-inet-types { prefix inet; revision-date "2013-07-15"; }
     import ietf-yang-types { prefix yang; }
-    import mef-types { prefix mef-types; }
+    import mef-types { prefix mef-types; revision-date 2015-05-26; }
 
     revision "2016-12-14" {
         description "It provides required datastore containers to handle DHCP requests