summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-11-28 15:32:46 -0500
committerJason DeTiberus <jdetiber@redhat.com>2016-11-29 12:41:14 -0500
commitcef42e2541f7ddeaf284b1350eed7f4e46234fe9 (patch)
treeec51eb6d9dc1d48daf336054ea5688e0f3107f13 /playbooks/common
parente5f352d6f7c7bd91c2784152a8805f6e22f407db (diff)
downloadopenshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.tar.gz
openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.tar.bz2
openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.tar.xz
openshift-cef42e2541f7ddeaf284b1350eed7f4e46234fe9.zip
update tests and flake8/pylint fixes
Diffstat (limited to 'playbooks/common')
-rwxr-xr-xplaybooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py b/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
index 9a065fd1c..1238acb05 100755
--- a/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
+++ b/playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py
@@ -17,6 +17,7 @@ requirements: [ ]
EXAMPLES = '''
'''
+
def modify_api_levels(level_list, remove, ensure, msg_prepend='',
msg_append=''):
""" modify_api_levels """
@@ -62,7 +63,6 @@ def upgrade_master_3_0_to_3_1(ansible_module, config_base, backup):
config = yaml.safe_load(master_cfg_file.read())
master_cfg_file.close()
-
# Remove unsupported api versions and ensure supported api versions from
# master config
unsupported_levels = ['v1beta1', 'v1beta2', 'v1beta3']
@@ -118,7 +118,7 @@ def main():
# redefined-outer-name
global module
- module = AnsibleModule(
+ module = AnsibleModule( # noqa: F405
argument_spec=dict(
config_base=dict(required=True),
from_version=dict(required=True, choices=['3.0']),
@@ -149,10 +149,11 @@ def main():
except Exception, e:
return module.fail_json(msg=str(e))
+
# ignore pylint errors related to the module_utils import
-# pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import
+# pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import, wrong-import-position
# import module snippets
-from ansible.module_utils.basic import *
+from ansible.module_utils.basic import * # noqa: E402,F403
if __name__ == '__main__':
main()