Loading src/device/service/drivers/transport_api/Tools.py +9 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,15 @@ def config_getter(root_url, resource_key, timeout): elif 'context' in context: context = context['context'] for sip in context['service-interface-point']: endpoint_type = sip.get('layer-protocol-name', '10Gbps') layer_protocol_name = sip.get('layer-protocol-name', '?') supportable_spectrum = sip.get('tapi-photonic-media:media-channel-service-interface-point-spec', {}) supportable_spectrum = supportable_spectrum.get('mc-pool', {}) supportable_spectrum = supportable_spectrum.get('supportable-spectrum', []) supportable_spectrum = supportable_spectrum[0] if len(supportable_spectrum) == 1 else {} grid_type = supportable_spectrum.get('frequency-constraint', {}).get('grid-type') granularity = supportable_spectrum.get('frequency-constraint', {}).get('adjustment-granularity') direction = sip.get('direction', '?') endpoint_type = ':'.join([layer_protocol_name, grid_type, granularity, direction]) endpoint_url = '/endpoints/endpoint[{:s}]'.format(sip['uuid']) endpoint_data = {'uuid': sip['uuid'], 'type': endpoint_type} result.append((endpoint_url, endpoint_data)) Loading Loading
src/device/service/drivers/transport_api/Tools.py +9 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,15 @@ def config_getter(root_url, resource_key, timeout): elif 'context' in context: context = context['context'] for sip in context['service-interface-point']: endpoint_type = sip.get('layer-protocol-name', '10Gbps') layer_protocol_name = sip.get('layer-protocol-name', '?') supportable_spectrum = sip.get('tapi-photonic-media:media-channel-service-interface-point-spec', {}) supportable_spectrum = supportable_spectrum.get('mc-pool', {}) supportable_spectrum = supportable_spectrum.get('supportable-spectrum', []) supportable_spectrum = supportable_spectrum[0] if len(supportable_spectrum) == 1 else {} grid_type = supportable_spectrum.get('frequency-constraint', {}).get('grid-type') granularity = supportable_spectrum.get('frequency-constraint', {}).get('adjustment-granularity') direction = sip.get('direction', '?') endpoint_type = ':'.join([layer_protocol_name, grid_type, granularity, direction]) endpoint_url = '/endpoints/endpoint[{:s}]'.format(sip['uuid']) endpoint_data = {'uuid': sip['uuid'], 'type': endpoint_type} result.append((endpoint_url, endpoint_data)) Loading