def test_04_service_path_create_OCH_OTU4(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_test', 'wave-number': '7', 'modulation-format': 'dp-qpsk', 'operation': 'create', 'nodes': [{ "node-id": "SPDR-SA1", "dest-tp": "XPDR1-NETWORK1" }], 'center-freq': 196.1, 'nmc-width': 40, 'min-freq': 196.075, 'max-freq': 196.125, 'lower-spectral-slot-number': 761, 'higher-spectral-slot-number': 768 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Interfaces created successfully for nodes: ', response['output']['result']) self.assertTrue(response['output']['success']) self.assertIn( { 'node-id': 'SPDR-SA1', 'otu-interface-id': ['XPDR1-NETWORK1-OTU'], 'och-interface-id': ['XPDR1-NETWORK1-761:768'] }, response['output']['node-interface'])
def test_10_create_OTS_ROADMC(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'create-ots-oms', { 'node-id': 'ROADMC01', 'logical-connection-point': 'DEG2-TTP-TXRX' }) self.assertEqual(response['status_code'], requests.codes.ok)
def test_30_servicePath_delete_ZToA(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'test', 'wave-number': '1', 'modulation-format': 'dp-qpsk', 'operation': 'delete', 'nodes': [{'node-id': 'XPDR-C1', 'dest-tp': 'XPDR1-NETWORK1', 'src-tp': 'XPDR1-CLIENT1'}, {'node-id': 'ROADM-C1', 'dest-tp': 'DEG1-TTP-TXRX', 'src-tp': 'SRG1-PP1-TXRX'}, {'node-id': 'ROADM-A1', 'src-tp': 'DEG2-TTP-TXRX', 'dest-tp': 'SRG1-PP1-TXRX'}, {'node-id': 'XPDR-A1', 'src-tp': 'XPDR1-NETWORK1', 'dest-tp': 'XPDR1-CLIENT1'}], 'center-freq': 196.1, 'nmc-width': 40, 'min-freq': 196.075, 'max-freq': 196.125, 'lower-spectral-slot-number': 761, 'higher-spectral-slot-number': 768 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Request processed', response['output']['result']) time.sleep(10)
def test_16_otn_service_path_delete_10GE(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service1', 'operation': 'delete', 'service-rate': '10', 'service-format': 'Ethernet', 'nodes': [{ 'node-id': 'SPDR-SA1', 'client-tp': 'XPDR1-CLIENT4', 'network-tp': 'XPDR1-NETWORK1' }], 'ethernet-encoding': 'eth encode', 'trib-slot': ['1'], 'trib-port-number': '1' }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Request processed', response['output']['result']) self.assertTrue(response['output']['success'])
def test_26_service_power_turndown_XPDRA_XPDRC(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-olm', 'service-power-turndown', { 'service-name': 'test', 'wave-number': 1, 'nodes': [ { 'dest-tp': 'XPDR1-NETWORK1', 'src-tp': 'XPDR1-CLIENT1', 'node-id': 'XPDR-A1' }, { 'dest-tp': 'DEG2-TTP-TXRX', 'src-tp': 'SRG1-PP1-TXRX', 'node-id': 'ROADM-A1' }, { 'dest-tp': 'SRG1-PP1-TXRX', 'src-tp': 'DEG1-TTP-TXRX', 'node-id': 'ROADM-C1' }, { 'dest-tp': 'XPDR1-CLIENT1', 'src-tp': 'XPDR1-NETWORK1', 'node-id': 'XPDR-C1' } ], 'lower-spectral-slot-number': 761, 'higher-spectral-slot-number': 768 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Success', response['output']['result'])
def test_40_service_path_create_otuc4(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_OTUC4', 'wave-number': '0', 'modulation-format': 'dp-qam16', 'operation': 'create', 'nodes': [{ 'node-id': 'XPDR-A2', 'dest-tp': 'XPDR2-NETWORK1' }], 'center-freq': 196.1, 'nmc-width': 75, 'min-freq': 196.0375, 'max-freq': 196.125, 'lower-spectral-slot-number': 755, 'higher-spectral-slot-number': 768 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Interfaces created successfully for nodes: ', response['output']['result']) self.assertIn( { 'node-id': 'XPDR-A2', 'otu-interface-id': ['XPDR2-NETWORK1-OTUC4'], 'och-interface-id': ['XPDR2-NETWORK1-OTSIGROUP-400G'] }, response['output']['node-interface'])
def test_12_get_PM_ROADMC(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-olm', 'get-pm', { 'node-id': 'ROADMC01', 'resource-type': 'interface', 'granularity': '15min', 'resource-identifier': { 'resource-name': 'OTS-DEG2-TTP-TXRX' } }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn( { 'pmparameter-name': 'OpticalPowerOutput', 'pmparameter-value': '18.1' }, response['output']['measurements']) self.assertIn( { 'pmparameter-name': 'OpticalReturnLoss', 'pmparameter-value': '48.8' }, response['output']['measurements']) self.assertIn( { 'pmparameter-name': 'OpticalPowerInput', 'pmparameter-value': '-3.2' }, response['output']['measurements'])
def test_07_device_renderer(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'modulation-format': 'dp-qpsk', 'operation': 'create', 'service-name': 'testNMC-MC', 'wave-number': '0', 'center-freq': '196.05', 'nmc-width': '80', 'nodes': [{ 'node-id': 'ROADM-D1', 'src-tp': 'SRG1-PP1-TXRX', 'dest-tp': 'DEG1-TTP-TXRX' }], 'min-freq': 196.00625, 'max-freq': 196.09375, 'lower-spectral-slot-number': 749, 'higher-spectral-slot-number': 763 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Interfaces created successfully for nodes: ', response['output']['result']) time.sleep(10)
def test_38_calculate_span_loss_current(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-olm', 'calculate-spanloss-current', None) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Success', response["output"]["result"]) time.sleep(5)
def test_06_connect_roadmA_to_xpdrA(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-networkutils', 'init-rdm-xpdr-links', { 'links-input': { 'xpdr-node': 'XPDRA01', 'xpdr-num': '1', 'network-num': '1', 'rdm-node': 'ROADMA01', 'srg-num': '1', 'termination-point-num': 'SRG1-PP1-TXRX' } }) self.assertEqual(response['status_code'], requests.codes.ok)
def test_34_otn_service_path_delete_oduc3(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_ODUC3', 'operation': 'delete', 'service-rate': '300', 'service-format': 'ODU', 'nodes': [{ 'node-id': 'XPDR-A2', 'network-tp': 'XPDR2-NETWORK1' }] }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Request processed', response['output']['result']) del self.NETWORK2_CHECK_DICT["supporting-oducn"]
def test_13_calculate_span_loss_base_ROADMA_ROADMC(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-olm', 'calculate-spanloss-base', { 'src-type': 'link', 'link-id': 'ROADM-A1-DEG2-DEG2-TTP-TXRXtoROADM-C1-DEG1-DEG1-TTP-TXRX' }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Success', response['output']['result']) self.assertIn({ 'spanloss': '17.6', 'link-id': 'ROADM-A1-DEG2-DEG2-TTP-TXRXtoROADM-C1-DEG1-DEG1-TTP-TXRX' }, response['output']['spans']) time.sleep(5)
def test_21_otn_service_path_delete_ODU4(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_ODU4', 'operation': 'delete', 'service-rate': '100', 'service-format': 'ODU', 'nodes': [{ 'node-id': 'SPDR-SA1', 'network-tp': 'XPDR1-NETWORK1' }] }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Request processed', response['output']['result']) self.assertTrue(response['output']['success'])
def test_05_service_path_create(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_test', 'wave-number': '7', 'modulation-format': 'dp-qpsk', 'operation': 'create', 'nodes': [{'node-id': 'ROADMA01', 'src-tp': 'SRG1-PP7-TXRX', 'dest-tp': 'DEG1-TTP-TXRX'}, {'node-id': 'XPDRA01', 'src-tp': 'XPDR1-CLIENT1', 'dest-tp': 'XPDR1-NETWORK1'}], 'center-freq': 195.8, 'nmc-width': 40, 'min-freq': 195.775, 'max-freq': 195.825, 'lower-spectral-slot-number': 713, 'higher-spectral-slot-number': 720 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Interfaces created successfully for nodes: ROADMA01', response['output']['result'])
def test_11_otn_service_path_create_10GE(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service1', 'operation': 'create', 'service-rate': '10', 'service-format': 'Ethernet', 'nodes': [{ 'node-id': 'SPDR-SA1', 'client-tp': 'XPDR1-CLIENT4', 'network-tp': 'XPDR1-NETWORK1' }], 'ethernet-encoding': 'eth encode', 'trib-slot': ['1'], 'trib-port-number': '1' }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn( 'Otn Service path was set up successfully for node :SPDR-SA1', response['output']['result']) self.assertTrue(response['output']['success']) self.assertEqual('SPDR-SA1', response['output']['node-interface'][0]['node-id']) self.assertIn( 'XPDR1-CLIENT4-ODU2e-service1-x-XPDR1-NETWORK1-ODU2e-service1', response['output']['node-interface'][0]['connection-id']) self.assertIn( 'XPDR1-CLIENT4-ETHERNET10G', response['output']['node-interface'][0]['eth-interface-id']) self.assertIn( 'XPDR1-NETWORK1-ODU2e-service1', response['output']['node-interface'][0]['odu-interface-id']) self.assertIn( 'XPDR1-CLIENT4-ODU2e-service1', response['output']['node-interface'][0]['odu-interface-id'])
def test_45_otn_service_path_create_oduc3(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_ODUC4', 'operation': 'create', 'service-rate': '400', 'service-format': 'ODU', 'nodes': [{ 'node-id': 'XPDR-A2', 'network-tp': 'XPDR2-NETWORK1' }] }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn( 'Otn Service path was set up successfully for node :XPDR-A2', response['output']['result']) self.assertIn( { 'node-id': 'XPDR-A2', 'odu-interface-id': ['XPDR2-NETWORK1-ODUC4'] }, response['output']['node-interface'])
def test_36_service_path_delete_otuc3(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'service_OTUC3', 'wave-number': '0', 'modulation-format': 'dp-qam8', 'operation': 'delete', 'nodes': [{ 'node-id': 'XPDR-A2', 'dest-tp': 'XPDR2-NETWORK1' }], 'center-freq': 196.1, 'nmc-width': 75, 'min-freq': 196.0375, 'max-freq': 196.125, 'lower-spectral-slot-number': 755, 'higher-spectral-slot-number': 768 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Request processed', response['output']['result']) del self.NETWORK2_CHECK_DICT["supporting-otucn"]
def test_23_service_power_setup_XPDRC_XPDRA(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-olm', 'service-power-setup', { 'service-name': 'test', 'wave-number': 1, 'nodes': [{ 'dest-tp': 'XPDR1-NETWORK1', 'src-tp': 'XPDR1-CLIENT1', 'node-id': 'XPDRC01' }, { 'dest-tp': 'DEG2-TTP-TXRX', 'src-tp': 'SRG1-PP1-TXRX', 'node-id': 'ROADMC01' }, { 'src-tp': 'DEG1-TTP-TXRX', 'dest-tp': 'SRG1-PP1-TXRX', 'node-id': 'ROADMA01' }, { 'src-tp': 'XPDR1-NETWORK1', 'dest-tp': 'XPDR1-CLIENT1', 'node-id': 'XPDRA01' }], 'center-freq': 196.1, 'nmc-width': 40, 'min-freq': 196.075, 'max-freq': 196.125, 'lower-spectral-slot-number': 761, 'higher-spectral-slot-number': 768 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Success', response['output']['result'])
def test_10_otn_service_path_create_100ge(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'otn-service-path', { 'service-name': 'service_Ethernet', 'operation': 'create', 'service-rate': '100', 'service-format': 'Ethernet', 'nodes': [{ 'node-id': 'XPDR-A2', 'client-tp': 'XPDR2-CLIENT1', 'network-tp': 'XPDR2-NETWORK1' }], 'ethernet-encoding': 'eth encode', 'opucn-trib-slots': ['1.1', '1.20'] }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn( 'Otn Service path was set up successfully for node :XPDR-A2', response['output']['result']) self.assertEqual('XPDR-A2', response['output']['node-interface'][0]['node-id']) self.assertIn( 'XPDR2-CLIENT1-ODU4-service_Ethernet-x-XPDR2-NETWORK1-ODU4-service_Ethernet', response['output']['node-interface'][0]['connection-id']) self.assertIn( 'XPDR2-CLIENT1-ETHERNET-100G', response['output']['node-interface'][0]['eth-interface-id']) self.assertIn( 'XPDR2-NETWORK1-ODU4-service_Ethernet', response['output']['node-interface'][0]['odu-interface-id']) self.assertIn( 'XPDR2-CLIENT1-ODU4-service_Ethernet', response['output']['node-interface'][0]['odu-interface-id'])
def test_33_servicePath_create_AToZ(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-device-renderer', 'service-path', { 'service-name': 'test2', 'wave-number': '2', 'modulation-format': 'dp-qpsk', 'operation': 'create', 'nodes': [{'node-id': 'XPDR-A1', 'dest-tp': 'XPDR1-NETWORK2', 'src-tp': 'XPDR1-CLIENT2'}, {'node-id': 'ROADM-A1', 'dest-tp': 'DEG2-TTP-TXRX', 'src-tp': 'SRG1-PP2-TXRX'}], 'center-freq': 196.1, 'nmc-width': 40, 'min-freq': 196.075, 'max-freq': 196.125, 'lower-spectral-slot-number': 753, 'higher-spectral-slot-number': 760 }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn('Interfaces created successfully for nodes', response['output']['result']) time.sleep(10)
def test_03_service_create_OTU4(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-renderer', 'service-implementation-request', { 'service-name': 'SPDRA-SPDRC-OTU4-ODU4', 'connection-type': 'infrastructure', 'service-handler-header': { 'request-id': 'abcd12-efgh34' }, 'service-a-end': { 'service-format': 'OTU', 'otu-service-rate': 'org-openroadm-otn-common-types:OTU4', 'clli': 'nodeSA', 'node-id': 'SPDR-SA1' }, 'service-z-end': { 'service-format': 'OTU', 'otu-service-rate': 'org-openroadm-otn-common-types:OTU4', 'clli': 'nodeSC', 'node-id': 'SPDR-SC1' }, 'path-description': { 'aToZ-direction': { 'rate': 100, 'modulation-format': 'dp-qpsk', 'aToZ-wavelength-number': 1, 'aToZ': [{ 'id': '0', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': '' } }, { 'id': '1', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '2', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '3', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': '' } }], 'aToZ-min-frequency': 196.075, 'aToZ-max-frequency': 196.125 }, 'zToA-direction': { 'zToA-wavelength-number': '1', 'rate': '100', 'modulation-format': 'dp-qpsk', 'zToA': [{ 'id': '0', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': '' } }, { 'id': '1', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '2', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '3', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': '' } }], 'zToA-min-frequency': 196.075, 'zToA-max-frequency': 196.125 } } }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn( 'Operation Successful', response['output'] ['configuration-response-common']['response-message'])
def test_11_service_create_10GE(self): response = test_utils_rfc8040.transportpce_api_rpc_request( 'transportpce-renderer', 'service-implementation-request', { 'service-name': 'SPDRA-SPDRC-10G', 'connection-type': 'service', 'service-handler-header': { 'request-id': 'abcd12-efgh34' }, 'service-a-end': { 'service-format': 'Ethernet', 'service-rate': '10', 'clli': 'nodeSA', 'node-id': 'SPDR-SA1' }, 'service-z-end': { 'service-format': 'Ethernet', 'service-rate': '10', 'clli': 'nodeSC', 'node-id': 'SPDR-SC1' }, 'path-description': { 'aToZ-direction': { 'rate': 10, 'min-trib-slot': '1.1', 'max-trib-slot': '1.8', 'aToZ': [{ 'id': '0', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': 'XPDR1-CLIENT1' } }, { 'id': '1', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '2', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '3', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': 'XPDR1-CLIENT1' } }] }, 'zToA-direction': { 'rate': '10', 'min-trib-slot': '1.1', 'max-trib-slot': '1.8', 'zToA': [{ 'id': '0', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': 'XPDR1-CLIENT1' } }, { 'id': '1', 'resource': { 'tp-node-id': 'SPDR-SC1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '2', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': 'XPDR1-NETWORK1' } }, { 'id': '3', 'resource': { 'tp-node-id': 'SPDR-SA1-XPDR1', 'tp-id': 'XPDR1-CLIENT1' } }] } } }) self.assertEqual(response['status_code'], requests.codes.ok) self.assertIn( 'Operation Successful', response['output'] ['configuration-response-common']['response-message'])