From 5fd219af92171df9884aa565ca0f9d264c7b7922 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Wed, 16 Jun 2021 09:25:55 +0200
Subject: [PATCH] pep8
---
brian_polling_manager/interfaces.py | 4 +++-
test/conftest.py | 3 ++-
test/test_sensu_checks.py | 1 -
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/brian_polling_manager/interfaces.py b/brian_polling_manager/interfaces.py
index 3d2d47d..ab6a15e 100644
--- a/brian_polling_manager/interfaces.py
+++ b/brian_polling_manager/interfaces.py
@@ -33,7 +33,9 @@ class InterfaceCheck(sensu.AbstractCheck):
return self.ifc_check_params['command'].format(
script=self.ifc_check_params['script'],
measurement=self.ifc_check_params['measurement'],
- community='0pBiFbD', # TODO: add this to /poller/interfaces response
+ # TODO: add community string to /poller/interfaces response
+ # (cf. POL1-339)
+ community='0pBiFbD',
hostname=self.interface['router'],
interface=self.interface['name'],
ifIndex=self.interface['snmp-index'])
diff --git a/test/conftest.py b/test/conftest.py
index da76a08..fc4dd77 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -43,7 +43,8 @@ def config():
'gws-direct-interface-check': {
'script': '/var/lib/sensu/bin/poll-gws-direct.sh',
'measurement': 'gwsd_counters',
- 'command': '{script} {measurement} {nren} {isp} {hostname} {tag}'
+ 'command': ('{script} {measurement} '
+ '{nren} {isp} {hostname} {tag}')
}
},
'statedir': state_dir_name,
diff --git a/test/test_sensu_checks.py b/test/test_sensu_checks.py
index 50e500b..b72dd05 100644
--- a/test/test_sensu_checks.py
+++ b/test/test_sensu_checks.py
@@ -120,4 +120,3 @@ def test_checks_differ():
b = DummyCheck(name='x', command='x', proxy_entity_name='x')
a.namespace = a.namespace + 'x'
assert not sensu.checks_match(a.to_dict(), b.to_dict())
-
--
GitLab