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

pep8

parent d52096ef
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,6 @@ from brian_polling_manager.interface_stats import config, brian, juniper ...@@ -9,7 +9,6 @@ from brian_polling_manager.interface_stats import config, brian, juniper
from brian_polling_manager import inventory, influx from brian_polling_manager import inventory, influx
import json
import logging.config import logging.config
import os import os
......
import json import json
import logging import logging
import logging.config import logging.config
import os
from typing import Union
import jsonschema import jsonschema
from brian_polling_manager import inventory
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
DEFAULT_INFLUX_SSL = True DEFAULT_INFLUX_SSL = True
......
ERROR_POINT_SCHEMA = { ERROR_POINT_SCHEMA = {
'$schema': 'https://json-schema.org/draft/2020-12/schema', '$schema': 'https://json-schema.org/draft/2020-12/schema',
...@@ -19,6 +17,7 @@ ERROR_POINT_SCHEMA = { ...@@ -19,6 +17,7 @@ ERROR_POINT_SCHEMA = {
'additionalProperties': False 'additionalProperties': False
} }
def points(router_fqdn, interface_counters): def points(router_fqdn, interface_counters):
""" """
:param router_fqdn: hostname :param router_fqdn: hostname
......
...@@ -38,7 +38,6 @@ CONTAINER_HEALTH_TIMEOUT_S = 60 ...@@ -38,7 +38,6 @@ CONTAINER_HEALTH_TIMEOUT_S = 60
CONTAINER_DOWN_TIMEOUT_S = 40 CONTAINER_DOWN_TIMEOUT_S = 40
@pytest.fixture @pytest.fixture
def free_host_port(): def free_host_port():
with contextlib.closing( with contextlib.closing(
...@@ -154,7 +153,6 @@ def test_logical_brian_counters(router_fqdn, ifc_netconf_rpc): ...@@ -154,7 +153,6 @@ def test_logical_brian_counters(router_fqdn, ifc_netconf_rpc):
jsonschema.validate(ctrs, brian.BRIAN_COUNTER_DICT_SCHEMA) jsonschema.validate(ctrs, brian.BRIAN_COUNTER_DICT_SCHEMA)
@pytest.mark.parametrize('router_fqdn', ROUTERS) @pytest.mark.parametrize('router_fqdn', ROUTERS)
def test_physical_brian_points(router_fqdn, ifc_netconf_rpc): def test_physical_brian_points(router_fqdn, ifc_netconf_rpc):
doc = juniper.get_interface_info_ncrpc(router_fqdn) doc = juniper.get_interface_info_ncrpc(router_fqdn)
...@@ -239,7 +237,6 @@ def brian_influx_container_params(app_config_params): ...@@ -239,7 +237,6 @@ def brian_influx_container_params(app_config_params):
assert app_config_params['influx']['brian-counters']['hostname'] \ assert app_config_params['influx']['brian-counters']['hostname'] \
== app_config_params['influx']['error-counters']['hostname'] == app_config_params['influx']['error-counters']['hostname']
influx_params = app_config_params['influx']['brian-counters'] influx_params = app_config_params['influx']['brian-counters']
with tempfile.TemporaryDirectory() as influx_data_dirname: with tempfile.TemporaryDirectory() as influx_data_dirname:
...@@ -307,7 +304,6 @@ def _output_or_die(args): ...@@ -307,7 +304,6 @@ def _output_or_die(args):
return output_info return output_info
def _wait_for_health_proc(container_name): def _wait_for_health_proc(container_name):
def _healthy(): def _healthy():
args = ['docker', 'inspect', container_name] args = ['docker', 'inspect', container_name]
...@@ -448,4 +444,4 @@ def test_e2e(app_config_params, ifc_netconf_rpc, testenv_containers, mocked_poll ...@@ -448,4 +444,4 @@ def test_e2e(app_config_params, ifc_netconf_rpc, testenv_containers, mocked_poll
query = f'select count(*) from {influx_config["measurement"]}' query = f'select count(*) from {influx_config["measurement"]}'
counts = next(client.query(query).get_points(measurement=influx_config["measurement"])) counts = next(client.query(query).get_points(measurement=influx_config["measurement"]))
assert all(f'count_{n}' in counts for n in expected_brian_fields) assert all(f'count_{n}' in counts for n in expected_brian_fields)
assert all(counts[f'count_{n}'] > 0 for n in expected_brian_fields) assert all(counts[f'count_{n}'] > 0 for n in expected_brian_fields)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment