diff --git a/src/device/service/drivers/openconfig/OpenConfigDriver.py b/src/device/service/drivers/openconfig/OpenConfigDriver.py index 569a0400ee709ebe3b0fa0694dd80801efc4f7fa..2399b9ac01258a21a4da6a9aa0e5bc09ea851951 100644 --- a/src/device/service/drivers/openconfig/OpenConfigDriver.py +++ b/src/device/service/drivers/openconfig/OpenConfigDriver.py @@ -21,7 +21,7 @@ from apscheduler.job import Job from apscheduler.jobstores.memory import MemoryJobStore from apscheduler.schedulers.background import BackgroundScheduler from ncclient.manager import Manager, connect_ssh -from common.method_wrappers.Decorator import MetricTypeEnum, MetricsPool, metered_subclass_method, INF +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method from common.tools.client.RetryDecorator import delay_exponential from common.type_checkers.Checkers import chk_length, chk_string, chk_type, chk_float from device.service.driver_api.Exceptions import UnsupportedResourceKeyException @@ -235,23 +235,7 @@ def edit_config( results = [e for _ in resources] # if commit fails, set exception in each resource return results -HISTOGRAM_BUCKETS = ( - # .005, .01, .025, .05, .075, .1, .25, .5, .75, 1.0, INF - 0.0001, 0.00025, 0.00050, 0.00075, - 0.0010, 0.0025, 0.0050, 0.0075, - 0.0100, 0.0250, 0.0500, 0.0750, - 0.1000, 0.2500, 0.5000, 0.7500, - 1.0000, 2.5000, 5.0000, 7.5000, - 10.0, 25.0, 50.0, 75.0, - 100.0, INF -) METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': 'openconfig'}) -METRICS_POOL.get_or_create('GetInitialConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) -METRICS_POOL.get_or_create('GetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) -METRICS_POOL.get_or_create('SetConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) -METRICS_POOL.get_or_create('DeleteConfig', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) -METRICS_POOL.get_or_create('SubscribeState', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) -METRICS_POOL.get_or_create('UnsubscribeState', MetricTypeEnum.HISTOGRAM_DURATION, buckets=HISTOGRAM_BUCKETS) class OpenConfigDriver(_Driver): def __init__(self, address : str, port : int, **settings) -> None: # pylint: disable=super-init-not-called