OVSDB Qos and Queue - Postman examples
authorEric Multanen <eric.w.multanen@intel.com>
Thu, 4 Feb 2016 01:00:56 +0000 (17:00 -0800)
committerSam Hague <shague@redhat.com>
Fri, 5 Feb 2016 02:37:24 +0000 (02:37 +0000)
Adds a Postman collection of RESTCONF commands for doing
CRUD operations with Qos and Queue entries.

v2 - remove tabs
v3 - remove tabs in right file

Change-Id: I8e98b2f9b5c6e517a5a60516fe21fce063e169e2
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
resources/commons/Qos-and-Queue-Collection-Environment-Variables.postman_environment [new file with mode: 0644]
resources/commons/Qos-and-Queue-Collection.json.postman_collection [new file with mode: 0644]
resources/commons/README
resources/commons/Single-Node-Cluster-Setup-Environment-Variables.postman_environment

diff --git a/resources/commons/Qos-and-Queue-Collection-Environment-Variables.postman_environment b/resources/commons/Qos-and-Queue-Collection-Environment-Variables.postman_environment
new file mode 100644 (file)
index 0000000..9e1c5db
--- /dev/null
@@ -0,0 +1,30 @@
+{
+    "id": "06bd940f-ba4c-fd63-25ca-be8272411257",
+    "name": "Qos and Queue Collection Environment Variables",
+    "values": [
+        {
+            "key": "CONTROLLER-IP",
+            "value": "10.11.12.1",
+            "type": "text",
+            "name": "CONTROLLER-IP",
+            "enabled": true
+        },
+        {
+            "key": "HYPERVISOR-IP",
+            "value": "10.20.20.1",
+            "type": "text",
+            "name": "HYPERVISOR-IP",
+            "enabled": true
+        },
+        {
+            "key": "HYPERVISOR-OVSDB-PORT",
+            "value": "6640",
+            "type": "text",
+            "name": "HYPERVISOR-OVSDB-PORT",
+            "enabled": true
+        }
+    ],
+    "timestamp": 1454573803907,
+    "synced": false,
+    "syncedFilename": ""
+}
diff --git a/resources/commons/Qos-and-Queue-Collection.json.postman_collection b/resources/commons/Qos-and-Queue-Collection.json.postman_collection
new file mode 100644 (file)
index 0000000..d1a1de7
--- /dev/null
@@ -0,0 +1,282 @@
+{
+    "id": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+    "name": "Qos and Queue Collection",
+    "description": "This collection demonstrates how to:\n\n- create Qos and Queue entries in the OVSDB\n- add or delete Queue entries from a Qos entry\n- add or delete a Qos entry from a termination point\n- delete Qos and Queue entries",
+    "order": [
+        "8470a026-b32c-a292-49a2-a523fe831881",
+        "f1627096-7541-0c7e-e998-cd29e90f2547",
+        "78f912b9-eb93-6df1-e6bd-b175a8ee097a",
+        "17f45b0e-bdd2-6c7b-18a9-26df17d2ca20",
+        "194fbaf3-362e-54c9-2daf-c9b76f38ee57",
+        "64210287-3ec5-48f3-7ee5-447c09cc3c84",
+        "9d1dc5b0-99a2-9d31-29b6-35dcc0cf24fa",
+        "760bb52a-e621-bf9c-7053-e72a94899fa9",
+        "501cf348-4095-3826-1081-c1b3ba428f3c",
+        "61f5f3d5-1014-b211-b9bf-80a6b269d9b4",
+        "c3549a74-512b-7e93-a5e8-0219e1956c99",
+        "18641f3c-2f50-9761-c780-3f6ee358c616",
+        "fbecd07b-135b-6070-0178-71af93998104"
+    ],
+    "folders": [],
+    "timestamp": 1454567977189,
+    "owner": "",
+    "remoteLink": "",
+    "public": false,
+    "requests": [
+        {
+            "id": "17f45b0e-bdd2-6c7b-18a9-26df17d2ca20",
+            "headers": "Content-Type: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/QOS-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572576470,
+            "name": "Add a QpS entry to a qos-entries list",
+            "description": "This restconf request will create or update a Qos entry for the ovsdb node 'HOST1'.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"ovsdb:qos-entries\": [\n    {\n      \"qos-id\": \"QOS-1\",\n      \"qos-type\": \"ovsdb:qos-type-linux-htb\",\n      \"qos-other-config\": [\n        {\n          \"other-config-key\": \"max-rate\",\n          \"other-config-value\": \"3300000\"\n        }\n      ]\n    }\n  ]\n}"
+        },
+        {
+            "id": "18641f3c-2f50-9761-c780-3f6ee358c616",
+            "headers": "",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/QUEUE-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "DELETE",
+            "data": [],
+            "dataMode": "params",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572803238,
+            "name": "Delete a Queue entry from an ovsdb node",
+            "description": "This restconf command will delete a Qos entry.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": []
+        },
+        {
+            "id": "194fbaf3-362e-54c9-2daf-c9b76f38ee57",
+            "headers": "Content-Type: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/QUEUE-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572671919,
+            "name": "Add a Queue entry to the queues list of aovsdb node 'HOST1'",
+            "description": "This restconf request will create or update a Queue entry on ovsdb node 'HOST1'.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"ovsdb:queues\": [\n    {\n      \"queue-id\": \"QUEUE-1\",\n      \"dscp\": 25,\n      \"queues-other-config\": [\n        {\n          \"queue-other-config-key\": \"max-rate\",\n          \"queue-other-config-value\": \"3600000\"\n        }\n      ]\n    }\n  ]\n}"
+        },
+        {
+            "id": "501cf348-4095-3826-1081-c1b3ba428f3c",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/QOS-1/queue-list/0/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "DELETE",
+            "data": [],
+            "dataMode": "params",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572752090,
+            "name": "Delete a Queue entry from a Qos entry",
+            "description": "This restconf command will delete a queue entry from a qos entry.\n\nThe queue entry is identified by it's key value (the queue number) in\nthe queue-list which is part of the qos entry.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": []
+        },
+        {
+            "id": "61f5f3d5-1014-b211-b9bf-80a6b269d9b4",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1%2Fbridge%2Fbr-test/termination-point/testport/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572769501,
+            "name": "Add existing QoS UUID to existing termination point",
+            "description": "This restconf request will specify the UUID of a Qos entry to associate with a port.\n\nThe Qos UUID is the actual operational value of a Qos entry.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"network-topology:termination-point\": [\n    \t{\n \t  \t\t\"ovsdb:name\": \"testport\",\n \t\t\t\"tp-id\": \"testport\",\n \t\t\t\"qos\": \"4126e461-020d-497d-97b7-c8f409d1c9b9\"\n  \t\t}\n    ]\n}"
+        },
+        {
+            "id": "64210287-3ec5-48f3-7ee5-447c09cc3c84",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/QOS-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "GET",
+            "data": [],
+            "dataMode": "params",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572690160,
+            "name": "Get Operational QoS Entry from Qos Entry list",
+            "description": "This restconf queries the operational md-sal for a specific Qos entry which was previously created by restconf (e.g. 'QOS-1').\n\nThis is useful for determining the actual UUID of the Qos entry in order to assign it to a port (i.e. termination point).",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": []
+        },
+        {
+            "id": "760bb52a-e621-bf9c-7053-e72a94899fa9",
+            "headers": "Content-Type: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/QOS-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572737919,
+            "name": "Add a Queue List to a QoS entry",
+            "description": "This restconf adds a Queue to a Qos entry by specifying a queue-list\nin the Qos entry which uses the operational queue UUID value.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"ovsdb:qos-entries\": [\n    {\n      \"qos-id\": \"QOS-1\",\n      \"queue-list\": [\n          {\n              \"queue-number\": \"0\",\n              \"queue-uuid\": \"8100a05f-d3fa-4e65-bbd1-6e886713f592\"\n          }\n        ]\n    }\n  ]\n}"
+        },
+        {
+            "id": "78f912b9-eb93-6df1-e6bd-b175a8ee097a",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1%2Fbridge%2Fbr-test/termination-point/testport/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454573176142,
+            "name": "Create Termination Point",
+            "description": "This restconf request creates port/interface (`testport`) and attach it to give bridge 'br-test'. \n",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"network-topology:termination-point\": [\n    \t{\n\t  \t\t\"ovsdb:name\": \"testport\",\n  \t\t\t\"tp-id\": \"testport\"\n\t\t}\n    ]\n}"
+        },
+        {
+            "id": "8470a026-b32c-a292-49a2-a523fe831881",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nAccept: application/json\nContent-Type: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "POST",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454573115055,
+            "name": "POST to create OVSDB NODE HOST1",
+            "description": "Fire this Restconf request if you want to initiate the connection to ovsdb node from controller. It assumes that ovsdb node is listening for tcp connection in passive mode. To configure the ovsdb node for listening incoming connection, please fire following command at ovsdb node machine\n\n\"ovs-vsctl set-manager tcp:16640\"",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "\r\n        {\r\n            \"node\": [\r\n                {\r\n                    \"node-id\": \"ovsdb:HOST1\",\r\n                    \"connection-info\": {\r\n                        \"ovsdb:remote-ip\": \"{{HYPERVISOR-IP}}\",\r\n                        \"ovsdb:remote-port\": \"{{HYPERVISOR-OVSDB-PORT}}\"\r\n                    }\r\n                }\r\n            ]\r\n        }\r\n"
+        },
+        {
+            "id": "9d1dc5b0-99a2-9d31-29b6-35dcc0cf24fa",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/QUEUE-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "GET",
+            "data": [],
+            "dataMode": "params",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572710554,
+            "name": "Get a specific operaiontal Queue entry",
+            "description": "This restconf command will query the operational md-sal for a specified Queue entry (e.g. 'QUEUE-1') which has previously been added to the config md-sal.\n\nThis is useful in order to get the actual UUID of the Queue entry in order to assign it to a Qos entry.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": []
+        },
+        {
+            "id": "c3549a74-512b-7e93-a5e8-0219e1956c99",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\nAccept: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1%2Fbridge%2Fbr-test/termination-point/testport/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572787173,
+            "name": "Delete a QoS UUID from a termination point",
+            "description": "This restconf request will delete a Qos entry from a port (termination point).\n\nNote - this is done by doing a PUT operation on the termination port with the Qos\nentry cleared.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"network-topology:termination-point\": [\n    \t{\n \t  \t\t\"ovsdb:name\": \"testport\",\n \t\t\t\"tp-id\": \"testport\"\n  \t\t}\n    ]\n}"
+        },
+        {
+            "id": "f1627096-7541-0c7e-e998-cd29e90f2547",
+            "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1%2Fbridge%2Fbr-test",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "PUT",
+            "data": [],
+            "dataMode": "raw",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572634841,
+            "name": "Create bridge br-test on HOST1",
+            "description": "Create bridge \"br-test\" on OVSDB node \"ovsdb:HOST1\"",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": [],
+            "rawModeData": "{\n  \"network-topology:node\": [\n        {\n            \"node-id\": \"ovsdb:HOST1/bridge/br-test\",\n             \"ovsdb:bridge-name\": \"br=test\",\n             \"ovsdb:managed-by\": \"/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb:HOST1']\"\n        }\n    ]\n}"
+        },
+        {
+            "id": "fbecd07b-135b-6070-0178-71af93998104",
+            "headers": "",
+            "url": "http://{{CONTROLLER-IP}}:8181/restconf/config/network-topology:network-topology/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/QOS-1/",
+            "preRequestScript": "",
+            "pathVariables": {},
+            "method": "DELETE",
+            "data": [],
+            "dataMode": "params",
+            "version": 2,
+            "tests": "",
+            "currentHelper": "normal",
+            "helperAttributes": {},
+            "time": 1454572816260,
+            "name": "Delete a QoS entry from a node",
+            "description": "This restconf command will delete a Qos entry from an ovsdb node.",
+            "collectionId": "af60f3ad-e690-74ea-1a5a-2ed6f4013755",
+            "responses": []
+        }
+    ]
+}
index 0cad7271a01ba6b95242b5232038e55125f7d4bb..a6f6920bb62e6e30abe07ab2eea2ffae704a3e73 100644 (file)
@@ -30,3 +30,7 @@ Contents
 - NetvirtSfc.json.postman_collection : Collection of REST-APIs to interact with Netvirt-Sfc.
 
 - Ovsdb-HwvtepSouthbound-Collection.json.postman_collection : Collection contains Restconf request for doing CRUD operations (hwvtep global node, physical switch, logical switch, physical locator, and physical port) on hwvtepsouthbound plugin running in standalone controller.
+
+- Qos-and-Queue-Collection-Environment-Variables.postman_environment : Postman environment file that defines variables used by the Qos-and-Queue-Collection.json.postman_collection
+
+- Qos-and-Queue-Collection.json.postman_collection - Collection of Postman Restconf commands for doing CRUD operations on Qos and Queue entries.
index dd830405ce934d3edd107ef1bf4e35e8c4698aa8..e9b9e4b8b429196f43408ee2817a7940829e05c0 100644 (file)
@@ -1,37 +1,37 @@
 {
-       "id": "76b6f656-7d9c-e4cd-80a4-5d6a42f07cd3",
-       "name": "Single Node Cluster Setup Environment Variables",
-       "values": [
-               {
-                       "key": "CONTROLLER-IP",
-                       "value": "localhost",
-                       "type": "text",
-                       "name": "CONTROLLER-IP",
-                       "enabled": true
-               },
-               {
-                       "key": "HYPERVISOR-NODE-ID",
-                       "value": "192.168.201.128:16640",
-                       "type": "text",
-                       "name": "HYPERVISOR-NODE-ID",
-                       "enabled": true
-               },
-               {
-                       "key": "HYPERVISOR-IP",
-                       "value": "192.168.201.128",
-                       "type": "text",
-                       "name": "HYPERVISOR-IP",
-                       "enabled": true
-               },
-               {
-                       "key": "HYPERVISOR-OVSDB-PORT",
-                       "value": "16640",
-                       "type": "text",
-                       "name": "HYPERVISOR-OVSDB-PORT",
-                       "enabled": true
-               }
-       ],
-       "timestamp": 1443832146164,
-       "synced": false,
-       "syncedFilename": ""
-}
\ No newline at end of file
+    "id": "76b6f656-7d9c-e4cd-80a4-5d6a42f07cd3",
+    "name": "Single Node Cluster Setup Environment Variables",
+    "values": [
+        {
+            "key": "CONTROLLER-IP",
+            "value": "localhost",
+            "type": "text",
+            "name": "CONTROLLER-IP",
+            "enabled": true
+        },
+        {
+            "key": "HYPERVISOR-NODE-ID",
+            "value": "192.168.201.128:16640",
+            "type": "text",
+            "name": "HYPERVISOR-NODE-ID",
+            "enabled": true
+        },
+        {
+            "key": "HYPERVISOR-IP",
+            "value": "192.168.201.128",
+            "type": "text",
+            "name": "HYPERVISOR-IP",
+            "enabled": true
+        },
+        {
+            "key": "HYPERVISOR-OVSDB-PORT",
+            "value": "16640",
+            "type": "text",
+            "name": "HYPERVISOR-OVSDB-PORT",
+            "enabled": true
+        }
+    ],
+    "timestamp": 1443832146164,
+    "synced": false,
+    "syncedFilename": ""
+}