Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added opt flags to yangpath.py for --sparse, --config-after, and --prefix-module #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bensons
Copy link

@bensons bensons commented Nov 29, 2022

Modification of the pyang OC plugin yangpath.py to enable alternative output formats, with the following option flags:

  • --sparse causes the path to be output without extra whitespace
  • --config-after causes the [ro] or [rw] config flag to be placed after the path, rather than before it
  • --prefix-module causes the module name to be printed at the beginning of each line instead of as a section header

openconfig_pyang/plugins/yangpath.py Show resolved Hide resolved
else:
s += ' %s' % (pathstr)
if ctx.opts.print_depth:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this block become a function that just takes an argument of the indentation to be applied (since it looks like lines 204-208 differ from this block only based on the indentation on line 223 and 228?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants