Initial import of Microsemi Driver

Change-Id: I431d5f2c18e0b66a84c36273c3d9f0b84f223841

Added in BUCK files for building driver

Change-Id: I70681327f5b89f67e904c45d5974ab393652d51f

Corrected some syntax errors

Change-Id: I11150cc499c212005f80619e3900e747f1c23d96

Updated pom file to clean build

Change-Id: I6613ddc9e6802aa882e716cf04df210249870835

Added in utility functions for EA1000 Init

Change-Id: I51ffe0cf0daf9ffcea0e2479ee9982fcd1755440

Added YMS code to Microsemi Driver

Change-Id: I6f2a14e454c6909bf9e9f6025321c74c98c13c72

Updated driver to work with YMS and YCH

Change-Id: If7dbe3cd5bd1b6f902d09d6b2dc3895605d70f70

Implemented IetfSystemManager as a service and call on YMS as a service

Change-Id: If1c5e8482b1f53f578a3b0b770accd50024111cf

Moved YMS calls over in to Yang Service implementation

Change-Id: I044aad06f1ef7452bc48e88987787a683666cd72

improved unit test for IetfSystemManager

Change-Id: I48fbf831e7e5ca0e1ef3de8288e56da1b5ebb7a4

Major changes to IetfSystemManager to work in live system

Change-Id: I6e3aa118ba422151f314b9a666860d90905c9929

Added in retry mechanism for DeviceDescription to wait for YCH

Change-Id: If8e0f2c2f315ffd6db15627a11382a00217dd262

Added in implementation of MseaSaFiltering and unit tests

Change-Id: I34bf888e0e732bd4664d1fb8ef5abb679b1506fe

Updated driver with unit tests for MseaSaFiltering

Change-Id: I7ea2407a546622ff55d1ab21610c45697546d632

Modified removeFlowRules of Ea1000FlowRuleProgrammable

Change-Id: Ibb4a555f61887a8e6e42af588bb42f7b70f58efb

Added in manager for MseaUniEvc service with unit tests

Change-Id: Idc5853f46051548973f52a0659f7f88982ff960c

Implemented getFlowEntries() for EVCs from EA1000

Change-Id: Ie85dadfa7760f0b30a9bdf6ccd09cca9f097fff9

Added in translation of FlowRules in to EVC on EA1000

Change-Id: Icfb65171c3300c96b3ca4e18cbd327f0ed2190be

Added in handling of FlowRule deletion including complex ceVlanMaps

Change-Id: I7fd0bb0ef04d1b40e4b7d6a6db7f7ee662329780

Updated Service entries for new onos-yang-tools

Change-Id: I44e655202f3a45073e1e16f83737caed6e01afa8

Revert "Updated Service entries for new onos-yang-tools"

This reverts commit 642b550ef1de12ed59bad2eaa3a2da414d2e5e59.

Improved timeout mechanism for YANG model loading

Change-Id: If744ecd206372e822edf2b736c83226321a12256

Minor edits of EVC creation

Change-Id: Ib0a4763deaf6dce37625ba77f5095b39cd98272d

Added in CustomEvc and supporting classes

Change-Id: Iad60eb1bcd48d2aec55b894b2d419b51852c3b2f

Created CeVlanUtils to resolve loading problem

Change-Id: I0d63931ad2c5ad2725861ebc7dccc4d5fe7b9298

Modified startup check

Change-Id: I6e6bcfa7e615044cb08fe7ee2f8a6c8b89aabb21

Modified handlin of flow rules

Change-Id: I965a79c23298866122aeb94c6d9d584aafee3bd5

Fixed problem with ceVlanMap

Change-Id: If1458c35d0b95b5b25b6636f098292f9e91c06c6

Minor Pom edits

Change-Id: I5cefb18674aa04b1f50bd7e2306260c1c3ad3814

Commented out extension references in YANG files to avoid onos-yang-tools problems

Change-Id: I32fdb34c4f476f495fe28e75d0f410aaf14e2ec1

Corrected error in removing 0 in CeVlanMapUtils

Change-Id: I8cd1fd02788b81c2613364d5639ef6e090057f80

Changes in YMS to accomodate EA1000 driver

Change-Id: I6ae2b9bd2be49eae8d4ad2f929dfe3214c514550
diff --git a/drivers/microsemi/ea1000yang/src/main/yang/msea-types.yang b/drivers/microsemi/ea1000yang/src/main/yang/msea-types.yang
new file mode 100644
index 0000000..8b05aac
--- /dev/null
+++ b/drivers/microsemi/ea1000yang/src/main/yang/msea-types.yang
@@ -0,0 +1,385 @@
+module msea-types {

+    

+  namespace "http://www.microsemi.com/microsemi-edge-assure/msea-types";

+  prefix "msea-types"; //MicroSemi EdgeAssure (msea)

+

+  organization

+   "Microsemi Inc., FTD Division";

+

+  contact           

+   "Web URL: http://www.microsemi.com/

+    E-mail:  info@microsemi.com

+    Postal:  Microsemi Corporation Corporate Headquarters

+             One Enterprise Aliso Viejo, 

+             CA 92656

+             U.S.A.

+    Phone:   +1 949 380 6100

+    Fax:     +1 949 215-4996";

+

+  description       

+   "This module contains a collection of generally useful derived

+    YANG data types for VLans and Meps and such.

+	

+    Copyright 2016 Microsemi Inc.

+    All rights reserved.";

+

+  revision "2016-02-29" {

+    description     

+     "Initial version - Sean Condon, Microsemi";

+    reference

+	 "Eagle EANTC Tail-f Inter-operation Summary Revision 1.0 16th Feb 2016";

+  }

+

+  //

+  // Extensions related to Edge Assure

+  //

+  extension not-changeable {

+	description

+	  "Marks the leaf as being settable at creation time 

+	   only and not writable thereafter";

+  }

+  

+  extension xref-module {

+	description

+	  "For leaf items that have type leafref, this attribute defines

+	  the netopeer module that supports that reference if it is outside

+	  the current module";

+	argument module-name;

+  }

+  

+  extension deprecated {

+	  description 

+	  "For leaf items that have become obsolete. This should generate a 

+	  warning to the user that they are using a deprected attribute";

+  }

+    

+  //

+  // Type definitions related to Edge Assure

+  //

+  typedef mep-id-type {

+    type uint16 {

+      range "1..8191";

+    }

+

+    description

+      "Maintenance association End Point Identifier (MEPID): A small integer,

+       unique over a given Maintenance Association, identifying a

+       specific MEP.";

+    reference

+      "[802.1q] 3.19 and 19.2.1";

+  }

+

+  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] 9.6";

+  }

+

+  typedef port-status-type {

+    type enumeration {

+      enum no-status-tlv {

+          description "Indicates either that no CCM has been received or that 

+                       no port status TLV was present in the last CCM received.";

+      }

+      enum blocked {

+          description "Ordinary data cannot pass freely through the port on 

+                       which the remote MEP resides. Value of enableRmepDefect 

+                       is equal to false.";

+      }

+      enum up {

+          description "Ordinary data can pass freely through the port on which

+                       the remote MEP resides. Value of enableRmepDefect is 

+                       equal to true.";

+      }

+    }    

+

+    description

+      "The set of values available from the Port Status TLV in CCM PDUs

+       including the default no-status-tlv";

+

+    reference

+      "[802.1q] 20.19.3, 12.14.7.6.3:f

+       IEEE8021-CFM-MIB.Dot1agCfmPortStatus";

+  }

+

+  typedef interface-status-type {

+    type enumeration {

+      enum no-status-tlv {

+          description "Indicates either that no CCM has been received or that

+                       no interface status TLV was present in the last CCM received.";

+      }

+      enum up {

+          description "The interface is ready to pass packets.";

+      }

+      enum down {

+          description "The interface cannot pass packets.";

+      }

+      enum testing {

+          description "The interface is in some test mode.";

+      }

+      enum unknown {

+          description "The interface status cannot be determined for some reason.";

+      }

+      enum dormant {

+          description "The interface is not in a state to pass
		  	  packets but is in a pending state, waiting
			  for some external event.";

+      }

+      enum not-present {

+          description "Some component of the interface is missing.";

+      }

+      enum lower-layer-down {

+          description "The interface is down due to state of the lower layer 

+                       interfaces.";

+      }

+    }

+

+    description

+      "The set of values available from the Interface Status TLV in CCM PDUs

+       including the default no-status-tlv";

+    reference

+      "[802.1q] 20.19.4, 12.14.7.6.3:g

+       IEEE8021-CFM-MIB.Dot1agCfmInterfaceStatus";

+  }

+  

+  typedef mac-address-and-uint-type {

+    type binary {

+      length "8";

+    } 

+    description

+      "A MAC address and a two-octet unsigned integer";

+    reference

+      "[802.1q] IEEE8021-CFM-MIB.Dot1agCfmMaintDomainNameType";

+  }

+  

+  typedef mac-address-and-uint-str {

+    type string {

+      pattern '([0-9a-fA-F]{2}[:-]){6}([0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9]|65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5])';

+    }

+    description

+     "The mac-address type represents an IEEE 802 MAC address.

+      The canonical representation uses lowercase characters.

+

+      In the value set and its semantics, this type is equivalent

+      to the MacAddress textual convention of the SMIv2.";

+    reference

+     "IEEE 802: IEEE Standard for Local and Metropolitan Area

+                Networks: Overview and Architecture

+      RFC 2579: Textual Conventions for SMIv2";

+  }

+  

+

+  typedef md-level-type {

+    type uint8 {

+      range "0..7";

+    }

+

+    description

+      "Maintenance Domain Level (MD Level) identifier.  Higher numbers

+       correspond to higher Maintenance Domains, those with the greatest

+       physical reach, with the highest values for customers' CFM PDUs.

+       Lower numbers correspond to lower Maintenance Domains, those with

+       more limited physical reach, with the lowest values for CFM PDUs

+       protecting single bridges or physical links.";

+

+    reference

+      "[802.1q] 18.3, 21.4.1, IEEE8021-CFM-MIB.Dot1agCfmMDLevel";

+  }

+

+  typedef priority-type {

+    type uint8 {

+      range "0..7";

+    }

+

+    description

+      "A 3 bit priority value to be used in the VLAN tag, if present

+       in the transmitted frame.";

+    reference

+      "[802.1q] 12.14.7.3.2:e";

+  }

+  

+  typedef cos-color-type {

+    type enumeration {

+      enum "green" {

+    	  description "Change color to green";

+      }

+      enum "yellow" {

+    	  description "Change color to yellow";

+      }

+      enum "drop" {

+    	  description "Delete color information";

+      }

+    }

+    description

+      "TBD";

+    reference "[MEF23.1].";

+  }

+  

+  typedef service-list-type {

+    type string {

+      length "0..255";

+      pattern "\d*([,:]\d*)*";

+    }

+    description     

+     "An octet string containing a list of item values.

+      

+      An item value is an arbitrary string of octets from

+      ASCII character 0x30 - 0x39, but may not contain 

+      a delimiter character. Delimiter characters are 

+      defined to be one of the following:

+      

+          -  An ASCII comma character (0x2C)

+          -  An ASCII colon character (0x3A)

+      

+      Delimiter characters are used to separate item values

+      in a item list.  Only a single delimiter character may

+      occur between two item values.  A item value may not

+      have a zero length.  These constraints imply certain

+      restrictions on the contents of this object:

+      

+          - There cannot be a leading or trailing delimiter

+            character.

+      

+          - There cannot be multiple adjacent delimiter

+            characters.

+      

+      The 'comma' delimiter separates individual items or a

+      sequence of items. The 'colon' delimiter indicates a range

+      of items from the first item before the colon through the

+      last item after the colon. Individual ranges in the same

+      item list need to be separated by a 'comma'.

+      

+      Some examples of valid item lists are:

+      

+          - ''            -- an empty list

+          - '1234'        -- list of one item

+          - '10,11,12'    -- list of several items

+          - '10:20'       -- a list containing all the valid values from

+                             10 through 20

+      

+      Note that although an item value may not have a length of

+      zero, an empty string is still valid.  This indicates

+      an empty list (i.e. there are no tag values in the list).

+      

+      The use of the item list is to select one or more items at

+      one time with a single object instead of having separate row

+      entries in a table for each individual item.";

+  }

+  

+  

+  typedef service-preservation-type {

+    type enumeration {

+      enum preserve   { 

+		description "The type of service is preserved, either CE-VLAN ID or 

+			CE-VLAN CoS as indicated by the specific object";

+		}

+      enum noPreserve { 

+		description "The type of service is not preserved, either CE-VLAN ID

+			or CE-VLAN CoS as indicated by the specific object.";

+		}

+    }

+    description     

+     "Configures the EVC preservation attributes.";

+    reference       

+     "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";

+  }

+

+  typedef service-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       

+     "[MEF 6.1] 6.0";

+  }

+

+  

+  typedef identifier45 {

+    type string {

+      length "min..45";

+    }

+    description

+      "This type definition accepts any visible ASCII character " +

+      "plus the <space> character.The string must be RFC 2579 " +

+      "Display " +

+      "String but not contain the characters 0.00 through 0.1f " +

+      "It does not accept the <delete> character despite the " +

+      "current MEF specification.";

+    reference "MEF 10.3 [R8], [R9]";

+  }

+  

+  typedef file-name {

+    type string {

+      length "1..45";

+      pattern '[a-zA-Z0-9\-_.]*';

+    }

+    description "Valid file names only";

+  }

+  

+  typedef reset-config-options {

+	  type enumeration {

+		  enum operational {

+			  description "Reset any operational data on the device. Configuration 

+					  for CFM, Y-1564, RFC-2544 and UNI";

+		  }

+		  enum safiltering {

+			  description "Reset only safiltering data on the device.";

+		  }

+		  enum permissions {

+			  description "Reset only permissions data on the device.";

+		  }

+		  enum allnetconf {

+			  description "Reset all NETCONF data - leaves only logs and SSH keys.";

+		  }

+		  enum nuclear {

+			  description "Remove all configuration and history on the device.

+					  Deletes SSH keys. Resets device to factory defaults";

+		  }

+	  }

+  }

+  

+  	grouping mep-config-attribs-noref {

+		description 

+		"Attributes related to the configuration of a MEP";

+	

+		leaf maintenance-domain {

+                type uint8 {

+                   range 1..64;

+                }

+		  description

+		  "A reference to a specific Maintenance Domain.";

+		}

+		

+		leaf maintenance-association {

+                type uint8 {

+                   range 1..64;

+                }

+			description

+			"A reference to a specific Maintenance Association.";

+		}

+		

+		leaf maintenance-association-end-point {

+			type mep-id-type;

+			description

+			"A reference to a specific Maintenance association End Point.";

+		}

+	}

+}