.setSupportingCircuitPackName(circuitPackName)
.setSupportingPort(port.getPortName())
.setPortDirection(port.getPortDirection().getName());
-
+ if (port.getAdministrativeState() != null) {
+ mpBldr.setPortAdminState(port.getAdministrativeState().name());
+ }
+ if (port.getOperationalState() != null) {
+ mpBldr.setPortOperState(port.getOperationalState().name());
+ }
if (!logicalConnectionPoint.contains(StringConstants.TTP_TOKEN) || (port.getInterfaces() == null)) {
return mpBldr.build();
}
if (partnerLcp != null) {
mpBldr.setPartnerLcp(partnerLcp);
}
-
+ if (port.getAdministrativeState() != null) {
+ mpBldr.setPortAdminState(port.getAdministrativeState().name());
+ }
+ if (port.getOperationalState() != null) {
+ mpBldr.setPortOperState(port.getOperationalState().name());
+ }
return mpBldr.build();
}
.setSupportingCircuitPackName(circuitPackName)
.setSupportingPort(port.getPortName())
.setPortDirection(port.getPortDirection().getName());
+ if (port.getAdministrativeState() != null) {
+ mpBldr.setPortAdminState(port.getAdministrativeState().name());
+ }
+ if (port.getOperationalState() != null) {
+ mpBldr.setPortOperState(port.getOperationalState().name());
+ }
if ((port.getInterfaces() == null)
|| (!logicalConnectionPoint.contains(StringConstants.TTP_TOKEN)
}
mpBldr.setSupportedInterfaceCapability(supportedIntf);
}
+ if (port.getAdministrativeState() != null) {
+ mpBldr.setPortAdminState(port.getAdministrativeState().name());
+ }
+ if (port.getOperationalState() != null) {
+ mpBldr.setPortOperState(port.getOperationalState().name());
+ }
return mpBldr.build();
}
.setSupportingCircuitPackName(circuitPackName)
.setSupportingPort(port.getPortName())
.setPortDirection(port.getPortDirection().getName());
+ if (port.getAdministrativeState() != null) {
+ mpBldr.setPortAdminState(port.getAdministrativeState().name());
+ }
+ if (port.getOperationalState() != null) {
+ mpBldr.setPortOperState(port.getOperationalState().name());
+ }
if ((port.getInterfaces() == null)
|| (!logicalConnectionPoint.contains(StringConstants.TTP_TOKEN)
}
mpBldr.setSupportedInterfaceCapability(supportedIntf);
}
+ if (port.getAdministrativeState() != null) {
+ mpBldr.setPortAdminState(port.getAdministrativeState().name());
+ }
+ if (port.getOperationalState() != null) {
+ mpBldr.setPortOperState(port.getOperationalState().name());
+ }
return mpBldr.build();
}
res = response.json()
self.assertIn(
{'supporting-port': 'L1', 'supporting-circuit-pack-name': '2/0',
- 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_05_rdm_portmapping_SRG1_PP7_TXRX(self):
res = response.json()
self.assertIn(
{'supporting-port': 'C7', 'supporting-circuit-pack-name': '4/0',
- 'logical-connection-point': 'SRG1-PP7-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'SRG1-PP7-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_06_rdm_portmapping_SRG3_PP1_TXRX(self):
res = response.json()
self.assertIn(
{'supporting-port': 'C1', 'supporting-circuit-pack-name': '5/0',
- 'logical-connection-point': 'SRG3-PP1-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'SRG3-PP1-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_07_xpdr_device_connection(self):
{'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-CLIENT1', 'port-qual': 'xpdr-network',
- 'lcp-hash-val': 'OSvMgUyP+mE='},
+ 'lcp-hash-val': 'OSvMgUyP+mE=',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_11_xpdr_portmapping_NETWORK2(self):
{'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/2-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-CLIENT3', 'port-qual': 'xpdr-network',
- 'lcp-hash-val': 'OSvMgUyP+mI='},
+ 'lcp-hash-val': 'OSvMgUyP+mI=',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_12_xpdr_portmapping_CLIENT1(self):
'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AO9UFkY/TLYw'},
+ 'lcp-hash-val': 'AO9UFkY/TLYw',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_13_xpdr_portmapping_CLIENT2(self):
'supporting-circuit-pack-name': '1/0/C2-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT2', 'port-direction': 'bidirectional',
'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AO9UFkY/TLYz'},
+ 'lcp-hash-val': 'AO9UFkY/TLYz',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_14_xpdr_portmapping_CLIENT3(self):
'supporting-circuit-pack-name': '1/0/C3-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT3',
'connection-map-lcp': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
- 'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYy'},
+ 'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYy',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_15_xpdr_portmapping_CLIENT4(self):
{'supporting-port': 'C4',
'supporting-circuit-pack-name': '1/0/C4-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT4', 'port-direction': 'bidirectional',
- 'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLY1'},
+ 'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLY1',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_16_xpdr_device_disconnection(self):
res = response.json()
self.assertIn(
{'supporting-port': 'L1', 'supporting-circuit-pack-name': '2/0',
- 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
self.assertIn(
{'supporting-port': 'C7', 'supporting-circuit-pack-name': '4/0',
- 'logical-connection-point': 'SRG1-PP7-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'SRG1-PP7-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
def test_04_xpdr_portmapping(self):
{'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-CLIENT1', 'port-qual': 'xpdr-network',
- 'lcp-hash-val': 'OSvMgUyP+mE='},
+ 'lcp-hash-val': 'OSvMgUyP+mE=',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
self.assertIn(
{'supporting-port': 'C1',
'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AO9UFkY/TLYw'},
+ 'lcp-hash-val': 'AO9UFkY/TLYw',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
def test_05_service_path_create(self):
self.assertEqual('bidirectional', res_mapping['port-direction'])
self.assertEqual('xpdr-client', res_mapping['port-qual'])
self.assertEqual('FqlcrxV7p3g=', res_mapping['lcp-hash-val'])
+ self.assertEqual('InService', res_mapping['port-admin-state'])
+ self.assertEqual('InService', res_mapping['port-oper-state'])
self.assertIn('org-openroadm-port-types:if-10GE-ODU2e', res_mapping['supported-interface-capability'])
self.assertIn('org-openroadm-port-types:if-10GE-ODU2', res_mapping['supported-interface-capability'])
self.assertIn('org-openroadm-port-types:if-10GE', res_mapping['supported-interface-capability'])
"port-qual": "xpdr-network",
"supporting-circuit-pack-name": "CP1-CFP0",
"xponder-type": "mpdr",
- 'lcp-hash-val': 'Swfw02qXGyI='},
- res['mapping'])
+ 'lcp-hash-val': 'Swfw02qXGyI=',
+ 'port-admin-state': 'InService',
+ 'port-oper-state': 'InService'},
+ res['mapping'])
def test_04_service_path_create_OCH_OTU4(self):
response = test_utils.service_path_request("create", "service_OCH_OTU4", "1",
"port-qual": "xpdr-network",
"supporting-circuit-pack-name": "CP1-CFP0",
"xponder-type": "mpdr",
- "lcp-hash-val": "Swfw02qXGyI="},
+ "lcp-hash-val": "Swfw02qXGyI=",
+ "port-admin-state": "InService",
+ "port-oper-state": "InService"},
res['mapping'])
def test_06_check_interface_och(self):
"supporting-circuit-pack-name": "CP1-CFP0",
"xponder-type": "mpdr",
"supporting-odu4": "XPDR1-NETWORK1-ODU4",
- "lcp-hash-val": "Swfw02qXGyI="
+ "lcp-hash-val": "Swfw02qXGyI=",
+ "port-admin-state": "InService",
+ "port-oper-state": "InService"
},
res['mapping'])
res = response.json()
self.assertIn(
{'supporting-port': 'L1', 'supporting-circuit-pack-name': '1/0',
- 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_05_rdm_portmapping_DEG2_TTP_TXRX_with_ots_oms(self):
{'supporting-port': 'L1', 'supporting-circuit-pack-name': '2/0',
'logical-connection-point': 'DEG2-TTP-TXRX',
'supporting-oms': 'OMS-DEG2-TTP-TXRX', 'supporting-ots': 'OTS-DEG2-TTP-TXRX',
- 'port-direction': 'bidirectional'},
+ 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_06_rdm_portmapping_SRG1_PP3_TXRX(self):
res = response.json()
self.assertIn(
{'supporting-port': 'C3', 'supporting-circuit-pack-name': '3/0',
- 'logical-connection-point': 'SRG1-PP3-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'SRG1-PP3-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_07_rdm_portmapping_SRG3_PP1_TXRX(self):
res = response.json()
self.assertIn(
{'supporting-port': 'C1', 'supporting-circuit-pack-name': '5/0',
- 'logical-connection-point': 'SRG3-PP1-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'SRG3-PP1-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_08_xpdr_device_connection(self):
'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
- 'lcp-hash-val': 'AMkDwQ7xTmRI'},
+ 'lcp-hash-val': 'AMkDwQ7xTmRI',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_12_xpdr_portmapping_NETWORK2(self):
'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/2-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-CLIENT2', 'port-qual': 'xpdr-network',
- 'lcp-hash-val': 'AMkDwQ7xTmRL'},
+ 'lcp-hash-val': 'AMkDwQ7xTmRL',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_13_xpdr_portmapping_CLIENT1(self):
'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AJUUr6I5fALj'},
+ 'lcp-hash-val': 'AJUUr6I5fALj',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_14_xpdr_portmapping_CLIENT2(self):
'supporting-circuit-pack-name': '1/0/2-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT2', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK2', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AJUUr6I5fALg'},
+ 'lcp-hash-val': 'AJUUr6I5fALg',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['mapping'])
def test_15_xpdr_device_disconnection(self):
res = response.json()
self.assertIn(
{'supporting-port': 'L1', 'supporting-circuit-pack-name': '1/0',
- 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'DEG1-TTP-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
self.assertIn(
{'supporting-port': 'C3', 'supporting-circuit-pack-name': '3/0',
- 'logical-connection-point': 'SRG1-PP3-TXRX', 'port-direction': 'bidirectional'},
+ 'logical-connection-point': 'SRG1-PP3-TXRX', 'port-direction': 'bidirectional',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
def test_04_xpdr_portmapping(self):
'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
- 'lcp-hash-val': 'AMkDwQ7xTmRI'},
+ 'lcp-hash-val': 'AMkDwQ7xTmRI',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
self.assertIn(
{'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
- 'lcp-hash-val': 'AJUUr6I5fALj'},
+ 'lcp-hash-val': 'AJUUr6I5fALj',
+ 'port-admin-state': 'InService', 'port-oper-state': 'InService'},
res['nodes'][0]['mapping'])
def test_05_service_path_create(self):