Ask Your Question
0

Dynamically (runtime) Adding Yang Schema

asked 2016-12-22 06:01:57 -0700

avichap gravatar image

updated 2016-12-25 01:54:48 -0700

I am trying to commit an arbitrary DOM based yang module via the dom broker reference. once I commit I get a validation exception due to missing schema object.

How to I dynamically add yang schema to the domBroker so that the validation will pass and I will be able to store the DOM object.

I tried using the SchemaService. addModule(<my yang="" module="">) and got an unsupportedOperationException. is there an alternative way?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-01-10 05:21:35 -0700

avichap gravatar image

HI,

I have managed to load the yang schema by dynamically creating a yang bundle and programmatically installing it to OSGI,

The Yang bundle need to have a META-INF/yang folder with all the yang files.

once installing and starting the Bundle ODL updates the global schema context and validations and storing to MD-SAL DOM store works.

Thanks, Avi

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-12-22 06:01:57 -0700

Seen: 426 times

Last updated: Jan 10