From ce99ffe2053d9e52959704ecee6557c179118a80 Mon Sep 17 00:00:00 2001 From: Senthil Kumar Ganesan Date: Thu, 27 Apr 2017 03:41:43 -0700 Subject: [PATCH] Fixed PEP8 issues (#24030) --- lib/ansible/module_utils/dellos10.py | 6 ++++-- lib/ansible/module_utils/dellos9.py | 6 ++++-- test/sanity/pep8/legacy-files.txt | 2 -- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/ansible/module_utils/dellos10.py b/lib/ansible/module_utils/dellos10.py index e751e74382e..2c4567930df 100644 --- a/lib/ansible/module_utils/dellos10.py +++ b/lib/ansible/module_utils/dellos10.py @@ -34,7 +34,7 @@ import re from ansible.module_utils.basic import env_fallback, return_values from ansible.module_utils.network_common import to_list, ComplexList from ansible.module_utils.connection import exec_command -from ansible.module_utils.netcfg import NetworkConfig,ConfigLine +from ansible.module_utils.netcfg import NetworkConfig, ConfigLine _DEVICE_CONFIGS = {} @@ -56,6 +56,7 @@ dellos10_argument_spec = { 'provider': dict(type='dict'), } + def check_args(module, warnings): provider = module.params['provider'] or {} for key in dellos10_argument_spec: @@ -106,6 +107,7 @@ def run_commands(module, commands, check_rc=True): responses.append(out) return responses + def load_config(module, commands): rc, out, err = exec_command(module, 'configure terminal') if rc != 0: @@ -122,6 +124,7 @@ def load_config(module, commands): exec_command(module, 'end') + def get_sublevel_config(running_config, module): contents = list() current_config_contents = list() @@ -141,4 +144,3 @@ def get_sublevel_config(running_config, module): sublevel_config = '\n'.join(current_config_contents) return sublevel_config - diff --git a/lib/ansible/module_utils/dellos9.py b/lib/ansible/module_utils/dellos9.py index 0af653d97ca..b52af224b64 100644 --- a/lib/ansible/module_utils/dellos9.py +++ b/lib/ansible/module_utils/dellos9.py @@ -34,7 +34,7 @@ import re from ansible.module_utils.basic import env_fallback, return_values from ansible.module_utils.network_common import to_list, ComplexList from ansible.module_utils.connection import exec_command -from ansible.module_utils.netcfg import NetworkConfig,ConfigLine +from ansible.module_utils.netcfg import NetworkConfig, ConfigLine _DEVICE_CONFIGS = {} @@ -56,6 +56,7 @@ dellos9_argument_spec = { 'provider': dict(type='dict'), } + def check_args(module, warnings): provider = module.params['provider'] or {} for key in dellos9_argument_spec: @@ -106,6 +107,7 @@ def run_commands(module, commands, check_rc=True): responses.append(out) return responses + def load_config(module, commands): rc, out, err = exec_command(module, 'configure terminal') if rc != 0: @@ -121,6 +123,7 @@ def load_config(module, commands): exec_command(module, 'end') + def get_sublevel_config(running_config, module): contents = list() current_config_contents = list() @@ -140,4 +143,3 @@ def get_sublevel_config(running_config, module): sublevel_config = '\n'.join(current_config_contents) return sublevel_config - diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index 7448a637da1..6d533c740f9 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -97,8 +97,6 @@ lib/ansible/module_utils/bigswitch_utils.py lib/ansible/module_utils/cloudengine.py lib/ansible/module_utils/connection.py lib/ansible/module_utils/database.py -lib/ansible/module_utils/dellos10.py -lib/ansible/module_utils/dellos9.py lib/ansible/module_utils/docker_common.py lib/ansible/module_utils/ec2.py lib/ansible/module_utils/eos.py