def test_23_service_path_delete_OCH_OTU4(self): response = test_utils.service_path_request( "delete", "service_OCH_OTU4", "1", [{ "node-id": "SPDR-SA1", "dest-tp": "XPDR1-NETWORK1" }], 196.1, 40, 196.075, 196.125, 761, 768) time.sleep(3) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertIn('Request processed', res["output"]["result"]) self.assertTrue(res["output"]["success"])
def test_35_servicePath_delete_AToZ(self): response = test_utils.service_path_request("delete", "test", "1", [{"node-id": "XPDRA01", "dest-tp": "XPDR1-NETWORK2", "src-tp": "XPDR1-CLIENT2"}, {"node-id": "ROADMA01", "dest-tp": "DEG1-TTP-TXRX", "src-tp": "SRG1-PP2-TXRX"}], 196.1, 40, 196.075, 196.125, 761, 768) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertIn('Request processed', res["output"]["result"]) time.sleep(10)
def test_33_servicePath_create_AToZ(self): response = test_utils.service_path_request("create", "test2", "2", [{"node-id": "XPDRA01", "dest-tp": "XPDR1-NETWORK2", "src-tp": "XPDR1-CLIENT2"}, {"node-id": "ROADMA01", "dest-tp": "DEG1-TTP-TXRX", "src-tp": "SRG1-PP2-TXRX"}], 196.05, 40, 196.025, 196.075, 753, 760) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"]) # time.sleep(40) time.sleep(10)
def test_05_service_path_create(self): response = test_utils.service_path_request( "create", "service_test", "7", [{ "renderer:node-id": "ROADM-A1", "renderer:src-tp": "SRG1-PP3-TXRX", "renderer:dest-tp": "DEG1-TTP-TXRX" }, { "renderer:node-id": "XPDR-A1", "renderer:src-tp": "XPDR1-CLIENT1", "renderer:dest-tp": "XPDR1-NETWORK1" }], 195.8, 40, 195.775, 195.825, 713, 720) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertIn( 'Roadm-connection successfully created for nodes: ROADM-A1', res["output"]["result"])
def test_04_service_path_create_OCH_OTU4(self): response = test_utils.service_path_request( "create", "service_OCH_OTU4", "1", [{ "node-id": "SPDR-SA1", "dest-tp": "XPDR1-NETWORK1" }], 196.1, 40, 196.075, 196.125, 761, 768) time.sleep(3) self.assertEqual(response.status_code, requests.codes.ok) res = response.json() self.assertIn('Roadm-connection successfully created for nodes: ', res["output"]["result"]) self.assertTrue(res["output"]["success"]) self.assertIn( { 'node-id': 'SPDR-SA1', 'otu-interface-id': ['XPDR1-NETWORK1-OTU'], 'och-interface-id': ['XPDR1-NETWORK1-761:768'] }, res["output"]['node-interface'])
def test_14_service_path_delete(self): response = test_utils.service_path_request( "delete", "service_test", "7", [{ "renderer:node-id": "ROADMA01", "renderer:src-tp": "SRG1-PP7-TXRX", "renderer:dest-tp": "DEG1-TTP-TXRX" }, { "renderer:node-id": "XPDRA01", "renderer:src-tp": "XPDR1-CLIENT1", "renderer:dest-tp": "XPDR1-NETWORK1" }], 195.8, 40, 195.775, 195.825, 713, 720) self.assertEqual(response.status_code, requests.codes.ok) self.assertEqual( response.json(), {'output': { 'result': 'Request processed', 'success': True }})