Loading src/device/service/Tools.py +3 −5 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ from common.proto.device_pb2 import MonitoringSettings from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from google.protobuf import json_format from .driver_api._Driver import _Driver, RESOURCE_ENDPOINTS from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ( Loading Loading @@ -195,9 +193,9 @@ def populate_endpoints( device_endpoint.kpi_sample_types.append(kpi_sample_type) monitoring_loops.add_resource_key(device_uuid, endpoint_uuid, kpi_sample_type, monitor_resource_key) location = resource_value.get('location', {}) if location: json_format.Parse(json.dumps(location), device_endpoint.endpoint_location) location = resource_value.get('location', None) if location is not None: device_endpoint.endpoint_location.MergeFrom(Location(**location)) elif resource_key.startswith('/links/link'): # create sub-link Loading Loading
src/device/service/Tools.py +3 −5 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ from common.proto.device_pb2 import MonitoringSettings from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.tools.grpc.ConfigRules import update_config_rule_custom from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from google.protobuf import json_format from .driver_api._Driver import _Driver, RESOURCE_ENDPOINTS from .monitoring.MonitoringLoops import MonitoringLoops from .ErrorMessages import ( Loading Loading @@ -195,9 +193,9 @@ def populate_endpoints( device_endpoint.kpi_sample_types.append(kpi_sample_type) monitoring_loops.add_resource_key(device_uuid, endpoint_uuid, kpi_sample_type, monitor_resource_key) location = resource_value.get('location', {}) if location: json_format.Parse(json.dumps(location), device_endpoint.endpoint_location) location = resource_value.get('location', None) if location is not None: device_endpoint.endpoint_location.MergeFrom(Location(**location)) elif resource_key.startswith('/links/link'): # create sub-link Loading