Remove check_args from eos & ios (#62623)

* Remove check_args from eos & ios

* Clean up check_args from eos & ios

* Missed ios_vrf
This commit is contained in:
Nathaniel Case 2019-09-26 15:01:53 -04:00 committed by GitHub
parent 831e1bf2e0
commit 89abfcdb18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 15 additions and 44 deletions

View file

@ -84,10 +84,6 @@ def get_provider_argspec():
return eos_provider_spec
def check_args(module, warnings):
pass
def load_params(module):
provider = module.params.get('provider') or dict()
for key, value in iteritems(provider):

View file

@ -90,10 +90,6 @@ def get_capabilities(module):
return module._ios_capabilities
def check_args(module, warnings):
pass
def get_defaults_flag(module):
connection = get_connection(module)
try:

View file

@ -132,7 +132,7 @@ from copy import deepcopy
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec
from ansible.module_utils.network.eos.eos import load_config, run_commands
from ansible.module_utils.network.eos.eos import eos_argument_spec, check_args
from ansible.module_utils.network.eos.eos import eos_argument_spec
def search_obj_in_list(vlan_id, lst):
@ -327,7 +327,6 @@ def main():
mutually_exclusive=mutually_exclusive)
warnings = list()
check_args(module, warnings)
result = {'changed': False}

View file

@ -89,7 +89,7 @@ session_name:
"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.eos.eos import load_config, run_commands
from ansible.module_utils.network.eos.eos import eos_argument_spec, check_args
from ansible.module_utils.network.eos.eos import eos_argument_spec
from ansible.module_utils.six import string_types
from ansible.module_utils._text import to_text
@ -174,7 +174,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -299,7 +299,6 @@ from ansible.module_utils.network.common.config import NetworkConfig, dumps
from ansible.module_utils.network.eos.eos import get_config, load_config, get_connection
from ansible.module_utils.network.eos.eos import run_commands
from ansible.module_utils.network.eos.eos import eos_argument_spec
from ansible.module_utils.network.eos.eos import check_args
def get_candidate(module):
@ -384,7 +383,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -105,7 +105,7 @@ from copy import deepcopy
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec
from ansible.module_utils.network.eos.eos import get_config, load_config
from ansible.module_utils.network.eos.eos import eos_argument_spec, check_args
from ansible.module_utils.network.eos.eos import eos_argument_spec
DEST_GROUP = ['on', 'host', 'console', 'monitor', 'buffered']
@ -386,7 +386,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -158,7 +158,7 @@ from functools import partial
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec
from ansible.module_utils.network.eos.eos import get_config, load_config
from ansible.module_utils.network.eos.eos import eos_argument_spec, check_args
from ansible.module_utils.network.eos.eos import eos_argument_spec
from ansible.module_utils.six import iteritems
@ -367,8 +367,6 @@ def main():
'To set a user password use "configured_password" instead.'
)
check_args(module, warnings)
result = {'changed': False}
if warnings:
result['warnings'] = warnings

View file

@ -126,7 +126,7 @@ from copy import deepcopy
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec
from ansible.module_utils.network.eos.eos import load_config, run_commands
from ansible.module_utils.network.eos.eos import eos_argument_spec, check_args
from ansible.module_utils.network.eos.eos import eos_argument_spec
def search_obj_in_list(name, lst):
@ -319,7 +319,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}

View file

@ -170,7 +170,7 @@ from ansible.module_utils._text import to_text
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import exec_command
from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
from ansible.module_utils.network.common.config import NetworkConfig
from ansible.module_utils.network.common.utils import conditional, remove_default_spec
@ -466,7 +466,6 @@ def main():
mutually_exclusive=mutually_exclusive,
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -91,7 +91,7 @@ commands:
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import exec_command
from ansible.module_utils.network.ios.ios import load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
import re
@ -163,7 +163,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -146,7 +146,7 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.parsing import Conditional
from ansible.module_utils.network.common.utils import transform_commands, to_lines
from ansible.module_utils.network.ios.ios import run_commands
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
def parse_commands(module, warnings):
@ -184,7 +184,6 @@ def main():
warnings = list()
result = {'changed': False, 'warnings': warnings}
check_args(module, warnings)
commands = parse_commands(module, warnings)
wait_for = module.params['wait_for'] or list()

View file

@ -342,13 +342,11 @@ from ansible.module_utils.connection import ConnectionError
from ansible.module_utils.network.ios.ios import run_commands, get_config
from ansible.module_utils.network.ios.ios import get_defaults_flag, get_connection
from ansible.module_utils.network.ios.ios import ios_argument_spec
from ansible.module_utils.network.ios.ios import check_args as ios_check_args
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.config import NetworkConfig, dumps
def check_args(module, warnings):
ios_check_args(module, warnings)
if module.params['multiline_delimiter']:
if len(module.params['multiline_delimiter']) != 1:
module.fail_json(msg='multiline_delimiter value can only be a '

View file

@ -126,7 +126,7 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec, validate_ip_address
from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import get_capabilities
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
def validate_size(value, module):
@ -406,7 +406,6 @@ def main():
os_version = device_info['device_info']['network_os_version']
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -93,7 +93,7 @@ import re
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
def parse_server(line, dest):
@ -287,7 +287,6 @@ def main():
result = {'changed': False}
warnings = list()
check_args(module, warnings)
if warnings:
result['warnings'] = warnings

View file

@ -103,7 +103,7 @@ rtt:
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.ios.ios import run_commands
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
import re
@ -128,7 +128,6 @@ def main():
vrf = module.params["vrf"]
warnings = list()
check_args(module, warnings)
results = {}
if warnings:

View file

@ -137,7 +137,7 @@ from re import findall
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec, validate_ip_address
from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
def map_obj_to_commands(want, have):
@ -290,7 +290,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
if warnings:

View file

@ -120,7 +120,7 @@ import re
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
from ansible.module_utils.network.common.utils import ComplexList
_CONFIGURED_VRFS = None
@ -360,7 +360,6 @@ def main():
result = {'changed': False}
warnings = list()
check_args(module, warnings)
result['warnings'] = warnings
want = map_params_to_obj(module)

View file

@ -228,7 +228,7 @@ from functools import partial
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.common.utils import remove_default_spec
from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
from ansible.module_utils.six import iteritems
@ -511,8 +511,6 @@ def main():
'To set a user password use "configured_password" instead.'
)
check_args(module, warnings)
result = {'changed': False}
if warnings:
result['warnings'] = warnings

View file

@ -256,7 +256,7 @@ from functools import partial
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import exec_command
from ansible.module_utils.network.ios.ios import load_config, get_config
from ansible.module_utils.network.ios.ios import ios_argument_spec, check_args
from ansible.module_utils.network.ios.ios import ios_argument_spec
from ansible.module_utils.network.common.config import NetworkConfig
from ansible.module_utils.six import iteritems
@ -691,7 +691,6 @@ def main():
result = {'changed': False}
warnings = list()
check_args(module, warnings)
result['warnings'] = warnings
want = map_params_to_obj(module)