- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.7k
 
Open
sonic-net/sonic-utilities
#4060Labels
Description
Is it platform specific
generic
Importance or Severity
Low
Description of the bug
When generating config commands for CLI using sonic-cli-gen generate config <yang_model>, fields having multi-line descriptions generate the python file while adding that description as a help string inside click.options using double quotes. This throws an error when invoking the config command for that yang model with the following error:
failed to import plugin config.plugins.auto.sonic-buffer-pool_yang: unterminated string literal (detected at line 287) (sonic-buffer-pool_yang.py, line 287)
In such a case, multi-line strings can be used to avoid this issue.
Steps to Reproduce
- Generate the config command for a model (eg. sonic-buffer-pool)
 
sonic-cli-gen generate config sonic-buffer-pool
- Call the config command
 
config buffer-pool
Actual Behavior and Expected Behavior
Actual Behavior:
failed to import plugin config.plugins.auto.sonic-buffer-pool_yang: unterminated string literal (detected at line 287) (sonic-buffer-pool_yang.py, line 287)
Expected Behavior:
Usage: config buffer-pool [OPTIONS] COMMAND [ARGS]...
Options:
  -h, -?, --help   Show this message and exit
Commands:
  add          Add object in BUFFER_POOL.
  delete      Delete object in BUFFER_POOL.
  update    Add object in BUFFER_POOL.
Relevant log output
Output of show version, show techsupport
Attach files (if any)
No response