diff --git a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py index e56d436dd006197497d7774be598a480a134320c..c1591dbeb7c71c950135b92446849569bcd781f8 100644 --- a/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py +++ b/src/pathcomp/frontend/service/algorithms/tools/ResourceGroups.py @@ -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, @@ -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: