summaryrefslogtreecommitdiffstats
path: root/utils/test/dashboard/kibana_cleanup.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 14:37:05 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 16:58:05 +0100
commite73000209d46461b1196f560bf5c36bade020134 (patch)
tree6a09e8a127d777815378ef833824f924df82875c /utils/test/dashboard/kibana_cleanup.py
parente5f30e9839c4e36d7712b0e7dd3c319a85048322 (diff)
Fix flake8 violations in releng
Change-Id: I45769ff9c9db2de9fbba69117a92de414dd7f651 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'utils/test/dashboard/kibana_cleanup.py')
-rw-r--r--utils/test/dashboard/kibana_cleanup.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/utils/test/dashboard/kibana_cleanup.py b/utils/test/dashboard/kibana_cleanup.py
index ee0190049..7e3662c29 100644
--- a/utils/test/dashboard/kibana_cleanup.py
+++ b/utils/test/dashboard/kibana_cleanup.py
@@ -9,7 +9,8 @@ from dashboard.common import elastic_access
logger = logging.getLogger('clear_kibana')
logger.setLevel(logging.DEBUG)
file_handler = logging.FileHandler('/var/log/{}.log'.format('clear_kibana'))
-file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s'))
+file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: '
+ '%(message)s'))
logger.addHandler(file_handler)
@@ -21,12 +22,17 @@ def delete_all(url, es_creds):
if __name__ == '__main__':
- parser = argparse.ArgumentParser(description='Delete saved kibana searches, visualizations and dashboards')
- parser.add_argument('-e', '--elasticsearch-url', default='http://localhost:9200',
- help='the url of elasticsearch, defaults to http://localhost:9200')
+ parser = argparse.ArgumentParser(
+ description=('Delete saved kibana searches, '
+ 'visualizations and dashboards'))
+ parser.add_argument('-e', '--elasticsearch-url',
+ default='http://localhost:9200',
+ help=('the url of elasticsearch, '
+ 'defaults to http://localhost:9200'))
parser.add_argument('-u', '--elasticsearch-username', default=None,
- help='The username with password for elasticsearch in format username:password')
+ help=('The username with password for elasticsearch '
+ 'in format username:password'))
args = parser.parse_args()
base_elastic_url = args.elasticsearch_url
@@ -38,4 +44,3 @@ if __name__ == '__main__':
for url in urls:
delete_all(url, es_creds)
-