Commit 33f71796 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- EmulatedDriver: Corrected REG-EX expression
- Removed unneeded import
parent 8ca4e3b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +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 .driver_api._Driver import _Driver, RESOURCE_ENDPOINTS
from .monitoring.MonitoringLoops import MonitoringLoops
from .Errors import (
@@ -145,6 +144,7 @@ def _raw_config_rules_to_grpc(
def populate_config_rules(device : Device, driver : _Driver) -> List[str]:
    device_uuid = device.device_id.device_uuid.uuid
    results_getconfig = driver.GetConfig()
    LOGGER.warning('results_getconfig = {:s}'.format(str(results_getconfig)))
    return _raw_config_rules_to_grpc(
        device_uuid, device.device_config, ERROR_GET, ConfigActionEnum.CONFIGACTION_SET, results_getconfig)

+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ from .Tools import compose_resource_endpoint

LOGGER = logging.getLogger(__name__)

RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r'.*\/interface\[([^\]]+)\].*')
RE_GET_ENDPOINT_FROM_INTERFACE = re.compile(r'^\/interface\[([^\]]+)\].*')

HISTOGRAM_BUCKETS = (
    # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF