X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftransportpce_tests%2F2.2.1%2Ftest13_tapi_full_multi_layer.py;h=910ba2899952b88360e6c4e48cf9cb8857731f07;hb=db48b1e815c4f74a008f98f015fffe1bf0a052ca;hp=4c8d3c9b035edd43a4299d859d65641f36e0d1aa;hpb=88b66915d592d2f1602581bd6991b47b89673f71;p=transportpce.git diff --git a/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py b/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py index 4c8d3c9b0..910ba2899 100644 --- a/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py +++ b/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py @@ -174,16 +174,7 @@ class TransportPCEtesting(unittest.TestCase): res["output"]["result"]) time.sleep(2) - def test_07_connect_roadmA_PP1_to_spdrA_1_N1_tapi(self): - response = test_utils.connect_xpdr_to_rdm_tapi_request("SPDR-SA1-XPDR1", "XPDR1-NETWORK1", - "ROADM-A1", "SRG1-PP1-TXRX") - self.assertEqual(response.status_code, requests.codes.ok) - res = response.json() - self.assertIn('Link created in tapi topology', - res["output"]["result"]) - time.sleep(2) - - def test_08_connect_sprdC_1_N1_to_roadmC_PP1(self): + def test_07_connect_sprdC_1_N1_to_roadmC_PP1(self): response = test_utils.connect_xpdr_to_rdm_request("SPDR-SC1", "1", "1", "ROADM-C1", "1", "SRG1-PP1-TXRX") self.assertEqual(response.status_code, requests.codes.ok) @@ -192,7 +183,7 @@ class TransportPCEtesting(unittest.TestCase): res["output"]["result"]) time.sleep(2) - def test_09_connect_roadmC_PP1_to_spdrC_1_N1(self): + def test_08_connect_roadmC_PP1_to_spdrC_1_N1(self): response = test_utils.connect_rdm_to_xpdr_request("SPDR-SC1", "1", "1", "ROADM-C1", "1", "SRG1-PP1-TXRX") self.assertEqual(response.status_code, requests.codes.ok) @@ -201,16 +192,7 @@ class TransportPCEtesting(unittest.TestCase): res["output"]["result"]) time.sleep(2) - def test_10_connect_roadmC_PP1_to_spdrC_1_N1_tapi(self): - response = test_utils.connect_xpdr_to_rdm_tapi_request("SPDR-SC1-XPDR1", "XPDR1-NETWORK1", - "ROADM-C1", "SRG1-PP1-TXRX") - self.assertEqual(response.status_code, requests.codes.ok) - res = response.json() - self.assertIn('Link created in tapi topology', - res["output"]["result"]) - time.sleep(2) - - def test_11_add_omsAttributes_ROADMA_ROADMC(self): + def test_09_add_omsAttributes_ROADMA_ROADMC(self): # Config ROADMA-ROADMC oms-attributes data = {"span": { "auto-spanloss": "true", @@ -227,7 +209,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(response.status_code, requests.codes.created) time.sleep(2) - def test_12_add_omsAttributes_ROADMC_ROADMA(self): + def test_10_add_omsAttributes_ROADMC_ROADMA(self): # Config ROADMC-ROADMA oms-attributes data = {"span": { "auto-spanloss": "true", @@ -244,7 +226,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(response.status_code, requests.codes.created) time.sleep(2) - def test_13_check_otn_topology(self): + def test_11_check_otn_topology(self): response = test_utils.get_otn_topo_request() self.assertEqual(response.status_code, requests.codes.ok) res = response.json() @@ -253,7 +235,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertNotIn('ietf-network-topology:link', res['network'][0]) time.sleep(2) - def test_14_check_openroadm_topology(self): + def test_12_check_openroadm_topology(self): response = test_utils.get_ordm_topo_request("") self.assertEqual(response.status_code, requests.codes.ok) res = response.json() @@ -263,7 +245,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(nbLink, 22, 'There should be 22 openroadm links') time.sleep(2) - def test_15_get_tapi_topology_details(self): + def test_13_get_tapi_topology_details(self): response = test_utils.tapi_get_topology_details_request( "T0 - Full Multi-layer topology") time.sleep(2) @@ -275,7 +257,7 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(nbLink, 15, 'There should be 15 TAPI links') time.sleep(2) - def test_16_check_sip_details(self): + def test_14_check_sip_details(self): response = test_utils.tapi_get_sip_details_request() self.assertEqual(response.status_code, requests.codes.ok) res = response.json() @@ -284,7 +266,7 @@ class TransportPCEtesting(unittest.TestCase): time.sleep(2) # test create connectivity service from spdrA to spdrC for Photonic_media - def test_17_create_connectivity_service_PhotonicMedia(self): + def test_15_create_connectivity_service_PhotonicMedia(self): response = test_utils.tapi_create_connectivity_request(self.cr_serv_sample_data) time.sleep(self.WAITING) self.assertEqual(response.status_code, requests.codes.ok) @@ -314,7 +296,7 @@ class TransportPCEtesting(unittest.TestCase): # If the gate fails is because of the waiting time not being enough time.sleep(self.WAITING) - def test_18_get_service_PhotonicMedia(self): + def test_16_get_service_PhotonicMedia(self): response = test_utils.get_service_list_request( "services/" + str(self.uuid_services.pm)) self.assertEqual(response.status_code, requests.codes.ok) @@ -330,7 +312,7 @@ class TransportPCEtesting(unittest.TestCase): time.sleep(2) # test create connectivity service from spdrA to spdrC for odu - def test_19_create_connectivity_service_ODU(self): + def test_17_create_connectivity_service_ODU(self): # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["end-point"][0]["layer-protocol-name"] = "ODU" self.cr_serv_sample_data["input"]["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = "5efda776-f8de-3e0b-9bbd-2c702e210946" @@ -367,7 +349,7 @@ class TransportPCEtesting(unittest.TestCase): # If the gate fails is because of the waiting time not being enough time.sleep(self.WAITING) - def test_20_get_service_ODU(self): + def test_18_get_service_ODU(self): response = test_utils.get_service_list_request( "services/" + str(self.uuid_services.odu)) self.assertEqual(response.status_code, requests.codes.ok) @@ -383,7 +365,7 @@ class TransportPCEtesting(unittest.TestCase): time.sleep(2) # test create connectivity service from spdrA to spdrC for dsr - def test_21_create_connectivity_service_DSR(self): + def test_19_create_connectivity_service_DSR(self): # pylint: disable=line-too-long self.cr_serv_sample_data["input"]["end-point"][0]["layer-protocol-name"] = "DSR" self.cr_serv_sample_data["input"]["end-point"][0]["service-interface-point"]["service-interface-point-uuid"] = "c14797a0-adcc-3875-a1fe-df8949d1a2d7" @@ -424,7 +406,7 @@ class TransportPCEtesting(unittest.TestCase): # The sleep here is okey as the DSR service creation is very fast time.sleep(self.WAITING) - def test_22_get_service_DSR(self): + def test_20_get_service_DSR(self): response = test_utils.get_service_list_request( "services/" + str(self.uuid_services.dsr)) self.assertEqual(response.status_code, requests.codes.ok) @@ -439,7 +421,7 @@ class TransportPCEtesting(unittest.TestCase): res['services'][0]['lifecycle-state'], 'planned') time.sleep(2) - def test_23_get_connectivity_service_list(self): + def test_21_get_connectivity_service_list(self): response = test_utils.tapi_get_service_list_request() self.assertEqual(response.status_code, requests.codes.ok) res = response.json() @@ -449,37 +431,37 @@ class TransportPCEtesting(unittest.TestCase): self.assertEqual(ele['operational-state'], 'ENABLED') self.assertEqual(ele['service-layer'], 'PHOTONIC_MEDIA') nbconnection = len(ele['connection']) - self.assertEqual(nbconnection, 9, 'There should be 9 connections') + self.assertEqual(nbconnection, 3, 'There should be 3 connections') elif ele['uuid'] == self.uuid_services.odu: self.assertEqual(ele['operational-state'], 'ENABLED') self.assertEqual(ele['service-layer'], 'ODU') nbconnection = len(ele['connection']) - self.assertEqual(nbconnection, 1, 'There should be 3 connections') + self.assertEqual(nbconnection, 1, 'There should be 1 connections') elif ele['uuid'] == self.uuid_services.dsr: self.assertEqual(ele['operational-state'], 'ENABLED') self.assertEqual(ele['service-layer'], 'DSR') nbconnection = len(ele['connection']) - self.assertEqual(nbconnection, 4, 'There should be 4 connections') + self.assertEqual(nbconnection, 2, 'There should be 2 connections') else: self.fail("get connectivity service failed") time.sleep(2) - def test_24_delete_connectivity_service_DSR(self): + def test_22_delete_connectivity_service_DSR(self): response = test_utils.tapi_delete_connectivity_request(self.uuid_services.dsr) self.assertEqual(response.status_code, requests.codes.no_content) time.sleep(self.WAITING) - def test_25_delete_connectivity_service_ODU(self): + def test_23_delete_connectivity_service_ODU(self): response = test_utils.tapi_delete_connectivity_request(self.uuid_services.odu) self.assertEqual(response.status_code, requests.codes.no_content) time.sleep(self.WAITING) - def test_26_delete_connectivity_service_PhotonicMedia(self): + def test_24_delete_connectivity_service_PhotonicMedia(self): response = test_utils.tapi_delete_connectivity_request(self.uuid_services.pm) self.assertEqual(response.status_code, requests.codes.no_content) time.sleep(self.WAITING) - def test_27_get_no_tapi_services(self): + def test_25_get_no_tapi_services(self): response = test_utils.tapi_get_service_list_request() res = response.json() self.assertIn( @@ -489,7 +471,7 @@ class TransportPCEtesting(unittest.TestCase): res['errors']['error']) time.sleep(2) - def test_28_get_no_openroadm_services(self): + def test_26_get_no_openroadm_services(self): response = test_utils.get_service_list_request("") self.assertEqual(response.status_code, requests.codes.conflict) res = response.json() @@ -499,22 +481,22 @@ class TransportPCEtesting(unittest.TestCase): res['errors']['error']) time.sleep(2) - def test_29_disconnect_spdrA(self): + def test_27_disconnect_spdrA(self): response = test_utils.unmount_device("SPDR-SA1") self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) - def test_30_disconnect_spdrC(self): + def test_28_disconnect_spdrC(self): response = test_utils.unmount_device("SPDR-SC1") self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) - def test_31_disconnect_roadmA(self): + def test_29_disconnect_roadmA(self): response = test_utils.unmount_device("ROADM-A1") self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) - def test_32_disconnect_roadmC(self): + def test_30_disconnect_roadmC(self): response = test_utils.unmount_device("ROADM-C1") self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200)