Robert Varga [Wed, 5 Jul 2017 11:19:44 +0000 (13:19 +0200)]
Optimize JavaIdentifierNormalizer.normalizeClassIdentifier()
Inner split-and-iterate is really just a simple substring assembly,
as mentioned in comments. Let's not go off into weeds and perform
a simple lastIndexOf() and substring() operations.
Change-Id: I2f21a6c92644a358bd9f8316bedde33f8b661f13
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
620b863120d334412d280cf1d4480107f4aa392d)
Robert Varga [Wed, 5 Jul 2017 10:29:24 +0000 (12:29 +0200)]
Do not use temporary string to extract last character
StringBuilder is a CharSequence, hence turning it into a String
just to get a character from it is wasteful.
Change-Id: Icba9d5b7ebc1207498a06b41fec84aa74a19ff3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
78da6b0de0b2c5673ff144b043ef6aaf506a88b7)
Robert Varga [Wed, 5 Jul 2017 10:17:04 +0000 (12:17 +0200)]
Optimize JavaIdentifierNormalizer.normalizeClassIdentifier()
Do not use toLowerCase() in order to perform a simple compare.
Change-Id: Iadb0fce7a7ec163494442396111c6f473ac649e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
bf58434226294ecaf660584d840940cedeb18010)
Robert Varga [Wed, 5 Jul 2017 10:10:01 +0000 (12:10 +0200)]
Optimize fixCasesByJavaType for packages
Rather than doing expensive String.replaceAll(), use CharMatcher's
removeFrom().
Change-Id: I1748fdb3fe11246b81b598cba12ddf166ee3cb4e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
245a006423d41d1d4946d6a40b2f3311525f897a)
Robert Varga [Wed, 5 Jul 2017 10:06:43 +0000 (12:06 +0200)]
Optimize convertIdentifierEnumValue()
Use String.equalsIgnoreCase() rather than converting strings around.
Change-Id: I1695bd7aff746a4920fe985d2f95f31d1ed875b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d53de03aabb1e63d54d927d62775090da3620db6)
Robert Varga [Wed, 5 Jul 2017 09:55:38 +0000 (11:55 +0200)]
Optimize JavaIdentifierNormalizer.fixCases()
Rather than doing expensive String.split(), optimize the method
for non-underscore case and take advantage of Splitter. Also
peel the first iteration out of the loop.
Change-Id: I452737f1d3b65600aa73b19cf17ea837b12f843c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
21600d42239d0733a7b8d9de9ee442de108c8149)
Jie Han [Fri, 7 Jul 2017 08:51:13 +0000 (16:51 +0800)]
Binding generator v2 - uses statement - uses augment
Change-Id: I04cd6044ad81fb8a71dd5ee70b5d06e7d01bf5f2
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
9e7fdf90771bb0ecb1dcaffcfb6ff58e93ec20b0)
Jie Han [Mon, 10 Jul 2017 07:07:02 +0000 (15:07 +0800)]
Binding generator v2 - augment statement #2
- fix augment package and class name
Change-Id: I00e5f1d0547fdf15b9c5ee5abc9059c343feccc8
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
dd12713af387be01539547adbdc001e7ce2dcc43)
Jie Han [Mon, 10 Jul 2017 06:57:41 +0000 (14:57 +0800)]
Binding generator v2 - augment statement #1
- Only resolve augmentation that it's target in same module
Change-Id: Ifb135570871e37a697238919ec6b6ef08cb8d048
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
fb0cecb23bc02de2e243ce6f7a2b4df59a7334ff)
Jie Han [Fri, 7 Jul 2017 06:19:38 +0000 (14:19 +0800)]
Binding generator v2 - uses statement - uses of list
- fix list getter name of leaf "key" and
do not add list name as prefix of leaf name.
key "key" ; // -> getKey
leaf key { // -> getKeyReservedWord
....
}
leaf key1 { // -> getKey1
Change-Id: I84821fbeb378e2cdd02730a2c9c0da8a288e2e90
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
58ec504edcb0c8a287b7b871022c715b1e9d6789)
Jie Han [Fri, 7 Jul 2017 02:44:26 +0000 (10:44 +0800)]
Binding generator v2 - uses statement - uses of module
Change-Id: I8a2c5c9872be167ee0883a5a3020af7f4dc1d937
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
70c109ac0bde4fc1c1c94e423242522df0f06cc7)
Jie Han [Tue, 27 Jun 2017 08:14:54 +0000 (16:14 +0800)]
Binding generator v2 - uses statement - support choice
- generate type from uses choice which extends reference choice type
- add test yang
Note: fix getter in case type in grouping by
"Binding generator v2 - Clean up codes of constructGetter
Change-Id: I1e72a6812ac5c32974b2db2c1b6c343ae0944bd8
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
d68c7fe825e06409bdd721dd15437ae72be097c5)
Jie Han [Thu, 6 Jul 2017 12:17:40 +0000 (20:17 +0800)]
Binding generator v2 - uses statement - uses of rpc & action
Change-Id: I67ca5f9551141fc72de3644b7f6a0ee4c37c548c
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
1352a76c9a3fe8638093a8477575f8fda76f8fcb)
Jie Han [Thu, 6 Jul 2017 12:15:48 +0000 (20:15 +0800)]
Binding generator v2 - uses statement - restore getter
- restore getter name without suffix "Data"
Change-Id: I1c3dfd17c1a6507170e79b6945d36992ddfe1f36
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
826538f5c121f753db2a5afa483d9e8d7e57b4be)
Jie Han [Fri, 30 Jun 2017 07:38:18 +0000 (15:38 +0800)]
Binding generator v2 - Type reference fix
Change-Id: I85e08bdb4bfe09ac12604b1e57d1933f753a0176
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
23da4f4d9b685af9c40ab570158aa0263042ed57)
Jie Han [Fri, 30 Jun 2017 15:40:03 +0000 (23:40 +0800)]
Binding generator v2 - Identity fix
Change-Id: Iad246a2dfc355832ff5869a5b0bbd7b330140d00
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
b9712d4e34708ae0c5c6779bd3218557f593007d)
Robert Varga [Wed, 5 Jul 2017 09:23:35 +0000 (11:23 +0200)]
Optimize JavaIdentifierNormalizer.convertFirst()
Rather than fiddling around with temporary strings, perform a direct
replacement capabilities of CharMatcher with two possible matches.
Change-Id: I50c4f229ef38dcd9327da183372fc5e6d7c2faf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
50d9f2ba56f265b5b0b1a19e67ad569ecabf61c3)
Jie Han [Tue, 27 Jun 2017 03:23:17 +0000 (11:23 +0800)]
Binding generator v2 - uses statement - support list
- generate type from uses list which extends reference list type
- add suffix "Data" to the method getKey in grouping to avoid clashing with
the method generated from uses this grouping
- add test yang
Change-Id: Id9dde5688515732abe7d8e0e7ba8b68290f14fef
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
98178444055d011062f7e3350cfd6a4a391c8aa2)
Jie Han [Thu, 6 Jul 2017 08:17:11 +0000 (16:17 +0800)]
Binding generator v2 - uses statement - resolve uses node
Change-Id: I06c06180e84b2798c746d00cc53be200c654af90
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
7aecab16128ca4f551e4c736ba395acdba2c30d7)
Jie Han [Thu, 6 Jul 2017 09:29:56 +0000 (17:29 +0800)]
Binding generator v2 - uses statement - uses of notification
- changed for bebase
Change-Id: I78acfd070b8fe1e9987adf7de01aab81037106a4
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
e2b08f79e353126cc0e89f3891aae032c591c515)
Robert Varga [Wed, 5 Jul 2017 08:55:27 +0000 (10:55 +0200)]
Optimize JavaIdentifierNormalizer.normalizePartialPackageName()
- eliminate duplicate String.toLower() calls
- use StringBuilder.length() instead of toString.isEmpty()
- use CharMatcher.replaceFrom() instead of String.replaceAll()
- reuse innerSb
Change-Id: I7fcdb1f2b3d6a9a0d549b1506e5a381d94ed1ba6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
539c9d657cc0aff53bd05bba74545275cba8885c)
Robert Varga [Wed, 5 Jul 2017 08:35:26 +0000 (10:35 +0200)]
Optimize JavaIdentifierNormalizer.normalizeFullPackageName()
Use a Splitter instead of String.split(), pre-allocate StringBuilder
with an estimated size and remove duplicate at-end checks.
Change-Id: I0f0a51533ae26aec58cf514499ffd4e0a9f3d584
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
106dc46a7d431c140869cb346b38c4f5142016b5)
Robert Varga [Wed, 5 Jul 2017 09:12:05 +0000 (11:12 +0200)]
Optimize JavaIdentifierNormalizer.existNext()
Simplify conditional down to a simple expression.
Change-Id: I9914276aabff7463121d9c79f47f07a414a2e6c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ee7ca68f75cee58e6250fd2ddae42365616b54b6)
Jie Han [Wed, 5 Jul 2017 14:15:48 +0000 (22:15 +0800)]
Binding generator v2 - uses statement - uses implements
- interfaces generated for data children extends (implements) interfaces for
same children generated for referenced grouping
Change-Id: I4d9cd6e31760870353c5fdb22b7d961b195db8a0
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
d62116a5cd78856140135a991b1efe09081fe127)
Martin Ciglan [Tue, 11 Jul 2017 07:21:50 +0000 (09:21 +0200)]
Binding2-dom-adapter JUnit code coverage increase
- JUnit tests
- code clean-up
- ignore failing test from different package for now
Change-Id: Ia9ad961c7f4a4f7f342d3732f61ed838fecb6593
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
5d8911c43a7ad34a8f189289567742811f5fd981)
Jie Han [Thu, 6 Jul 2017 03:21:38 +0000 (11:21 +0800)]
Binding generator v2 - fix case builder to dto
Change-Id: I162e6349022a1fcc0efb69b84beba3b6c4716b71
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
e11c488ca9cbfa667b0cae9cad0b66eb304e6ee2)
Robert Varga [Wed, 5 Jul 2017 08:26:55 +0000 (10:26 +0200)]
Cleanup JavaIdentifierNormalizer
Eliminate overly-long line and eliminate unneeded parentheses.
Change-Id: Ifa6e22f2166a3362b6876db3532f940a9fe8367d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ee7a46fbaedcb61ca59851917b4fbe1848b1e39b)
Jakub Toth [Fri, 23 Jun 2017 10:25:00 +0000 (12:25 +0200)]
Binding v2 - remove checked future
Change-Id: I641ae876a76ba8e06d60ec5c63d6bdf7e3695973
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
jenkins-releng [Fri, 14 Jul 2017 12:49:20 +0000 (12:49 +0000)]
Bump versions by x.y.(z+1)
Change-Id: Ie62822d6d3bf54fba025492caf414f6a283c089d
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
xygeng [Thu, 29 Jun 2017 09:06:11 +0000 (17:06 +0800)]
Bug 8769 YangTextTemplate throw exception during yang binding Code Generator
Change-Id: Ibbf5cfd60f3110cf7298dcf5a31720672b6ca296
Signed-off-by: Geng Xingyuan <geng.xingyuan@zte.com.cn>
Martin Ciglan [Tue, 27 Jun 2017 12:00:44 +0000 (14:00 +0200)]
Binding v2 runtime - write transaction fix
- don't fiddle with normalizer in runtime
- make sure streamWriter method names correspond with yang-data-api naming
- JUnit test revealing mentioned issues added
Change-Id: Iebf92f43e0d3bd39e4c4c1aa0d38b8128cd7a918
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
6707b4a164734c6f2ea87bfe956a2367766e28a5)
Jie Han [Sat, 24 Jun 2017 08:05:28 +0000 (16:05 +0800)]
Binding generator v2 - namespace fix #4
- interfaces generated for data children extends
(implements) interfaces for same children generated for referenced grouping
- fix builder & key class link in description
- fix some tests
- cleanup codes
- fix hasBuilderClass
Change-Id: I7b26b9c930593f3874650d32f225e6c6c9313cbc
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
a3cd072bdec079b4c1cdaa985e7b6d9f769d1b0d)
Jie Han [Thu, 22 Jun 2017 09:01:45 +0000 (17:01 +0800)]
Binding generator v2 - namespace fix #3
- support generate type from uses grouping
- fix imports for builders in dto
- fiex merge conflicts
Change-Id: I211306a14243d5625a1af914329bca525ba54d7f
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
dd0a3c05d76d6576c66099eaefbbb9dc2dc90722)
Jie Han [Wed, 21 Jun 2017 09:40:18 +0000 (17:40 +0800)]
Binding generator v2 - namespace fix #2
- fix namespace of data type in grouping namespace
- add suffix "Grouping" for grouping type name
& "Data" for data type name
TODO #3 - support generate type from uses grouping
Change-Id: I1e59929169eb13bcba75de61770525d35213b524
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
58d35f538fe48fd71df99cc0e901da92634357a2)
Jie Han [Wed, 21 Jun 2017 06:27:02 +0000 (14:27 +0800)]
Binding generator v2 - namespace fix #1
- put builders to dto package
- add test yang
- fix merge conflicts
TODO
#2 - fix namespace of data type in grouping namespace
- add "Grouping" suffix for grouping type name
& "Data" for data type name
#3 - support generate type from uses grouping
Change-Id: Iac9fb8f76c8308860f166019d47b8849fb41f95e
ChangeId: I08aa15ebdc6ebefb5aa38869d9fb04bfe9664ee9
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
8d45e9e792a02e5aba4cef141f4df3955b21a378)
Martin Ciglan [Thu, 22 Jun 2017 14:25:49 +0000 (16:25 +0200)]
Binding generator v2 - Action, ListAction fix
- make sure generated code is compilable
- no unnecessary calls of Java identifier normalizer
- code clean up
- TODO: 2 JUnit tests needs some rework
Change-Id: I3f5151a60106fb21e60a1cff1afad40885215fde
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Martin Ciglan [Wed, 21 Jun 2017 10:17:18 +0000 (12:17 +0200)]
Binding generator v2 - Binary key fix
- small isues fixed to get generated code compilable
Change-Id: Idccf66675fddaba373758d810e03149c73ca0251
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Martin Ciglan [Tue, 20 Jun 2017 21:25:48 +0000 (23:25 +0200)]
Binding generator v2 - Identities fix
- if identity is once generated as base identity
of some other one, don't generate it again.
- this prevents unnecessary calls to JavaIdentifierNormalizer
and fixes compilablity issue (IdentityName.java vs. IdentityName1.java, etc..)
- code clean-up, javadoc fixes
Change-Id: Ie83f22d66bef06fd9a3b1850c09da8a3f9436062
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Martin Ciglan [Tue, 20 Jun 2017 19:05:26 +0000 (21:05 +0200)]
Binding generator v2 - Augments fix
- if YANG file uses augment identifier extension,
we need to normalize this identifier, otherwise
we end up with non-compilable generated Java code
- code clean up
Change-Id: I05ce4290b9587578944ef64428cff3e96d33dcf8
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Jakub Toth [Mon, 26 Jun 2017 09:02:38 +0000 (11:02 +0200)]
Binding v2 runtime - adapters - abstract data broker test
Change-Id: Ieeaf1a4e23af0b4c723c6a5cd771388d355ad70d
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
Martin Ciglan [Mon, 19 Jun 2017 10:24:56 +0000 (12:24 +0200)]
MDSAL Binding2 Features - Carbon only
Change-Id: Ib2c3b85fe14eaa675d294f01ad6b2ae85655afeb
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
Jakub Toth [Tue, 20 Jun 2017 12:39:03 +0000 (14:39 +0200)]
Binding v2 runtime - adapters - impl - operations
Change-Id: I2d95df66996bff0ae340c2f7799e6399081af6ef
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
20e925231d9a4d8bec35fe328c0f92f79886837d)
Jakub Toth [Tue, 20 Jun 2017 13:37:45 +0000 (15:37 +0200)]
Recover removed test case for JavaIdentifierNormalizerTest
Change-Id: Ia4064aec360e3e5f31a1322ded0730ca746f6bdf
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
fb3ffdcf0d424e8dc6638a875181f3f5c3d74129)
Jakub Toth [Mon, 19 Jun 2017 13:38:57 +0000 (15:38 +0200)]
Binding v2 runtime - adapters - impl - operations invoker
* added marker for operations
Change-Id: I7bf7144bf35882694c7223d6b3e5e2196757bd12
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
76cea2ee405a4edcec07788a21fb9c4848676554)
Jakub Toth [Fri, 16 Jun 2017 10:54:20 +0000 (12:54 +0200)]
Binding v2 runtime - adapters - impl - notifications
Change-Id: Ibfff70b6f4e9c5e4c7c198c95fb41ac278301eca
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
bb582aed99ca77913439628b1356b1b81877fd46)
Jie Han [Tue, 20 Jun 2017 07:11:24 +0000 (15:11 +0800)]
Binding generator v2 - augments fix #3
- handle Choice Cases augmentation
- add test yangs
- delete deprecated methods and fix tests
Change-Id: I78724808fcf4d5451cf2e0df29edf829abadb8dc
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
671ad01291ff0007de9fadd677c442ff0bf7ae14)
Martin Ciglan [Fri, 16 Jun 2017 13:44:22 +0000 (15:44 +0200)]
Binding generator v2 - augments fix #2
- handle uses-augment statements
for grouped augments by target path
- testing yang(s) included
- augmentations in groupings
TODO #3 Choice Cases
Change-Id: Ie670c03992bc41bb3e2f6efc1367f9bdf18da1b5
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
c542a344f0a3b18625e49fe43d6c69cec29364fe)
Jie Han [Fri, 16 Jun 2017 09:37:05 +0000 (17:37 +0800)]
Binding generator v2 - Namespace - Typedef package name fix
- add namespace to typedef type package name:
bits, unions, enumerations
Change-Id: Ifabac091c59e44780cdde34a18b6790c3b046d69
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
e56ee666d5d3a0983b15bb681d9f25db326aad43)
Jakub Toth [Thu, 15 Jun 2017 13:02:40 +0000 (15:02 +0200)]
Binding v2 runtime - adapters - impl - mount point
Change-Id: Ie714a6d22f5fcf033b8ba157bd3fae9772846807
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
71547ce0d7acf0313228eee087acaf73d913e044)
Jakub Toth [Thu, 15 Jun 2017 12:44:50 +0000 (14:44 +0200)]
Binding v2 runtime - adapters - transactions
Change-Id: I2b9734de0662c96d8388516024034da4240a3141
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
583b80b12001a568b73f9cfd4e516ecc73d14926)
Martin Ciglan [Thu, 15 Jun 2017 05:56:51 +0000 (07:56 +0200)]
Binding generator v2 - augments fix #1
- group augments by target path and generate code
accordingly.
TODO #2 uses-augment
#3 augmented choice-cases
Note: ignore some of failing existing tests
until all work here is done
Explanation:
yang snippet
container foo {
leaf my-leaf {
type string;
}
}
augment /foo:foo {
leaf bar {
type string;
}
}
augment /foo:foo {
leaf baz {
type string;
}
}
produces same generated code as
container foo {
leaf my-leaf {
type string;
}
}
augment /foo:foo {
leaf bar {
type string;
}
leaf baz {
type string;
}
}
Change-Id: I2bdb3ecf22bf2cb72fab3080f2b40748775ba49b
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
e2c9863b18008fce5c30bbd7e5af9858c0ade909)
Jakub Toth [Thu, 15 Jun 2017 12:17:16 +0000 (14:17 +0200)]
Binding v2 runtime - adapters - impl - data tree
Change-Id: Ice951cd38386a50efdf084f209faa5a902817e48
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
5e845756f6d4f3f4734fd73f3bef893212ef3b7d)
Jakub Toth [Wed, 14 Jun 2017 16:14:28 +0000 (18:14 +0200)]
Binding v2 runtime - adapters - registration
Change-Id: Ibb2dfbfa869852fda66972395d6a2a54633e7909
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
54f5afb6605d01e6d68dc5d96548ee35fe91de74)
Jakub Toth [Wed, 14 Jun 2017 12:44:16 +0000 (14:44 +0200)]
Binding v2 runtime - adapters - spi
Change-Id: I824c5c29fd71ad288df0b3ef9fbeedbc760b98dc
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
45c59d14f8d8eef21f0a088c310f2e6975504704)
Jakub Toth [Wed, 14 Jun 2017 10:06:45 +0000 (12:06 +0200)]
Binding v2 runtime - adapters - extractors
Change-Id: I0ee755ae25ad772b844ce70c3afdb76ba25d3b15
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
f84f1466990a488a1ec17a6239a58fbdd86da832)
Jakub Toth [Tue, 13 Jun 2017 12:08:00 +0000 (14:08 +0200)]
Binding2 runtime - Codecs - serialized
Change-Id: I45eef52b91b0a493d7352a7ea46479cb9fff709e
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
c6f05b10e72d0c7310e78e59e33f480fb6426bc5)
Jakub Toth [Tue, 13 Jun 2017 09:54:00 +0000 (11:54 +0200)]
Binding v2 runtime - codecs - modificators
Change-Id: Ifd0512bbcb2c6de7cf2d02feedc8976ddd325e61
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
54c8c2cb5d7aa515cdbcc7a2fd50ec8ab1504d36)
Jakub Toth [Mon, 12 Jun 2017 11:18:41 +0000 (13:18 +0200)]
Binding2 runtime - Codecs impl - codecs - part4
Change-Id: I65a814a2f84ecfae51ea1f67f7cded48622096a8
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
d651ceaa1651c318e76f12ace6a6b65b3bacd97b)
Martin Ciglan [Mon, 19 Jun 2017 06:36:33 +0000 (08:36 +0200)]
Binding2 runtime version fix
- in MD-SAL artifacts version stable/carbon fix
Change-Id: I6806f9ef0f013702bdc6afaaf665765a89938c47
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Jie Han [Fri, 16 Jun 2017 06:15:21 +0000 (14:15 +0800)]
Binding generator v2 - Decimal* - getDefaultInstance() fix
- add testing yang
Change-Id: I8b5761ee0f65dcbb9df17d858b97e2eafb10594b
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
f31c3ee816be089f79f8fa0a659bf3ead62f2ef8)
Jie Han [Fri, 16 Jun 2017 04:00:25 +0000 (12:00 +0800)]
Binding generator v2 - Bits - getDefaultInstance() fix
- add testing yang
Change-Id: I8e35707f65b3c1800545e36b48abbc97b3c212e5
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
bf32fff2e6859fda878fa6f0b6b172b3e6a9baf7)
Jie Han [Thu, 15 Jun 2017 10:05:12 +0000 (18:05 +0800)]
Binding generator v2 - Identityref - Compilability fix
- only one base support currently
- add testing yang
Change-Id: I5e277fcfbf5e92bdc31420dfefaa04d0d68b47c4
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
6c246170011dc5a4e82fc56fc74cd9cbc5c748d7)
Jie Han [Wed, 24 May 2017 08:15:08 +0000 (16:15 +0800)]
Binding generator v2 - Augmentation - Fix package name for recursively uses augment
- Fix package name for recursively uses augmentation, the yang file like:
...
grouping D{
uses "grp:A" {
augment "A1/A1-inner" {
leaf D-aug-A1 {
type string;
}
uses B {
augment "B1/B1-inner" {
leaf D-aug-B1-inner {
type string;
}
uses C {
augment "C1/C1-inner" {
leaf D-aug-C1-inner {
type string;
}
}
}
}
}
}
}
}
...
- add UT and yang file
Change-Id: If0b1131f15ab42be5c64a0fd087bd2a14a6597ce
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
0f8b8f57e35969bf0e37f918b8b18409963f55dc)
Jie Han [Thu, 8 Jun 2017 08:30:29 +0000 (16:30 +0800)]
Binding generator v2 - Package name
Change-Id: I65f291fe09a8e355545d6b218386b3cf9f0d27b1
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
ca0c56863fb5e605abcdc78fb48c77e615222845)
Jie Han [Sun, 11 Jun 2017 02:23:22 +0000 (10:23 +0800)]
Binding generator v2 - Enumeration fix
Change-Id: Ic1368cbb398d72b25830549cd0ec8bd32dad787a
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
c5a14fcff2ef38cded0124f26c70d68066cdcd07)
Jie Han [Tue, 13 Jun 2017 03:07:07 +0000 (11:07 +0800)]
Binding generator v2 - Instantiable compilability fix
Change-Id: I43f784d724f8d29bda669a043015944d78ed3597
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
605cb858861a03914f473727021f55a417e3994b)
Jie Han [Wed, 14 Jun 2017 07:59:49 +0000 (15:59 +0800)]
Binding generator v2 - Unions - Union's builder fix
- fix return type name of treeIdentifier with fully qualified name
to avoid name conflict
- recursive unoin builder support
- add yang file
Change-Id: I8770b849e6e50c04633eecb067d0f1d83bffb2c8
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
9e5a15c20e29454f3a4f1eef3aa52efac1b3f034)
Jie Han [Tue, 6 Jun 2017 12:05:33 +0000 (20:05 +0800)]
Binding generator v2 - Unions - fix getValue()
- set value NOT ReadOnly
- fix type instance identifier package
Change-Id: I8cfa676111952b169d6d6f31ce902adcce5bf45b
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
f2767f1ad0882a6f267832fa48b8dc129a71c779)
Jie Han [Thu, 8 Jun 2017 12:31:18 +0000 (20:31 +0800)]
Binding generator v2 - Unions - Enclosing type fix
- fix enclosing type for recursive unoins
- fix package name for reursive inner class
Change-Id: Ie1bd0df3afc1d600d94ff73b0c97aa349c242c78
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
30d64aed14584d69a4b8f9f09b29b4fc4c7f82e3)
Jakub Toth [Fri, 9 Jun 2017 08:22:01 +0000 (10:22 +0200)]
Binding2 runtime - Codecs impl - tests
Change-Id: Id6f1fc05bcdc7c156eb66b6c50f483b93d772bf7
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
30149540a89b87506da30d25004f9c1181dcee2d)
Jakub Toth [Thu, 8 Jun 2017 23:07:04 +0000 (01:07 +0200)]
Binding2 runtime - Codecs
* new codecs and contexts
* BindingContextCodec
* BindingNormalizdeNodeCodecRegistry
Change-Id: Ieab1cac667f755962b818c452171da9dc74ab979
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
a9deaba3e6463f7056ed327dbc75bd6f727f6cb0)
Jakub Toth [Thu, 8 Jun 2017 16:31:19 +0000 (18:31 +0200)]
Binding2 runtime - Module info context
* fix template for yangModuleInfo baed on change in
YangModuleInfo interface
Change-Id: I3161bc19559b1bd38bccaf2148a6745c12141745
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
1498be778f25c028f751c4e3f18e547bb316c3a1)
Jakub Toth [Thu, 8 Jun 2017 16:21:43 +0000 (18:21 +0200)]
Binding2 runtime - Codecs impl - codecs - part3
Change-Id: Ice1f15d71425020e3002d408be6652e9032ca3cf
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
733a6794a992eb298961de15ecb5dce2f20b5074)
Jakub Toth [Thu, 8 Jun 2017 16:00:01 +0000 (18:00 +0200)]
Binding2 runtime - Codecs impl - context - part3
* contexts based on operation codecs
Change-Id: Ide1797b1b4cb2f665e2708c3c1697aca063489bd
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
790a1c379d989b7dca5b098149f48903d040b801)
Jakub Toth [Thu, 8 Jun 2017 15:58:47 +0000 (17:58 +0200)]
Binding2 runtime - Codecs impl - codecs - part2
* operation codecs
Change-Id: I8c08617ec52d47b424d41aa04c7bf574055f1662
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
346a1c7b7783f4a5e8da6e539ecbc1ae370436c2)
Jakub Toth [Thu, 8 Jun 2017 15:31:33 +0000 (17:31 +0200)]
Binding2 runtime - Codecs impl - context - part2
* derived parts
* fixed base parts
Change-Id: Ib46351557a42e914bba3c4a34abf2ef94ec9bb80
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
764468fe46154f4d60cbcaa102ac59bd648be653)
Jakub Toth [Thu, 8 Jun 2017 10:15:35 +0000 (12:15 +0200)]
Binding2 runtime - Codecs impl - codecs
* remove codec.*.codecs packages
Change-Id: I17897e62d5343ee059489a999d68c6bab0fe9c2c
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
3da7525a0c08431182c392e9343cf667aa3fd9b1)
Jakub Toth [Wed, 7 Jun 2017 11:29:57 +0000 (13:29 +0200)]
Binding2 runtime - Codecs impl - cache
* caching data part
Change-Id: If0b595c4c50dd3a0741629432623210c31bce381
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
291aa50f6da2ab115afb6952faf0c469ab73ae5a)
Jakub Toth [Wed, 7 Jun 2017 10:18:19 +0000 (12:18 +0200)]
Binding2 runtime - Codecs impl - writers
* writers of Binding v2 and DOM for serializing data
Change-Id: I947f902f8acd97c67646b65750edf470f04ccc3e
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
182edc606d56e26d66297de10fae48ea63756072)
Jakub Toth [Wed, 7 Jun 2017 09:18:30 +0000 (11:18 +0200)]
Binding2 runtime - Codecs impl - context
* derived contexts
* fixed based contexts
Change-Id: I2900f4356a7750553180a043d450b3f279c99d63
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
fbbb121f810f6fd663a4fc7e3f8a8bddda0d21b5)
Martin Ciglan [Mon, 5 Jun 2017 14:27:47 +0000 (16:27 +0200)]
Binding2 runtime - Codecs impl #2
- NodeCodecContext & relatives
TODO: test coverage
Change-Id: I024618f2b80207e47eec85819390868ee34b6407
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
397b1239e991457b0e0605bec78faf2a5c2f73b8)
Jakub Toth [Fri, 9 Jun 2017 13:09:22 +0000 (15:09 +0200)]
Binding v2 runtime - refactor - part3
* various runtime classes lost in generator or even spec v2 packages
are grouped in new runtime v2 module and used in runtime v2
* move javassist part from spec
Change-Id: I87522a6f79f7bcc0ebcb66a87cedd75e506b51a8
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
69b66d1c581ad12d340b1cf7df4b4c66d69234b4)
Jakub Toth [Fri, 9 Jun 2017 13:04:12 +0000 (15:04 +0200)]
Binding v2 runtime - refactor - part2
* various runtime classes lost in generator or even spec v2 packages
are grouped in new runtime v2 module and used in runtime v2
* move AugmentationFieldGetter and BindingReflections
* move tests
Change-Id: I61459f6a392890e2a2c038ab25e4592c2b135e05
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
0836a9a58b22244e880d68cb701346ac6ae03175)
Jakub Toth [Fri, 9 Jun 2017 12:41:16 +0000 (14:41 +0200)]
Binding v2 runtime - refactor - part1
* various runtime classes lost in generator or even spec v2 packages
are grouped in new runtime v2 module and used in runtime v2
* move BindingRuntimeContext and BindingSchemaContextUtils
Change-Id: Iad8316c29a424b3dae881849d0c59c261d608629
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
aef5c64ffa47d32d9914a0a90e3db755b7347061)
Jakub Toth [Fri, 9 Jun 2017 12:03:47 +0000 (14:03 +0200)]
Binding v2 runtime - init module
* various runtime classes lost in generator or even spec v2 packages
are grouped in new runtime v2 module and used in runtime v2
Change-Id: Ie9b2d8e9c25076301e87728061969e7ff7607a1b
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
314ed0467a28881cb21d9b5212c6f123044614a5)
Martin Ciglan [Tue, 13 Jun 2017 10:39:12 +0000 (12:39 +0200)]
Bug 8634: list & leaf-list compilability fix
- compilability fix for list & leaf-list generated code
- tested yangs
- make sure 'leaf key' as key makes no harm
Change-Id: I1b4e5f4ac7c0070672d6a33b0db62976c2b3f507
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
d680dcd8d76d637bb67112074d609f855c63fee6)
Jie Han [Tue, 6 Jun 2017 11:29:42 +0000 (19:29 +0800)]
Add endline to gettermethod and property
Change-Id: I6bec99d905e1021e064bd5d9b66858782b7b2f4f
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
1915ddc74c09280a790e80946f11bc7151e60241)
Martin Ciglan [Thu, 8 Jun 2017 07:11:27 +0000 (09:11 +0200)]
Support for Yang 1.1 Anydata statement in mdsal-binding2-generator
- able to recognize anydata statement in root or data schema node
- generate type & Java code for it
- YANG test example
Change-Id: I79baeb831ed1b663d332800cca556f6e1dc53cb6
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
ce3c65609d686c12738b01943765560ebebdf518)
Jie Han [Wed, 24 May 2017 03:06:02 +0000 (11:06 +0800)]
Add implement type 'BindingTypes.INSTANTIABLE' to augment type
-Add implement type 'BindingTypes.INSTANTIABLE' to augment type
to replace 'DataObject' as to override the interface "implementedInterface"
in it's builder.
Change-Id: I2ece953f805a8246a3f1ca7532e5c170047eff44
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
eb587fe0bb814ae942a32859e8b6f99d42cd3673)
Jakub Toth [Tue, 6 Jun 2017 13:20:02 +0000 (15:20 +0200)]
Binding v2 DOM Codec - generator - SPI - part 2
* prepare base SPI parts of generating serializers for writers
* added implementation of StreamWriterGenerator
Change-Id: I9445495e5893296e1384b258856eca8236ea6698
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
6cd0af8477aeb6ae2e3acc602e06b32804db4cdc)
Martin Ciglan [Fri, 9 Jun 2017 13:27:22 +0000 (15:27 +0200)]
Binding generator v2 - leaf-list support
- generate types & Java code
- test yang file
Change-Id: Idccbcf49bddb7a465e5951d5fa5490e0304bf7f8
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
be73e89f50304188e22b375dddd88eefdc1bf83a)
Jakub Toth [Tue, 6 Jun 2017 12:30:27 +0000 (14:30 +0200)]
Binding v2 DOM Codec - generator - SPI - part 1
* prepare base SPI parts of generating serializers for writers
* add missing method to GeneratedClassLoadingStrategy
* resolving class from class loader according to fully qualified
name
* checkstyle issues solved
Change-Id: I55aa8286c8d02c69db2af3534076c13f443d7544
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
9672e88fee1170117f650b6146461bc4874b45d6)
Jakub Toth [Tue, 6 Jun 2017 13:18:42 +0000 (15:18 +0200)]
Binding v2 DOM Codec - choice serializer implementation
Change-Id: I2147b0ef3e254d552134ccf371a25fcdb18fe402
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
5ad03c179af275fbaad1a6b2964a2be2aebb7539)
Jakub Toth [Tue, 6 Jun 2017 12:29:06 +0000 (14:29 +0200)]
Binding v2 DOM Codec - augmentation
* api for augmentation
* impl of agumentation serializer
* fix jdoc in spec
* use of TreeNode instead of DataObject
Change-Id: I7c6ec42ddb8bc7f3957e3a82b55fb982fab6de4d
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit
6c7141733d72557464d267762a755fa75056b2e5)
Martin Ciglan [Fri, 9 Jun 2017 09:09:53 +0000 (11:09 +0200)]
Binding generator v2 - Choice/Cases support
- generate types & Java code
- builder template fix
- test yang file
Change-Id: Ia001b5e02a3b2e870ae0b46f59a7a9546395b48b
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
d235138fce6cc0bd83c72e7b6f8eeefaf260b428)
Jie Han [Fri, 2 Jun 2017 08:46:43 +0000 (16:46 +0800)]
Bug 8583 - Duplicate appending rank to augement class
- The rank was appended repeatedly in both ReferencedTypeImpl
and addRawAugmentGenTypeDefinition
Change-Id: If139626f4fafd2824f9c24437918067e78a909b2
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
eede0ee45f7858ff82c4c031a417a255af87663f)
Jie Han [Mon, 5 Jun 2017 11:05:38 +0000 (19:05 +0800)]
Bug 8593 - Augmentation's Builder overrides a method from interface Augmentable.
Change-Id: I87b5b66679aa8825f4ce46e6c25a2d05eba680dd
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
29ca73cdfd6a1f4c690462630aa275d10dd3ec12)
Jie Han [Thu, 1 Jun 2017 02:43:29 +0000 (10:43 +0800)]
Bug 8575 - IllegalArgumentException thrown when uses a grouping which name is not unique
- find target uses grouping which name is not unique
- add JUnit Test and Yang file
Change-Id: Idc0d782a2443ed2cd3339f4f7ed4c712a04a60fe
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit
e28261b237a2bd06144dc30da814671698c8b48a)
Martin Ciglan [Wed, 7 Jun 2017 13:36:40 +0000 (15:36 +0200)]
Bug 706: - Missing support for anyxml statement in java generator and mapping service
- basic logic to recognize anyxml node within root or data schema node
- generate type and Java code for it
Change-Id: I0a7dd00661b569dd76d95b6404e4590f6544e415
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
7eb194c73ef0681486b5adf4a318e8f4fde5fd62)
Martin Ciglan [Mon, 5 Jun 2017 07:19:13 +0000 (09:19 +0200)]
Binding generator v2 - Unions compilability fix
Change-Id: I8ae28571069c2d0f966d9953f43229bce941083f
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit
d0610f971b262931b7f58b8e628eb4564ded9bf5)