Remove deprecated params from module argspec nxos modules (#34911)

* Remove deprecated param from module argspec nxos modules

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* fix nxos_vrrp syntaxerror

* Add choices for version _nxos_ip_interface

* remove check_args function

* remove include_defaults
This commit is contained in:
Trishna Guha 2018-01-16 18:23:58 +05:30 committed by GitHub
parent 0196b6bb69
commit a727930f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 85 additions and 254 deletions

View file

@ -76,12 +76,6 @@ from ansible.module_utils.network.nxos.nxos import load_config, run_commands
from ansible.module_utils.network.nxos.nxos import get_capabilities, nxos_argument_spec
def check_args(module, warnings):
for key in ('include_defaults', 'config', 'save'):
if module.params[key] is not None:
warnings.append('argument %s is no longer supported, ignoring value' % key)
def get_available_features(feature, module):
available_features = {}
feature_regex = r'(?P<feature>\S+)\s+\d+\s+(?P<state>.*)'
@ -213,12 +207,7 @@ def validate_feature(module, mode='show'):
def main():
argument_spec = dict(
feature=dict(type='str', required=True),
state=dict(choices=['enabled', 'disabled'], default='enabled'),
# deprecated in Ans2.3
include_defaults=dict(),
config=dict(),
save=dict()
state=dict(choices=['enabled', 'disabled'], default='enabled')
)
argument_spec.update(nxos_argument_spec)
@ -226,7 +215,6 @@ def main():
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
warnings = list()
check_args(module, warnings)
results = dict(changed=False, warnings=warnings)
feature = validate_feature(module)