[ONOS-4829] Augmented data method generator implmentation.
Change-Id: I0cb68dd10a748e5b66eec0b832574f408a23ba5c
diff --git a/plugin/src/test/resources/xPathLinker/Case/submodule/test.yang b/plugin/src/test/resources/xPathLinker/Case/submodule/test.yang
new file mode 100644
index 0000000..dbff7e8
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/submodule/test.yang
@@ -0,0 +1,31 @@
+module test {
+ namespace "xpath:intra:single";
+ prefix test ;
+
+ include test1;
+ include test2;
+ include test4;
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ augment /cont5/cont6 {
+ leaf a {
+ type int32;
+ }
+ }
+
+ augment /cont3/cont4/cont8 {
+ leaf a {
+ type int32;
+ }
+ }
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/submodule/test1.yang b/plugin/src/test/resources/xPathLinker/Case/submodule/test1.yang
new file mode 100644
index 0000000..23161d4
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/submodule/test1.yang
@@ -0,0 +1,47 @@
+submodule test1 {
+
+ belongs-to test {
+ prefix test;
+ }
+
+ include test4;
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ container cont1 {
+ leaf leaf1 {
+ type int32;
+ }
+ container cont2 {
+ leaf leaf2 {
+ type int32;
+ }
+ }
+ }
+
+ augment /cont1/cont2 {
+ container cont4 {
+ leaf leaf1 {
+ type int32;
+ }
+ }
+ }
+
+ augment /cont3/cont4 {
+ container cont8 {
+ leaf leaf8 {
+ type int32;
+ }
+ }
+ }
+
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/submodule/test2.yang b/plugin/src/test/resources/xPathLinker/Case/submodule/test2.yang
new file mode 100644
index 0000000..26640ee
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/submodule/test2.yang
@@ -0,0 +1,36 @@
+submodule test2{
+ belongs-to test {
+ prefix test;
+ }
+
+ include test1;
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ container cont5 {
+ leaf leaf5 {
+ type int32;
+ }
+ container cont6 {
+ leaf leaf6 {
+ type int32;
+ }
+ }
+ }
+
+ augment /cont1/cont2/cont4 {
+ container cont10 {
+ leaf leaf10 {
+ type int32;
+ }
+ }
+ }
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/submodule/test4.yang b/plugin/src/test/resources/xPathLinker/Case/submodule/test4.yang
new file mode 100644
index 0000000..fcbf522
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/submodule/test4.yang
@@ -0,0 +1,28 @@
+submodule test4 {
+
+ belongs-to test {
+ prefix test;
+ }
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ container cont3 {
+ leaf leaf3 {
+ type int32;
+ }
+ container cont4 {
+ leaf leaf4 {
+ type int32;
+ }
+ }
+ }
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/uses/test.yang b/plugin/src/test/resources/xPathLinker/Case/uses/test.yang
new file mode 100644
index 0000000..e57a468
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/uses/test.yang
@@ -0,0 +1,31 @@
+module test {
+ namespace "xpath:intra:single";
+ prefix test ;
+
+ include test1;
+ include test2;
+ include test4;
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ augment /cont5/cont6/cont3/cont4 {
+ leaf a {
+ type int32;
+ }
+ }
+
+ augment /group1/cont3/cont4/cont8 {
+ leaf a {
+ type int32;
+ }
+ }
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/uses/test1.yang b/plugin/src/test/resources/xPathLinker/Case/uses/test1.yang
new file mode 100644
index 0000000..2c5dc20
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/uses/test1.yang
@@ -0,0 +1,47 @@
+submodule test1 {
+
+ belongs-to test {
+ prefix test;
+ }
+
+ include test4;
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ container cont1 {
+ leaf leaf1 {
+ type int32;
+ }
+ container cont2 {
+ leaf leaf2 {
+ type int32;
+ }
+ }
+ }
+
+ augment /cont1/cont2 {
+ container cont4 {
+ leaf leaf1 {
+ type int32;
+ }
+ }
+ }
+
+ augment /group1/cont3/cont4 {
+ container cont8 {
+ leaf leaf8 {
+ type int32;
+ }
+ }
+ }
+
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/uses/test2.yang b/plugin/src/test/resources/xPathLinker/Case/uses/test2.yang
new file mode 100644
index 0000000..fedb0aa
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/uses/test2.yang
@@ -0,0 +1,56 @@
+submodule test2{
+ belongs-to test {
+ prefix test;
+ }
+
+ include test1;
+ include test4;
+
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ grouping group2 {
+ container cont11 {
+ }
+ }
+
+ container cont5 {
+ leaf leaf5 {
+ type int32;
+ }
+ container cont6 {
+ leaf leaf6 {
+ type int32;
+ }
+ uses group1;
+ }
+ }
+
+ container ethernet {
+ leaf leaf10 {
+ type string;
+ }
+ }
+
+
+ augment /ethernet {
+ uses group2;
+ }
+
+ augment /cont1/cont2/cont4 {
+ container cont10 {
+ leaf leaf10 {
+ type int32;
+ }
+
+ }
+ }
+}
+
diff --git a/plugin/src/test/resources/xPathLinker/Case/uses/test4.yang b/plugin/src/test/resources/xPathLinker/Case/uses/test4.yang
new file mode 100644
index 0000000..589179d
--- /dev/null
+++ b/plugin/src/test/resources/xPathLinker/Case/uses/test4.yang
@@ -0,0 +1,37 @@
+submodule test4 {
+
+ belongs-to test {
+ prefix test;
+ }
+
+ include test2;
+ organization "";
+ contact "";
+
+ description
+ "Defines basic service types for L3VPN service.";
+
+ revision "2015-12-16" {
+ reference "";
+ }
+
+ grouping group1 {
+ container cont3 {
+ leaf leaf3 {
+ type int32;
+ }
+ container cont4 {
+ leaf leaf4 {
+ type int32;
+ }
+ }
+ }
+ }
+
+ augment /ethernet/cont11 {
+ leaf leaf11 {
+ type int32;
+ }
+ }
+
+}
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test.yang
index 139e2c5..adb4800 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test.yang
@@ -21,7 +21,7 @@
}
augment /test2:cont1/test2:cont2/test2:cont3/test1:cont2 {
- leaf a {
+ leaf leaf8 {
type int32;
}
}
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test1.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test1.yang
index ed3716f..0957e15 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test1.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test1.yang
@@ -29,7 +29,7 @@
type int32;
}
container cont2 {
- leaf leaf1 {
+ leaf leaf3 {
type int32;
}
}
@@ -37,12 +37,12 @@
}
augment /test2:cont1/test2:cont2/test2:cont3 {
- leaf a {
+ leaf leaf2 {
type int32;
}
container cont2 {
- leaf leaf1 {
+ leaf leaf4 {
type int32;
}
}
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test2.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test2.yang
index f65bef0..0eeb46d 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test2.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiFileAugmentMulti/test2.yang
@@ -13,11 +13,11 @@
}
container cont1 {
- leaf leaf1 {
+ leaf leaf5 {
type int32;
}
container cont2 {
- leaf leaf1 {
+ leaf leaf6 {
type int32;
}
}
@@ -25,7 +25,7 @@
augment /cont1/cont2 {
container cont3 {
- leaf a {
+ leaf leaf7 {
type string;
}
}
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiUses/test.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiUses/test.yang
index 80ee110..01aa34e 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterMultiUses/test.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterMultiUses/test.yang
@@ -23,7 +23,7 @@
uses test2:group1;
}
- augment /cont2/group1/cont1/cont2 {
+ augment /cont2/cont1/cont2 {
leaf a {
type int32;
}
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test.yang
index 4b15645..15a6fab 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test.yang
@@ -19,14 +19,14 @@
}
augment /test2:cont1/test2:cont2/cont2 {
- leaf a {
+ leaf leaf {
type int32;
}
uses group1;
}
- augment /test2:cont1/test2:cont2/cont2/group1/cont1/cont2 {
- leaf a {
+ augment /test2:cont1/test2:cont2/cont2/cont1/cont2 {
+ leaf leaf1 {
type int32;
}
}
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test1.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test1.yang
index fbc3bcb..e7fbc31 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test1.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test1.yang
@@ -21,7 +21,7 @@
grouping group1 {
container cont1 {
container cont2 {
- leaf a {
+ leaf leaf2 {
type string;
}
}
@@ -29,7 +29,7 @@
}
augment /test2:cont1/test2:cont2 {
- leaf a {
+ leaf leaf3 {
type int32;
}
container cont2 {
diff --git a/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test2.yang b/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test2.yang
index f20ac7d..2905f9a 100644
--- a/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test2.yang
+++ b/plugin/src/test/resources/xPathLinker/InterFile/InterSingleUses/test2.yang
@@ -13,11 +13,11 @@
}
container cont1 {
- leaf leaf1 {
+ leaf leaf4 {
type int32;
}
container cont2 {
- leaf leaf1 {
+ leaf leaf5 {
type int32;
}
}
diff --git a/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang b/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang
index 6cfb133..6d7473d 100644
--- a/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang
+++ b/plugin/src/test/resources/xPathLinker/IntraFile/IntraMultiUses/test.yang
@@ -29,7 +29,7 @@
uses group1;
}
- augment /cont2/group1/cont1/cont3 {
+ augment /cont2/cont1/cont3 {
leaf a {
type int32;
}
diff --git a/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang b/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang
index c60668a..3074db7 100644
--- a/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang
+++ b/plugin/src/test/resources/xPathLinker/IntraFile/IntraSingleUses/test.yang
@@ -24,7 +24,7 @@
uses group1;
}
- augment /cont2/group1/cont1 {
+ augment /cont2/cont1 {
leaf a {
type int32;
}