Skip to content
Snippets Groups Projects
Commit df441fd9 authored by Erik Reid's avatar Erik Reid
Browse files

pep8

parent 9e6d9a3f
Branches
Tags
No related merge requests found
......@@ -70,7 +70,6 @@ def setup_logging():
logging.config.dictConfig(logging_config)
def ctr2point(measurement, counters):
"""
......@@ -167,6 +166,7 @@ def _main(app_config_params: dict):
with contextlib.closing(influx.influx_client(influx_params)) as client:
client.write_points(points)
@click.command()
@click.option(
'--config', 'app_config_params',
......
......@@ -56,7 +56,6 @@ def counters(router_fqdn, interface_counters):
if 'resource' in ingress_errors:
_p['input_resource_errors'] = ingress_errors['resource']
egress_errors = _brct['egress'].get('errors', {})
if 'drops' in egress_errors:
_p['output_drops'] = egress_errors['drops']
......@@ -67,7 +66,6 @@ def counters(router_fqdn, interface_counters):
if 'resource' in egress_errors:
_p['output_resource_errors'] = egress_errors['resource']
if 'l2' in _ifc:
_l2ct = _ifc['l2']
ingress_errors = _l2ct['ingress'].get('errors', {})
......@@ -96,7 +94,6 @@ def counters(router_fqdn, interface_counters):
if 'errored-blocks-seconds' in pcs_stats:
_p['errored_blocks_seconds'] = pcs_stats['errored-blocks-seconds']
return _p
def _has_data(ctrs):
......
import concurrent.futures
import contextlib
from functools import partial
import itertools
import json
import logging
......@@ -188,33 +187,6 @@ def test_error_points(router_fqdn, ifc_netconf_rpc):
jsonschema.validate(_p, influx.INFLUX_POINT)
assert _p['fields'] # any trivial points should already be filtered
#
# @pytest.mark.parametrize('router_fqdn', ROUTERS)
# def test_physical_error_points(router_fqdn, ifc_netconf_rpc):
# doc = juniper.get_interface_info_ncrpc(router_fqdn)
# interfaces = juniper.physical_interface_counters(doc)
# counters = errors.counters(router_fqdn=router_fqdn, interface_counters=interfaces)
# for _p in map(partial(cli.ctr2point, 'bogus-measurement'), counters):
# jsonschema.validate(_p, influx.INFLUX_POINT)
#
#
# @pytest.mark.parametrize('router_fqdn', ROUTERS)
# def test_logical_brian_points(router_fqdn, ifc_netconf_rpc):
# doc = juniper.get_interface_info_ncrpc(router_fqdn)
# interfaces = juniper.logical_interface_counters(doc)
# counters = brian.counters(router_fqdn=router_fqdn, interface_counters=interfaces)
# for _p in map(partial(cli.ctr2point, 'bogus-measurement'), counters):
# jsonschema.validate(_p, influx.INFLUX_POINT)
#
#
# @pytest.mark.parametrize('router_fqdn', ROUTERS)
# def test_logical_error_points(router_fqdn, ifc_netconf_rpc):
# doc = juniper.get_interface_info_ncrpc(router_fqdn)
# interfaces = juniper.logical_interface_counters(doc)
# counters = errors.counters(router_fqdn=router_fqdn, interface_counters=interfaces)
# for _p in map(partial(cli.ctr2point, 'bogus-measurement'), counters):
# jsonschema.validate(_p, influx.INFLUX_POINT)
#
@pytest.fixture
def app_config_params(free_host_port):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment