def test_10_check_interface_ODU4(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SC1", "interface", "XPDR1-NETWORK1-ODU4") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR1-NETWORK1-ODU4', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-CFP0', 'supporting-interface': 'XPDR1-NETWORK1-OTU', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'CP1-CFP0-P1' } # SAPI/DAPI are added in the Otu4 renderer input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP', 'rate': 'org-openroadm-otn-common-types:ODU4', 'tx-sapi': 'AMf1n5hK6Xkk', 'tx-dapi': 'H/OelLynehI=', 'expected-sapi': 'H/OelLynehI=', 'expected-dapi': 'AMf1n5hK6Xkk' } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu'], **input_dict_2), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual({ 'payload-type': '21', 'exp-payload-type': '21' }, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['opu'])
def test_06_check_interface_och(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SC1", "interface", "XPDR1-NETWORK1-761:768") self.assertEqual(response['status_code'], requests.codes.ok) self.assertDictEqual( dict( { 'name': 'XPDR1-NETWORK1-1', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-CFP0', 'type': 'org-openroadm-interfaces:opticalChannel', 'supporting-port': 'CP1-CFP0-P1' }, **response['interface'][0]), response['interface'][0]) self.assertIn( response['interface'][0] ['org-openroadm-optical-channel-interfaces:och'], [{ 'frequency': '196.1000', 'rate': 'org-openroadm-common-types:R100G', 'transmit-power': '-5', 'modulation-format': 'dp-qpsk' }, { 'frequency': 196.1, 'rate': 'org-openroadm-common-types:R100G', 'transmit-power': -5, 'modulation-format': 'dp-qpsk' }])
def test_07_check_interface_OTU(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SC1", "interface", "XPDR1-NETWORK1-OTU") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR1-NETWORK1-OTU', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-CFP0', 'supporting-interface': 'XPDR1-NETWORK1-1', 'type': 'org-openroadm-interfaces:otnOtu', 'supporting-port': 'CP1-CFP0-P1' } input_dict_2 = { 'tx-dapi': 'H/OelLynehI=', 'expected-sapi': 'H/OelLynehI=', 'tx-sapi': 'AMf1n5hK6Xkk', 'expected-dapi': 'AMf1n5hK6Xkk', 'rate': 'org-openroadm-otn-common-types:OTU4', 'fec': 'scfec' } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-otu-interfaces:otu']), response['interface'][0]['org-openroadm-otn-otu-interfaces:otu'])
def test_10_check_interface_ODU4(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SA1", "interface", "XPDR1-NETWORK1-ODU4") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR1-NETWORK1-ODU4', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-CFP0', 'supporting-interface': 'XPDR1-NETWORK1-OTU', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'CP1-CFP0-P1' } input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP', 'rate': 'org-openroadm-otn-common-types:ODU4' } self.assertDictEqual(dict(response['interface'][0], **input_dict_1), response['interface'][0]) self.assertDictEqual( dict( response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu'], **input_dict_2), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual({ 'payload-type': '21', 'exp-payload-type': '21' }, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['opu'])
def test_12_check_interface_odu4_client(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-CLIENT1-ODU4-service_Ethernet") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-CLIENT1-ODU4-service_Ethernet', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT', 'supporting-interface-list': 'XPDR2-CLIENT1-ETHERNET-100G', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'C1' } input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP-CTP', 'rate': 'org-openroadm-otn-common-types:ODU4', 'monitoring-mode': 'terminated' } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual({ 'payload-type': '07', 'exp-payload-type': '07' }, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['opu'])
def test_13_service_path_create_xpdr_check(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A1", "interface", "XPDR1-NETWORK1-ODU4") self.assertEqual(response['status_code'], requests.codes.ok) # the 2 following statements replace self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict( { 'name': 'XPDR1-NETWORK1-ODU4', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': '1', 'supporting-interface': 'XPDR1-NETWORK1-OTU' }, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( { 'rate': 'org-openroadm-otn-common-types:ODU4', 'monitoring-mode': 'terminated' }, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual({ 'exp-payload-type': '07', 'payload-type': '07' }, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['opu'])
def test_07_check_interface_OTU(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SA1", "interface", "XPDR1-NETWORK1-OTU") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR1-NETWORK1-OTU', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-CFP0', 'supporting-interface': 'XPDR1-NETWORK1-761:768', 'type': 'org-openroadm-interfaces:otnOtu', 'supporting-port': 'CP1-CFP0-P1' } input_dict_2 = { 'rate': 'org-openroadm-otn-common-types:OTU4', 'fec': 'scfec' } self.assertDictEqual(dict(response['interface'][0], **input_dict_1), response['interface'][0]) self.assertDictEqual( dict( response['interface'][0] ['org-openroadm-otn-otu-interfaces:otu'], **input_dict_2), response['interface'][0]['org-openroadm-otn-otu-interfaces:otu'])
def test_08_service_path_create_rdm_check(self): response = test_utils_rfc8040.check_node_attribute_request( "ROADM-A1", "interface", "SRG1-PP3-TXRX-nmc-713:720") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict( { 'name': 'SRG1-PP3-TXRX-nmc-713:720', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '3/0', 'type': 'org-openroadm-interfaces:networkMediaChannelConnectionTerminationPoint', 'supporting-port': 'C3' }, **response['interface'][0]), response['interface'][0]) self.assertIn( response['interface'][0] ['org-openroadm-network-media-channel-interfaces:nmc-ctp'], [{ 'frequency': '195.8000', 'width': '40' }, { 'frequency': 195.8, 'width': 40 }])
def test_11_service_path_create_xpdr_check(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A1", "interface", "XPDR1-NETWORK1-713:720") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict( { 'name': 'XPDR1-NETWORK1-713:720', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'type': 'org-openroadm-interfaces:opticalChannel', 'supporting-port': '1' }, **response['interface'][0]), response['interface'][0]) self.assertIn( response['interface'][0] ['org-openroadm-optical-channel-interfaces:och'], [{ 'rate': 'org-openroadm-common-types:R100G', 'transmit-power': '-5', 'modulation-format': 'dp-qpsk', 'frequency': '195.8000' }, { 'rate': 'org-openroadm-common-types:R100G', 'transmit-power': -5, 'modulation-format': 'dp-qpsk', 'frequency': 195.8 }])
def test_07_service_path_create_rdm_check(self): response = test_utils_rfc8040.check_node_attribute_request( "ROADM-A1", "interface", "DEG1-TTP-TXRX-mc-713:720") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict( { 'name': 'DEG1-TTP-TXRX-mc-7', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/0', 'type': 'org-openroadm-interfaces:mediaChannelTrailTerminationPoint', 'supporting-port': 'L1' }, **response['interface'][0]), response['interface'][0]) self.assertIn( response['interface'][0] ['org-openroadm-media-channel-interfaces:mc-ttp'], [{ 'min-freq': '195.7750', 'max-freq': '195.8250' }, { 'min-freq': 195.775, 'max-freq': 195.825 }])
def test_08_degree_mc_interface(self): response = test_utils_rfc8040.check_node_attribute_request( "ROADM-D1", "interface", "DEG1-TTP-TXRX-mc-749:763") self.assertEqual(response['status_code'], requests.codes.ok) self.assertDictEqual( dict( { "name": "DEG1-TTP-TXRX-mc-749:763", "supporting-interface": "OMS-DEG1-TTP-TXRX", "supporting-circuit-pack-name": "1/0", "circuit-id": "TBD", "description": "TBD", "supporting-port": "L1", "type": "org-openroadm-interfaces:mediaChannelTrailTerminationPoint" }, **response['interface'][0]), response['interface'][0]) # Check the mc-ttp max and min-freq self.assertIn( response['interface'][0] ['org-openroadm-media-channel-interfaces:mc-ttp'], [{ 'min-freq': '196.00625', 'max-freq': '196.09375' }, { 'min-freq': 196.00625, 'max-freq': 196.09375 }]) time.sleep(3)
def test_10_srg_nmc_interface(self): response = test_utils_rfc8040.check_node_attribute_request( "ROADM-D1", "interface", "SRG1-PP1-TXRX-nmc-749:763") self.assertEqual(response['status_code'], requests.codes.ok) self.assertEqual( dict( { "name": "SRG1-PP1-TXRX-nmc-749:763", "supporting-circuit-pack-name": "3/0", "circuit-id": "TBD", "description": "TBD", "supporting-port": "C1", "type": "org-openroadm-interfaces:networkMediaChannelConnectionTerminationPoint" }, **response['interface'][0]), response['interface'][0]) self.assertIn( response['interface'][0] ['org-openroadm-network-media-channel-interfaces:nmc-ctp'], [{ 'frequency': '196.05000', 'width': '80' }, { 'frequency': 196.05, 'width': 80 }]) time.sleep(3)
def test_16_check_interface_ODU2E_NETWORK(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SC1", "interface", "XPDR1-NETWORK1-ODU2e-SPDRA-SPDRC-10G") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR1-NETWORK1-ODU2e-SPDRA-SPDRC-10G', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-CFP0', 'supporting-interface': 'XPDR1-NETWORK1-ODU4', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'CP1-CFP0-P1' } input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-CTP', 'rate': 'org-openroadm-otn-common-types:ODU2e', 'monitoring-mode': 'monitored' } input_dict_3 = {'trib-port-number': 1} self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual( dict( input_dict_3, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu'] ['parent-odu-allocation']), response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']['parent-odu-allocation']) self.assertIn( 1, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['parent-odu-allocation']['trib-slots'])
def test_44_check_interface_otuc4(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTUC4") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-NETWORK1-OTUC4', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', ['supporting-interface-list'][0]: 'XPDR2-NETWORK1-OTSIGROUP-400G', 'type': 'org-openroadm-interfaces:otnOtu', 'supporting-port': 'L1' } input_dict_2 = { "rate": "org-openroadm-otn-common-types:OTUCn", "degthr-percentage": 100, "tim-detect-mode": "Disabled", "otucn-n-rate": 4, "degm-intervals": 2 } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-otu-interfaces:otu']), response['interface'][0]['org-openroadm-otn-otu-interfaces:otu'])
def test_43_check_interface_otsig(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-OTSIGROUP-400G") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-NETWORK1-OTSIGROUP-400G', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', ['supporting-interface-list'][0]: 'XPDR2-NETWORK1-755:768', 'type': 'org-openroadm-interfaces:otsi-group', 'supporting-port': 'L1' } input_dict_2 = { "group-id": 1, "group-rate": "org-openroadm-common-optical-channel-types:R400G-otsi" } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otsi-group-interfaces:otsi-group']), response['interface'][0] ['org-openroadm-otsi-group-interfaces:otsi-group'])
def test_28_get_roadmconnection_ROADMC(self): response = test_utils_rfc8040.check_node_attribute_request( 'ROADMC01', 'roadm-connections', 'DEG2-TTP-TXRX-SRG1-PP1-TXRX-761:768') self.assertEqual(response['status_code'], requests.codes.ok) self.assertEqual( "off", response['roadm-connections'][0]['opticalControlMode'])
def test_18_check_interface_ODU2E_CLIENT(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SC1", "interface", "XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR1-CLIENT1-ODU2e-SPDRA-SPDRC-10G', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-SFP4', 'supporting-interface': 'XPDR1-CLIENT1-ETHERNET10G', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'CP1-SFP4-P1' } input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP-CTP', 'rate': 'org-openroadm-otn-common-types:ODU2e', 'monitoring-mode': 'terminated' } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual({ 'payload-type': '03', 'exp-payload-type': '03' }, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['opu'])
def test_27_get_roadmconnection_ROADMA(self): response = test_utils_rfc8040.check_node_attribute_request( 'ROADMA01', 'roadm-connections', 'SRG1-PP1-TXRX-DEG1-TTP-TXRX-761:768') self.assertEqual(response['status_code'], requests.codes.ok) self.assertEqual( "off", response['roadm-connections'][0]['opticalControlMode']) self.assertEqual( float(response['roadm-connections'][0]['target-output-power']), -60)
def test_11_roadm_connection(self): response = test_utils_rfc8040.check_node_attribute_request( "ROADM-D1", "roadm-connections", "SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763") self.assertEqual(response['status_code'], requests.codes.ok) self.assertEqual("SRG1-PP1-TXRX-DEG1-TTP-TXRX-749:763", response['roadm-connections'][0]['connection-name']) self.assertEqual("SRG1-PP1-TXRX-nmc-749:763", response['roadm-connections'][0]['source']['src-if']) self.assertEqual( "DEG1-TTP-TXRX-nmc-749:763", response['roadm-connections'][0]['destination']['dst-if']) time.sleep(3)
def test_08_service_path_create_rdm_check(self): response = test_utils_rfc8040.check_node_attribute_request( "ROADMA01", "roadm-connections", "SRG1-PP7-TXRX-DEG1-TTP-TXRX-713:720") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict({ 'connection-number': 'SRG1-PP7-TXRX-DEG1-TTP-TXRX-713:720', 'wavelength-number': 7, 'opticalControlMode': 'off' }, **response['roadm-connections'][0]), response['roadm-connections'][0]) self.assertDictEqual({'src-if': 'SRG1-PP7-TXRX-713:720'}, response['roadm-connections'][0]['source']) self.assertDictEqual({'dst-if': 'DEG1-TTP-TXRX-713:720'}, response['roadm-connections'][0]['destination'])
def test_07_service_path_create_rdm_check(self): response = test_utils_rfc8040.check_node_attribute_request("ROADMA01", "interface", "SRG1-PP7-TXRX-713:720") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict({ 'name': 'SRG1-PP7-TXRX-713:720', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '4/0', 'type': 'org-openroadm-interfaces:opticalChannel', 'supporting-port': 'C7' }, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( {'wavelength-number': 7}, response['interface'][0]['org-openroadm-optical-channel-interfaces:och'])
def test_10_service_path_create_xpdr_check(self): response = test_utils_rfc8040.check_node_attribute_request("XPDRA01", "interface", "XPDR1-NETWORK1-OTU") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict({ 'name': 'XPDR1-NETWORK1-OTU', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'type': 'org-openroadm-interfaces:otnOtu', 'supporting-port': '1', 'supporting-interface': 'XPDR1-NETWORK1-713:720' }, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( {'rate': 'org-openroadm-otn-otu-interfaces:OTU4', 'fec': 'scfec'}, response['interface'][0]['org-openroadm-otn-otu-interfaces:otu'])
def test_17_check_interface_10GE_CLIENT(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SC1", "interface", "XPDR1-CLIENT1-ETHERNET10G") self.assertEqual(response['status_code'], requests.codes.ok) input_dict = { 'name': 'XPDR1-CLIENT1-ETHERNET10G', 'administrative-state': 'inService', 'supporting-circuit-pack-name': 'CP1-SFP4', 'type': 'org-openroadm-interfaces:ethernetCsmacd', 'supporting-port': 'CP1-SFP4-P1' } self.assertDictEqual(dict(input_dict, **response['interface'][0]), response['interface'][0]) self.assertEqual( response['interface'][0] ['org-openroadm-ethernet-interfaces:ethernet']['speed'], 10000)
def test_15_check_ODU2E_connection(self): response = test_utils_rfc8040.check_node_attribute_request( "SPDR-SA1", "odu-connection", "XPDR1-CLIENT4-ODU2e-service1-x-XPDR1-NETWORK1-ODU2e-service1") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'connection-name': 'XPDR1-CLIENT4-ODU2e-service1-x-XPDR1-NETWORK1-ODU2e-service1', 'direction': 'bidirectional' } self.assertDictEqual( dict(response['odu-connection'][0], **input_dict_1), response['odu-connection'][0]) self.assertDictEqual({'dst-if': 'XPDR1-NETWORK1-ODU2e-service1'}, response['odu-connection'][0]['destination']) self.assertDictEqual({'src-if': 'XPDR1-CLIENT4-ODU2e-service1'}, response['odu-connection'][0]['source'])
def test_12_service_path_create_xpdr_check(self): response = test_utils_rfc8040.check_node_attribute_request("XPDRA01", "interface", "XPDR1-CLIENT1-ETHERNET") self.assertEqual(response['status_code'], requests.codes.ok) # the following statement replaces self.assertDictContainsSubset deprecated in python 3.2 self.assertDictEqual( dict({ 'name': 'XPDR1-CLIENT1-ETHERNET', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT', 'type': 'org-openroadm-interfaces:ethernetCsmacd', 'supporting-port': 'C1' }, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( {'speed': 100000, 'mtu': 9000, 'auto-negotiation': 'enabled', 'duplex': 'full', 'fec': 'off'}, response['interface'][0]['org-openroadm-ethernet-interfaces:ethernet'])
def test_11_check_interface_100ge_client(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-CLIENT1-ETHERNET-100G") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-CLIENT1-ETHERNET-100G', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/1/1-PLUG-CLIENT', 'type': 'org-openroadm-interfaces:ethernetCsmacd', 'supporting-port': 'C1' } input_dict_2 = {'speed': 100000} self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-ethernet-interfaces:ethernet']), response['interface'][0] ['org-openroadm-ethernet-interfaces:ethernet'])
def test_14_check_odu_connection_xpdra2(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "odu-connection", "XPDR2-CLIENT1-ODU4-service_Ethernet-x-XPDR2-NETWORK1-ODU4-service_Ethernet" ) self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'connection-name': 'XPDR2-CLIENT1-ODU4-service_Ethernet-x-XPDR2-NETWORK1-ODU4-service_Ethernet', 'direction': 'bidirectional' } self.assertDictEqual( dict(input_dict_1, **response['odu-connection'][0]), response['odu-connection'][0]) self.assertDictEqual( {'dst-if': 'XPDR2-NETWORK1-ODU4-service_Ethernet'}, response['odu-connection'][0]['destination']) self.assertDictEqual({'src-if': 'XPDR2-CLIENT1-ODU4-service_Ethernet'}, response['odu-connection'][0]['source'])
def test_13_check_interface_odu4_network(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-ODU4-service_Ethernet") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-NETWORK1-ODU4-service_Ethernet', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-interface-list': 'XPDR2-NETWORK1-ODUC2', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'L1' } input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-CTP', 'rate': 'org-openroadm-otn-common-types:ODU4', 'monitoring-mode': 'not-terminated' } input_dict_3 = {'trib-port-number': 1} self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual( dict( input_dict_3, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu'] ['parent-odu-allocation']), response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']['parent-odu-allocation']) self.assertIn( '1.1', response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['parent-odu-allocation']['opucn-trib-slots']) self.assertIn( '1.20', response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['parent-odu-allocation']['opucn-trib-slots'])
def test_42_check_interface_otsi(self): # pylint: disable=line-too-long response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-755:768") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-NETWORK1-755:768', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'type': 'org-openroadm-interfaces:otsi', 'supporting-port': 'L1' } input_dict_2 = { "frequency": 196.0812, "otsi-rate": "org-openroadm-common-optical-channel-types:R400G-otsi", "fec": "org-openroadm-common-types:ofec", "transmit-power": -5, "provision-mode": "explicit", "modulation-format": "dp-qam16" } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-optical-tributary-signal-interfaces:otsi']), response['interface'][0] ['org-openroadm-optical-tributary-signal-interfaces:otsi']) self.assertDictEqual( { "foic-type": "org-openroadm-common-optical-channel-types:foic4.8", "iid": [1, 2, 3, 4] }, response['interface'][0] ['org-openroadm-optical-tributary-signal-interfaces:otsi'] ['flexo'])
def test_47_check_interface_oduc4(self): response = test_utils_rfc8040.check_node_attribute_request( "XPDR-A2", "interface", "XPDR2-NETWORK1-ODUC4") self.assertEqual(response['status_code'], requests.codes.ok) input_dict_1 = { 'name': 'XPDR2-NETWORK1-ODUC4', 'administrative-state': 'inService', 'supporting-circuit-pack-name': '1/2/2-PLUG-NET', 'supporting-interface-list': 'XPDR2-NETWORK1-OTUC4', 'type': 'org-openroadm-interfaces:otnOdu', 'supporting-port': 'L1' } input_dict_2 = { 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP', 'rate': 'org-openroadm-otn-common-types:ODUCn', 'tx-sapi': 'LY9PxYJqUbw=', 'tx-dapi': 'LY9PxYJqUbw=', 'expected-sapi': 'LY9PxYJqUbw=', 'expected-dapi': 'LY9PxYJqUbw=', "degm-intervals": 2, "degthr-percentage": 100, "monitoring-mode": "terminated", "oducn-n-rate": 4 } self.assertDictEqual(dict(input_dict_1, **response['interface'][0]), response['interface'][0]) self.assertDictEqual( dict( input_dict_2, **response['interface'][0] ['org-openroadm-otn-odu-interfaces:odu']), response['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) self.assertDictEqual({ 'payload-type': '22', 'exp-payload-type': '22' }, response['interface'][0]['org-openroadm-otn-odu-interfaces:odu'] ['opu'])