Loading src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +9 −7 Original line number Diff line number Diff line Loading @@ -36,8 +36,8 @@ DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.EMULATED_XR_CONSTELLATION.value : 40, DeviceTypeEnum.XR_CONSTELLATION.value : 40, DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value : 30, DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value : 30, DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value : 40, DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value : 40, DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value : 30, DeviceTypeEnum.OPEN_LINE_SYSTEM.value : 30, Loading @@ -57,11 +57,13 @@ IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER} def get_device_controller_uuid( device : Device ) -> Optional[str]: for config_rule in device.device_config.config_rules: if config_rule.WhichOneof('config_rule') != 'custom': continue if config_rule.custom.resource_key != '_controller': continue device_controller_id = json.loads(config_rule.custom.resource_value) return device_controller_id['uuid'] controller_uuid = device.controller_id.device_uuid.uuid if len(controller_uuid) > 0: return controller_uuid #for config_rule in device.device_config.config_rules: # if config_rule.WhichOneof('config_rule') != 'custom': continue # if config_rule.custom.resource_key != '_controller': continue # device_controller_id = json.loads(config_rule.custom.resource_value) # return device_controller_id['uuid'] return None def _map_device_type(device : Device) -> DeviceTypeEnum: Loading Loading
src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +9 −7 Original line number Diff line number Diff line Loading @@ -36,8 +36,8 @@ DEVICE_TYPE_TO_DEEPNESS = { DeviceTypeEnum.EMULATED_XR_CONSTELLATION.value : 40, DeviceTypeEnum.XR_CONSTELLATION.value : 40, DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value : 30, DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value : 30, DeviceTypeEnum.EMULATED_MICROWAVE_RADIO_SYSTEM.value : 40, DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM.value : 40, DeviceTypeEnum.EMULATED_OPEN_LINE_SYSTEM.value : 30, DeviceTypeEnum.OPEN_LINE_SYSTEM.value : 30, Loading @@ -57,11 +57,13 @@ IGNORED_DEVICE_TYPES = {DeviceTypeEnum.EMULATED_OPTICAL_SPLITTER} def get_device_controller_uuid( device : Device ) -> Optional[str]: for config_rule in device.device_config.config_rules: if config_rule.WhichOneof('config_rule') != 'custom': continue if config_rule.custom.resource_key != '_controller': continue device_controller_id = json.loads(config_rule.custom.resource_value) return device_controller_id['uuid'] controller_uuid = device.controller_id.device_uuid.uuid if len(controller_uuid) > 0: return controller_uuid #for config_rule in device.device_config.config_rules: # if config_rule.WhichOneof('config_rule') != 'custom': continue # if config_rule.custom.resource_key != '_controller': continue # device_controller_id = json.loads(config_rule.custom.resource_value) # return device_controller_id['uuid'] return None def _map_device_type(device : Device) -> DeviceTypeEnum: Loading