yangtools.git
9 years agoMake buildModules() in YangParser behave same as other methods 12/9912/1
Maros Marsalek [Wed, 13 Aug 2014 07:05:20 +0000 (09:05 +0200)]
Make buildModules() in YangParser behave same as other methods

Submodules were not resolved

Change-Id: Ifaac3b7f95883f190874cf91f8837c697c6c33e7
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-1425: fix builder's implementation of equals() 68/9868/2
Robert Varga [Mon, 11 Aug 2014 21:39:36 +0000 (23:39 +0200)]
BUG-1425: fix builder's implementation of equals()

With the advent of LazyDataObject, we have two implementation which need
to compare as equal. LazyObject.equals(builderObject) already works, but
we need the revers to be true, too. This patch sets out to do exactly
that.

Change-Id: I931f66a9088451524a842f6a67e8492ac922fd3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1425: fix toString() invocation on LazyObject"
Lukas Sedlak [Mon, 11 Aug 2014 14:23:29 +0000 (14:23 +0000)]
Merge "BUG-1425: fix toString() invocation on LazyObject"

9 years agoBUG-1425: fix toString() invocation on LazyObject 56/9856/1
Robert Varga [Mon, 11 Aug 2014 14:02:28 +0000 (16:02 +0200)]
BUG-1425: fix toString() invocation on LazyObject

When we are coming in from toString(), the proxy invocation does not
work. Extract getAugmentations() into a private method and use that
instead.

Change-Id: Ia851560b7703817f6d75887fa7e80037292e3fd1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFixed missing "/" at begining of list. 54/9854/1
Milos Fabian [Mon, 11 Aug 2014 10:57:24 +0000 (12:57 +0200)]
Fixed missing "/" at begining of list.

Change-Id: I95cd9f2fc28bcf8ff46fba72a3c13339a5868078
Signed-off-by: Milos Fabian <milfabia@cisco.com>
9 years agoFixes to yangtools feature.xml file 47/9847/1
Ed Warnicke [Sun, 10 Aug 2014 19:49:06 +0000 (14:49 -0500)]
Fixes to yangtools feature.xml file

Change-Id: I54852269f3e42aeae7a9ef54e593ef29e48bfcbb
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBug 1443: Implemented Lazy deserialization using dynamic proxies 95/9795/7
Tony Tkacik [Thu, 7 Aug 2014 17:06:17 +0000 (19:06 +0200)]
Bug 1443: Implemented Lazy deserialization using dynamic proxies

Result objects from translation from NormalizedNode to Binding Data
are lazily deserialized and initial cost of deserialization
is only one allocation.

Nested data are lazily deserialized once they are accessed.
This decreases time spent on eager deserialization of data
which never was accessed.

Implementation is mostly carried out in
LazyDataObject - InvocationHandler which maps proxy, data and codec
DataContainerPrototype - Prototype of DataContainerContext,
which holds only neccessary information to instantiate real context
DataObjectCodecContext - Context which holds various mapping
required for serialization / deserialization of data.

Also renames AugmentationNode to AugmentationNodeContext to keep naming
consistent and hides it from outside world, as it is
implementation-specific detail.

Change-Id: I94d994277bd0319e9aabcf842e0a741871713a30
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-997 Add SourceIdentifier to MissingSchemaSourceException"
Robert Varga [Sun, 10 Aug 2014 05:48:56 +0000 (05:48 +0000)]
Merge "BUG-997 Add SourceIdentifier to MissingSchemaSourceException"

9 years agoMerge "BUG-997 Fix unused argument in SchemaResolutionException"
Robert Varga [Sun, 10 Aug 2014 05:48:40 +0000 (05:48 +0000)]
Merge "BUG-997 Fix unused argument in SchemaResolutionException"

9 years agoMerge "BUG-997 Implement Filesystem source cache for schema repository"
Robert Varga [Sun, 10 Aug 2014 05:48:34 +0000 (05:48 +0000)]
Merge "BUG-997 Implement Filesystem source cache for schema repository"

9 years agoMerge "BUG-997 Add tests for shared schema context and fix dependency resolution...
Robert Varga [Sun, 10 Aug 2014 05:48:13 +0000 (05:48 +0000)]
Merge "BUG-997 Add tests for shared schema context and fix dependency resolution bug"

9 years agoMerge "Fix DCL in YangInstanceIdentifier"
Tony Tkacik [Fri, 8 Aug 2014 22:49:00 +0000 (22:49 +0000)]
Merge "Fix DCL in YangInstanceIdentifier"

9 years agoFix DCL in YangInstanceIdentifier 12/9812/2
Robert Varga [Fri, 8 Aug 2014 12:41:09 +0000 (14:41 +0200)]
Fix DCL in YangInstanceIdentifier

We were DCL on non-volatile variables. Fixed both instances.

Change-Id: Iedfc9a03ba1fea1c049f44f2b68c2d873564c4ca
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-997 Add SourceIdentifier to MissingSchemaSourceException 11/9811/1
Maros Marsalek [Fri, 8 Aug 2014 08:52:17 +0000 (10:52 +0200)]
BUG-997 Add SourceIdentifier to MissingSchemaSourceException

Change-Id: Ia4a595492935a66371faa844c5286a312a7897e2
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-997 Fix unused argument in SchemaResolutionException 10/9810/1
Maros Marsalek [Fri, 8 Aug 2014 07:44:53 +0000 (09:44 +0200)]
BUG-997 Fix unused argument in SchemaResolutionException

Change-Id: Id40a5318d824e71405a220c18dffa34ade745c08
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-997 Implement Filesystem source cache for schema repository 69/9769/3
Maros Marsalek [Wed, 6 Aug 2014 08:42:22 +0000 (10:42 +0200)]
BUG-997 Implement Filesystem source cache for schema repository

Use utility methods for storing files from legacy Filesystem cache

+ Add sorting by Cost to schema repository for multiple providers of the same source

Change-Id: I9a30240042e34fe7898966467b503eee85166887
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-997 Add tests for shared schema context and fix dependency resolution bug 46/9646/4
Maros Marsalek [Mon, 4 Aug 2014 11:16:48 +0000 (13:16 +0200)]
BUG-997 Add tests for shared schema context and fix dependency resolution bug

Change-Id: I51d1110629b915e6893a08fa827ccf2ba46ed181
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBug 1443: Added support for Union type & OSGI Runtime 49/9749/3
Tony Tkacik [Wed, 6 Aug 2014 13:02:05 +0000 (15:02 +0200)]
Bug 1443: Added support for Union type & OSGI Runtime

Introduced new marker interface SchemaUnawareCodec
which marks codecs for simple value types,
which are unaffected by introduction of new modules
(practically everything except union, instance identifier
 and identity codecs). Reworked caching to cache only these
codecs.

Added integration with OSGI, which ensures proper class loading
and updates Javassist classpool if necessary.

Updated ModuleContext to not populate type to schema fields
with empty augmentations, which are undetectable in
data tree.

Change-Id: I2a2c8477e9fdc2ef53bd9f81956023c0760d620e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1372 - toString methods in generated classes"
Tony Tkacik [Fri, 8 Aug 2014 07:20:19 +0000 (07:20 +0000)]
Merge "Bug 1372 - toString methods in generated classes"

9 years agoMerge "BUG-1436: deprecate IntermediateMapping"
Tony Tkacik [Thu, 7 Aug 2014 20:16:41 +0000 (20:16 +0000)]
Merge "BUG-1436: deprecate IntermediateMapping"

9 years agoMerge "Fixed incorrect test location."
Tony Tkacik [Thu, 7 Aug 2014 20:16:10 +0000 (20:16 +0000)]
Merge "Fixed incorrect test location."

9 years agoMerge "Fix AugmentationSchemaProxy.getDataChildByName()"
Tony Tkacik [Thu, 7 Aug 2014 20:03:11 +0000 (20:03 +0000)]
Merge "Fix AugmentationSchemaProxy.getDataChildByName()"

9 years agoMigrate test asserts 26/9626/4
Robert Varga [Sun, 3 Aug 2014 12:51:21 +0000 (14:51 +0200)]
Migrate test asserts

With update to JUnit 4.11 we need to migrate tests to use
proper non-deprecated methods/classes. Also removes wildcard imports.

Change-Id: I969f482a2dd85242fd32c22e7c5807d643e3e554
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not override versions provided through odlparent 33/9433/7
Robert Varga [Tue, 29 Jul 2014 13:41:16 +0000 (15:41 +0200)]
Do not override versions provided through odlparent

Cuts down declarations which are duplicates and/or result in downgrades.

Change-Id: I7110996ddedff456881a768cd49841191e219345
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix AugmentationSchemaProxy.getDataChildByName() 92/9792/1
Robert Varga [Thu, 7 Aug 2014 14:54:15 +0000 (16:54 +0200)]
Fix AugmentationSchemaProxy.getDataChildByName()

This implementation breaks the API contract specified by
AugmentationDefinition by throwing IllegalArgumentException where it
should just return null.

Drive-by: fix a typo in AugmentationSchema
Change-Id: I762ce3c02ba776d8a025ccd5bcdba82a6c1579ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1436: deprecate IntermediateMapping 87/9787/2
Robert Varga [Thu, 7 Aug 2014 13:53:59 +0000 (15:53 +0200)]
BUG-1436: deprecate IntermediateMapping

IntermediateMapping is only used in CompositeNode-related codecs and
thus is scheduled to be removed at the same time as CompositeNodes.

Change-Id: Ifff06e62441e5f8cc2eac069145389201f369493
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1372 - toString methods in generated classes 82/9782/1
Ladislav Borak [Thu, 7 Aug 2014 11:41:09 +0000 (13:41 +0200)]
Bug 1372 - toString methods in generated classes

- changed generated toString method in BaseTemplate,
  added info about simple name of class

Change-Id: I1e4142a9d78205b497f8ed552ac72d1440029b46
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 1372 - toString methods in generated classes"
Tony Tkacik [Thu, 7 Aug 2014 06:13:41 +0000 (06:13 +0000)]
Merge "Bug 1372 - toString methods in generated classes"

9 years agoMerge "BUG-576: modified parser to handle augmentation of extension instances."
Tony Tkacik [Wed, 6 Aug 2014 16:49:39 +0000 (16:49 +0000)]
Merge "BUG-576: modified parser to handle augmentation of extension instances."

9 years agoMerge "BUG-576: modified parser to handle refinement of extension instances."
Tony Tkacik [Wed, 6 Aug 2014 16:49:27 +0000 (16:49 +0000)]
Merge "BUG-576: modified parser to handle refinement of extension instances."

9 years agoMerge "Fix sonar not reporting unit tests"
Tony Tkacik [Wed, 6 Aug 2014 15:54:07 +0000 (15:54 +0000)]
Merge "Fix sonar not reporting unit tests"

9 years agoFix sonar not reporting unit tests 24/9724/10
Ladislav Borak [Wed, 6 Aug 2014 14:38:39 +0000 (16:38 +0200)]
Fix sonar not reporting unit tests

Enables jacoco plugin (uncodnitionally for now) to get sonar to pickup
the stats.
Changed TypeDefinitionCompilationTest because synthetic fields.

Change-Id: I6baced1cd3ed1a10b790c8a7f11348febc1a380b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBUG-1487: refactor StreamWriterGenerator 09/9709/8
Robert Varga [Tue, 5 Aug 2014 16:30:05 +0000 (18:30 +0200)]
BUG-1487: refactor StreamWriterGenerator

This is a reorganization of the StreamWriterGenerator such that it is
properly split up into classes, with contracts clarified. It also
prevents outside subclassing. Also cache pre-made serializer instances.

Change-Id: I492d73a082c24c03b8d17f3868e4a497c8f64b7b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1487: use prototypes for instantiating codecs 08/9708/8
Robert Varga [Tue, 5 Aug 2014 14:37:01 +0000 (16:37 +0200)]
BUG-1487: use prototypes for instantiating codecs

Optimizes the per-class overhead by copying a prototype class, and then
setting the proper serializer name. At the same time we get rid of the
static serializer methods, making the interface a bit cleaner.
Additionally, we hide the AbstractStreamWriterGenerator, so that to have
a proper boundary.

Change-Id: Ia7d56ff16e1eec7204fa087c49f2ee55a658a377
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-576: modified parser to handle augmentation of extension instances. 75/9575/4
Martin Vitez [Fri, 1 Aug 2014 11:13:11 +0000 (13:13 +0200)]
BUG-576: modified parser to handle augmentation of extension instances.

Change-Id: Ic40d5691baa57ee72953abf761dd52e1c85f66c2
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoMerge "Bug 1432 - Generated DTOs for types use inefficient instantiation"
Tony Tkacik [Wed, 6 Aug 2014 09:22:59 +0000 (09:22 +0000)]
Merge "Bug 1432 - Generated DTOs for types use inefficient instantiation"

9 years agoBUG-576: modified parser to handle refinement of extension instances. 74/9574/3
Martin Vitez [Fri, 1 Aug 2014 10:38:44 +0000 (12:38 +0200)]
BUG-576: modified parser to handle refinement of extension instances.

If user tries to refine an instance of extension parser log this event and continue with parsing
instead of throwing an exception.

Change-Id: I6d535b124527bc5a47ef90ba72b57eccbd6c73ef
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBug 1432 - Generated DTOs for types use inefficient instantiation 02/9502/3
Ladislav Borak [Wed, 30 Jul 2014 17:32:00 +0000 (19:32 +0200)]
Bug 1432 - Generated DTOs for types use inefficient instantiation

- changed method for generating default instance value
- only for types (boolean, byte, short, int and long)

Change-Id: I4a423f3569ed84f4d6aff8efe97a110045c6e7c7
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoFix feature file (again :( ) 15/9715/1
Ed Warnicke [Tue, 5 Aug 2014 20:28:03 +0000 (15:28 -0500)]
Fix feature file (again :( )

Change-Id: I95c9d241a812f6d54b7df6d5ee46627930bc1691
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoFix to feature file 91/9691/3
Giovanni Meo [Tue, 5 Aug 2014 18:07:47 +0000 (20:07 +0200)]
Fix to feature file

Change-Id: I6619218e29d8581aedb8012e3fd35553168ad36d
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
9 years agoMerge "yang-data-json is in the feature file, but not built"
Tony Tkacik [Tue, 5 Aug 2014 13:23:47 +0000 (13:23 +0000)]
Merge "yang-data-json is in the feature file, but not built"

9 years agoBUG-1402: Make sure the version in the yang-maven-plugin-it is interpolated also... 94/9694/2
Giovanni Meo [Mon, 4 Aug 2014 14:49:45 +0000 (16:49 +0200)]
BUG-1402: Make sure the version in the yang-maven-plugin-it is interpolated also for the parent

- The parent version of the test parent pom for the IT was still
hardcoded, we need that to come from the project itself else it cannot
be released

Change-Id: I88ae85df3bb84e805df9594b56d3c62d21386f4f
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
9 years agoyang-data-json is in the feature file, but not built 93/9693/1
Giovanni Meo [Fri, 1 Aug 2014 16:53:12 +0000 (18:53 +0200)]
yang-data-json is in the feature file, but not built

- Remove reference to a no-longer existent artifacts and add new dependencies

Change-Id: Ib9fe2e388f658114e0deadfa4dbab0f403a1fed7
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
9 years agoBUG-1382: eliminate use of QName.getPrefix from yang parser 90/9390/7
Martin Vitez [Wed, 23 Jul 2014 12:52:14 +0000 (14:52 +0200)]
BUG-1382: eliminate use of QName.getPrefix from yang parser

Updated tests - removed tests on QName's prefix.

Please do not merge before https://git.opendaylight.org/gerrit/#/c/9640/ is merged.

Change-Id: I41b8940965631609074c5bb8e4c2e0538a33f6a9
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoMerge "BUG-1472: deprecated CompositeNode and friends"
Robert Varga [Tue, 5 Aug 2014 08:01:46 +0000 (08:01 +0000)]
Merge "BUG-1472: deprecated CompositeNode and friends"

9 years agoMerge "BUG-994: introduce ObjectCache for QNameModule/QName"
Tony Tkacik [Tue, 5 Aug 2014 07:46:55 +0000 (07:46 +0000)]
Merge "BUG-994: introduce ObjectCache for QNameModule/QName"

9 years agoBUG-1472: deprecated CompositeNode and friends 21/9621/3
Robert Varga [Sun, 3 Aug 2014 11:18:33 +0000 (13:18 +0200)]
BUG-1472: deprecated CompositeNode and friends

These APIs are deprecated in favor of NormalizedNode and friends. Mark
them as such, so the code that needs to be migrated gets highlighted.

Change-Id: I9d5b903d54dd295f4111f6832bf023b2685c0291
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1439, Bug 1443 Binding Codec NormalizedNodeWriter support 97/9497/11
Tony Tkacik [Fri, 1 Aug 2014 17:28:13 +0000 (19:28 +0200)]
Bug 1439, Bug 1443 Binding Codec NormalizedNodeWriter support

Added initial implementation of Code generator for Binding Stream Writers
which uses NormalizedNodeStreamWriter on the backend
to write data.

Change-Id: Icae22fd1b9ed4256022650d3ad16b38c577f3d3a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1275: teach NormalizedNode builders about size hints"
Tony Tkacik [Mon, 4 Aug 2014 18:17:03 +0000 (18:17 +0000)]
Merge "BUG-1275: teach NormalizedNode builders about size hints"

9 years agoMerge "BUG-865: Remove SchemaServiceListener"
Tony Tkacik [Mon, 4 Aug 2014 18:15:00 +0000 (18:15 +0000)]
Merge "BUG-865: Remove SchemaServiceListener"

9 years agoMerge "BUG-1382: deprecate QName.getPrefix()"
Tony Tkacik [Mon, 4 Aug 2014 18:10:20 +0000 (18:10 +0000)]
Merge "BUG-1382: deprecate QName.getPrefix()"

9 years agoBug 1232 - Add snippet of yang file into comments 44/9144/15
Ladislav Borak [Thu, 31 Jul 2014 22:59:32 +0000 (00:59 +0200)]
Bug 1232 - Add snippet of yang file into comments

- reworked all proposals from Tom Pantelis
- tested with toaster.yang, generated javadoc files added
  as attachment into bugzilla

Change-Id: I6a6c8a6f6592b1abf9368e9b8232263a029460a8
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBUG-1382: deprecate QName.getPrefix() 43/9643/2
Robert Varga [Mon, 4 Aug 2014 10:33:28 +0000 (12:33 +0200)]
BUG-1382: deprecate QName.getPrefix()

Prefix storage in QNames is deprecated. Mark the constructors and
getter as deprecated so it can be removed at a later stage.

Change-Id: I68637fe156195b3668cce334b1cc70ab322c0ffc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1424: Documented RootModificationApplyOperation 66/9366/3
Tony Tkacik [Fri, 25 Jul 2014 15:46:50 +0000 (17:46 +0200)]
Bug 1424: Documented RootModificationApplyOperation

Change-Id: Ided408fb2aeff572eddbc226a8b97c288760b5a3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1475: Correctly handle case of typedef that extends boolean"
Martin Vitez [Mon, 4 Aug 2014 08:15:17 +0000 (08:15 +0000)]
Merge "Bug 1475: Correctly handle case of typedef that extends boolean"

9 years agoBUG-994: introduce ObjectCache for QNameModule/QName 26/6926/19
Robert Varga [Tue, 13 May 2014 09:21:55 +0000 (11:21 +0200)]
BUG-994: introduce ObjectCache for QNameModule/QName

This introduces caching for QNameModule using object-cache-api. This
will allow for efficient object reuse, at the cost of requiring a cache
implementation being available on the class path.

The use of cache has been not propagated to the static creator methods,
simply because the caching lookup introduces a cost which is not
acceptable in all contexts.

Change-Id: I5af9c7e54c726c05a5824521f5ed5183dc4899b4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1275: teach NormalizedNode builders about size hints 38/9638/1
Robert Varga [Mon, 4 Aug 2014 07:27:34 +0000 (09:27 +0200)]
BUG-1275: teach NormalizedNode builders about size hints

With the upcoming codec work we will be able to offer sizing hints
when instantiating normalized nodes. This patch exposes the methods to
pass those hints down to the implementation maps, so they can size
themselves.

Change-Id: Idbc39bda3937d11c89b89807bd253afca5d775f7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused imports 24/9624/2
Robert Varga [Sun, 3 Aug 2014 12:04:17 +0000 (14:04 +0200)]
Remove unused imports

Lowers the number of warnings a bit.

Change-Id: I9cbb9f0bd2f711fa4f7410a5023c73497a59f35e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-865: Remove SchemaServiceListener 30/9530/3
Robert Varga [Thu, 31 Jul 2014 13:08:17 +0000 (15:08 +0200)]
BUG-865: Remove SchemaServiceListener

Eradicates the long-deprecated SchemaServiceListener.
SchemaContextListener is the new name for the equivalent service.

Requires controller to merge I15d495d805eb7a08c3bcd3ab0cf8b5a8d2797db5.

Change-Id: I38185b131e9745c0cad366c38428e8be9a8fb4fe
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1475: Correctly handle case of typedef that extends boolean 35/9635/1
Ed Warnicke [Sun, 3 Aug 2014 20:09:14 +0000 (15:09 -0500)]
Bug 1475: Correctly handle case of typedef that extends boolean

Change-Id: I892ddb39b56cbd17ea22f07a94f4c2c2dd9ed448
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge "BUG-1275: Expose XmlStreamUtils.writeValue()"
Tony Tkacik [Sun, 3 Aug 2014 18:17:16 +0000 (18:17 +0000)]
Merge "BUG-1275: Expose XmlStreamUtils.writeValue()"

9 years agoMerge "BUG-997: Evolve the SchemaRegistry concepts"
Tony Tkacik [Sun, 3 Aug 2014 18:13:58 +0000 (18:13 +0000)]
Merge "BUG-997: Evolve the SchemaRegistry concepts"

9 years agoMerge "BUG-1469: introduce ReflectiveExceptionMapper"
Tony Tkacik [Sun, 3 Aug 2014 18:13:27 +0000 (18:13 +0000)]
Merge "BUG-1469: introduce ReflectiveExceptionMapper"

9 years agoMerge "BUG-1473: rename yang.model.util.InstanceIdentifier"
Tony Tkacik [Sun, 3 Aug 2014 18:11:59 +0000 (18:11 +0000)]
Merge "BUG-1473: rename yang.model.util.InstanceIdentifier"

9 years agoMerge "BUG-1460: make sure DCL works"
Tony Tkacik [Sun, 3 Aug 2014 18:09:16 +0000 (18:09 +0000)]
Merge "BUG-1460: make sure DCL works"

9 years agoBUG-1473: rename yang.model.util.InstanceIdentifier 22/9622/1
Robert Varga [Sun, 3 Aug 2014 11:28:05 +0000 (13:28 +0200)]
BUG-1473: rename yang.model.util.InstanceIdentifier

The class is renamed to InstanceIdentifierType and users are updated to
point to the new name.

Change-Id: I7ece7ea97a4bbbc623156e0e9db692d1e2a56f81
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-997: Evolve the SchemaRegistry concepts 81/9581/9
Robert Varga [Fri, 1 Aug 2014 14:19:29 +0000 (16:19 +0200)]
BUG-997: Evolve the SchemaRegistry concepts

This is the next step in SchemaRegistry evolution. Introduces
SchemaSourceListener and abstract classes for cache and transformer
patterns. Also completes implementation of the the abstract schema
registry and converts URLSchemaContextResolver. Finally it marks the
APIs as Beta, since they are being proven until we certify NETCONF
completely.

Change-Id: If82522c9a9a1913c818146da1247c8c5ca79b9c5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1469: introduce ReflectiveExceptionMapper 09/9609/5
Robert Varga [Sat, 2 Aug 2014 10:34:00 +0000 (12:34 +0200)]
BUG-1469: introduce ReflectiveExceptionMapper

Convenience class for use when simple instantiation is acceptable and
the mapper instance can be shared.

Change-Id: I1946155a46b94fda5067ccbffcbf3b72f2ce8e3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Updated creation of Binding Spec Context to provide additional information."
Robert Varga [Sun, 3 Aug 2014 10:36:24 +0000 (10:36 +0000)]
Merge "Updated creation of Binding Spec Context to provide additional information."

9 years agoMerge "Runtime Codec cleanup"
Robert Varga [Sun, 3 Aug 2014 10:33:48 +0000 (10:33 +0000)]
Merge "Runtime Codec cleanup"

9 years agoUpdated creation of Binding Spec Context to provide additional information. 85/9585/2
Tony Tkacik [Fri, 1 Aug 2014 17:18:28 +0000 (19:18 +0200)]
Updated creation of Binding Spec Context to provide additional information.

Change-Id: I0c71d8b3cb3a569b340fc0ef0c71283382fe2ac6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoRuntime Codec cleanup 84/9584/2
Tony Tkacik [Fri, 1 Aug 2014 17:15:36 +0000 (19:15 +0200)]
Runtime Codec cleanup

- Extracted Augmentation getter to Bidning Reflections
- Fixed retrieval of IdenfierCodec

Change-Id: Ib6b6f45349bd8b5b055dccd036549ec727c0186d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1437, Bug 1438 NormalizedNode Stream Writer API and Implementation"
Robert Varga [Fri, 1 Aug 2014 22:11:20 +0000 (22:11 +0000)]
Merge "Bug 1437, Bug 1438 NormalizedNode Stream Writer API and Implementation"

9 years agoMerge "BUG-997: make sure we carry YANG text around"
Tony Tkacik [Fri, 1 Aug 2014 17:33:10 +0000 (17:33 +0000)]
Merge "BUG-997: make sure we carry YANG text around"

9 years agoBug 1437, Bug 1438 NormalizedNode Stream Writer API and Implementation 96/9496/5
Tony Tkacik [Wed, 30 Jul 2014 15:09:08 +0000 (17:09 +0200)]
Bug 1437, Bug 1438 NormalizedNode Stream Writer API and Implementation

Initial draft of NormalizedNode Stream Writer API, along
with initial implementation which produces immutable NormalizedNodes.

Change-Id: I45513d88eefca7aa070e6679ccfdedf358266d59
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-997: make sure we carry YANG text around 80/9580/1
Robert Varga [Fri, 1 Aug 2014 17:12:38 +0000 (19:12 +0200)]
BUG-997: make sure we carry YANG text around

Unfortunately we need the schema source for module builder, in order to
support netconf monitoring. This is not right, as that component should
be talking to the schema repository to get the text version of a
particular module.

Change-Id: I3360c5b060f63b415f6248ae6e05d41136247ed0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1119 - Optimize generated range checks"
Robert Varga [Fri, 1 Aug 2014 15:38:01 +0000 (15:38 +0000)]
Merge "Bug 1119 - Optimize generated range checks"

9 years agoBug 1119 - Optimize generated range checks 83/9483/7
Ladislav Borak [Wed, 30 Jul 2014 21:56:02 +0000 (23:56 +0200)]
Bug 1119 - Optimize generated range checks

- moved initialization of range and length constraints list
  into static initialization block

Change-Id: I2f5631fceb0e776fe3172e9a05ee97b7fe81252b
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "BUG-1305: fixed unknown nodes and issue with single quote in antlr grammar."
Tony Tkacik [Fri, 1 Aug 2014 14:24:39 +0000 (14:24 +0000)]
Merge "BUG-1305: fixed unknown nodes and issue with single quote in antlr grammar."

9 years agoMerge "Bug 1436: Introduced BindingStreamEventWriter interface"
Robert Varga [Fri, 1 Aug 2014 13:50:22 +0000 (13:50 +0000)]
Merge "Bug 1436: Introduced BindingStreamEventWriter interface"

9 years agoMerge "Bug 1430: New common/util concurrent classes"
Robert Varga [Fri, 1 Aug 2014 13:49:06 +0000 (13:49 +0000)]
Merge "Bug 1430: New common/util concurrent classes"

9 years agoBug 1436: Introduced BindingStreamEventWriter interface 77/9377/6
Tony Tkacik [Mon, 28 Jul 2014 11:36:48 +0000 (13:36 +0200)]
Bug 1436: Introduced BindingStreamEventWriter interface

Introduced BindingStreamEventWriter interface,
which allows to implement Binding codecs
with plugable backend for actual serialization.

This interface needs to present in yang.binding
package, since this in only package which
is imported by all generated YANG Java Bindings
and thus visible for them.

Change-Id: I2d235cd63ecda1d63c8077854a38a5dc9d184d2d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-1305: fixed unknown nodes and issue with single quote in antlr grammar. 70/9570/1
Martin Vitez [Fri, 1 Aug 2014 09:23:18 +0000 (11:23 +0200)]
BUG-1305: fixed unknown nodes and issue with single quote in antlr grammar.

Change-Id: I6721cfc3b2042f3564996f08d155201cc2ff2d43
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoMerge "BUG-997: introduce base SchemaRepository"
Tony Tkacik [Fri, 1 Aug 2014 09:16:39 +0000 (09:16 +0000)]
Merge "BUG-997: introduce base SchemaRepository"

9 years agoMerge "BUG-997: Rework URLSchemaContextResolver"
Tony Tkacik [Fri, 1 Aug 2014 09:16:12 +0000 (09:16 +0000)]
Merge "BUG-997: Rework URLSchemaContextResolver"

9 years agoMerge "BUG-997: Introduce ASTSchemaSource"
Tony Tkacik [Fri, 1 Aug 2014 09:15:46 +0000 (09:15 +0000)]
Merge "BUG-997: Introduce ASTSchemaSource"

9 years agoBUG-1460: make sure DCL works 67/9567/3
Robert Varga [Fri, 1 Aug 2014 08:26:58 +0000 (10:26 +0200)]
BUG-1460: make sure DCL works

As the bug correctly notes, the check of non-volatile field can result
in bad effects.

Change-Id: Ifd0d72c28fe53692b037c2ecf861d36d312b4182
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1402: removed hardcoded plugin version for testing."
Tony Tkacik [Fri, 1 Aug 2014 08:26:00 +0000 (08:26 +0000)]
Merge "BUG-1402: removed hardcoded plugin version for testing."

9 years agoMerge changes Ic9936326,I9b600761
Tony Tkacik [Fri, 1 Aug 2014 07:54:20 +0000 (07:54 +0000)]
Merge changes Ic9936326,I9b600761

* changes:
  BUG-865: move ClassLoaderUtils into util package
  BUG-865: prepare to move ListenerRegistry

9 years agoMerge "BUG-865: Move Immutables"
Tony Tkacik [Fri, 1 Aug 2014 07:54:03 +0000 (07:54 +0000)]
Merge "BUG-865: Move Immutables"

9 years agoBUG-576: fixed bug in parsing of union types. 65/9565/1
Martin Vitez [Fri, 1 Aug 2014 07:06:41 +0000 (09:06 +0200)]
BUG-576: fixed bug in parsing of union types.

Parser creates an empty collection of restrictions and tries to set them to union builder, but union cannot be restricted.
This patch avoid adding restrictions to union builder.
Added test.

Change-Id: Ie0822f21380f8e5f9cd42960e7248927710053cd
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-997: introduce base SchemaRepository 68/9368/9
Robert Varga [Mon, 21 Jul 2014 13:43:59 +0000 (15:43 +0200)]
BUG-997: introduce base SchemaRepository

Change-Id: I51d6c14a217b008afd0fa73c18c6dfc6cc8909b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-997: Rework URLSchemaContextResolver 24/9524/6
Robert Varga [Mon, 28 Jul 2014 10:47:21 +0000 (12:47 +0200)]
BUG-997: Rework URLSchemaContextResolver

This patch introduces an alternative implementation of
URLSchemaContextResolver, which takes advantage of the newly-created
APIs. The core improvement lies in the fact that it pre-validates
registered sources, thus eliding multiple parse actions.

Change-Id: I3311a3f0251868f91c385d0291365934ccfb9ede
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Introduced CompositeNode <-> NormalizedNode serializer"
Tony Tkacik [Thu, 31 Jul 2014 15:31:09 +0000 (15:31 +0000)]
Merge "Introduced CompositeNode <-> NormalizedNode serializer"

9 years agoIntroduced CompositeNode <-> NormalizedNode serializer 39/9539/1
Tony Tkacik [Thu, 31 Jul 2014 14:50:44 +0000 (14:50 +0000)]
Introduced CompositeNode <-> NormalizedNode serializer

- add AnyXmlNodeBase parser and serializer
- in ContainerNodeCnSnSerializer and MapEntryNodeCnSnSerializer was used
MutableCompositeNodeTOImpl which uses init() method which is deprecated
therefore it was rewritten and also whole package was renamed.
- support for AnyXml yang type to yang-data-composite-node

Change-Id: I1f40beef29e8c1c052113043f7029fbc0650192c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Revert "Composite node <-> normalized node serializer and deserializer""
Tony Tkacik [Thu, 31 Jul 2014 13:58:24 +0000 (13:58 +0000)]
Merge "Revert "Composite node <-> normalized node serializer and deserializer""

9 years agoRevert "Composite node <-> normalized node serializer and deserializer" 35/9535/1
Tony Tkacik [Thu, 31 Jul 2014 13:48:15 +0000 (13:48 +0000)]
Revert "Composite node <-> normalized node serializer and deserializer"

This commit renamed artefact, which was missed on code
review done by me, so reverting it for now, to be properly
documented.

Change-Id: Iffaa2f6e1c0e245adbc10ae59cdbc3eb2f365346
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-1402: removed hardcoded plugin version for testing. 31/9531/1
Martin Vitez [Thu, 31 Jul 2014 12:58:28 +0000 (14:58 +0200)]
BUG-1402: removed hardcoded plugin version for testing.

In test-parent/pom.xml was hardcoded yang-maven-plugin version in property it-project.version.
This patch remove this property and use parent pom version.

Change-Id: Ib6478c839abcc54a0862439b201b4889f2af5cc7
Signed-off-by: Martin Vitez <mvitez@cisco.com>
9 years agoBUG-997: Introduce ASTSchemaSource 69/9369/8
Robert Varga [Fri, 25 Jul 2014 02:45:53 +0000 (04:45 +0200)]
BUG-997: Introduce ASTSchemaSource

ASTSchemaSource represents an intermediate processing step, where we
have parsed the YANG text and extracted dependency information.

Change-Id: Ice0b841404a28912787b83f88f9b2d28c68497d5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Composite node <-> normalized node serializer and deserializer"
Tony Tkacik [Thu, 31 Jul 2014 09:24:41 +0000 (09:24 +0000)]
Merge "Composite node <-> normalized node serializer and deserializer"