Loading src/device/service/drivers/emulated/EmulatedDriver.py +2 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ class EmulatedDriver(_Driver): match = RE_GET_ENDPOINT_FROM_INTERFACE.match(resource_key) if match is not None: endpoint_uuid = match.group(1) if '.' in endpoint_uuid: endpoint_uuid = endpoint_uuid.split('.')[0] self.__synthetic_sampling_parameters.set_endpoint_configured(endpoint_uuid) results.append(True) Loading Loading @@ -190,6 +191,7 @@ class EmulatedDriver(_Driver): match = RE_GET_ENDPOINT_FROM_INTERFACE.match(resource_key) if match is not None: endpoint_uuid = match.group(1) if '.' in endpoint_uuid: endpoint_uuid = endpoint_uuid.split('.')[0] self.__synthetic_sampling_parameters.unset_endpoint_configured(endpoint_uuid) parent = resource_node.parent Loading src/monitoring/service/MonitoringServiceServicerImpl.py +1 −1 Original line number Diff line number Diff line Loading @@ -592,7 +592,7 @@ class MonitoringServiceServicerImpl(MonitoringServiceServicer): LOGGER.info('GetInstantKpi error: KpiID({:s}): not found in database'.format(str(kpi_id))) response.kpi_id.kpi_id.uuid = "NoID" else: query = f"SELECT kpi_id, timestamp, kpi_value FROM monitoring WHERE kpi_id = '{kpi_id}' " \ query = f"SELECT kpi_id, timestamp, kpi_value FROM {METRICSDB_TABLE} WHERE kpi_id = '{kpi_id}' " \ f"LATEST ON timestamp PARTITION BY kpi_id" data = self.metrics_db.run_query(query) LOGGER.debug(data) Loading src/tests/ofc22/descriptors_emulated.json +2 −21 Original line number Diff line number Diff line { "contexts": [ { "context_id": {"context_uuid": {"uuid": "admin"}}, "topology_ids": [], "service_ids": [] } {"context_id": {"context_uuid": {"uuid": "admin"}}} ], "topologies": [ { "topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}, "device_ids": [ {"device_uuid": {"uuid": "R1-EMU"}}, {"device_uuid": {"uuid": "R2-EMU"}}, {"device_uuid": {"uuid": "R3-EMU"}}, {"device_uuid": {"uuid": "R4-EMU"}}, {"device_uuid": {"uuid": "O1-OLS"}} ], "link_ids": [ {"link_uuid": {"uuid": "R1-EMU/13/0/0==O1-OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, {"link_uuid": {"uuid": "R2-EMU/13/0/0==O1-OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, {"link_uuid": {"uuid": "R3-EMU/13/0/0==O1-OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, {"link_uuid": {"uuid": "R4-EMU/13/0/0==O1-OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} ] } {"topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}} ], "devices": [ { Loading Loading
src/device/service/drivers/emulated/EmulatedDriver.py +2 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ class EmulatedDriver(_Driver): match = RE_GET_ENDPOINT_FROM_INTERFACE.match(resource_key) if match is not None: endpoint_uuid = match.group(1) if '.' in endpoint_uuid: endpoint_uuid = endpoint_uuid.split('.')[0] self.__synthetic_sampling_parameters.set_endpoint_configured(endpoint_uuid) results.append(True) Loading Loading @@ -190,6 +191,7 @@ class EmulatedDriver(_Driver): match = RE_GET_ENDPOINT_FROM_INTERFACE.match(resource_key) if match is not None: endpoint_uuid = match.group(1) if '.' in endpoint_uuid: endpoint_uuid = endpoint_uuid.split('.')[0] self.__synthetic_sampling_parameters.unset_endpoint_configured(endpoint_uuid) parent = resource_node.parent Loading
src/monitoring/service/MonitoringServiceServicerImpl.py +1 −1 Original line number Diff line number Diff line Loading @@ -592,7 +592,7 @@ class MonitoringServiceServicerImpl(MonitoringServiceServicer): LOGGER.info('GetInstantKpi error: KpiID({:s}): not found in database'.format(str(kpi_id))) response.kpi_id.kpi_id.uuid = "NoID" else: query = f"SELECT kpi_id, timestamp, kpi_value FROM monitoring WHERE kpi_id = '{kpi_id}' " \ query = f"SELECT kpi_id, timestamp, kpi_value FROM {METRICSDB_TABLE} WHERE kpi_id = '{kpi_id}' " \ f"LATEST ON timestamp PARTITION BY kpi_id" data = self.metrics_db.run_query(query) LOGGER.debug(data) Loading
src/tests/ofc22/descriptors_emulated.json +2 −21 Original line number Diff line number Diff line { "contexts": [ { "context_id": {"context_uuid": {"uuid": "admin"}}, "topology_ids": [], "service_ids": [] } {"context_id": {"context_uuid": {"uuid": "admin"}}} ], "topologies": [ { "topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}, "device_ids": [ {"device_uuid": {"uuid": "R1-EMU"}}, {"device_uuid": {"uuid": "R2-EMU"}}, {"device_uuid": {"uuid": "R3-EMU"}}, {"device_uuid": {"uuid": "R4-EMU"}}, {"device_uuid": {"uuid": "O1-OLS"}} ], "link_ids": [ {"link_uuid": {"uuid": "R1-EMU/13/0/0==O1-OLS/aade6001-f00b-5e2f-a357-6a0a9d3de870"}}, {"link_uuid": {"uuid": "R2-EMU/13/0/0==O1-OLS/eb287d83-f05e-53ec-ab5a-adf6bd2b5418"}}, {"link_uuid": {"uuid": "R3-EMU/13/0/0==O1-OLS/0ef74f99-1acc-57bd-ab9d-4b958b06c513"}}, {"link_uuid": {"uuid": "R4-EMU/13/0/0==O1-OLS/50296d99-58cc-5ce7-82f5-fc8ee4eec2ec"}} ] } {"topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}} ], "devices": [ { Loading