[NETCONF-3] Export schema information for data subtree Created: 20/May/14  Updated: 15/Mar/19  Resolved: 12/Oct/18

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Lucia Pargacova Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

It's needed to add functionality to ODL - getting yang model (in yin format) via rest API from physical net elements with info about datastorage - config or operational.



 Comments   
Comment by Juraj Sebin [ 27/May/14 ]

Maybe Restconf API explorer can be somehow used in this (https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf_API_Explorer)

Comment by Tony Tkacik [ 15/Jul/14 ]

Are you asking for returning YIN version of YANG data?

Comment by Robert Varga [ 31/Jul/14 ]

So there are two things we can do:

1) implement yang-monitoring in MD-SAL, as Tony suggested

2) expose current schemacontext as a REST-rooted document

There are upsides and downsides to both and I think we really want to do both. The upside of 1) is simplicity and existing model of model. The downside is that it gives you only module-level visibility, not how things fit together.

Option 2 requires a custom REST endpoint, but it gives you the properly cross-referenced view of how the data world looks like from the perspective of the controller, e.g. all augments are properly resolved, all uses are inlined, etc.

Comment by Juraj Sebin [ 28/Aug/14 ]

In regard to option 1/ (at least for our needs), single module visiblity wouldn't be a problem, because we already working with it (we are already processing uses/grouping and augment statements)

Comment by Robert Varga [ 13/Nov/15 ]

Move to NETCONF project

Comment by Robert Varga [ 07/Nov/16 ]

YIN export is available from the yangtools project. RESTCONF needs to project these exports via the protocol – I think yang library should cover this.

Comment by Jakub Morvay [ 12/Oct/18 ]

Described functionality should be present both in RFC8040 and Bierman02 RESTCONF implementations.

 

Bierman02: See SchemaRetrievalService.java API, you should be able to get ODL and mountpoints schemas at:

 

/modules/module/{identifier:.+}/schema

where identifier is module name and revision (ODL schemas) or mountpoint id and module name with revision (mountpoint schemas).

 

 

Please see following examples,

ODL schema resource:

 

 

restconf/modules/module/ietf-netconf/2011-06-01/schema

mountpoint schema resource:

 

 

/restconf/modules/module/network-topology:network-topology/topology/topology-netconf/node/netconf-node/yang-ext:mount/ietf-netconf/2011-06-01/schema

 

For RFC 8040 implementations, you should be able to get schemas at:

 

/rests/modules/{identifier:.+}

where identifier is again module name with its revision or for mountpoint schemas you need to add also mountpoint id.

 

 

Both YANG and YIN formats are supported (you can specify them in accept HTTP header).

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