Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

(Please see https://wiki.onap.org/display/DW/Existing+Yang+Parser)

OpenDayLight Yang tools recognise recognize YANG extensions

  • Contains interface which has methods to access data of a YANG extension statement

    Code Block
    languagejava
    themeEclipse
    titleYang tools ExtensionDefinition Interface
    package org.opendaylight.yangtools.yang.model.api;
    import org.opendaylight.yangtools.yang.model.api.stmt.ExtensionEffectiveStatement;
    public interface ExtensionDefinition extends SchemaNode, EffectiveStatementEquivalent<ExtensionEffectiveStatement> {
        String getArgument();
        boolean isYinElement();
    }      


Test cases and scenarios

The following test cases used and modified the standard stores model seen above.

Case #DescriptionJAVA objectNotes
1


Code Block
collapsetrue
module stores {
    yang-version 1.1;
	...
    extension sync-flag{
        description "This extension allows to tag nodes with a sync flag";
        argument "value";
    }

    typedef year {...}

    container bookstore {
        book-store:sync-flag "on";
		...
        leaf bookstore-name {...}
...
}




2