Skip to content

Add sample xml skeleton plugin#42

Open
ljbevemyr wants to merge 1 commit into
mbj4668:masterfrom
ljbevemyr:sample_xml_skeleton_plugin
Open

Add sample xml skeleton plugin#42
ljbevemyr wants to merge 1 commit into
mbj4668:masterfrom
ljbevemyr:sample_xml_skeleton_plugin

Conversation

@ljbevemyr

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@fnchooft fnchooft left a comment

Copy link
Copy Markdown
Contributor

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