mdsal.git
6 years agoBinding v2 runtime - adapters - impl - notifications 34/59234/2
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)

6 years agoBinding generator v2 - augments fix #3 32/59232/1
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)

6 years agoBinding generator v2 - augments fix #2 02/59202/1
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)

6 years agoBinding generator v2 - Namespace - Typedef package name fix 91/59191/2
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)

6 years agoBinding v2 runtime - adapters - impl - mount point 85/59185/2
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)

6 years agoBinding v2 runtime - adapters - transactions 83/59183/3
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)

6 years agoBinding generator v2 - augments fix #1 84/59184/2
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)

6 years agoBinding v2 runtime - adapters - impl - data tree 68/59168/2
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)

6 years agoBinding v2 runtime - adapters - registration 65/59165/2
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)

6 years agoBinding v2 runtime - adapters - spi 64/59164/2
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)

6 years agoBinding v2 runtime - adapters - extractors 63/59163/1
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)

6 years agoBinding2 runtime - Codecs - serialized 42/59142/2
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)

6 years agoBinding v2 runtime - codecs - modificators 41/59141/2
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)

6 years agoBinding2 runtime - Codecs impl - codecs - part4 40/59140/1
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)

6 years agoBinding2 runtime version fix 33/59133/1
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>
6 years agoBinding generator v2 - Decimal* - getDefaultInstance() fix 75/59075/1
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)

6 years agoBinding generator v2 - Bits - getDefaultInstance() fix 72/59072/2
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)

6 years agoBinding generator v2 - Identityref - Compilability fix 69/59069/1
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)

6 years agoBinding generator v2 - Augmentation - Fix package name for recursively uses augment 58/59058/1
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)

6 years agoBinding generator v2 - Package name 13/59013/2
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)

6 years agoBinding generator v2 - Enumeration fix 07/59007/2
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)

6 years agoBinding generator v2 - Instantiable compilability fix 03/59003/2
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)

6 years agoBinding generator v2 - Unions - Union's builder fix 05/59005/1
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)

6 years agoBinding generator v2 - Unions - fix getValue() 01/59001/1
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)

6 years agoBinding generator v2 - Unions - Enclosing type fix 99/58999/1
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)

6 years agoBinding2 runtime - Codecs impl - tests 82/58982/1
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)

6 years agoBinding2 runtime - Codecs 77/58977/1
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)

6 years agoBinding2 runtime - Module info context 76/58976/1
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)

6 years agoBinding2 runtime - Codecs impl - codecs - part3 75/58975/1
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)

6 years agoBinding2 runtime - Codecs impl - context - part3 73/58973/1
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)

6 years agoBinding2 runtime - Codecs impl - codecs - part2 59/58959/1
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)

6 years agoBinding2 runtime - Codecs impl - context - part2 57/58957/1
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)

6 years agoBinding2 runtime - Codecs impl - codecs 54/58954/1
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)

6 years agoBinding2 runtime - Codecs impl - cache 35/58935/1
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)

6 years agoBinding2 runtime - Codecs impl - writers 30/58930/1
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)

6 years agoBinding2 runtime - Codecs impl - context 25/58925/1
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)

6 years agoBinding2 runtime - Codecs impl #2 17/58917/1
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)

6 years agoBinding v2 runtime - refactor - part3 15/58915/1
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)

6 years agoBinding v2 runtime - refactor - part2 14/58914/1
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)

6 years agoBinding v2 runtime - refactor - part1 13/58913/1
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)

6 years agoBinding v2 runtime - init module 64/58764/5
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)

6 years agoBug 8634: list & leaf-list compilability fix 97/58897/1
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)

6 years agoAdd endline to gettermethod and property 84/58784/1
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)

6 years agoSupport for Yang 1.1 Anydata statement in mdsal-binding2-generator 35/58735/1
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)

6 years agoAdd implement type 'BindingTypes.INSTANTIABLE' to augment type 97/58697/1
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)

6 years agoBinding v2 DOM Codec - generator - SPI - part 2 86/58686/2
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)

6 years agoBinding generator v2 - leaf-list support 84/58684/3
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)

6 years agoBinding v2 DOM Codec - generator - SPI - part 1 81/58681/3
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)

6 years agoBinding v2 DOM Codec - choice serializer implementation 82/58682/2
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)

6 years agoBinding v2 DOM Codec - augmentation 80/58680/2
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)

6 years agoBinding generator v2 - Choice/Cases support 83/58683/1
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)

6 years agoBug 8583 - Duplicate appending rank to augement class 15/58515/2
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)

6 years agoBug 8593 - Augmentation's Builder overrides a method from interface Augmentable. 12/58512/1
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)

6 years agoBug 8575 - IllegalArgumentException thrown when uses a grouping which name is not... 95/58495/1
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)

6 years agoBug 706: - Missing support for anyxml statement in java generator and mapping service 68/58468/3
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)

6 years agoBinding generator v2 - Unions compilability fix 45/58445/2
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)

6 years agoBinding v2 DOM Codec - generator - base implementation 43/58443/2
Jakub Toth [Mon, 5 Jun 2017 14:00:09 +0000 (16:00 +0200)]
Binding v2 DOM Codec - generator - base implementation

 * prototype of implementation of tree node serializer
 * static property for Binding objects

Change-Id: I67ba59924044adf12bed0bd2293f91ddf3f02025
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit 3cd9677453fa4346fdd6fd732bf9ce0e4b30ed2c)

6 years agoBinding v2 DOM Codec - generator - API 42/58442/2
Jakub Toth [Mon, 5 Jun 2017 13:32:39 +0000 (15:32 +0200)]
Binding v2 DOM Codec - generator - API

  * api for getting serializer fo specific type

Change-Id: I04288cf4d514193a1bae363781a29517cf5adb2f
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit c9ab5d69eb5f533fb9e41270d046f903c0d38690)

6 years agoBinding v2 DOM Codec - Javassist part 41/58441/1
Jakub Toth [Tue, 6 Jun 2017 08:33:16 +0000 (10:33 +0200)]
Binding v2 DOM Codec - Javassist part

Change-Id: I9f07629ef79729650e44b1caba239a25a23db81e
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit 23bb8e62b8ea9716e6e1b8404f02c49786490ba5)

6 years agoBinding2 runtime - Codecs impl #1 32/58332/2
Martin Ciglan [Mon, 5 Jun 2017 09:02:30 +0000 (11:02 +0200)]
Binding2 runtime - Codecs impl #1

- value based codecs & relatives

TODO: more Javadocs, test coverage

Change-Id: I1c780772ea93d613c4e220ded61c07d6582c8954
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 357db495133d3d275582e9ea4b5063c15e9a5f5a)

6 years agoBinding v2 DOM Codec - codecs API - Part 2 31/58331/3
Jakub Toth [Thu, 1 Jun 2017 09:53:59 +0000 (11:53 +0200)]
Binding v2 DOM Codec - codecs API - Part 2

  *factory
  *serializer

Change-Id: I63ef1b59b31514e8e6d583d3b9aaa17ad1224365
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit 42db214f7dd3a1ff871b1f8197d120b1da9f90b3)

6 years agoBinding v2 runtime context 30/58330/3
Jakub Toth [Thu, 1 Jun 2017 06:10:08 +0000 (08:10 +0200)]
Binding v2 runtime context

  *preparing of binding runtime context via reflection
  *tests

Change-Id: I02a3e568942fe4f31621299c12bf978bcaa4940b
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit 319b4d682c190284488cad35e6ff58746d5fde9a)

6 years agoBinding v2 DOM Codec - codecs API - Part 1 25/58325/3
Jakub Toth [Wed, 31 May 2017 09:12:10 +0000 (11:12 +0200)]
Binding v2 DOM Codec - codecs API - Part 1

  * normalized node codec
  * tree codec
  * tree node codec

Change-Id: Id58cf84d337ce310afb889c54f913fdbb59d79b0
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit 85d32b48ba1bf1a37a340fce81708f9bfd9080e4)

6 years agoBinding spec runtime v2 - TreeNodeSerializer & relatives 24/58324/4
Martin Ciglan [Wed, 31 May 2017 07:54:10 +0000 (09:54 +0200)]
Binding spec runtime v2 - TreeNodeSerializer & relatives

Change-Id: I6ad9cf2f0fc6fb9b55c7ba788fa6ece86ba7f8c0
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit ebbf805a1d97ddb8988f5ad698b5c37245830194)

6 years agoBinding2 runtime - API #7 23/58323/4
Martin Ciglan [Wed, 24 May 2017 13:44:29 +0000 (15:44 +0200)]
Binding2 runtime - API #7

- NotificationPublishService & its relatives
- test coverage for classes
- Javadocs provided

Change-Id: I888f72924d8fe38e76f0990fec34b040824439c6
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 82540750ebcfb2887733e953cad0205e3fcd16ee)

6 years agoBinding2 runtime - API #6 22/58322/4
Martin Ciglan [Wed, 24 May 2017 13:09:53 +0000 (15:09 +0200)]
Binding2 runtime - API #6

- DataTreeCommitCohortRegistry & its relatives
- Javadocs provided

Change-Id: I86f5771140f7c151dfad78b0066cc8d0b8790625
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 99f29efb2f2f675ae6c6632cd35fcab1d0d14518)

6 years agoBinding2 runtime - API #5 21/58321/4
Martin Ciglan [Tue, 23 May 2017 09:15:50 +0000 (11:15 +0200)]
Binding2 runtime - API #5

- Rpc, Action, ListAction API support
- Javadocs provided

Change-Id: I8250bf00579c5743be50d3fcf8296fddb3be1d69
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit b7a4eb412bac92b57eb4fe15d441976369330030)

6 years agoBinding2 runtime - API #4 20/58320/3
Martin Ciglan [Tue, 23 May 2017 08:11:25 +0000 (10:11 +0200)]
Binding2 runtime - API #4

- MountPointService & its relatives
- Javadocs provided

Change-Id: I15c55a34b0b4bb4df9aefd92749743c4a0cc2c3e
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 44c4876b84124f0104b539453d05ac6812f33db2)

6 years agoBinding2 runtime - API #3 38/58338/1
Martin Ciglan [Mon, 22 May 2017 14:33:18 +0000 (16:33 +0200)]
Binding2 runtime - API #3

- DataTreeProducer, DataTreeService & its relatives
- Javadocs provided
- test coverage for classes

Change-Id: I75e2b4666db95153d97a24be38a9e2e78c37237f
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 2cfeb45bca729abfa28658a4cf23a1713849741e)

6 years agoBinding2 runtime - API #2 19/58319/2
Martin Ciglan [Mon, 22 May 2017 13:31:46 +0000 (15:31 +0200)]
Binding2 runtime - API #2

- DataTreeWriteCursor & its relatives
- Javadocs provided

Change-Id: I1e6d6e6f609d048f78821875a0ef37f7aa6f47b1
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit b60e6c66d294945f916f8a78b5d383c9c49659ff)

6 years agoBinding2 runtime - API #1 18/58318/1
Martin Ciglan [Mon, 22 May 2017 12:24:28 +0000 (14:24 +0200)]
Binding2 runtime - API #1

- BindingService, DataTreeModification, transactions basics & its relatives
- Javadocs provided
- test coverage for classes

Change-Id: I2d032ec3a0a565941266610194fb8d176c5392ff
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 827c2b1cea519c8a3a3e3789ecbf7ed6f84a0e07)

6 years agoBinding generator v2 - Identities support 22/58222/2
Martin Ciglan [Thu, 1 Jun 2017 12:20:10 +0000 (14:20 +0200)]
Binding generator v2 - Identities support

- naming conflict prevention added

Change-Id: Iac43a3ed45ed13b113fd48a2dce3829a9ce7c21a
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit ccc1939cf81b78524c29bf649c8d4e04742fd849)

6 years agoBinding v2 runtime 05/58005/2
Martin Ciglan [Tue, 30 May 2017 07:38:55 +0000 (09:38 +0200)]
Binding v2 runtime

- main placeholders with pom.xml files

Change-Id: I84c04e5170a897b3414df3793b2a895eeea90de2
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
6 years agoBinding generator v2 - Unions fix 21/58221/2
Jakub Toth [Thu, 1 Jun 2017 14:51:48 +0000 (16:51 +0200)]
Binding generator v2 - Unions fix

- generate Java code fixes

TODO: template compilability issues

Change-Id: Icfa857df13617edec93b3a8de47bbba5d4a9b966
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
(cherry picked from commit 555a8d1dc3d75f642fff33acda73b9d31564dd2f)

6 years agoBinding generator v2 - Notifications 20/58220/1
Martin Ciglan [Tue, 30 May 2017 12:17:01 +0000 (14:17 +0200)]
Binding generator v2 - Notifications

- generated Java code compilability fixes

Change-Id: I82e1f59820820c1d6717fc4227031e7d33465cab
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
(cherry picked from commit 138cdec6a16b8663d0f9670c8aef7457925109c3)

6 years agoBUG-8226: do not import nested classes 47/57947/1
Robert Varga [Thu, 11 May 2017 09:28:38 +0000 (11:28 +0200)]
BUG-8226: do not import nested classes

Importing a nested classes leads to a unused import warning, so compare
the declared package name with the class being generated and do not emit
an import declaration if the package name matches FQDN.

Change-Id: I4240cac663476c1405962631a9d173f5ed434ee9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a6fdc323e0b9b76d99c0d976e7a5912a6fc42ef8)

6 years agoBug 8307: Add the option for activating deviation statements 18/57418/2
Martin Ciglan [Fri, 19 May 2017 10:14:56 +0000 (12:14 +0200)]
Bug 8307: Add the option for activating deviation statements

- follow-up patch for Yangtools changes:
https://git.opendaylight.org/gerrit/#/c/56452/

Change-Id: Ia78b119fee3bdf12be90dbb95d8d811576df57ed
Signed-off-by: Martin Ciglan <martin.ciglan@pantheon.tech>
6 years agoBindingDOMRpcProviderServiceAdapter should implement its interface 52/56952/2
Martin Ciglan [Fri, 12 May 2017 11:09:06 +0000 (13:09 +0200)]
BindingDOMRpcProviderServiceAdapter should implement its interface

Change-Id: I773f244bff3c08eb7982187089f6f0e8f0eefb65
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 1d3c94194fdcae0d88c36abdadc7e094bf568585)

6 years agoBump versions by x.y.(z+1) 53/57853/1
jenkins-releng [Thu, 25 May 2017 18:18:07 +0000 (18:18 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I273b8cbdf90ec814a6ca1018069df5b6f0bb55c1
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoDisable maven site build 57/56857/2
Robert Varga [Thu, 11 May 2017 13:30:02 +0000 (15:30 +0200)]
Disable maven site build

Change-Id: I9f4ac30cffcd58d2873aeae955a6626082f3479d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix generating of description for operations 54/56854/2
Jakub Toth [Thu, 11 May 2017 12:50:01 +0000 (14:50 +0200)]
Fix generating of description for operations

Change-Id: I8cc45bd00910377429c95fd3ab818c7d93299275
Signed-off-by: Jakub Toth <jatoth@cisco.com>
6 years agomdsal-binding2 features 91/56791/3
Jakub Toth [Wed, 10 May 2017 13:53:56 +0000 (15:53 +0200)]
mdsal-binding2 features

Change-Id: I5776ee2300d993b9e8a690499c1e85972cbd3d9d
Signed-off-by: Jakub Toth <jatoth@cisco.com>
6 years agoBinding generator implementation & decomposition 02/56802/1
Martin Ciglan [Wed, 10 May 2017 10:59:37 +0000 (12:59 +0200)]
Binding generator implementation & decomposition

- various fixes to make sure binding & code generator
generates compilable Java code for RPCs

Change-Id: I87def49a28ffa5f978e64a3d8c3de1b0adc2049c
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
6 years agoFix of generating inner class with same name like parent 72/56772/2
Jakub Toth [Wed, 3 May 2017 20:40:28 +0000 (22:40 +0200)]
Fix of generating inner class with same name like parent

Change-Id: I9ad44f50e48f71145012fd32b1f5d9e7c322afb3
Signed-off-by: Jakub Toth <jatoth@cisco.com>
(cherry picked from commit 2a4e4ff779c1fcba0703e3df41c791fee8c10409)

6 years agoRepeated instantiation of typeProvider 71/56771/1
Jie Han [Wed, 10 May 2017 01:52:06 +0000 (09:52 +0800)]
Repeated instantiation of typeProvider
Another instantiation is at line 253 of the same file in function:
public List<Type> generateTypes(final SchemaContext context, final Set<Module> modules)

Change-Id: Ic6dab97de47f54db193f5da7952e97bade656fd9
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit 619878e56edb6f4c835b739cef5c2d6d01154eb4)

6 years agoFix merging lines in JavaCodePrettyPrint 20/56620/1
Jakub Toth [Fri, 5 May 2017 20:15:34 +0000 (22:15 +0200)]
Fix merging lines in JavaCodePrettyPrint

Change-Id: Ice139808fdad35ee329ee87c10c05edef7984195
Signed-off-by: Jakub Toth <jatoth@cisco.com>
6 years agoUtil class for cleaning of generated Java files 19/56519/3
Jakub Toth [Thu, 27 Apr 2017 13:12:04 +0000 (15:12 +0200)]
Util class for cleaning of generated Java files

  *comment generateImplementedMethods in builderTemplate, was
   breaking buil + tests

Change-Id: I5880adec4b9629d8a6761b5e75161e89235a9fe5
Signed-off-by: Jakub Toth <jatoth@cisco.com>
6 years agoCleanup ModuleInfoBackedContext 10/56510/2
Robert Varga [Wed, 3 May 2017 15:43:04 +0000 (17:43 +0200)]
Cleanup ModuleInfoBackedContext

Remove classLoader assignment in conditional.

Change-Id: I59e8da66d5cd405bd37783088083d69e52d8933c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c782494da0ba9e3b32f052c19c3012c03253a45c)

6 years agoBinding Generator implementation & decomposition 17/56517/2
Martin Ciglan [Wed, 3 May 2017 07:43:39 +0000 (09:43 +0200)]
Binding Generator implementation & decomposition

- fixes possible NPE using Java 1.8 Optional

Change-Id: Ib8f91d85668baf738ba4d9e5c2c613d3c19aaa2c
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 0a64a9c19ee3b7755164f4bd73ee855203345524)

6 years agoCode generator prototype - Binding specification v2 18/56518/1
Martin Ciglan [Tue, 2 May 2017 11:55:36 +0000 (13:55 +0200)]
Code generator prototype - Binding specification v2

- fixes NPE & compilability issue for data schema node
builders when node is a child of root

Change-Id: Iaec542989cbeb9583f814986371b22cbb70f7858
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 141e3def6accb5c75feed87d98cfa29acfcd8d61)

7 years agoBUG-8327: Introduce DOMYangTextSourceProvider and implement it 97/56297/1
Robert Varga [Fri, 28 Apr 2017 12:05:21 +0000 (14:05 +0200)]
BUG-8327: Introduce DOMYangTextSourceProvider and implement it

Migration requires that DOMSchemaService provides the capability to
access underlying sources in YANG text. Rather than modifying the
base DOMSchemaService, make it an DOMExtensibleService and define
the appropriate extension, DOMYangTextSourceProvider.

Update OsgiBundleScanningSchemaService to implement the new
extension.

Change-Id: I4c75d8abdf850c42fe69a08201f976271a2cbc8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 985c0859e1ad4a1c2dd734e75a4249ddd6b1e2a8)

7 years agoBUG-7927: stop scanning bundles on framework stop 41/56241/1
Robert Varga [Thu, 27 Apr 2017 17:33:36 +0000 (19:33 +0200)]
BUG-7927: stop scanning bundles on framework stop

Monitor framework bundle for STOPPING event and when it triggers
flag us as stopping: all bundles are about to shut down, so there
is no point in trying to update the schema context anymore.

Change-Id: I1a55169fce1705c19a139063cf632674fc256701
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2d05325b648b880088cea24ee1afd9edfc5a8979)

7 years agoBinding Generator Implementation & decomposition 26/56226/1
Martin Ciglan [Thu, 27 Apr 2017 08:34:22 +0000 (10:34 +0200)]
Binding Generator Implementation & decomposition

- support YANG groupings

Change-Id: If8b62b09fc61db523050ff94f53d2b7f03c422ad
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 950d1931ec8830300bf5904dc0af082d9e9dc59e)

7 years agoLazily create schema context in GlobalBundleScanning* 00/56200/2
Robert Varga [Thu, 27 Apr 2017 16:38:37 +0000 (18:38 +0200)]
Lazily create schema context in GlobalBundleScanning*

On OsgiBundleScanningSchemaService startup, it calls
tryToUpdateSchemaContext when bundleTracker.open() completes.
This parses and creates a schema context and notifies listeners
of the updated schema context. However we don't have to call
tryToUpdateSchemaContext in start() unless there actually are
listeners registered as the purpose of tryToUpdateSchemaContext
is to update listeners. So made this change. It's not likely there
would be any listeners at that point anway.

I also changed the synchronization so as not to synchronize on 'this'
or the class instance as both are unsafe (users could sync on the
instance causing unwanted contention, either innocently or maliciously).

Change-Id: I435358b0851671b7fbfdc9784577c91ff20556df
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 62ca5284757904ee8a2ac0f79f07b0f4c41dc830)

7 years agoTurn off visibility of OsgiBundleScanningSchemaService#start() 11/56211/2
Robert Varga [Thu, 27 Apr 2017 16:41:10 +0000 (18:41 +0200)]
Turn off visibility of OsgiBundleScanningSchemaService#start()

Since the start() method is only used in the createInstance(), it
should be private and not exposed.

Change-Id: I0264d0a66bbfb2536bc4d6c57f27f15584ddfabb
Signed-off-by: Alexis de Talhouƫt <adetalhouet@inocybe.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoCode generator prototype - Binding specification v2 44/56144/3
Martin Ciglan [Wed, 26 Apr 2017 15:40:01 +0000 (17:40 +0200)]
Code generator prototype - Binding specification v2

- fixes compilability issues in builder template
including prerequisities

Change-Id: I1653caf42139256b54a38b754f0121e749a4e61a
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 676a097cc462ac0b22b2c05a2598e5445d13dab1)

7 years agoCode generator prototype - Binding specification v2 13/56213/1
Martin Ciglan [Thu, 27 Apr 2017 14:28:26 +0000 (16:28 +0200)]
Code generator prototype - Binding specification v2

- fixes compilability issue with setter return type for nested element
e.g. String for leaf or inner container, etc...

Change-Id: I372f1492624bc9f566eaddf7ddd02e3534580f9d
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit db0918a2876719b116b508ea67a8a60c0f1697ed)

7 years agoSpeed up OsgiBundleScanningSchemaService close 94/56194/1
Robert Varga [Thu, 27 Apr 2017 16:20:53 +0000 (18:20 +0200)]
Speed up OsgiBundleScanningSchemaService close

On close, the OsgiBundleScanningSchemaService closes the
BundleTracker which untracks all the bundles and notifies the listener
of removed bundles. This results in a call to tryToUpdateSchemaContext
which causes the remaining yang files to be re-parsed to build a new
SchemaContext. To prevent this extra processing on shutdown, I added
a "stopping" flag to elide tryToUpdateSchemaContext the same we do
with the "starting" flag.

Change-Id: I9f7c05277df9bf1ffaec1c699453020312aab203
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b0a11d8bb72e2b74f64ca1dbd6d981cf3a70c8ea)

7 years agoCode generator prototype - Binding specification v2 49/56049/1
Martin Ciglan [Tue, 25 Apr 2017 12:43:00 +0000 (14:43 +0200)]
Code generator prototype - Binding specification v2

- this adds proper @Override tags to methods specified by superclasses.

Change-Id: Ib938ce31b71ca8fdf1aa35038b39b61f5abd1821
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit a07a48345ec5e1f40a53bbbe93a76ea8424e7ea6)

7 years agoCode generator prototype - Binding specification v2 35/56035/1
Martin Ciglan [Tue, 25 Apr 2017 11:04:09 +0000 (13:04 +0200)]
Code generator prototype - Binding specification v2

- fixes compilability issues in class template
for constructors

Change-Id: Ib55533f6dc8948b2ca23c395e19b5a6ed30d4b76
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 063ba2e5851072e07f7aca80c69b25ebc6a0ed54)