diff options
Diffstat (limited to 'netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref')
8 files changed, 119 insertions, 0 deletions
diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/cont-augment-module.yang b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/cont-augment-module.yang new file mode 100644 index 0000000..b54027e --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/cont-augment-module.yang @@ -0,0 +1,39 @@ +module cont-augment-module { + namespace "cont:augment:module"; + + prefix "cntaugmod"; + + import main-module {prefix mamo; revision-date 2013-12-02;} + + revision 2013-12-02 { + + } + + augment "/mamo:cont" { + leaf-list lflst1 { + type leafref { + path "../mamo:lf1"; + } + } + + leaf lf4 { + type leafref { + path "../mamo:lf1"; + } + } + + /* reference to not leaf element */ + leaf lf6 { + type leafref { + path "../lflst1"; + } + } + + leaf lf7 { + type leafref { + path "../lf4"; + } + } + } + +} diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/main-module.yang b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/main-module.yang new file mode 100644 index 0000000..0d90d2b --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/main-module.yang @@ -0,0 +1,50 @@ +module main-module { + namespace "main:module"; + + prefix "mainmod"; + revision 2013-12-02 { + } + + container cont { + leaf lf1 { + /* + *FIX ME + * If is this leaf lf1 called from cont-augment-module.yang + * from lf4, type that will be returned to the lf1 is string. + * Than there are failing tests because of we have string, + * do not number(uint32) + */ +// type uint32; + type string; + } + + container cont1 { + leaf lf11 { + /* + * FIX ME TOO WITH BAD PARSING + */ +// type boolean; + type string; + } + } + + leaf lf2 { + type leafref { + path "../lf1"; + } + } + + leaf lf3 { + type leafref { + path "/cont/cont1/lf11"; + } + } + + /* reference to nonexisting leaf */ + leaf lf5 { + type leafref { + path "/cont/lf"; + } + } + } +} diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_absolut_ref_to_existing_leaf.xml b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_absolut_ref_to_existing_leaf.xml new file mode 100644 index 0000000..bd5b6a2 --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_absolut_ref_to_existing_leaf.xml @@ -0,0 +1,7 @@ +<cont xmlns="main:module" + xmlns:cont-augment-module="cont:augment:module"> + <cont1> + <lf11>true</lf11> + </cont1> + <lf3>true</lf3> +</cont>
\ No newline at end of file diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_from_leafref_to_leafref.xml b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_from_leafref_to_leafref.xml new file mode 100644 index 0000000..7b1c277 --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_from_leafref_to_leafref.xml @@ -0,0 +1,4 @@ +<cont xmlns="main:module" + xmlns:cont-augment-module="cont:augment:module"> + <cont-augment-module:lf7>200</cont-augment-module:lf7> +</cont>
\ No newline at end of file diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_ref_to_non_existing_leaf.xml b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_ref_to_non_existing_leaf.xml new file mode 100644 index 0000000..cdbd56b --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_ref_to_non_existing_leaf.xml @@ -0,0 +1,4 @@ +<cont xmlns="main:module" + xmlns:cont-augment-module="cont:augment:module"> + <lf5>137</lf5> +</cont>
\ No newline at end of file diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_ref_to_not_leaf.xml b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_ref_to_not_leaf.xml new file mode 100644 index 0000000..953280b --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_ref_to_not_leaf.xml @@ -0,0 +1,4 @@ +<cont xmlns="main:module" + xmlns:cont-augment-module="cont:augment:module"> + <cont-augment-module:lf6>44</cont-augment-module:lf6> +</cont>
\ No newline at end of file diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_relativ_ref_from_leaflist_to_existing_leaf.xml b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_relativ_ref_from_leaflist_to_existing_leaf.xml new file mode 100644 index 0000000..8fe0ac4 --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_relativ_ref_from_leaflist_to_existing_leaf.xml @@ -0,0 +1,6 @@ +<cont xmlns="main:module" + xmlns:cont-augment-module="cont:augment:module"> + <cont-augment-module:lflst1>345</cont-augment-module:lflst1> + <cont-augment-module:lflst1>346</cont-augment-module:lflst1> + <cont-augment-module:lflst1>347</cont-augment-module:lflst1> +</cont>
\ No newline at end of file diff --git a/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_relativ_ref_to_existing_leaf.xml b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_relativ_ref_to_existing_leaf.xml new file mode 100644 index 0000000..14a2544 --- /dev/null +++ b/netconf/restconf/restconf-nb-bierman02/src/test/resources/nn-to-json/leafref/xml/data_relativ_ref_to_existing_leaf.xml @@ -0,0 +1,5 @@ +<cont xmlns="main:module" + xmlns:cont-augment-module="cont:augment:module"> + <lf1>121</lf1> + <lf2>121</lf2> +</cont>
\ No newline at end of file |