1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

checks commit comment to make sure it doesn't exceed 60 characters (#5155)

The comment argument can be at most 60 characters per the IOS XR command
line.  If a comment is > 60 characters, the module will now gracefully error
and return a well formed message.

fixes 5146
This commit is contained in:
Peter Sprygada 2016-10-04 16:21:50 -04:00 committed by Matt Clay
parent efca39d4d4
commit 56120433c9

View file

@ -194,6 +194,9 @@ DEFAULT_COMMIT_COMMENT = 'configured by iosxr_config'
def check_args(module, warnings):
if module.params['comment']:
if len(module.params['comment']) > 60:
module.fail_json(msg='comment argument cannot be more than 60 characters')
if module.params['force']:
warnings.append('The force argument is deprecated, please use '
'match=none instead. This argument will be '