yangtools.git
9 years agoRemove <repositories> and <pluginRepositories> sections 78/15178/2
Thanh Ha [Wed, 11 Feb 2015 23:25:03 +0000 (18:25 -0500)]
Remove <repositories> and <pluginRepositories> sections

It is recommended that developers and servers configure this locally via
settings.xml.

https://lists.opendaylight.org/pipermail/discuss/2015-January/004482.html

Change-Id: Ifc89c520b593abedaca80be3706775bef747db15
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoFixup build failures introduced by guava 18 12/15312/2
Robert Varga [Sat, 14 Feb 2015 07:45:08 +0000 (08:45 +0100)]
Fixup build failures introduced by guava 18

This fixes the fallout from the version skew.

Change-Id: I8678102ce3eda0f5904c9551eb4f4f83bc1b9480
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2512: Initial design of YANG statement meta-model."
Robert Varga [Fri, 13 Feb 2015 18:22:46 +0000 (18:22 +0000)]
Merge "Bug 2512: Initial design of YANG statement meta-model."

9 years agoBug 2512: Initial design of YANG statement meta-model. 77/14677/9
Tony Tkacik [Thu, 29 Jan 2015 16:37:09 +0000 (17:37 +0100)]
Bug 2512: Initial design of YANG statement meta-model.

Analysis of several new functional requirements for YANG parser,
showed  need to define meta-model of YANG model, which
could be used for transformation and processing of different YANG model
serialization formats (YANG text and YIN).

This new model introduces additional concept from YANG:

  - Statement
     - DeclaredStatement
     - EffectiveStatement
  - StatementDefinition
  - IdentifierNamespace

This basic building blocks allow us to describe with these APIs
any YANG statement model, which may be introduced down the line
in form of YANG extensions or updates to YANG specification,
which does not affect statement principle.

Change-Id: I9d42eaeba41fc388ed84dc7071d8e38755daab5d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG 2413 - tracking in yang grouping"
Tony Tkacik [Fri, 13 Feb 2015 14:39:37 +0000 (14:39 +0000)]
Merge "BUG 2413 - tracking in yang grouping"

9 years agoMerge "BUG 2307: Filtering proxy for Schema context functionality"
Tony Tkacik [Fri, 13 Feb 2015 09:02:54 +0000 (09:02 +0000)]
Merge "BUG 2307: Filtering proxy for Schema context functionality"

9 years agoBUG 2307: Filtering proxy for Schema context functionality 97/14597/9
Marian Dubai [Thu, 29 Jan 2015 09:29:51 +0000 (10:29 +0100)]
BUG 2307: Filtering proxy for Schema context functionality

Change-Id: If4c2231993ae70144f677625df100fa078695863
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoMerge "Migrate to use odlparent features-test"
Tony Tkacik [Thu, 12 Feb 2015 17:36:59 +0000 (17:36 +0000)]
Merge "Migrate to use odlparent features-test"

9 years agoMerge "Remove repository declaration"
Tony Tkacik [Thu, 12 Feb 2015 17:36:02 +0000 (17:36 +0000)]
Merge "Remove repository declaration"

9 years agoMigrate to use odlparent features-test 62/14162/3
Robert Varga [Thu, 15 Jan 2015 02:16:29 +0000 (03:16 +0100)]
Migrate to use odlparent features-test

The code from features-test has been migrated over to odlparent. This
patch makes sure we use that artifact instead of the yangtools-provided
one.

Change-Id: I15b92ed55b838a85e9787f69d4647693a551f461
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2624 - XXX.getQName() should return namespace of module to which XXX 41/15141/1
Peter Kajsa [Wed, 11 Feb 2015 12:53:12 +0000 (13:53 +0100)]
Bug 2624 - XXX.getQName() should return namespace of module to which XXX
belongs.

For more information, please see the Bug 2624.

Change-Id: I47bdc55bb90ad91a31110f9edfa842a39bcdf9ec
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
9 years agoMerge "Make JSON serializer always serialize empty containers"
Tony Tkacik [Tue, 10 Feb 2015 12:40:03 +0000 (12:40 +0000)]
Merge "Make JSON serializer always serialize empty containers"

9 years agoMake JSON serializer always serialize empty containers 06/15106/1
Maros Marsalek [Tue, 10 Feb 2015 12:08:23 +0000 (13:08 +0100)]
Make JSON serializer always serialize empty containers

Even if their presence is not required

Change-Id: I5913a3a07d39be14391488ae88f0243c0c7189d3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG 2413 - tracking in yang grouping 00/15100/1
Vaclav Demcak [Tue, 10 Feb 2015 08:52:48 +0000 (09:52 +0100)]
BUG 2413 - tracking in yang grouping

Change-Id: I284006a735c711ff9faf4d9e953906bb8f21fa06
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoRemove repository declaration 71/15071/2
Robert Varga [Mon, 9 Feb 2015 15:52:36 +0000 (16:52 +0100)]
Remove repository declaration

Repositories are managed by settings.xml, so remove them from parent.

Change-Id: I5e377c5c3601ef3988c8397311fb120864cda4f1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMark yang generated source location as a source directory. 87/15087/2
Nathan Harmon [Mon, 9 Feb 2015 21:19:39 +0000 (13:19 -0800)]
Mark yang generated source location as a source directory.

Change-Id: I958affa226e9e34a795ffea42450976ca9ef4697
Signed-off-by: Nathan Harmon <nathan.harmon@hp.com>
9 years agoMake dependencyManagement mandatory 99/15099/1
Robert Varga [Tue, 10 Feb 2015 07:09:02 +0000 (08:09 +0100)]
Make dependencyManagement mandatory

Activating on existence of src/main/yang leads to different things being
defined when this pom is used in build vs. offlne.

Change-Id: I86cf9b2e9fc77fcad1c3868137eec5082766ae90
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemoved unused dependency on yang-binding from yang-model-util 61/15061/1
Tony Tkacik [Mon, 9 Feb 2015 08:21:58 +0000 (09:21 +0100)]
Removed unused dependency on yang-binding from yang-model-util

Change-Id: I73275351cf6736a5bf881533f8633c2137ab245a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoAdd notification support to SchemaTracker 47/14547/2
Maros Marsalek [Tue, 27 Jan 2015 16:39:09 +0000 (17:39 +0100)]
Add notification support to SchemaTracker

This allows serialization of notification from NormalizedNode writer

Change-Id: Id3fdf415aef7ceae271bbc187ba578f37434e90b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix possible null pointer in NormalizedNode XML stream writer 46/14546/2
Maros Marsalek [Wed, 21 Jan 2015 13:28:39 +0000 (14:28 +0100)]
Fix possible null pointer in NormalizedNode XML stream writer

Change-Id: Ifc768335f54ce4110e54b094da4809716fdc7618
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Introduce javax.annonations to concepts"
Tony Tkacik [Thu, 5 Feb 2015 09:56:40 +0000 (09:56 +0000)]
Merge "Introduce javax.annonations to concepts"

9 years agoMerge "Document the Path concept."
Tony Tkacik [Thu, 5 Feb 2015 09:56:31 +0000 (09:56 +0000)]
Merge "Document the Path concept."

9 years agoMerge changes I7aea2237,Ie8e125e5
Tony Tkacik [Thu, 5 Feb 2015 09:51:22 +0000 (09:51 +0000)]
Merge changes I7aea2237,Ie8e125e5

* changes:
  Remove ietf-netconf
  Eliminate unused pluginManagement section

9 years agoMerge changes Id14ebb05,I2a431693
Tony Tkacik [Thu, 5 Feb 2015 09:49:41 +0000 (09:49 +0000)]
Merge changes Id14ebb05,I2a431693

* changes:
  Add copyright header and fix whitespace
  Fix lifecycle mapping errors in eclipse

9 years agoMerge "Optimize Types instantiation"
Tony Tkacik [Thu, 5 Feb 2015 09:48:13 +0000 (09:48 +0000)]
Merge "Optimize Types instantiation"

9 years agoMerge "Improve codec performance"
Tony Tkacik [Thu, 5 Feb 2015 09:47:55 +0000 (09:47 +0000)]
Merge "Improve codec performance"

9 years agoMerge "Modified RpcResultBuilder classes to be Serializable"
Robert Varga [Wed, 4 Feb 2015 22:14:47 +0000 (22:14 +0000)]
Merge "Modified RpcResultBuilder classes to be Serializable"

9 years agoIntroduce javax.annonations to concepts 22/14822/1
Robert Varga [Wed, 4 Feb 2015 11:51:11 +0000 (12:51 +0100)]
Introduce javax.annonations to concepts

Annotating expected behaviours guides analysis tools, so it is useful to
use them in concepts.

Change-Id: Ib9f27b951fd8523e4ea429e851fa7d2d5eff2627
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDocument the Path concept. 21/14821/1
Robert Varga [Wed, 4 Feb 2015 11:44:55 +0000 (12:44 +0100)]
Document the Path concept.

Adds a javadoc clarification to the concept, which allows its
implementations to be documented as well.

Change-Id: Ib6d7c09a23975659359ddfeeea1be688864590c1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoModified RpcResultBuilder classes to be Serializable 56/14656/2
tpantelis [Fri, 30 Jan 2015 17:47:02 +0000 (12:47 -0500)]
Modified RpcResultBuilder classes to be Serializable

Data store exceptions (eg TransactionCommitFailedException) can be
thrown across the wire by remote actors in the clustered store and
they contain RpcError instances so RpcErrorImpl must be Serializable.
Also RpcResultImpl should be Serializable.

Change-Id: Ia938d0fd5f51400ab0c7ae084ef16f22a99de24e
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "Bug 2561: Parser incorrectly allows usage of union in list"
Robert Varga [Tue, 27 Jan 2015 21:40:25 +0000 (21:40 +0000)]
Merge "Bug 2561: Parser incorrectly allows usage of union in list"

9 years agoResolved some sonar issues: Dead store to local variable 78/11978/6
Ladislav Borak [Wed, 15 Oct 2014 08:49:09 +0000 (10:49 +0200)]
Resolved some sonar issues: Dead store to local variable

DataValidationException - local variables actualValue and expectedValue in method checkListKey
were used only as parameters by throwing IllegalListKeyException, which was thrown when childNode was null.

This check was removed because:

1. it is already performed in call to overloaded checkListKey
2. value is already dereferenced and if it were null a
NullPointerException would have occurred

JSONNormalizedNodeStreamWriter - removed waste calling of anyxmlNode method

BindingToRestRPC - in method invoke added error, which occurs during extracting rpc
output in proxy method, to the rpc errors.

Change-Id: If58bf1e0342f0454600cbd3be1e152c397ce5249
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoRemove ietf-netconf 39/14539/1
Robert Varga [Tue, 27 Jan 2015 13:18:30 +0000 (14:18 +0100)]
Remove ietf-netconf

We never built it, so remove it completely from repository.

Change-Id: I7aea2237e68ed9c945d70f1a91dd83c7031a4f03
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd copyright header and fix whitespace 37/14537/1
Robert Varga [Tue, 27 Jan 2015 13:06:52 +0000 (14:06 +0100)]
Add copyright header and fix whitespace

Change-Id: Id14ebb053ea0e6707ed32ce2c571a7e1a774bb9a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoEliminate unused pluginManagement section 38/14538/1
Robert Varga [Tue, 27 Jan 2015 13:07:49 +0000 (14:07 +0100)]
Eliminate unused pluginManagement section

This is an aggregator, no need to define further plugins.

Change-Id: Ie8e125e54ff68434a4c976a19b534268b2749d5f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix lifecycle mapping errors in eclipse 36/14536/1
Robert Varga [Tue, 27 Jan 2015 13:04:06 +0000 (14:04 +0100)]
Fix lifecycle mapping errors in eclipse

maven-checkstyle-plugin needs to be added to lifecycle mapping. Also do
not override the version provided by odlparent.

Change-Id: I2a4316938a4ffb330e5a08c688bd691d41b6e16c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoImprove codec performance 02/14402/5
Robert Varga [Thu, 22 Jan 2015 20:18:22 +0000 (21:18 +0100)]
Improve codec performance

Convert the codecs from reflection to invocation API. Invoking
constructors and getters via reflection seems to be causing around
2% overhead which can be avoided if the call site is properly bound.

Change-Id: I0c303773a21913d9d1a6de952d37eb0dd022cbd1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize Types instantiation 14/14514/2
Robert Varga [Mon, 26 Jan 2015 17:08:36 +0000 (18:08 +0100)]
Optimize Types instantiation

Instead of using Arrays.copyOf(), use a simple array clone -- it has
better performance characteristics.

Change-Id: I2261f54c2a867dd09fd2f2655a0665492489215f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 865: ModuleInfoBackedContext is no more SchemaSourceProvider."
Robert Varga [Tue, 27 Jan 2015 09:33:21 +0000 (09:33 +0000)]
Merge "Bug 865: ModuleInfoBackedContext is no more SchemaSourceProvider."

9 years agoMerge "Bug 865: Moved filesystem model cache related functionality"
Robert Varga [Tue, 27 Jan 2015 09:32:51 +0000 (09:32 +0000)]
Merge "Bug 865: Moved filesystem model cache related functionality"

9 years agoBUG-1434: fix NPEs when using null byte arrays 07/14507/2
Robert Varga [Mon, 26 Jan 2015 16:42:35 +0000 (17:42 +0100)]
BUG-1434: fix NPEs when using null byte arrays

Commit introduced a regression, which caused NPEs being thrown when the
byte array was null (and hence failed to copy). Guard the copy with an
explicit null check and do not use Arrays.copyOf(), but clone().

Change-Id: I832ccae7a269548954705b2c1cdb1a42f83f71a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 865: ModuleInfoBackedContext is no more SchemaSourceProvider. 32/14432/2
Tony Tkacik [Fri, 23 Jan 2015 11:29:09 +0000 (12:29 +0100)]
Bug 865: ModuleInfoBackedContext is no more SchemaSourceProvider.

ModuleInfoBackedContext is only used as only class-loader registry
for generated classes and and utility class to create Schema Context
from Binding v1 jar artefacts.

Thus it is safely remove implementation of unused and now deprecated
interface SchemaSourceProvider.

Change-Id: Iee9abf7d35a1a0c64878005c17a6ab82a1857eb3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 865: Moved filesystem model cache related functionality 31/14431/2
Tony Tkacik [Thu, 22 Jan 2015 13:27:31 +0000 (14:27 +0100)]
Bug 865: Moved filesystem model cache related functionality

Moved static utilities from deprecated implementation of file-system
cache to non-deprecated Helium implementation in order
to ease removal of deprecation classes.

Change-Id: Iecf71444c3532c7fdadea9a5cd34a91837165007
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Cleanup warning suppressions"
Tony Tkacik [Mon, 26 Jan 2015 09:16:48 +0000 (09:16 +0000)]
Merge "Cleanup warning suppressions"

9 years agoMerge "Remove unused imports"
Tony Tkacik [Mon, 26 Jan 2015 09:16:15 +0000 (09:16 +0000)]
Merge "Remove unused imports"

9 years agoMerge "Migrate ClassLoaderUtils callers"
Tony Tkacik [Mon, 26 Jan 2015 09:15:37 +0000 (09:15 +0000)]
Merge "Migrate ClassLoaderUtils callers"

9 years agoMerge "Cleanup warnings in pom.xml"
Tony Tkacik [Mon, 26 Jan 2015 09:15:26 +0000 (09:15 +0000)]
Merge "Cleanup warnings in pom.xml"

9 years agoMerge "Bug 1434 - Make arrays non-mutable"
Robert Varga [Sun, 25 Jan 2015 09:13:59 +0000 (09:13 +0000)]
Merge "Bug 1434 - Make arrays non-mutable"

9 years agoBug 1093: Extracted major static inner classes in parser.builder.impl 33/14433/2
Tony Tkacik [Fri, 23 Jan 2015 12:00:17 +0000 (13:00 +0100)]
Bug 1093: Extracted major static inner classes in parser.builder.impl

Change-Id: Ifb00bd69ebf585aaa5f24ee463349d363a24f7a7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoCleanup warning suppressions 19/14419/2
Robert Varga [Fri, 23 Jan 2015 07:36:12 +0000 (08:36 +0100)]
Cleanup warning suppressions

Some of these are implied by context, some are needed down the stack.

Change-Id: Ifc090d3dce1a99fc5624d312f16f1046705dd285
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused imports 18/14418/2
Robert Varga [Fri, 23 Jan 2015 07:34:24 +0000 (08:34 +0100)]
Remove unused imports

The usual spring cleaning of unused import warnings.

Change-Id: Ia9d2d178fd1bc8f3468eab467cd434b34455c7a5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMigrate ClassLoaderUtils callers 17/14417/2
Robert Varga [Fri, 23 Jan 2015 07:32:26 +0000 (08:32 +0100)]
Migrate ClassLoaderUtils callers

oeg.opendaylight.yangtools.yang.util.ClassLoaderUtils is deprecated in
favor of the util package. This switches over some users.

Change-Id: I5c7035b70e23b37397b31e36616a973d8decbc01
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCleanup warnings in pom.xml 16/14416/2
Robert Varga [Fri, 23 Jan 2015 07:29:33 +0000 (08:29 +0100)]
Cleanup warnings in pom.xml

- do not override managed versions
- do not override parent groupId where not needed
- do not override parent version where not needed

Change-Id: Ib9d31f93dd6f09c60c86dde46258c20029f278ee
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Split out codecs from BindingCodecContext"
Tony Tkacik [Fri, 23 Jan 2015 11:07:25 +0000 (11:07 +0000)]
Merge "Split out codecs from BindingCodecContext"

9 years agoMerge "DataTreeCandidateNode.getChildNodes() should return a Collection"
Tony Tkacik [Fri, 23 Jan 2015 11:07:08 +0000 (11:07 +0000)]
Merge "DataTreeCandidateNode.getChildNodes() should return a Collection"

9 years agoMerge "Make NodeModification return a Collection"
Tony Tkacik [Fri, 23 Jan 2015 11:06:30 +0000 (11:06 +0000)]
Merge "Make NodeModification return a Collection"

9 years agoMerge "Fixed incorrect serialization of multiple nested UnionTypes."
Tony Tkacik [Fri, 23 Jan 2015 11:05:43 +0000 (11:05 +0000)]
Merge "Fixed incorrect serialization of multiple nested UnionTypes."

9 years agoBug 2561: Parser incorrectly allows usage of union in list 29/14129/6
Martin Ciglan [Tue, 13 Jan 2015 15:42:46 +0000 (16:42 +0100)]
Bug 2561: Parser incorrectly allows usage of union in list

Proposed solution rejects this and parser throws exception

Change-Id: I3cca06a72cfa33245f05a81e62b6a696966697c4
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 1434 - Make arrays non-mutable 86/9686/10
Ladislav Borak [Tue, 5 Aug 2014 11:13:58 +0000 (13:13 +0200)]
Bug 1434 - Make arrays non-mutable

- changed getters, if fields return type is array,
  create local copy and send temporary reference
- constructor which has field of type array,
  save this array by temporary reference

Change-Id: Ifd96bd8f16eabec95409675723d5c13684914e16
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 2480: Union objects are generated incorrectly when using bits type"
Robert Varga [Fri, 23 Jan 2015 07:09:26 +0000 (07:09 +0000)]
Merge "Bug 2480: Union objects are generated incorrectly when using bits type"

9 years agoSplit out codecs from BindingCodecContext 01/14401/2
Robert Varga [Thu, 22 Jan 2015 20:35:23 +0000 (21:35 +0100)]
Split out codecs from BindingCodecContext

Static inner classes reduce code clarity, so split them out before we
start making changes.

Change-Id: Iba235f74ff13f89c21371c913c76bf3a571499a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse Maven Enforcer plugin to require Maven version 37/14237/3
Thanh Ha [Mon, 19 Jan 2015 04:08:42 +0000 (23:08 -0500)]
Use Maven Enforcer plugin to require Maven version

Using the <prerequisites> configuration in pom files is deprecated and
it is recommended to use the maven-enforcer-plugin to enforce these
rules instead.

See:
http://jira.codehaus.org/browse/MNG-5297
http://jira.codehaus.org/browse/MNG-4840

Change-Id: Ia0265ba264693c3ce09ebb24a6a489bad5efa60e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoDataTreeCandidateNode.getChildNodes() should return a Collection 99/14399/1
Robert Varga [Thu, 22 Jan 2015 19:06:30 +0000 (20:06 +0100)]
DataTreeCandidateNode.getChildNodes() should return a Collection

All known implementations actually use a collection and users usually
need to know the size to size their structures appropriately. It is fair
ask to specify the return to be a Collection, with undefined iteration
order.

Change-Id: I05cbcc89ab309f012f39e4160461eee15904ed25
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake NodeModification return a Collection 98/14398/1
Robert Varga [Thu, 22 Jan 2015 19:00:33 +0000 (20:00 +0100)]
Make NodeModification return a Collection

Knowing the number of nodes is often useful. Our internal implementation
uses a Map, so we can freely promote this to a Collection.

Change-Id: Ieaa6a9ffa32c84d8484a2ed84f027ff205c4e738
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Added getModifiedChild to DataTreeCandidateNode."
Robert Varga [Thu, 22 Jan 2015 18:38:01 +0000 (18:38 +0000)]
Merge "Added getModifiedChild to DataTreeCandidateNode."

9 years agoMerge "Bug 2404: RPC and Notification support for Binding Data Codec"
Robert Varga [Thu, 22 Jan 2015 18:31:33 +0000 (18:31 +0000)]
Merge "Bug 2404: RPC and Notification support for Binding Data Codec"

9 years agoMerge "Bug 1305: Review YangTools grammar"
Tony Tkacik [Thu, 22 Jan 2015 16:08:15 +0000 (16:08 +0000)]
Merge "Bug 1305: Review YangTools grammar"

9 years agoFixed incorrect serialization of multiple nested UnionTypes. 50/14350/7
Tomas Cere [Wed, 21 Jan 2015 17:59:05 +0000 (18:59 +0100)]
Fixed incorrect serialization of multiple nested UnionTypes.

Change-Id: I2bf4153fc3b931fd6f80f2683b8abb47a1e12c7b
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoBug 1305: Review YangTools grammar 07/13307/6
Martin Ciglan [Tue, 2 Dec 2014 13:38:48 +0000 (14:38 +0100)]
Bug 1305: Review YangTools grammar

Since our grammar uses strings, which are validated in Java code during entering actual statements,
this has been addressed within this commit. Rest of grammar issues have been opened as bugs in bugzilla.

Change-Id: Ia70afeeaa1b59d1b77076b1c71cdacf8c3779d74
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 865: Deprecated Hydrogen Source Repository APIs 77/14377/2
Tony Tkacik [Thu, 22 Jan 2015 11:57:18 +0000 (12:57 +0100)]
Bug 865: Deprecated Hydrogen Source Repository APIs

Deprecated Hydrogen Source Repository APIs, which are not
used in Helium MD-SAL runtime code and
migrated necessary utility methods from deprecated classes
to non-deprecated ones.

Change-Id: I01e2411c501dd221a6126e6fb80edcd0af6bc852
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Improve BaseTemplate speed"
Tony Tkacik [Wed, 21 Jan 2015 14:37:52 +0000 (14:37 +0000)]
Merge "Improve BaseTemplate speed"

9 years agoMerge "Bug 2431: YangTools grammar misses unknown statement in some statements"
Tony Tkacik [Wed, 21 Jan 2015 14:36:02 +0000 (14:36 +0000)]
Merge "Bug 2431: YangTools grammar misses unknown statement in some statements"

9 years agoMerge "Added missing copyright headers to yang-data-impl"
Robert Varga [Wed, 21 Jan 2015 10:41:35 +0000 (10:41 +0000)]
Merge "Added missing copyright headers to yang-data-impl"

9 years agoAdded getModifiedChild to DataTreeCandidateNode. 81/14281/2
Tony Tkacik [Tue, 20 Jan 2015 09:37:22 +0000 (10:37 +0100)]
Added getModifiedChild to DataTreeCandidateNode.

Change-Id: I2e1466d8ef903de2b87a36c49b0b5deba9de9ad8
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoAdded missing copyright headers to yang-data-impl 82/14282/2
Tony Tkacik [Tue, 20 Jan 2015 09:43:42 +0000 (10:43 +0100)]
Added missing copyright headers to yang-data-impl

Change-Id: Ic794c020df39f1a19902a993dfac539f2a6e935f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-2606: add support for removing augmentations 57/14257/2
Robert Varga [Mon, 19 Jan 2015 16:15:44 +0000 (17:15 +0100)]
BUG-2606: add support for removing augmentations

This patch adds an explicit removeAugmentation() method to the builder.

Change-Id: I2111da008485512930dc2cfe551a787106c5f599
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2606: formalize the augmentation removal"
Tony Tkacik [Tue, 20 Jan 2015 09:39:18 +0000 (09:39 +0000)]
Merge "BUG-2606: formalize the augmentation removal"

9 years agoBUG-2606: formalize the augmentation removal 56/14256/1
Robert Varga [Mon, 19 Jan 2015 16:11:36 +0000 (17:11 +0100)]
BUG-2606: formalize the augmentation removal

Setting an augmentation to null has the same effect as removing it,
when accessing it via getAugmentation(). Formalize this actually
removing the mapping, which is more space-efficient.

Change-Id: I994b459161d9d374c80a353b82763dfb31faaf3d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2606: Fixed serialization of null augmentations."
Robert Varga [Mon, 19 Jan 2015 16:03:04 +0000 (16:03 +0000)]
Merge "Bug 2606: Fixed serialization of null augmentations."

9 years agoBug 2404: RPC and Notification support for Binding Data Codec 63/13763/8
Tony Tkacik [Fri, 19 Dec 2014 15:48:14 +0000 (16:48 +0100)]
Bug 2404: RPC and Notification support for Binding Data Codec

Added support for serialization and deserialization of RPC
and Notification data from Binding representation to Normalized
Representation.

Change-Id: I2e071ac1fac9d5f2ac34421f1718dbaa6051975c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2606: Fixed serialization of null augmentations. 50/14250/1
Tony Tkacik [Mon, 19 Jan 2015 14:24:12 +0000 (15:24 +0100)]
Bug 2606: Fixed serialization of null augmentations.

Binding DTO contract allowed to use addAugmentation(T,null)
to remove augmentation, but this was not supported
by binding-data-codec.

Added explicit ommision of null augmentations.

Change-Id: Ib16f3a18e6b09ab970dcaef83e3fca4f490c9ec3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoRemove deprecated sonar.profile property 36/14236/1
Thanh Ha [Mon, 19 Jan 2015 04:04:21 +0000 (23:04 -0500)]
Remove deprecated sonar.profile property

sonar.profile is deprecated in Sonar 4.5.x which is used by ODL.

Change-Id: I0d4f6c33c4324682035858c45b14af265be97c4b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRevert "Added generated convenience setters that take Builder<T>" 14/14214/3
Robert Varga [Sat, 17 Jan 2015 10:41:18 +0000 (10:41 +0000)]
Revert "Added generated convenience setters that take Builder<T>"

This reverts commit 0bede1b3a817175f7db70fd5347c08c3f0ff1af1, as it breaks
the controller build. The problem is that it breaks current code which passes
in null argument -- which is ambiguous.

Change-Id: Ie6b8882d7790fc21a6a798f3fa94bca40dc71bd5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdded generated convenience setters that take Builder<T> 93/14093/6
Ed Warnicke [Mon, 12 Jan 2015 01:14:53 +0000 (19:14 -0600)]
Added generated convenience setters that take Builder<T>

Basically, if we previously had

FooBuilder.setBar(Bar value)

we now also have

FooBuilder.setBar(Builder<Bar> value)

That just calls value.build() and calls the original setter.

Change-Id: I99e19f7a8a51af5c4a48ecb8813c6e6202546857
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoImproved RPCResultBuilder to have convenience methods that take Builders 26/13926/7
Ed Warnicke [Mon, 5 Jan 2015 23:37:32 +0000 (17:37 -0600)]
Improved RPCResultBuilder to have convenience methods that take Builders

Change-Id: I994d085d194a2aa6b318e18b8f8e3a3fc539cde6
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Added RpcResultBuilder.buildFuture() as a convenience method"
Robert Varga [Fri, 16 Jan 2015 17:34:03 +0000 (17:34 +0000)]
Merge "Added RpcResultBuilder.buildFuture() as a convenience method"

9 years agoImprove BaseTemplate speed 98/14198/2
Robert Varga [Fri, 16 Jan 2015 16:53:54 +0000 (17:53 +0100)]
Improve BaseTemplate speed

String processing is sub-optimal in these aspects:
- string-based methods used when character-based ones are available,
- inefficient use of String.replace() for single-character filtering,
- inefficient use of String.replaceAll() where a pre-compiled Pattern
  should be used.
- inefficient use of StringTokenizer where a Splitter can be used

Change-Id: Iee446a4279b9be343891192d93a84a420b32526c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2258: Fixed Type Definition search in runtime generated codecs"
Robert Varga [Fri, 16 Jan 2015 16:40:46 +0000 (16:40 +0000)]
Merge "Bug 2258: Fixed Type Definition search in runtime generated codecs"

9 years agoBug 2480: Union objects are generated incorrectly when using bits type 35/13535/6
Martin Ciglan [Wed, 10 Dec 2014 13:29:05 +0000 (14:29 +0100)]
Bug 2480: Union objects are generated incorrectly when using bits type

In case of bits typedef within union, method getValue() returning array
of booleans was missing.

Change-Id: If4b0f98d3889facff819d02f44566e816674528d
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoMerge "Bug 2563 - Parser should fail when key statement does not reference leaf."
Tony Tkacik [Fri, 16 Jan 2015 15:04:01 +0000 (15:04 +0000)]
Merge "Bug 2563 - Parser should fail when key statement does not reference leaf."

9 years agoAdded RpcResultBuilder.buildFuture() as a convenience method 23/13923/8
Ed Warnicke [Mon, 5 Jan 2015 21:47:44 +0000 (15:47 -0600)]
Added RpcResultBuilder.buildFuture() as a convenience method

Wraps RpcResult<T> in a Future.

Change-Id: Icf045362b9cd3be83f7168cbd2baee0561d516d2
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2258: Fixed Type Definition search in runtime generated codecs 21/12521/4
Tony Tkacik [Mon, 27 Oct 2014 13:11:37 +0000 (14:11 +0100)]
Bug 2258: Fixed Type Definition search in runtime generated codecs

Type Definition search in runtime generated codecs, did not look
up nested (scoped) type definitions properly, which resulted
in IllegalArgumentException in schema context update which
prevented further working of codec.

Updated code to perform correct nested search in grouping
and type-definitoions.

Change-Id: I3860c2f70b5e0ba3d265b7f2b032e89eadaced08
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2431: YangTools grammar misses unknown statement in some statements 44/14144/2
Martin Ciglan [Wed, 14 Jan 2015 14:43:10 +0000 (15:43 +0100)]
Bug 2431: YangTools grammar misses unknown statement in some statements

Based on existing YANG grammar review, these statements missed unknown statement, wrapped in
statement separator (stmtsep):

submodule-stmt
import-stmt
include-stmt
belongs-to-stmt
revision-stmt

Now fixed.

Change-Id: If0ef7325428b10f10cada5ace427798da6917fe0
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoAdd marker interface Builder<T> to generated Builders 24/13924/7
Ed Warnicke [Mon, 5 Jan 2015 23:02:19 +0000 (17:02 -0600)]
Add marker interface Builder<T> to generated Builders

Change-Id: I6e6e7f33143982e4a719ea6d6399947587a627a3
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2563 - Parser should fail when key statement does not reference leaf. 45/14145/3
Peter Kajsa [Wed, 14 Jan 2015 14:45:55 +0000 (15:45 +0100)]
Bug 2563 - Parser should fail when key statement does not reference leaf.

Change-Id: Idec40d3ae75f09894600856a349154cc7fb4b64a
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
9 years agoBUG-2159: deactivate Java 8 javadoc workaround 86/14186/3
Robert Varga [Thu, 15 Jan 2015 21:38:34 +0000 (22:38 +0100)]
BUG-2159: deactivate Java 8 javadoc workaround

Now that the build is compliant with the stricter rules, remove the
compatibility profile.

Change-Id: I6b53931e75b0aceaf73e40fd8a3838fdd06126f1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: fix wrong javadocs 85/14185/3
Robert Varga [Thu, 15 Jan 2015 21:36:14 +0000 (22:36 +0100)]
BUG-2159: fix wrong javadocs

Java 8 javadoc generation is a lot stricter than previous versions. This
patch fixes the offenders.

Change-Id: I8a6d7f11a8fb38919d5fa34ab01c3a82849bfa8f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: make sure generated comments are Java-8-safe 91/14191/2
Robert Varga [Fri, 16 Jan 2015 09:47:52 +0000 (10:47 +0100)]
BUG-2159: make sure generated comments are Java-8-safe

The javadoc generator produced output which was not compliant with
default Java 8 javadoc settings. This patch fixes that.

Change-Id: I102e1398d49042d785ce451846aeebc20d5eed58
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Shift Builder<P> from toInstance() to build()"
Robert Varga [Thu, 15 Jan 2015 19:11:48 +0000 (19:11 +0000)]
Merge "Shift Builder<P> from toInstance() to build()"

9 years agoShift Builder<P> from toInstance() to build() 92/14092/2
Ed Warnicke [Mon, 12 Jan 2015 00:25:53 +0000 (18:25 -0600)]
Shift Builder<P> from toInstance() to build()

In order to be able to use Builder<P> as a marker
on generated Builders, it needed to shift to build()

All 'internal' uses for Builder have been changed
to use build().  For things used outside of yangtools,
a depracted toInstance() is maintained on child
interfaces/classes.

Change-Id: I43662296e328133a5b5267be54d407e2ad4b95e8
Signed-off-by: Ed Warnicke <eaw@cisco.com>