Ask Your Question
0

Augmenting an augmented Yang model

asked 2015-06-17 16:20:24 -0700

labry gravatar image

updated 2015-06-17 16:29:33 -0700

Hi,

I think augmenting is possible only once, but the document does not mention if it is possible to augment again or not. Is it possible to augment an already augmented module? if possible, tell me how?

Thanks

edit retag flag offensive close merge delete

Comments

If you have a service model say "services", and you have modules for different services, service_A, service_B, service_C each defining their own models. You can augment them to the services using augment statements in each of service_A,service_B and service_C. Also, a given service_A can augment at multiple locations in the service(schemaTree)

Srijit Nair ( 2015-06-20 22:18:14 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-06-22 12:30:16 -0700

Hello,

Keep in mind that when you "augment", you are augmenting something generic. So the best way to augment multiple times is to augment the generic definition. Explanation with example:

Here we have a "node": https://github.com/opendaylight/yangtools/blob/3ba82c14c3e73d5141edc695f695d8e377c42bf1/integration-test/bug1196-test-model/src/main/yang/network-topology%402013-10-21.yang#L18 This is a network-topology node.

Here we augment that "node" with 3 types of augmentations: https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/src/main/yang/ovsdb.yang#L847 https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/src/main/yang/ovsdb.yang#L853 https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/src/main/yang/ovsdb.yang#L859

Hope it answers your question.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2015-06-17 16:20:24 -0700

Seen: 383 times

Last updated: Jun 22 '15