Replies: 5 comments 1 reply
-
Have to write a series of blog posts on the topic, here are just a few ideas. Please keep in mind that:
OK, here we go:
Hope this makes sense, |
Beta Was this translation helpful? Give feedback.
-
What I'm aiming for is a simple and stable core that is reasonably easy to implement on new devices plus the ability to extend it. Obviously we could use a YANG data model to describe the lab topology data model, but I'm guessing that it's still easier for most people to add a YAML list saying "add these keywords to a module" than to create an augmented YAML data model. Anyway, the whole extensibility framework is much more than just adding attributes to a data model -- you need topology-to-device data transformation and then node-to-configuration transformation (regardless of whether the configuration is YANG-controlled or a text file). |
Beta Was this translation helpful? Give feedback.
-
Checkout what Roman built for Containerlab:
https://json-schema.app/view/%23?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsrl-labs%2Fcontainerlab%2Fmain%2Fschemas%2Fclab.schema.json
…On Thu, Dec 23, 2021 at 7:28 AM Ivan Pepelnjak ***@***.***> wrote:
What I'm aiming for is a simple and stable core that is reasonably easy to
implement on new devices plus the ability to extend it.
Obviously we could use a YANG data model to describe the lab topology data
model, but I'm guessing that it's still easier for most people to add a
YAML list saying "add these keywords to a module" than to create an
augmented YAML data model.
Anyway, the whole extensibility framework is much more than just adding
attributes to a data model -- you need topology-to-device data
transformation and then node-to-configuration transformation (regardless of
whether the configuration is YANG-controlled or a text file).
—
Reply to this email directly, view it on GitHub
<#82 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPQAC6VDJDO6WDA6HG2CYTUSMPXTANCNFSM5KQUR6KQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Checkout what Roman built for Containerlab:
https://json-schema.app/view/%23?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsrl-labs%2Fcontainerlab%2Fmain%2Fschemas%2Fclab.schema.json
I use JSON schema in all sorts of places, so I know exactly how tedious it is ;) Here’s a simple example:
https://www.ipspace.net/kb/DataModels/70-Validation.html
It’s nice to know there’s an online app to work with JSON schemas. Thanks for the pointer.
Best,
Ivan
On Thu, Dec 23, 2021 at 7:28 AM Ivan Pepelnjak ***@***.***> wrote:
What I'm aiming for is a simple and stable core that is reasonably easy to
implement on new devices plus the ability to extend it.
Obviously we could use a YANG data model to describe the lab topology data
model, but I'm guessing that it's still easier for most people to add a
YAML list saying "add these keywords to a module" than to create an
augmented YAML data model.
Anyway, the whole extensibility framework is much more than just adding
attributes to a data model -- you need topology-to-device data
transformation and then node-to-configuration transformation (regardless of
whether the configuration is YANG-controlled or a text file).
—
Reply to this email directly, view it on GitHub
<#82 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPQAC6VDJDO6WDA6HG2CYTUSMPXTANCNFSM5KQUR6KQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
netlab got attribute validation in 1.5.0 |
Beta Was this translation helpful? Give feedback.
-
Reading https://github.com/ipspace/netsim-tools/blob/master/docs/extend-attributes.md#extending-module-attributes, I'm wondering what could be the purpose?
The module wouldn't use such attributes in its templates, as it is not aware of them (if not, it should have declared them as attributes to start with)
I could see the point of moving this declaration into each module's code, as opposed to the global defaults ( i.e. define the attributes at the point of usage ). The extension mechanism makes sense to me, just not the specific use case here
Beta Was this translation helpful? Give feedback.
All reactions