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:
parent
efca39d4d4
commit
56120433c9
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue