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
pull/18777/head
Peter Sprygada 8 years ago committed by Matt Clay
parent efca39d4d4
commit 56120433c9

@ -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 '

Loading…
Cancel
Save