summaryrefslogtreecommitdiffstats
path: root/doctor_tests/installer/common
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2017-12-21 16:11:31 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2018-01-09 09:37:39 +0800
commit754b94bba6df6e7aafd5f1ffb8432a40cb815649 (patch)
tree4bbe2f725e5b378bbd8f1b12cbbbb173afb203b2 /doctor_tests/installer/common
parentbdbd22904733af311225a3315555bb39ea12ed55 (diff)
support pep8 check
Change-Id: I3c4358694c57d27a207ae60712c44f717c8895f7 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'doctor_tests/installer/common')
-rw-r--r--doctor_tests/installer/common/congress.py12
-rw-r--r--doctor_tests/installer/common/set_ceilometer.py3
-rw-r--r--doctor_tests/installer/common/vitrage.py11
3 files changed, 17 insertions, 9 deletions
diff --git a/doctor_tests/installer/common/congress.py b/doctor_tests/installer/common/congress.py
index db882de2..cc58c390 100644
--- a/doctor_tests/installer/common/congress.py
+++ b/doctor_tests/installer/common/congress.py
@@ -6,6 +6,8 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+
def set_doctor_driver_conf(ssh_client, restart_cmd):
cg_set_cmd = '''#!/bin/bash
co_conf=/etc/congress/congress.conf
@@ -23,8 +25,9 @@ fi
ret, output = ssh_client.ssh(cg_set_cmd)
if ret:
- raise Exception('Do the congress command in controller node failed....'
- 'ret=%s, cmd=%s, output=%s' % (ret, cg_set_cmd, output))
+ raise Exception('Do the congress command in controller node failed...'
+ 'ret=%s, cmd=%s, output=%s'
+ % (ret, cg_set_cmd, output))
def restore_doctor_driver_conf(ssh_client, restart_cmd):
@@ -43,5 +46,6 @@ fi
ret, output = ssh_client.ssh(cg_restore_cmd)
if ret:
- raise Exception('Do the congress command in controller node failed....'
- 'ret=%s, cmd=%s, output=%s' % (ret, cg_restore_cmd, output))
+ raise Exception('Do the congress command in controller node failed...'
+ 'ret=%s, cmd=%s, output=%s'
+ % (ret, cg_restore_cmd, output))
diff --git a/doctor_tests/installer/common/set_ceilometer.py b/doctor_tests/installer/common/set_ceilometer.py
index f5946cb2..4050aaef 100644
--- a/doctor_tests/installer/common/set_ceilometer.py
+++ b/doctor_tests/installer/common/set_ceilometer.py
@@ -33,7 +33,8 @@ def set_notifier_topic():
publishers.append(event_notifier_topic)
config_modified = True
else:
- print('NOTE: event notifier is configured in ceilometer as we needed')
+ print('NOTE: event notifier is configured'
+ 'in ceilometer as we needed')
if config_modified:
shutil.copyfile(ep_file, ep_file_bak)
diff --git a/doctor_tests/installer/common/vitrage.py b/doctor_tests/installer/common/vitrage.py
index 9ea32271..30a73f5d 100644
--- a/doctor_tests/installer/common/vitrage.py
+++ b/doctor_tests/installer/common/vitrage.py
@@ -9,7 +9,8 @@
import os
-vitrage_template_file = '/etc/vitrage/templates/vitrage_host_down_scenarios.yaml'
+vitrage_template_file = \
+ '/etc/vitrage/templates/vitrage_host_down_scenarios.yaml'
template = """
metadata:
@@ -86,13 +87,15 @@ scenarios:
action_type: mark_down
action_target:
target: instance
-"""
+""" # noqa
def set_vitrage_host_down_template():
if os.path.isfile(vitrage_template_file):
- print('Vitrage host_down template file: %s already exists.' % vitrage_template_file)
+ print('Vitrage host_down template file: %s already exists.'
+ % vitrage_template_file)
else:
- print('Create Vitrage host_down template file:%s.' % vitrage_template_file)
+ print('Create Vitrage host_down template file:%s.'
+ % vitrage_template_file)
with open(vitrage_template_file, 'w') as file:
file.write(template)