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

Schema Mount support #45

Open
kaja-mohideen opened this issue Sep 8, 2020 · 2 comments
Open

Schema Mount support #45

kaja-mohideen opened this issue Sep 8, 2020 · 2 comments

Comments

@kaja-mohideen
Copy link

1/ Recognise the ietf-yang-schema-mount - mount point extension in yang module.
2/ Allow specifying a module as mounted in a mount-point defined by other module in same generation/execution.

@bartoszm
Copy link
Collaborator

@kaja-mohideen if you still interested in this feature? could you give me a minimal example of how output should look like for given input ?

@kaja-mohideen
Copy link
Author

kaja-mohideen commented Mar 12, 2022

Yes. I'm interested in this feature.
demo-mount.zip

In the attached zip, I have provided a minimal yang model "list-manager" that provides a mountpoint where entry-type-1 and entry-type-2 can be mounted in runtime by a NETCONF / RESTCONF Server.

Since yang2swagger has no support for that now, I have commented 2 lines in list-manager.yang (Line 6 and 46) that imports and declares the mount-point.

To demonstrate how the data structure should be, I have defined the contents of entry-type-1 and entry-type-2 modules inside a grouping and used "uses" in list-manager. See the generated swagger.yaml.

Once this feature is implemented

  • list-manager should NOT import,use anything from entry-type-1, entry-type-2. It's the server that does the mounting
  • Swagger-generator when generating the output for module "list-manager", should accept additional yang module names that are getting mounted in the mountpoint "name" (yangmnt:mount-point argument)
  • The yang modules that are listed as "mounted" should be mounted only and NOT be generated at the root /data level, unless those are also listed for generation.

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

No branches or pull requests

2 participants