[MDSAL-447] Support life cycle management of YANG file at runtime Created: 06/May/19  Updated: 25/Jun/19

Status: Confirmed
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Epic Priority: Low
Reporter: Alexis de Talhouët Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Life cycle management of YANG file can start with add and delete only.

Here is what I envison:

Use case would be to have external system able to

  1. manage YANG model(s) that are self contained, e.g. there is no interaction with other deployed YANGs
    - add:
      action: RPC to either accept a file, or a raw string
      behaviour: That RPC would
                                validate the YANG file(s)
                                generate RESTCONF APIs to interact with it
    - delete
      action: RPC to delete based on module name and revision date (assuming this combinaison is unique)
      behaviour: That RPC would
                                delete the datastore owned by that YANG (config and oper)
                                unsubscribe all open web-socket subscribtion(s) to any path of that YANG tree
                                unsubscribe all open YANG notification subscriptions
                                remove the generated RESTCONF APIs along with the YANG file(s)

  2. Interact with specific YANG tree using the generated RESTCONF APIs of that YANG, for config and/or oper based on use case

  3. Register to web-socket notification for a specific path/sub-path of a YANG, or use TSDR for consumption of YANG notification (e.g. through kafka)

 

The web-socket / YANG notification thing can be seen as enhancements.



 Comments   
Comment by Robert Varga [ 08/Jun/19 ]

adetalhouet do I understand correctly 3. to mean that effectively you'd like to see a stream of updates to a particular Kafka topic being delivered whenever a YangInstanceIdentifier changes?

Comment by Alexis de Talhouët [ 25/Jun/19 ]

Yes, but this is, at this point, the least important part of the feature.

The key of this really to have the ability to load yang in the system at runtime  and have restconf binding auto-generated with APIs for that yang being exposed.

Comment by Robert Varga [ 25/Jun/19 ]

Yes, so essentially you would be using this as a REST-accessible external datastore to some other system, right?

Comment by Alexis de Talhouët [ 25/Jun/19 ]

Yes, exactly.

Comment by Robert Varga [ 25/Jun/19 ]

Right. So I think we do have all the building blocks needed, it's just a matter of some quality LEGO time.

Comment by Alexis de Talhouët [ 25/Jun/19 ]

That's what I think as well. I'll be glad to help assembling LEGO if needed. If you have pointers/ideas on how to do, I can work on it.

Thank you for considering the feature, I believe this will be a great addition to ODL.

Comment by Robert Varga [ 25/Jun/19 ]

Changed to epic, as this really is a project-scoped thing, i.e. it has a RESTCONF dependency, but it's not something we want to co-install with other features except our dependencies.

One thing to consider: should the management (add/remove models) and access (get/put) have different endpoints?

Comment by Alexis de Talhouët [ 25/Jun/19 ]

> this really is a project-scoped thing

Right, I was initially thinking MDSAL providing this feature, but I don't know if MDSAL could have dependency on RESTCONF, given the dependency tree. But with these projects having their own release lifecycle, maybe it is acceptable..

> One thing to consider: should the management (add/remove models) and access (get/put) have different endpoints?

Yes, I envision management API/contract having its own model, defining a container having a list with revision-date and namespace as keys. That model could have RPCs for add/remove models, but this could be redundant with get/put to the list.

For data access, I was thinking of using RESTCONF RFC standard following the same pattern as other YANGs already exposed by ODL.

Comment by Robert Varga [ 25/Jun/19 ]

adetalhouet so on the datastore semantics: do you just need running (implied stored), or running without persistence, or also operational?

In NMDA-speak:

  • do you need to manipulate 'intended'?
  • if so, is 'intended' all you care about?

 

Comment by Alexis de Talhouët [ 25/Jun/19 ]

I was thinking having configuration and operational datastores, so the external system can track state accordingly.

I'm not familiar with the NMDA terminology, but it seems
The intended configuration datastore (<intended>) is a read-only configuration datastore
hence I'm not sure that is the expectation, as the point would be to have external system able to write to the datastore.

Comment by Robert Varga [ 25/Jun/19 ]

Not only that, <intended> is not persisted and derived from <running> plus-whatever-implementation-specific.

At any rate, if you are looking for operational, you are in violation of RFC8040 (which boils down to running-only), so you need NMDA as well.

That opens up a bit of a question: to what extent do you need the validated? Should we go for 'config=true, paranoid' or are there things we can rely on the user to do?

Comment by Robert Varga [ 25/Jun/19 ]

Forgot to explicitly call out: do you expect persistence guarantees? (assuming here that you'd run a container-per-datastore model here)

Comment by Alexis de Talhouët [ 25/Jun/19 ]

I'm not familiar with these things. Basically, datastore semantics doesn't need to be anything different than what ODL has to offer today. Likewise for the persistence, as there are already mechanisms to backup&restore and persist datastore today.

Generated at Wed Feb 07 20:09:50 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.