test topoPortMapping adapted to Honeynode
[transportpce.git] / tests / transportpce_tests / test_end2end.py
index 9daaad5bdda67386ff98740d6e60fd28bf274470..ed5f0b5add0576c5a36a062e2096562ddd7f8441 100644 (file)
@@ -29,6 +29,8 @@ class TransportPCEFulltesting(unittest.TestCase):
     honeynode_process4 = None
     restconf_baseurl = "http://localhost:8181/restconf"
 
+#START_IGNORE_XTESTING
+
     @classmethod
     def __start_honeynode1(cls):
         executable = ("./honeynode/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
@@ -36,7 +38,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         if os.path.isfile(executable):
             with open('honeynode1.log', 'w') as outfile:
                 cls.honeynode_process1 = subprocess.Popen(
-                    [executable, "17830", "sample_configs/ord_2.1/oper-ROADMA-full.xml"],
+                    [executable, "17840", "sample_configs/openroadm/2.1/oper-ROADMA-full.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -46,7 +48,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         if os.path.isfile(executable):
             with open('honeynode2.log', 'w') as outfile:
                 cls.honeynode_process2 = subprocess.Popen(
-                    [executable, "17831", "sample_configs/ord_2.1/oper-XPDRA.xml"],
+                    [executable, "17831", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -56,7 +58,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         if os.path.isfile(executable):
             with open('honeynode3.log', 'w') as outfile:
                 cls.honeynode_process3 = subprocess.Popen(
-                    [executable, "17833", "sample_configs/ord_2.1/oper-ROADMC-full.xml"],
+                    [executable, "17843", "sample_configs/openroadm/2.1/oper-ROADMC-full.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -66,7 +68,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         if os.path.isfile(executable):
             with open('honeynode4.log', 'w') as outfile:
                 cls.honeynode_process4 = subprocess.Popen(
-                    [executable, "17834", "sample_configs/ord_2.1/oper-XPDRC.xml"],
+                    [executable, "17834", "sample_configs/openroadm/2.1/oper-XPDRC.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -127,6 +129,8 @@ class TransportPCEFulltesting(unittest.TestCase):
     def setUp(self):  # instruction executed before each test method
         print ("execution of {}".format(self.id().split(".")[-1]))
 
+#END_IGNORE_XTESTING
+
 #  connect netconf devices
     def test_01_connect_xpdrA(self):
         url = ("{}/config/network-topology:"
@@ -175,7 +179,7 @@ class TransportPCEFulltesting(unittest.TestCase):
              "netconf-node-topology:username": "admin",
              "netconf-node-topology:password": "admin",
              "netconf-node-topology:host": "127.0.0.1",
-             "netconf-node-topology:port": "17830",
+             "netconf-node-topology:port": "17840",
              "netconf-node-topology:tcp-only": "false",
              "netconf-node-topology:pass-through": {}}]}
         headers = {'content-type': 'application/json'}
@@ -194,7 +198,7 @@ class TransportPCEFulltesting(unittest.TestCase):
              "netconf-node-topology:username": "admin",
              "netconf-node-topology:password": "admin",
              "netconf-node-topology:host": "127.0.0.1",
-             "netconf-node-topology:port": "17833",
+             "netconf-node-topology:port": "17843",
              "netconf-node-topology:tcp-only": "false",
              "netconf-node-topology:pass-through": {}}]}
         headers = {'content-type': 'application/json'}
@@ -560,7 +564,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(5)
 
     def test_17_check_topo_XPDRA(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/XPDRA-XPDR1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/XPDRA-XPDR1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -579,7 +583,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(3)
 
     def test_18_check_topo_ROADMA_SRG1(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/ROADMA-SRG1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/ROADMA-SRG1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -595,7 +599,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(3)
 
     def test_19_check_topo_ROADMA_DEG1(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/ROADMA-DEG1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/ROADMA-DEG1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -755,7 +759,7 @@ class TransportPCEFulltesting(unittest.TestCase):
              res['roadm-connections'][0]['destination'])
 
     def test_23_check_topo_XPDRA(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/XPDRA-XPDR1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/XPDRA-XPDR1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -774,7 +778,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(10)
 
     def test_24_check_topo_ROADMA_SRG1(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/ROADMA-SRG1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/ROADMA-SRG1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -796,7 +800,7 @@ class TransportPCEFulltesting(unittest.TestCase):
 
 
     def test_25_check_topo_ROADMA_DEG1(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/ROADMA-DEG1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/ROADMA-DEG1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -1011,7 +1015,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(2)
 
     def test_31_check_topo_XPDRA(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/XPDRA-XPDR1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/XPDRA-XPDR1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -1026,7 +1030,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(10)
 
     def test_32_check_topo_ROADMA_SRG1(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/ROADMA-SRG1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/ROADMA-SRG1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))
@@ -1045,7 +1049,7 @@ class TransportPCEFulltesting(unittest.TestCase):
         time.sleep(10)
 
     def test_33_check_topo_ROADMA_DEG1(self):
-        url1 = ("{}/config/ietf-network:network/openroadm-topology/node/ROADMA-DEG1"
+        url1 = ("{}/config/ietf-network:networks/network/openroadm-topology/node/ROADMA-DEG1"
                .format(self.restconf_baseurl))
         response = requests.request(
              "GET", url1, auth=('admin', 'admin'))