Initial import of CFM and SOAM api

Change-Id: Icf5cc2d5fb34b75460e80e8cced0d70265bcd33b
diff --git a/apps/cfm/src/test/resources/examples/CreateDM_Mep10.json b/apps/cfm/src/test/resources/examples/CreateDM_Mep10.json
new file mode 100644
index 0000000..4b8a962
--- /dev/null
+++ b/apps/cfm/src/test/resources/examples/CreateDM_Mep10.json
@@ -0,0 +1,18 @@
+{
+  "dm": {
+    "remoteMepId":20,
+    "dmCfgType": "DMDMM",
+    "version": "Y17312008",
+    "priority": "PRIO1",
+    "messagePeriodMs": 100,
+    "startTime": {
+      "immediate":true
+    },
+    "stopTime": {
+      "none":true
+    },
+    "frameSize": 1500,
+    "measurementIntervalMins": 1,
+    "measurementsEnabled": ["FRAME_DELAY_TWO_WAY_BINS","FRAME_DELAY_TWO_WAY_AVERAGE"]
+  }
+}
\ No newline at end of file
diff --git a/apps/cfm/src/test/resources/examples/CreateMa1InDomainA.json b/apps/cfm/src/test/resources/examples/CreateMa1InDomainA.json
new file mode 100644
index 0000000..0790aee
--- /dev/null
+++ b/apps/cfm/src/test/resources/examples/CreateMa1InDomainA.json
@@ -0,0 +1,23 @@
+{
+  "ma": {
+    "maName": "ma-vlan-1",
+    "maNameType": "CHARACTERSTRING",
+    "maNumericId": 1,
+    "ccm-interval": "INTERVAL_1S",
+    "component-list": [
+      { "component": {
+        "component-id":"1",
+        "tag-type": "VLAN_STAG",
+        "vid-list": [
+          {"vid":1}
+        ]
+      }
+      }
+    ],
+    "rmep-list": [
+      { "rmep":10 },
+      { "rmep":20 },
+      { "rmep":30 }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/apps/cfm/src/test/resources/examples/CreateMa2InDomainA.json b/apps/cfm/src/test/resources/examples/CreateMa2InDomainA.json
new file mode 100644
index 0000000..67afdba
--- /dev/null
+++ b/apps/cfm/src/test/resources/examples/CreateMa2InDomainA.json
@@ -0,0 +1,22 @@
+{
+  "ma": {
+    "maName": "ma-vlan-2",
+    "maNameType": "CHARACTERSTRING",
+    "maNumericId": 2,
+    "ccm-interval": "INTERVAL_1S",
+    "component-list": [
+      { "component": {
+        "component-id":"1",
+        "tag-type": "VLAN_STAG",
+        "vid-list": [
+          {"vid":2}
+        ]
+      }
+      }
+    ],
+    "rmep-list": [
+      { "rmep":10 },
+      { "rmep":20 }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/apps/cfm/src/test/resources/examples/CreateMdDomainA.json b/apps/cfm/src/test/resources/examples/CreateMdDomainA.json
new file mode 100644
index 0000000..2dbb761
--- /dev/null
+++ b/apps/cfm/src/test/resources/examples/CreateMdDomainA.json
@@ -0,0 +1,7 @@
+{"md": {
+  "mdName": "DomainA",
+  "mdNameType": "CHARACTERSTRING",
+  "mdLevel": "LEVEL3",
+  "mdNumeridId": 1
+}
+}
\ No newline at end of file
diff --git a/apps/cfm/src/test/resources/examples/CreateMep10.json b/apps/cfm/src/test/resources/examples/CreateMep10.json
new file mode 100644
index 0000000..3b393c2
--- /dev/null
+++ b/apps/cfm/src/test/resources/examples/CreateMep10.json
@@ -0,0 +1,14 @@
+{
+  "mep": {
+    "mepId": 10,
+    "deviceId": "netconf:192.168.56.10:830",
+    "port": 0,
+    "direction": "DOWN_MEP",
+    "mdName": "DomainA",
+    "maName": "ma-vlan-1",
+    "primary-vid": 1,
+    "administrative-state": true,
+    "ccm-ltm-priority": 4,
+    "cci-enabled" :true
+  }
+}
\ No newline at end of file
diff --git a/apps/cfm/src/test/resources/examples/README.md b/apps/cfm/src/test/resources/examples/README.md
new file mode 100644
index 0000000..3557cff
--- /dev/null
+++ b/apps/cfm/src/test/resources/examples/README.md
@@ -0,0 +1,12 @@
+Run:
+
+* curl --user onos:rocks -d @CreateMdDomainA.json http://localhost:8181/onos/cfm/md --header "Content-Type:application/json"
+* curl --user onos:rocks -d @CreateMa1InDomainA.json http://localhost:8181/onos/cfm/md/DomainA/ma --header "Content-Type:application/json"
+* curl --user onos:rocks -d @CreateMa2InDomainA.json http://localhost:8181/onos/cfm/md/DomainA/ma --header "Content-Type:application/json"
+* curl --user onos:rocks http://localhost:8181/onos/cfm/md 
+
+Create a Device that supports CFM Programmable, say at netconf:192.168.56.10:830
+* curl --user onos:rocks -d @CreateMep10.json http://localhost:8181/onos/cfm/md/DomainA/ma/ma-vlan-1/mep --header "Content-Type:application/json"
+
+Now call the RPC to create a Delay Measurement on that device
+* curl --user onos:rocks -X PUT -d @CreateDM_Mep10.json http://localhost:8181/onos/cfm/md/DomainA/ma/ma-vlan-1/mep/10/dm --header "Content-Type:application/json"