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

Support for nested entry objects #185

Open
kklimonda-cl opened this issue Nov 8, 2024 · 0 comments
Open

Support for nested entry objects #185

kklimonda-cl opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kklimonda-cl
Copy link
Contributor

Some objects are nested within other objects, e.g. interface can have multiple interfaces.

An example object xpath:

<request cmd="set" obj="/config/devices/entry[@name='localhost.localdomain']/template/entry[@name='codegen_template']/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/2']/layer3/units/entry[@name='ethernet1/2.12']" />

This cannot be currently described in YAML spec, and cannot be properly rendered by codegen.

The following changes to the generated code are needed:

  • In Pango, location.XpathWithEntryName signature has to change from (version.Number, string) to (version.Number, ...string) - we'll probably rename it also to location.XpathWithValues
  • In Terraform, a parent attribute is needed that will be passed in CRUD functions along with the name.

In codegen YAML specs we'll probably need a new resource type, and a way to express full xpath suffix (with parent variable).
This is complicated due to the fact that nested entry objects may have different xpaths based on variant:

  • ethernet subinterface xpath includes variant as parent xpath along with the name.
@kklimonda-cl kklimonda-cl added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant