Colin Dixon [Fri, 10 Apr 2015 00:36:49 +0000 (20:36 -0400)]
Mark JSON writers as @Deprecated
Also fixing a few typos.
Change-Id: I69bb45e564149de510ce0cbd2ef0c5c700b0b3e4
Signed-off-by: Colin Dixon <colin@colindixon.com>
Jozef Gloncak [Thu, 18 Dec 2014 14:08:49 +0000 (15:08 +0100)]
BUG 2973 - correction of output for empty yang type
Empty" type supports (de)serializiation from
JSON array with null ( [null] ) as was specified in
Section 3.3.9 of draft-lhotka-netmod-yang-json-02
Change-Id: I6650893c00212828cd771e477b81811917000713
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit
b18ea8d1646806849f0f1ffbba333a04b9ce93f8)
Tony Tkacik [Wed, 29 Apr 2015 13:35:08 +0000 (15:35 +0200)]
Bug 3067: Improved error reporting in Binding Data Codec
Error reporting in Binding Data Codec was reworked
to throw three additional subclasses of IllegalArgumentException
for specific case of failure:
MissingSchema and MissingSchemaForClass - exception thrown
when schema context associated with codec does not contain
models for supplied class or DOM argument.
IncorrectNesting is thrown when schema is available an user
constructed data with invalid nesting (bypassed generic
compile-time checks).
The checks to determine type of exception are done only
if error condition is detected, so non-error fast path
should not be affected by advanced checks.
Added test which tests these types of exceptions.
Change-Id: Iad020a42317ab46df4d2240568fd6e8205383857
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit
3f754cccb393b989bafb8b194edf9da0ec3e9e8a)
Debalina Ghosh [Mon, 13 Apr 2015 20:31:43 +0000 (13:31 -0700)]
Fixing magic numbers
Change-Id: Id844166d94e9d8059bb48fadfbccec95fe45cf46
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Debalina Ghosh [Wed, 6 May 2015 18:12:25 +0000 (11:12 -0700)]
Elimitating redundant modifiers
Change-Id: I01e55a903937cd2344ef90aac10a247c269bf560
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Thomas Bachman [Thu, 7 May 2015 14:55:03 +0000 (10:55 -0400)]
Bug 3151: Fix Not a Proxy Instance Exception
This fixes a bug where a "Not a Proxy Instance"
exception (also IllegalArgumentException) is thrown
when hashCode is invoked in a yangtools generated
builder.
Change-Id: Iddc7ca6e4785e5ce11e41900a438dbb49baeaf6d
Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
pkajsa [Thu, 13 Nov 2014 13:51:20 +0000 (14:51 +0100)]
Bug 2333 - Java code generation error, when yang model contains Choice node
in module body at top level
BindingGeneratorImpl fails (NoSuchElementException) during java source code
generation from yang model which contains Choice node directly in module body
at top level. The parent path of Choice node is empty (because the parent
is the module) and therefore iterator.next() on the path fails. For more
information see Bug 2333.
Change-Id: I6e617eca91bb5d8d2b91ad058a4df5c2793ec81d
Signed-off-by: pkajsa <pkajsa@cisco.com>
Jan Hajnar [Mon, 27 Apr 2015 12:29:09 +0000 (14:29 +0200)]
Bug 2690 - Yang-Data-Impl: write and then merge on same list in
modification produces incorrect result
* added check for previous WRITE operation in recursiveMerge().
If there is some WRITE operation before MERGE we create new WRITE
operations for children => our data created by WRITE won't be
overwritten by merge on container/list.
* These children WRITE transactions will be recursively pushed down in the tree
while there are merge operations on them
Change-Id: Ie346c61c52cb000ee950d137f39d42e1ead3e1ff
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Tony Tkacik [Tue, 5 May 2015 08:16:56 +0000 (08:16 +0000)]
Merge "Fix NPE in DataTreeCandidates"
Tom Pantelis [Mon, 4 May 2015 12:01:16 +0000 (08:01 -0400)]
Fix NPE in DataTreeCandidates
Patch https://git.opendaylight.org/gerrit/#/c/19473 introduced a
guaranteed NPE in DataTreeCandidates.NodeIterator. applyToModification
constructs a NodeIterator passing in a null parent. However the
NodeIterator ctor has PreCondition for non-null parent. Need to remove
the PreCondition.
(need unit tests for this code)
Change-Id: If778aaeede03a593ad2c6acf859f3741fdf0eedd
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Debalina Ghosh [Mon, 4 May 2015 18:26:28 +0000 (11:26 -0700)]
Fixing sonar issues in yanf-data-impl leafref
Change-Id: I21c1b2fd3342ac1da28f73eabe8d15a774f3032f
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Robert Varga [Mon, 4 May 2015 13:32:00 +0000 (13:32 +0000)]
Merge "Bug 3016 : This manual serialization of ImmutableList was done because in routed rpc, remote server was not able to deserialize the object in AKKA messages properly. Following exception was thrown:"
Robert Varga [Mon, 4 May 2015 12:05:21 +0000 (12:05 +0000)]
Merge "Removed features-test"
Robert Varga [Mon, 4 May 2015 12:05:13 +0000 (12:05 +0000)]
Merge "Removed unused dependency."
Tony Tkacik [Mon, 4 May 2015 12:03:43 +0000 (12:03 +0000)]
Merge "Fix sonar issues in AnyXmlEffectiveStatementImpl"
Robert Varga [Sun, 3 May 2015 13:16:42 +0000 (15:16 +0200)]
Do not use recursion in InMemoryDataTreeModification.ready()
This patch reworks the logic to eliminate the recursion in
ModifiedNode.seal(), opting for state-tracking class and simple loops.
Change-Id: I42ab781d84e6ebaccc3ff18c3bca6cebcff4573c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 2 May 2015 04:09:52 +0000 (06:09 +0200)]
Optimize DataTreeCandidate.applyToModification()
Both implementations use recursive calls to themselves. Instead of recursion,
we can use a simplistic single-linked stack of operations and iterate over
them.
While this results in object allocation, these objects are short-lived
and never leak from current thread, which means they are easily
collected. Since the call is not recursive, JIT should be able to more
easily inline and optimize the operations.
Change-Id: I7d82a58c6be3e853ea5bcf9069876370804cb199
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sun, 3 May 2015 07:08:47 +0000 (09:08 +0200)]
Mark methods as static
Private methods do not take object state, so can be turned into statics.
Also perform drive-by cleanup of sonar warnings.
Change-Id: Icca99c4a9242f9459e278bc9ccb7fa1f67259ff1
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sun, 3 May 2015 07:43:18 +0000 (09:43 +0200)]
Fix benchmark to compile on JDK8
Since we do not compile benchmarks by default, this part was skipped
when we fixed javadocs.
Change-Id: I22768608bae94f0ab8cecdbd86b661c8a58010ea
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 1 May 2015 20:12:49 +0000 (20:12 +0000)]
Merge "adding methods to minmaxelements to reduce complexity"
Tony Tkacik [Tue, 28 Apr 2015 15:28:49 +0000 (17:28 +0200)]
Fixed some major sonar warnings in yang-common.
Change-Id: I73ba32227467eca5e189bf76f01099caba760913
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Debalina Ghosh [Wed, 22 Apr 2015 20:48:04 +0000 (13:48 -0700)]
adding methods to minmaxelements to reduce complexity
Change-Id: I7a451b68b1d4f1aa8d2560b61f70c8f6a4481a9b
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Debalina Ghosh [Wed, 22 Apr 2015 18:43:44 +0000 (11:43 -0700)]
Fix sonar issues in AnyXmlEffectiveStatementImpl
Change-Id: I41472f04d21fdcedbe8afaae1942cbc4ac21dddf
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Harman Singh [Thu, 30 Apr 2015 21:37:25 +0000 (14:37 -0700)]
Bug 3016 : This manual serialization of ImmutableList was done because in routed rpc,
remote server was not able to deserialize the object in AKKA messages properly.
Following exception was thrown:
ERROR Remoting - cannot assign instance of com.google.common.collect.RegularImmutableList
to field org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.legacyPath of type
com.google.common.collect.ImmutableList in instance of org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
Change-Id: I74daf7ab5a6d4c164bb87b1bebc5f4e2dffb8753
Signed-off-by: Harman Singh <harmasin@cisco.com>
Robert Varga [Thu, 30 Apr 2015 15:53:01 +0000 (15:53 +0000)]
Merge "Fixed sonar issues in ClassLoaderUtils."
Tony Tkacik [Thu, 30 Apr 2015 13:37:48 +0000 (13:37 +0000)]
Merge "Add hooking into NormalizedNodeParsers."
Tony Tkacik [Thu, 30 Apr 2015 13:21:34 +0000 (13:21 +0000)]
Merge "Bug 2983 - Throws ResultAlreadySet instead of IllegalStateException"
Tony Tkacik [Wed, 29 Apr 2015 16:48:44 +0000 (18:48 +0200)]
Removed features-test
Yangtools Feature Test was replaced by odlparent feature test.
Change-Id: I972a06d283c2dca1aadfb0b3068708ef7c8dff17
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Wed, 29 Apr 2015 16:46:12 +0000 (18:46 +0200)]
Removed unused dependency.
Change-Id: If27764d177a80e9aa4a46abbb9c675b0f503056f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Peter Kajsa [Fri, 24 Apr 2015 13:08:36 +0000 (15:08 +0200)]
Bug 2366 - Effective statement implementation
- implementation of addedByUses, addedByAugmentation, Original and
other fields initialization
- bugfix of augmentation in uses stmt (yang models in /test/resources/model)
- bugfix and test of forward referencing augmentations and uses
- added implementation to Module, Deviation and Import effective statements
- implementation of unit tests
- implementation of Submodule effective statement in progress
Change-Id: Ib4d98cf8875655a7d75ffa6bfd59601638a9ad57
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
Tony Tkacik [Wed, 29 Apr 2015 09:24:45 +0000 (11:24 +0200)]
Fixed sonar issues in ClassLoaderUtils.
Change-Id: I7c21cd2978732ab318a1707043ae8f448e9ba48a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Jan Hajnar [Wed, 22 Apr 2015 14:11:32 +0000 (16:11 +0200)]
Bug 2983 - Throws ResultAlreadySet instead of IllegalStateException
* added custom exception when trying to set NormalizedNodeResult
* added more descriptive error when getting NormalizedNodeResult already
set exception
Change-Id: I35beffc79a4951134ba64c07ad1ed627b431031b
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Robert Varga [Tue, 28 Apr 2015 19:22:56 +0000 (19:22 +0000)]
Merge "Cleanup some major sonar warning in yang/*"
Robert Varga [Tue, 28 Apr 2015 19:08:26 +0000 (19:08 +0000)]
Merge "Bumped Checkstyle to 6.1.1 to be in sync with Maven plugin."
Tomas Cere [Tue, 28 Apr 2015 12:35:13 +0000 (14:35 +0200)]
Add hooking into NormalizedNodeParsers.
Makes it possible to add a ParsingStrategy into the parsers,
to allow for callbacks/custom processing while parsing.
DefaultParsingStrategy has the same behaviour as the already present parsers.
Change-Id: I5998af4befaf31d3af3f4cf5e2f46ddc32b1e05b
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Tue, 28 Apr 2015 12:31:22 +0000 (14:31 +0200)]
Bumped Checkstyle to 6.1.1 to be in sync with Maven plugin.
Checkstyle checks needs to be in sync with Checkstyle maven
plugin due to static final constants, which were not
preserved between 2.14 and 2.15 which resulted in
NullPointerExceptions.
Change-Id: I043a9b8bf196b44636f3496e5fd65efce9eccc80
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 27 Apr 2015 09:11:03 +0000 (09:11 +0000)]
Cleanup some major sonar warning in yang/*
Change-Id: I7d300fbb5521a3fcad6dea8ceea96eb9a5419fa9
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Robert Varga [Sun, 19 Apr 2015 02:36:43 +0000 (04:36 +0200)]
BUG-2882: introduce cursor-based modification API
This patch introduces the notion of a DataTreeSnapshotCursor and a
DataTreeModificationCurser as its mutating variant. The use of cursors
can lean to potential savings when applying multiple operations which
share a common root nested deeper in the data tree.
Change-Id: Iaed2c3d2d0260c97f4dfa36410b1c0944ba37c6c
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 24 Apr 2015 11:03:54 +0000 (11:03 +0000)]
Merge "Bug 3051: Fixed pattern checks in generated DTOs"
Tony Tkacik [Fri, 24 Apr 2015 08:37:21 +0000 (10:37 +0200)]
Bumped model versions to .8-SNAPSHOT
Change-Id: I1b1c6c3fcd875795f2b8cab1d4146b25c87ee7e7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 23 Apr 2015 10:03:12 +0000 (10:03 +0000)]
Bumped Yangtools by minor version.
Change-Id: I0c357c757ed78607982abfbf788433e16c88835c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 23 Apr 2015 19:37:19 +0000 (19:37 +0000)]
Merge "Bug 2363, Bug 2205. Beta version of LeafRefContext tree computation"
Peter Kajsa [Wed, 4 Feb 2015 09:06:09 +0000 (10:06 +0100)]
Bug 2363, Bug 2205. Beta version of LeafRefContext tree computation
beta version of DataTree leafrefs values validation
Currently works (Bug 2363):
- LeafRefContext tree build with all relations:
- isReferencing/ hasReferencingChild
- isReferenced/ hasReferencedChild
- leafref target node -> leafref source nodes
- validation of LeafRef Path and Predicates syntax according to RFC6020
specification
- parsing of all LeafRef Path components (i.e.: LeafRef absolute/relative
target path, path Predicates, key path expressions) into LeafRefPath
instance
- pack of utils methods over LeafRefContext tree
- a couple of simple tests
Currently works (Bug 2205):
- validation of LeafRefs values and LeafRefs targets for WRITE, MERGE and
DELETE operations
- leafref path predicates evaluation (also multiple)
Currently known issues (Bug 2363):
- improve leafref identification, also for cases when type of the leaf is
typedef -> typedef -> etc.. -> leafref
- handle also choices without case
- questionable issue is, whether it is necessary to merge referencing and
referencedBy subtrees under the root context (currently are not)
- in equals method check also for predicates equality
- test the solution
Currently known issues (Bug 2205):
- handle also UnkeyedLists
- perfrom further testing
- increase unit tests coverage
- add tests for special cases.
Change-Id: Id873fb446fe40855993fe00e6a56f82d3daee491
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
Gregor Zatko [Thu, 23 Apr 2015 06:58:18 +0000 (08:58 +0200)]
Bug 2366: new parser API extensions support implemented
Change-Id: Ic8b25287a5e79b6c95e40eb65f7f305e9ba41145
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Signed-off-by: Gregor Zatko <gzatko@cisco.com>
Tony Tkacik [Thu, 23 Apr 2015 15:13:36 +0000 (17:13 +0200)]
Bug 3051: Fixed pattern checks in generated DTOs
Pattern checks in generated DTOs were generated as
OR checks in case model type specified multiple
patterns, but correct behaviour is to do AND.
So in order string needs to verified against
all patterns and match all of them.
Change-Id: If82e282312c82dd71de79534c7fa599fcdcefab4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Robert Varga [Thu, 23 Apr 2015 13:01:20 +0000 (15:01 +0200)]
Expose YangInstanceIdentifier.EMPTY
Quite a few users have custom-made versions of this field. Expose it as
an API element.
Change-Id: I2e77b6bc7751b8e4be92df139c9b1cf782328414
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 22 Apr 2015 15:33:37 +0000 (17:33 +0200)]
SchemaAwareApplyOperation.checkDeleteApplicable() can be static
This method does not touch local state, so make it static.
Change-Id: I973fb25e4989c7969ddb5df18e2d683d2cbc15ef
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 22 Apr 2015 15:32:47 +0000 (17:32 +0200)]
Dump the modification which fails to produce a root node
For CDS implementation, there seems to be a bug where we fail to create
an appropriate changeset. Also be sure to send debug on how the
candidate is being applied.
Change-Id: Ie0eccd831169ff42c002851633926713dba20c74
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 23 Apr 2015 10:27:19 +0000 (12:27 +0200)]
Fixed thread-safety issue in YANG parser.
Change-Id: I9a83ecb316528ee99bc1905ea1d2e7e3f61f11e3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Wed, 22 Apr 2015 18:28:43 +0000 (18:28 +0000)]
Merge "Fix missing format placeholder"
Tony Tkacik [Wed, 22 Apr 2015 18:28:10 +0000 (18:28 +0000)]
Merge "Add parser support for non-strict schema lookup."
Tony Tkacik [Wed, 22 Apr 2015 18:25:56 +0000 (18:25 +0000)]
Merge "Introduce InstanceIdToNodes into yang-data-impl"
Gregor Zatko [Wed, 22 Apr 2015 13:56:11 +0000 (15:56 +0200)]
Sonar issues clean-up
Change-Id: I9267a5e8dc8347f04a04977043b558369e35670b
Signed-off-by: Gregor Zatko <gzatko@cisco.com>
Tony Tkacik [Wed, 22 Apr 2015 15:54:40 +0000 (15:54 +0000)]
Merge "tests for arguments parsing parsing Augment in Uses (except extensions)"
Tony Tkacik [Wed, 22 Apr 2015 15:53:39 +0000 (15:53 +0000)]
Merge "Fix ifelse curly braces"
Tony Tkacik [Wed, 22 Apr 2015 15:52:02 +0000 (15:52 +0000)]
Merge "Fixing findbugs"
Maros Marsalek [Tue, 21 Apr 2015 12:15:19 +0000 (14:15 +0200)]
Introduce InstanceIdToNodes into yang-data-impl
This utility class transforms instance identifier into a normalized node
structure. Suitable for netconf/restconf protocols.
Change-Id: Ib91afe858ee1d5871dd20222b4a8dba56664df73
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tomas Cere [Wed, 22 Apr 2015 14:44:02 +0000 (16:44 +0200)]
Add parser support for non-strict schema lookup.
If parsers are in non-strict mode they will ignore parsing
any node that fails schema lookup.
Change-Id: I61fa05a2607477a7378952d8a88283f2ca98a13c
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tony Tkacik [Wed, 22 Apr 2015 13:26:57 +0000 (13:26 +0000)]
Merge changes I7c9bd36f,I09573668
* changes:
Add a revisionless QName constructor
Fix DataTreeCandidateNode API definition
Gregor Zatko [Wed, 22 Apr 2015 08:42:32 +0000 (10:42 +0200)]
tests for arguments parsing
parsing Augment in Uses (except extensions)
Change-Id: I331f97cc38d8a060c24d76f482e42618ee046316
Signed-off-by: Gregor Zatko <gzatko@cisco.com>
Debalina Ghosh [Tue, 21 Apr 2015 21:15:35 +0000 (14:15 -0700)]
Fix ifelse curly braces
Change-Id: I174644fd63e25ae0a499908ef60b683407e78185
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Robert Varga [Tue, 21 Apr 2015 15:44:34 +0000 (17:44 +0200)]
Fix missing format placeholder
The modification is not logged because we are missing the %s
placeholder.
Change-Id: I8dd1b72a3fe1dde516cad063996731964c1fac29
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 21 Apr 2015 08:52:12 +0000 (08:52 +0000)]
Merge "Bug 2900: Fixed incorrect instanceof check in xml codec."
Tony Tkacik [Tue, 21 Apr 2015 08:34:29 +0000 (08:34 +0000)]
Bug 2900: Fixed incorrect instanceof check in xml codec.
Change-Id: I4b48f73458b8876271ce8ee219f9babd05ec632b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Tue, 21 Apr 2015 08:05:53 +0000 (08:05 +0000)]
Merge "change to interface"
Tony Tkacik [Tue, 21 Apr 2015 07:47:16 +0000 (07:47 +0000)]
Merge "Sonar issues clean-up"
Debalina Ghosh [Thu, 16 Apr 2015 21:25:05 +0000 (14:25 -0700)]
Fixing findbugs
Change-Id: I153b8f990b79b3600d40ac239b5930fabb1f9f63
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Debalina Ghosh [Fri, 17 Apr 2015 17:47:06 +0000 (10:47 -0700)]
change to interface
Change-Id: Id16a68b5486e334c01341a646a9e83bb0407272c
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Debalina Ghosh [Fri, 17 Apr 2015 18:49:59 +0000 (11:49 -0700)]
Findbugs for yang parser impl util
Change-Id: I82f976de66bb3806f0f8d35ab77ca19cdad87b40
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Robert Varga [Sat, 18 Apr 2015 21:31:38 +0000 (23:31 +0200)]
Add a revisionless QName constructor
We already provide a string-based constructor, but that requires a valid
revision date. A QNameModule does not require a revision, which is
reflected by other factory methods. Add a two-string factory method,
which does not take a revision argument.
Change-Id: I7c9bd36fc972a843b6b45ef972400a8f77f9c9b0
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 20 Apr 2015 13:40:36 +0000 (15:40 +0200)]
Fix DataTreeCandidateNode API definition
The javadocs for getDataBefore() and getDataAfter() were switched. Also
add @Nonnull annotations to express the intent to users.
Change-Id: I0957366830f43f0c02e69ae7bddfabe018955bef
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 20 Apr 2015 13:25:03 +0000 (15:25 +0200)]
Bug 2900: Fixed incorrect dispatch for unkeyed list parser.
Change-Id: I3a15b79fd1973736fa0443099f1e7572b78663c1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Ciglan [Mon, 20 Apr 2015 12:13:23 +0000 (14:13 +0200)]
Sonar issues clean-up
Change-Id: Ic1b3a836efc17f6f589238be26ece2bd08ebcc0a
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Robert Varga [Sat, 18 Apr 2015 18:36:18 +0000 (20:36 +0200)]
BUG-3018: introduce DataTreeCandidateNodes
This is a utility class for various DataTreeCandidate-related
operations. One of them is a method to transform a NormalizedNode into a
DataTreeCandidate which behaves as if that node was freshly written into
an empty DataTree.
Change-Id: Id8126a68f3bf35092bd8630358eb258d65c61d36
Signed-off-by: Robert Varga <rovarga@cisco.com>
Debalina Ghosh [Wed, 15 Apr 2015 19:13:32 +0000 (12:13 -0700)]
Remove ununsed variable
Change-Id: I942cb8d25f4afeea0a488131b326232923d87022
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.com>
Robert Varga [Thu, 16 Apr 2015 11:51:13 +0000 (11:51 +0000)]
Merge "Bug 2999: Use normalized type in creation of simple JSON codecs."
Tony Tkacik [Thu, 16 Apr 2015 11:10:33 +0000 (13:10 +0200)]
Bug 2999: Use normalized type in creation of simple JSON codecs.
Change-Id: I9c3fc6412fb96f513967a950540725a6c4886cad
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Robert Varga [Thu, 16 Apr 2015 10:59:03 +0000 (10:59 +0000)]
Merge "Bug 2362 - Milestone: Basic constraints validation"
Robert Varga [Thu, 16 Apr 2015 09:11:31 +0000 (09:11 +0000)]
Merge "Direct schema node lookup in SchemaUtils"
Maros Marsalek [Mon, 13 Apr 2015 15:58:31 +0000 (17:58 +0200)]
Direct schema node lookup in SchemaUtils
SchemaUtils.findSchemaForChild now looks up child schema node
directly by querying the parent schema node and uses the
iterative/recursive lookup as fallback.
This is a performance improvement that bypasses the recursive
lookup if possible.
Change-Id: I888e767310713efd42428ef58caf959651643f49
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Vishal Thapar [Tue, 14 Apr 2015 12:40:19 +0000 (18:10 +0530)]
workaround for BUG: 2974
Suggested workaround for bug2974 is to add
yang-types revision to ietf-interfaces.yang
This change imports latest revision as well as
changes the dependency to ietf-yang-type-
20130715
Change-Id: If0ad60b435ae311db656d1a7e49402bc3ef6bb2f
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
Tony Tkacik [Wed, 15 Apr 2015 13:51:34 +0000 (13:51 +0000)]
Merge "Bug 2997: Fixed instanceof checks to use interfaces"
Gregor Zatko [Wed, 15 Apr 2015 10:45:19 +0000 (12:45 +0200)]
Bug 2366 - Effective statements impl for new yang parser.
- added implementation of effective statements and integration to
yang-model-api
- added implementation and tests of augment declared statement and AugmentUtils
Change-Id: Ifc39ce971cd3efd5bb00f3f4f25dbd791ee65c38
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
Signed-off-by: Gregor Zatko <gzatko@cisco.com>
Tony Tkacik [Wed, 15 Apr 2015 08:18:51 +0000 (10:18 +0200)]
Bug 2997: Fixed instanceof checks to use interfaces
JSONCodecFactory used instanceof checks for conrete
implementation classes instead of checks for
interfaces describing behaviour.
Change-Id: Ib8a0b259b993a52bd661ac33db6ae91308f46774
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Martin Ciglan [Tue, 14 Apr 2015 14:31:07 +0000 (16:31 +0200)]
Bug 2366 - new parser API - implementation of declared statements
- added integration between ANTL4 parsing YANG file and new parser
- added test to demonstrate it
- added implementation of yang statements and their definitions resp. support
classes
- added implementation of effective statements and integration to yang.model.api
- added effective build implementation and unit tests of effective build
- added new namespaces
- added new utils and parsing methods
- added simple unit tests
Bugfixing:
- fix of phases switching bugs on two places
- fix of argument parsing before parent ctx assigment (NPE on null parent)
- fix of values retrieval from sourceLocal and treeScoped namespaces
- fix of tryToComplete method in SourceSpecificContext class. Method did not
return correct progress result although everything was resolved
correctly
Change-Id: I5d6acc69bb877b26403d69e276ed5c578e9bd4d9
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Signed-off-by: Gregor Zatko <gzatko@cisco.com>
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Jan Hajnar [Fri, 6 Feb 2015 14:26:34 +0000 (15:26 +0100)]
Bug 2362 - Milestone: Basic constraints validation
* added validator class for min and max elements constraint
* added validation method calls from NormalizedNodeContainerModificationStrategy and
UnkeyedListModificationStrategy
* added tests
Change-Id: I384837f1a2a6dc730b824d509f7080df7408fd3f
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 14 Apr 2015 10:38:31 +0000 (10:38 +0000)]
Merge "Bug 2362: Make sure JSON and XML codecs are not losing constraints."
Tony Tkacik [Mon, 13 Apr 2015 16:48:43 +0000 (18:48 +0200)]
Bug 2984 - Added Missing space separator for list keys in yin format
Change-Id: Ibb943777604f61dde20bb84fce2a7f13c38333c7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 13 Apr 2015 09:27:14 +0000 (09:27 +0000)]
Merge "BUG-1485: deprecate length/range methods"
Robert Varga [Mon, 13 Apr 2015 09:18:48 +0000 (09:18 +0000)]
Merge "Bug 1260: Implemented Binding Caching Codec"
Robert Varga [Mon, 13 Apr 2015 08:40:23 +0000 (08:40 +0000)]
Merge "Bug 2374 - YANG Binding: Added support for AugmentationHolder interface"
Robert Varga [Wed, 18 Mar 2015 17:20:15 +0000 (18:20 +0100)]
BUG-1485: deprecate length/range methods
These methods leak the internals of how constraints are enforced. No
outside parties should rely on them, so lets mark them deprecated. If we
do not get reports of use, we should be removing them in a future
release.
Change-Id: I128c5abe5c894a4808ff30dcebd6af42d8f682cb
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 8 Apr 2015 17:41:05 +0000 (19:41 +0200)]
Bug 1260: Implemented Binding Caching Codec
Implemented Bidning Caching Codec which maintains
API-user configured cache of serialized data
from Bidning to NormalizedNode.
These cached data are used in subsequent serializations
in order to not allocate new NormalizedNodes for
logically equivalent data.
Change-Id: Iafaed957453569c3e8ecfbb2aed333f3a1fd418f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Jan Hajnar [Thu, 9 Apr 2015 11:41:43 +0000 (13:41 +0200)]
Bug 2964 - ClassCastException when querying -
controller-config/yang-ext:mount/config:modules
* added test for bugfix
Change-Id: I4d82b982471559b3bfc7ce81cce65f91d831aab3
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Robert Varga [Sat, 11 Apr 2015 20:22:50 +0000 (22:22 +0200)]
Fix enum members' name
Enumeration members are supposed to be capitalized as normal constants.
Fix that before the API is widely used.
Change-Id: I1d0632e9491bd79047d1f71f2a906c498cdd0ad6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 11 Apr 2015 20:40:02 +0000 (22:40 +0200)]
Do not declare RuntimeExceptions as thrown
Fix a bunch of sonar warnings around declaring runtime exceptions.
Change-Id: I6e8267e29ef6c0d3f2d220531ca656ff564331ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 11 Apr 2015 15:11:12 +0000 (17:11 +0200)]
Squash declared types
Rather than binding to particular implementation, make sure we use an
interface.
Change-Id: Ibecbc00a42d1c37339c5f965f6c1c5a63fa24d7f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sat, 11 Apr 2015 15:03:58 +0000 (17:03 +0200)]
Fix constant names
Constants should have capitalized names. Fixes a few sonar warnings.
Change-Id: I600b482a817055784874e91f9cb8c5b06b948302
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 10 Apr 2015 09:44:58 +0000 (09:44 +0000)]
Merge "BUG-2962: add DataTreeTip interface and implement it"
Tony Tkacik [Thu, 9 Apr 2015 07:59:57 +0000 (09:59 +0200)]
Bug 2362: Make sure JSON and XML codecs are not losing constraints.
Change-Id: I9b3659f46438f1ad06ef86e2df33b7e963db40bc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>