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

Add sample xml skeleton plugin #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ljbevemyr
Copy link
Contributor

This commit adds the sample xml skeleton plugin which generates a xml
skeleton from the input YANG model.

Five different options are available for the plugin:

  • doctype, data or config (don´t seams to be working in the
    corresponding pyang plugin)
  • defaults, includes default values
  • annotations, includes comments for type, key and presence
  • path, only includes the given path
  • populate, includes values for types specified from input file

This commit adds the sample xml skeleton plugin which generates a xml
skeleton from the input YANG model.

Five different options are available for the plugin:
- doctype, data or config (don´t seams to be working in the
corresponding pyang plugin)
- defaults, includes default values
- annotations, includes comments for type, key and presence
- path, only includes the given path
- populate, includes values for types specified from input file
@ljbevemyr ljbevemyr force-pushed the sample_xml_skeleton_plugin branch from d1651d3 to e50c6df Compare March 22, 2022 08:24
@@ -0,0 +1,5 @@
{string, "populate type string"}.
{unit8, "16"}.
Copy link
Contributor

Choose a reason for hiding this comment

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

uint8 - maybe?

@@ -0,0 +1,5 @@
{string, "populate type string"}.
{unit8, "16"}.
{unit32, "32"}.
Copy link
Contributor

Choose a reason for hiding this comment

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

uint32 - maybe?
The populate-functionality is really nice.
For instance with typedefs local in the module - you can just add the atom and voila.

Copy link
Contributor

@fnchooft fnchooft left a comment

Choose a reason for hiding this comment

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

test/lux/sample-xml-skeleton/population.txt
aybe the types need to be:

uint8 - instead of unit8.
uint32 - intead of unit32.

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