RestConf commands

Each *.rest file represents a single RestConf Command to the SMO-O1-Controller

Issue-ID: OAM-122
Signed-off-by: demx8as6 <martin.skorupski@highstreet-technologies.com>
Change-Id: I5eb995efd15f71a9f1d174c94699f5d7df701dc5
diff --git a/data-model/tools/o1-controller-restconf-commands/.vscode/settings.json b/data-model/tools/o1-controller-restconf-commands/.vscode/settings.json
new file mode 100644
index 0000000..ce7dbb4
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/.vscode/settings.json
@@ -0,0 +1,10 @@
+{
+  "rest-client.environmentVariables": {
+    "local": {
+      "baseUrl": "http://localhost:8181",
+      "user": "admin",
+      "password": "admin",
+      "mountPoint": "ntsim_onf_core_model_1_4-0_51009",
+    },
+  }
+}
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/README.md b/data-model/tools/o1-controller-restconf-commands/README.md
new file mode 100644
index 0000000..4924832
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/README.md
@@ -0,0 +1,7 @@
+# RESTCONF Commands to ONAP SDN-R/O-RAN O1 Controller
+
+This project shows a couple of examles for Bierman-RESTCONF commands and RFC8040-RESTCONF commands to OpenDaylight.
+
+This is an vsCode project using the [rest-client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) extension.
+
+Please adapt your enviroment in ./vscode/settings.json.
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-modules-biermann.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-modules-biermann.rest
new file mode 100644
index 0000000..c839057
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-modules-biermann.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/restconf/modules HTTP/1.1
+Authorization: Basic {{user}} {{password}}
+Accept: application/json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-modules-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-modules-rfc8040.rest
new file mode 100644
index 0000000..71f5196
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-modules-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/restconf/modules HTTP/1.1
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-both-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-both-rfc8040.rest
new file mode 100644
index 0000000..a5185bb
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-both-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf?fields=node(node-id) 
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-capabilities-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-capabilities-rfc8040.rest
new file mode 100644
index 0000000..e5aa2a5
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-capabilities-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf?content=nonconfig&fields=node(node-id;netconf-node-topology:available-capabilities/available-capability/capability) 
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-config-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-config-rfc8040.rest
new file mode 100644
index 0000000..7b330ab
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-config-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf?fields=node(node-id;netconf-node-topology:connection-status) 
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-connection-status-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-connection-status-rfc8040.rest
new file mode 100644
index 0000000..558281c
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-all-node-ids-connection-status-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf?fields=node(node-id;netconf-node-topology:connection-status) 
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-capabilities-biermann.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-capabilities-biermann.rest
new file mode 100644
index 0000000..f4e9572
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-capabilities-biermann.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/{{mountPoint}}/netconf-node-topology:available-capabilities
+Authorization: Basic {{user}} {{password}}
+Accept: application/json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-capabilities-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-capabilities-rfc8040.rest
new file mode 100644
index 0000000..694b1e0
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-capabilities-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf/node={{mountPoint}}/netconf-node-topology:available-capabilities?fields=available-capability(capability)
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-onf-core-air-interface-singnal-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-onf-core-air-interface-singnal-rfc8040.rest
new file mode 100644
index 0000000..0127832
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-node-onf-core-air-interface-singnal-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf/node={{mountPoint}}/yang-ext:mount/core-model-1-4:control-construct/logical-termination-point=e6c5831d-37ce-4ef4-b075-733f6791bde1/layer-protocol=pRppR4R/wire-interface-2-0:wire-interface-pac/wire-interface-configuration?fields=interface-name;problem-kind-severity-list(problem-kind-name)
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-both-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-both-rfc8040.rest
new file mode 100644
index 0000000..fd651a4
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-both-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf 
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-config-biermann.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-config-biermann.rest
new file mode 100644
index 0000000..d638b9f
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-config-biermann.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/restconf/config/network-topology:network-topology/topology/topology-netconf
+Authorization: Basic {{user}} {{password}}
+Accept: application/json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-config-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-config-rfc8040.rest
new file mode 100644
index 0000000..81d987b
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-config-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology/topology=topology-netconf?content=config HTTP/1.1
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-operational-biermann.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-operational-biermann.rest
new file mode 100644
index 0000000..c7e6d20
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-operational-biermann.rest
@@ -0,0 +1,4 @@
+GET {{baseUrl}}/restconf/operational/network-topology:network-topology/topology/topology-netconf
+Authorization: Basic {{user}} {{password}}
+Accept: application/json
+Content-Type: application/json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-operational-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-operational-rfc8040.rest
new file mode 100644
index 0000000..165a442
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-odl-netconf-topo-operational-rfc8040.rest
@@ -0,0 +1,3 @@
+GET {{baseUrl}}/rests/data/network-topology:network-topology?content=nonconfig 
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-list-biermann.rest b/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-list-biermann.rest
new file mode 100644
index 0000000..402ea35
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-list-biermann.rest
@@ -0,0 +1,23 @@
+POST {{baseUrl}}/restconf/operations/data-provider:read-network-element-connection-list HTTP/1.1
+Authorization: Basic {{user}} {{password}}
+Accept: application/json
+Content-Type: application/json
+
+{
+    "data-provider:input": {
+        "filter": [{
+                "property": "status",
+                "filtervalue": "Connecting"
+            }
+        ],
+        "sortorder": [{
+                "property": "node-id",
+                "sortorder": "descending"
+            }
+        ],
+        "pagination": {
+            "size": 10,
+            "page": 1
+        }
+    }
+}
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-list-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-list-rfc8040.rest
new file mode 100644
index 0000000..089447c
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-list-rfc8040.rest
@@ -0,0 +1,23 @@
+POST {{baseUrl}}/rests/operations/data-provider:read-network-element-connection-list HTTP/1.1
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
+Content-Type: application/yang-data+json
+
+{
+    "data-provider:input": {
+        "filter": [{
+                "property": "status",
+                "filtervalue": "Connecting"
+            }
+        ],
+        "sortorder": [{
+                "property": "node-id",
+                "sortorder": "descending"
+            }
+        ],
+        "pagination": {
+            "size": 10,
+            "page": 1
+        }
+    }
+}
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-log.rest b/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-log.rest
new file mode 100644
index 0000000..251bc6b
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-sdnr-connection-log.rest
@@ -0,0 +1,13 @@
+POST {{baseUrl}}/database/connectionlog/_search HTTP/1.1
+Content-Type: application/json
+
+{
+    "from": 3,
+    "size": 4,
+    "sort": {
+        "timestamp": "desc"
+    },
+    "query": {
+        "match_all": {}
+    }
+}
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-sdnr-create-connection-biermann.rest b/data-model/tools/o1-controller-restconf-commands/get-sdnr-create-connection-biermann.rest
new file mode 100644
index 0000000..dd7d6a7
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-sdnr-create-connection-biermann.rest
@@ -0,0 +1,16 @@
+POST {{baseUrl}}/restconf/operations/data-provider:create-network-element-connection
+Authorization: Basic {{user}} {{password}}
+Accept: application/json
+Content-Type: application/json
+
+{
+  "data-provider:input": {
+    "id": "new-mountpoint-name",
+    "node-id": "new-mountpoint-name",
+    "host": "10.10.10.10",
+    "port": "830",
+    "username": "netconf",
+    "password": "netconf",
+    "is-required": "true"
+  }
+}
\ No newline at end of file
diff --git a/data-model/tools/o1-controller-restconf-commands/get-sdnr-create-connection-rfc8040.rest b/data-model/tools/o1-controller-restconf-commands/get-sdnr-create-connection-rfc8040.rest
new file mode 100644
index 0000000..ce660a7
--- /dev/null
+++ b/data-model/tools/o1-controller-restconf-commands/get-sdnr-create-connection-rfc8040.rest
@@ -0,0 +1,16 @@
+POST {{baseUrl}}/rests/operations/data-provider:create-network-element-connection HTTP/1.1
+Authorization: Basic {{user}} {{password}}
+Accept: application/yang-data+json
+Content-Type: application/yang-data+json
+
+{
+  "data-provider:input": {
+    "id": "new-mountpoint-name",
+    "node-id": "new-mountpoint-name",
+    "host": "10.10.10.10",
+    "port": "830",
+    "username": "netconf",
+    "password": "netconf",
+    "is-required": "true"
+  }
+}
\ No newline at end of file