Making iosxr check_args call module_util/iosxr check_args. Fixes #25501 (#26261)

This commit is contained in:
James Mighion 2017-07-05 09:50:53 -07:00 committed by Ganesh Nalawade
parent 5229370364
commit 1d62283796

View file

@ -182,11 +182,13 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.netcfg import NetworkConfig, dumps from ansible.module_utils.netcfg import NetworkConfig, dumps
from ansible.module_utils.iosxr import load_config,get_config from ansible.module_utils.iosxr import load_config,get_config
from ansible.module_utils.iosxr import iosxr_argument_spec from ansible.module_utils.iosxr import iosxr_argument_spec
from ansible.module_utils.iosxr import check_args as iosxr_check_args
DEFAULT_COMMIT_COMMENT = 'configured by iosxr_config' DEFAULT_COMMIT_COMMENT = 'configured by iosxr_config'
def check_args(module, warnings): def check_args(module, warnings):
iosxr_check_args(module, warnings)
if module.params['comment']: if module.params['comment']:
if len(module.params['comment']) > 60: if len(module.params['comment']) > 60:
module.fail_json(msg='comment argument cannot be more than 60 characters') module.fail_json(msg='comment argument cannot be more than 60 characters')