Update Functional tests for SP1.6
[transportpce.git] / tests / transportpce_tests / test_portmapping.py
index f386abf0db94239d7292f671075c2c02b4dcd457..f43218f2011d9a0b7d9cc9e127a7995888be7802 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 ##############################################################################
-#Copyright (c) 2017 Orange, Inc. and others.  All rights reserved.
+# Copyright (c) 2017 Orange, Inc. and others.  All rights reserved.
 #
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Apache License, Version 2.0
@@ -20,21 +20,31 @@ import time
 import unittest
 
 
-class TransportPCEtesting(unittest.TestCase):
+class TransportPCEPortMappingTesting(unittest.TestCase):
 
-    testtools_process = None
+    honeynode_process1 = None
+    honeynode_process2 = None
     odl_process = None
-    restconf_baseurl = "http://127.0.0.1:8181/restconf"
+    restconf_baseurl = "http://localhost:8181/restconf"
 
     @classmethod
-    def __start_testtools(cls):
-        executable = ("./netconf/netconf/tools/netconf-testtool/target/"
-                      "netconf-testtool-1.3.1-SNAPSHOT-executable.jar")
+    def __start_honeynode1(cls):
+        executable = ("./honeynode/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+                      "/honeynode-distribution-1.18.01/honeycomb-tpce")
         if os.path.isfile(executable):
-            with open('testtools.log', 'w') as outfile:
-                cls.testtools_process = subprocess.Popen(
-                    ["java", "-jar", executable, "--schemas-dir", "schemas",
-                     "--initial-config-xml", "sample-config-ROADM.xml"],
+            with open('honeynode1.log', 'w') as outfile:
+                cls.honeynode_process1 = subprocess.Popen(
+                    [executable, "17831", "sample_configs/ord_2.1/oper-XPDRA.xml"],
+                    stdout=outfile)
+
+    @classmethod
+    def __start_honeynode2(cls):
+        executable = ("./honeynode/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
+                      "/honeynode-distribution-1.18.01/honeycomb-tpce")
+        if os.path.isfile(executable):
+            with open('honeynode2.log', 'w') as outfile:
+                cls.honeynode_process2 = subprocess.Popen(
+                    [executable, "17830", "sample_configs/ord_2.1/oper-ROADMA.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -42,29 +52,63 @@ class TransportPCEtesting(unittest.TestCase):
         executable = "../karaf/target/assembly/bin/karaf"
         with open('odl.log', 'w') as outfile:
             cls.odl_process = subprocess.Popen(
-                ["bash", executable], stdout=outfile,
+                ["bash", executable, "server"], stdout=outfile,
                 stdin=open(os.devnull))
 
     @classmethod
     def setUpClass(cls):
-        cls.__start_testtools()
+        cls.__start_honeynode1()
+        time.sleep(20)
+        cls.__start_honeynode2()
+        time.sleep(20)
         cls.__start_odl()
         time.sleep(60)
 
     @classmethod
     def tearDownClass(cls):
-        cls.testtools_process.send_signal(signal.SIGINT)
-        cls.testtools_process.wait()
         for child in psutil.Process(cls.odl_process.pid).children():
             child.send_signal(signal.SIGINT)
             child.wait()
         cls.odl_process.send_signal(signal.SIGINT)
         cls.odl_process.wait()
+        for child in psutil.Process(cls.honeynode_process1.pid).children():
+            child.send_signal(signal.SIGINT)
+            child.wait()
+        cls.honeynode_process1.send_signal(signal.SIGINT)
+        cls.honeynode_process1.wait()
+        for child in psutil.Process(cls.honeynode_process2.pid).children():
+            child.send_signal(signal.SIGINT)
+            child.wait()
+        cls.honeynode_process2.send_signal(signal.SIGINT)
+        cls.honeynode_process2.wait()
 
     def setUp(self):
-        time.sleep(1)
+        print ("execution of {}".format(self.id().split(".")[-1]))
+        time.sleep(10)
+
+#    def test_01_restconfAPI(self):
+#        url = ("{}/operational/network-topology:network-topology/topology/"
+#        "topology-netconf/node/controller-config".format(self.restconf_baseurl))
+#        headers = {'content-type': 'application/json'}
+#        response = requests.request("GET", url, headers=headers, auth=('admin', 'admin'))
+#        self.assertEqual(response.status_code, requests.codes.ok)
+#        res = response.json()
+#        self.assertEqual(res['node'] [0] ['netconf-node-topology:connection-status'],
+#                         'connected')
+
+    def test_02_restconfAPI(self):
+        url = ("{}/config/transportpce-portmapping:network/nodes/controller-config".format(self.restconf_baseurl))
+        headers = {'content-type': 'application/json'}
+        response = requests.request(
+            "GET", url, headers=headers, auth=('admin', 'admin'))
+        self.assertEqual(response.status_code, requests.codes.not_found)
+        res = response.json()
+        self.assertIn(
+            {"error-type":"application", "error-tag":"data-missing",
+             "error-message":"Request could not be completed because the relevant data model content does not exist "},
+            res['errors']['error'])
 
-    def test_01_connect_device(self):
+    def test_03_rdm_device_connected(self):
         url = ("{}/config/network-topology:"
                "network-topology/topology/topology-netconf/node/ROADMA"
               .format(self.restconf_baseurl))
@@ -83,7 +127,7 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.created)
         time.sleep(20)
 
-    def test_02_device_connected(self):
+    def test_04_rdm_device_connected(self):
         url = ("{}/operational/network-topology:"
                "network-topology/topology/topology-netconf/node/ROADMA"
                .format(self.restconf_baseurl))
@@ -97,36 +141,8 @@ class TransportPCEtesting(unittest.TestCase):
             'connected')
         time.sleep(10)
 
-    def test_03_portmapping_SRG1_PP3_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP3-TXRX"
-               .format(self.restconf_baseurl))
-        headers = {'content-type': 'application/json'}
-        response = requests.request(
-            "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        res = response.json()
-        self.assertIn(
-            {'supporting-port': 'C3', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP3-TXRX'},
-            res['mapping'])
-
-    def test_04_portmapping_SRG1_PP6_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP6-TXRX"
-               .format(self.restconf_baseurl))
-        headers = {'content-type': 'application/json'}
-        response = requests.request(
-            "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        res = response.json()
-        self.assertIn(
-            {'supporting-port': 'C6', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP6-TXRX'},
-            res['mapping'])
-
-    def test_05_portmapping_DEG1_TTP_TXRX(self):
-        url = ("{}/config/portmapping:network/"
+    def test_05_rdm_portmapping_DEG1_TTP_TXRX(self):
+        url = ("{}/config/transportpce-portmapping:network/"
                "nodes/ROADMA/mapping/DEG1-TTP-TXRX"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
@@ -139,9 +155,9 @@ class TransportPCEtesting(unittest.TestCase):
              'logical-connection-point': 'DEG1-TTP-TXRX'},
             res['mapping'])
 
-    def test_06_portmapping_SRG1_PP9_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP9-TXRX"
+    def test_06_rdm_portmapping_SRG1_PP7_TXRX(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/ROADMA/mapping/SRG1-PP7-TXRX"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
@@ -149,13 +165,13 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C9', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP9-TXRX'},
+            {'supporting-port': 'C7', 'supporting-circuit-pack-name': '4/0',
+             'logical-connection-point': 'SRG1-PP7-TXRX'},
             res['mapping'])
 
-    def test_07_portmapping_SRG1_PP16_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP16-TXRX"
+    def test_07_rdm_portmapping_SRG3_PP1_TXRX(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/ROADMA/mapping/SRG3-PP1-TXRX"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
@@ -163,55 +179,60 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C16', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP16-TXRX'},
+            {'supporting-port': 'C1', 'supporting-circuit-pack-name': '5/0',
+             'logical-connection-point': 'SRG3-PP1-TXRX'},
             res['mapping'])
 
-    def test_08_portmapping_SRG1_PP4_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP4-TXRX"
-               .format(self.restconf_baseurl))
+    def test_08_xpdr_device_connected(self):
+        url = ("{}/config/network-topology:"
+               "network-topology/topology/topology-netconf/node/XPDRA"
+              .format(self.restconf_baseurl))
+        data = {"node": [{
+            "node-id": "XPDRA",
+            "netconf-node-topology:username": "admin",
+            "netconf-node-topology:password": "admin",
+            "netconf-node-topology:host": "127.0.0.1",
+            "netconf-node-topology:port": "17831",
+            "netconf-node-topology:tcp-only": "false",
+            "netconf-node-topology:pass-through": {}}]}
         headers = {'content-type': 'application/json'}
         response = requests.request(
-            "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        res = response.json()
-        self.assertIn(
-            {'supporting-port': 'C4', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP4-TXRX'},
-            res['mapping'])
+            "PUT", url, data=json.dumps(data), headers=headers,
+            auth=('admin', 'admin'))
+        self.assertEqual(response.status_code, requests.codes.created)
+        time.sleep(20)
 
-    def test_09_portmapping_SRG1_PP2_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP2-TXRX"
+    def test_09_xpdr_device_connected(self):
+        url = ("{}/operational/network-topology:"
+               "network-topology/topology/topology-netconf/node/XPDRA"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertIn(
-            {'supporting-port': 'C2', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP2-TXRX'},
-            res['mapping'])
+        self.assertEqual(
+            res['node'][0]['netconf-node-topology:connection-status'],
+            'connected')
+        time.sleep(10)
 
-    def test_10_portmapping_SRG1_PP14_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP14-TXRX"
-              .format(self.restconf_baseurl))
+    def test_10_xpdr_portmapping_NETWORK1(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/XPDRA/mapping/XPDR1-NETWORK1"
+               .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C14', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP14-TXRX'},
+            {'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
+             'logical-connection-point': 'XPDR1-NETWORK1'},
             res['mapping'])
 
-    def test_11_portmapping_SRG1_PP11_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP11-TXRX"
+    def test_11_xpdr_portmapping_NETWORK2(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/XPDRA/mapping/XPDR1-NETWORK2"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
@@ -219,13 +240,13 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C11', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP11-TXRX'},
+            {'supporting-port': '2', 'supporting-circuit-pack-name': '1/0/2-PLUG-NET',
+             'logical-connection-point': 'XPDR1-NETWORK2'},
             res['mapping'])
 
-    def test_12_portmapping_SRG1_PP7_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP7-TXRX"
+    def test_12_xpdr_portmapping_CLIENT1(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/XPDRA/mapping/XPDR1-CLIENT1"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
@@ -233,13 +254,14 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C7', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP7-TXRX'},
+            {'supporting-port': 'C1',
+             'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT',
+             'logical-connection-point': 'XPDR1-CLIENT1'},
             res['mapping'])
 
-    def test_13_portmapping_DEG2_TTP_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/DEG2-TTP-TXRX"
+    def test_13_xpdr_portmapping_CLIENT2(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/XPDRA/mapping/XPDR1-CLIENT2"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
@@ -247,13 +269,14 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'L1', 'supporting-circuit-pack-name': '3/0',
-             'logical-connection-point': 'DEG2-TTP-TXRX'},
+            {'supporting-port': 'C2',
+                 'supporting-circuit-pack-name': '1/0/C2-PLUG-CLIENT',
+                 'logical-connection-point': 'XPDR1-CLIENT2'},
             res['mapping'])
 
-    def test_14_portmapping_DEG2_TTP_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/DEG2-TTP-TXRX"
+    def test_14_xpdr_portmapping_CLIENT4(self):
+        url = ("{}/config/transportpce-portmapping:network/"
+               "nodes/XPDRA/mapping/XPDR1-CLIENT4"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
@@ -261,169 +284,81 @@ class TransportPCEtesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'L1', 'supporting-circuit-pack-name': '3/0',
-             'logical-connection-point': 'DEG2-TTP-TXRX'},
+            {'supporting-port': 'C4',
+             'supporting-circuit-pack-name': '1/0/C4-PLUG-CLIENT',
+             'logical-connection-point': 'XPDR1-CLIENT4'},
             res['mapping'])
 
-    def test_15_portmapping_SRG1_PP12_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP12-TXRX"
+    def test_15_xpdr_device_disconnected(self):
+        url = ("{}/config/network-topology:"
+                "network-topology/topology/topology-netconf/node/XPDRA"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
-            "GET", url, headers=headers, auth=('admin', 'admin'))
+             "DELETE", url, headers=headers,
+             auth=('admin', 'admin'))
         self.assertEqual(response.status_code, requests.codes.ok)
-        res = response.json()
-        self.assertIn(
-            {'supporting-port': 'C12', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP12-TXRX'},
-            res['mapping'])
+        time.sleep(20)
 
-    def test_16_portmapping_SRG1_PP8_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP8-TXRX"
-               .format(self.restconf_baseurl))
+    def test_16_xpdr_device_disconnected(self):
+        url = ("{}/operational/network-topology:network-topology/topology/"
+               "topology-netconf/node/XPDRA".format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
+        self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C8', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP8-TXRX'},
-            res['mapping'])
+            {"error-type":"application", "error-tag":"data-missing",
+             "error-message":"Request could not be completed because the relevant data model content does not exist "},
+            res['errors']['error'])
 
-    def test_17_portmapping_SRG1_PP5_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP5-TXRX"
-               .format(self.restconf_baseurl))
+    def test_17_xpdr_device_disconnected(self):
+        url = ("{}/config/transportpce-portmapping:network/nodes/XPDRA".format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
+        self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C5', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP5-TXRX'},
-            res['mapping'])
+            {"error-type":"application", "error-tag":"data-missing",
+             "error-message":"Request could not be completed because the relevant data model content does not exist "},
+            res['errors']['error'])
 
-    def test_18_portmapping_SRG1_PP13_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP13-TXRX"
+    def test_18_rdm_device_disconnected(self):
+        url = ("{}/config/network-topology:network-topology/topology/topology-netconf/node/ROADMA"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
-            "GET", url, headers=headers, auth=('admin', 'admin'))
+             "DELETE", url, headers=headers,
+             auth=('admin', 'admin'))
         self.assertEqual(response.status_code, requests.codes.ok)
-        res = response.json()
-        self.assertIn(
-            {'supporting-port': 'C13', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP13-TXRX'},
-            res['mapping'])
+        time.sleep(20)
 
-    def test_19_portmapping_SRG1_PP15_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP15-TXRX"
+    def test_19_rdm_device_disconnected(self):
+        url = ("{}/operational/network-topology:network-topology/topology/topology-netconf/node/ROADMA"
                .format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
+        self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C15', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP15-TXRX'},
-            res['mapping'])
+            {"error-type":"application", "error-tag":"data-missing",
+             "error-message":"Request could not be completed because the relevant data model content does not exist "},
+            res['errors']['error'])
 
-    def test_20_portmapping_SRG1_PP10_TXRX(self):
-        url = ("{}/config/portmapping:network/"
-               "nodes/ROADMA/mapping/SRG1-PP10-TXRX"
-               .format(self.restconf_baseurl))
+    def test_20_rdm_device_disconnected(self):
+        url = ("{}/config/transportpce-portmapping:network/nodes/ROADMA".format(self.restconf_baseurl))
         headers = {'content-type': 'application/json'}
         response = requests.request(
             "GET", url, headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
+        self.assertEqual(response.status_code, requests.codes.not_found)
         res = response.json()
         self.assertIn(
-            {'supporting-port': 'C10', 'supporting-circuit-pack-name': '4/0',
-             'logical-connection-point': 'SRG1-PP10-TXRX'},
-            res['mapping'])
-
-    def test_21_cross_connection_DEG1_TTP_TXRX_SRG1_PP3_TXRX(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
-        data = {"renderer:input": {
-            "renderer:service-name": "service_32",
-            "renderer:wave-number": "32",
-            "renderer:operation": "create",
-            "renderer:nodes": [
-                {"renderer:node-id": "ROADMA",
-                 "renderer:src-tp": "DEG1-TTP-TXRX",
-                 "renderer:dest-tp": "SRG1-PP3-TXRX"}]}}
-        headers = {'content-type': 'application/json'}
-        response = requests.request(
-            "POST", url, data=json.dumps(data),
-            headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        self.assertEqual(response.json(), {
-            'output': {
-                'result':
-                'Roadm-connection successfully created for nodes [ROADMA]'}})
-
-    def test_22_cross_connection_SRG1_PP3_TXRX_DEG1_TTP_TXRX(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
-        data = {"renderer:input": {
-            "renderer:service-name": "service_32",
-            "renderer:wave-number": "32",
-            "renderer:operation": "create",
-            "renderer:nodes": [
-                {"renderer:node-id": "ROADMA",
-                 "renderer:src-tp": "SRG1-PP3-TXRX",
-                 "renderer:dest-tp": "DEG1-TTP-TXRX"}]}}
-        headers = {'content-type': 'application/json'}
-        response = requests.request(
-            "POST", url, data=json.dumps(data),
-            headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        self.assertEqual(response.json(), {
-            'output': {
-                'result':
-                'Roadm-connection successfully created for nodes [ROADMA]'}})
-
-    def test_23_delete_DEG1_TTP_TXRX_SRG1_PP3_TXRX(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
-        data = {"renderer:input": {
-            "renderer:service-name": "service_32",
-            "renderer:wave-number": "32",
-            "renderer:operation": "delete",
-            "renderer:nodes": [
-                {"renderer:node-id": "ROADMA",
-                 "renderer:src-tp": "DEG1-TTP-TXRX",
-                 "renderer:dest-tp": "SRG1-PP3-TXRX"}]}}
-        headers = {'content-type': 'application/json'}
-        response = requests.request(
-            "POST", url, data=json.dumps(data),
-            headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        self.assertEqual(response.json(), {
-            'output': {'result': 'Request processed'}})
-
-    def test_24_delete_SRG1_PP3_TXRX_DEG1_TTP_TXRX(self):
-        url = "{}/operations/renderer:service-path".format(self.restconf_baseurl)
-        data = {"renderer:input": {
-            "renderer:service-name": "service_32",
-            "renderer:wave-number": "32",
-            "renderer:operation": "delete",
-            "renderer:nodes": [
-                {"renderer:node-id": "ROADMA",
-                 "renderer:src-tp": "SRG1-PP3-TXRX",
-                 "renderer:dest-tp": "DEG1-TTP-TXRX"}]}}
-        headers = {'content-type': 'application/json'}
-        response = requests.request(
-            "POST", url, data=json.dumps(data),
-            headers=headers, auth=('admin', 'admin'))
-        self.assertEqual(response.status_code, requests.codes.ok)
-        self.assertEqual(response.json(), {
-            'output': {'result': 'Request processed'}})
+            {"error-type":"application", "error-tag":"data-missing",
+             "error-message":"Request could not be completed because the relevant data model content does not exist "},
+            res['errors']['error'])
 
 
 if __name__ == "__main__":