yangtools.git
9 years agoBUG-2689: Cast exception when serializing L3Address from groupbasedpolicy policy... 58/15558/3
Martin Ciglan [Fri, 20 Feb 2015 15:10:15 +0000 (16:10 +0100)]
BUG-2689: Cast exception when serializing L3Address from groupbasedpolicy policy.yang

When deserializing L3AddressKey, alphabetical order of key arguments
didn't match with order of related QNames as defined in yang model.

The binding-independent world retains the ordering specified in model,
while the binding-aware world requires constructor arguments to be
alpha-sorted.

Change-Id: Icb277fed97d0984ca1a60aa7add7817db727facc
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Updated Json Stream Writer to use gson JsonWriter."
Tony Tkacik [Wed, 25 Feb 2015 08:04:59 +0000 (08:04 +0000)]
Merge "Updated Json Stream Writer to use gson JsonWriter."

9 years agoMerge "Fix supporting-node in topology model so it can actually be used."
Robert Varga [Wed, 25 Feb 2015 06:07:52 +0000 (06:07 +0000)]
Merge "Fix supporting-node in topology model so it can actually be used."

9 years agoFix supporting-node in topology model so it can actually be used. 75/15475/2
Ed Warnicke [Wed, 18 Feb 2015 19:09:39 +0000 (12:09 -0700)]
Fix supporting-node in topology model so it can actually be used.

supporting-node in the topology model *only* has a node-ref
The node-ref is a leafref, which only provides the node-id
for the node.  Since we have no notion of what topology the supporting node
is in, we can't find it.

Change-Id: Ibc5829a45d97bb5a95abee07b397447a4cd509e0
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBug 2361: Added meta-level SPI for building any statement-based models. 66/15166/12
Tony Tkacik [Wed, 11 Feb 2015 20:28:37 +0000 (21:28 +0100)]
Bug 2361: Added meta-level SPI for building any statement-based models.

This meta-level SPI is designed for components, which introduces
support for conrete statements, identifier namespaces or effective
model inference to the YANG parser.

Change-Id: Iff35085fa5a44568c449a5e1e34ee371768dd88b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2497: Added YIN Export for Effective Schema Context. 58/15258/7
Tony Tkacik [Thu, 29 Jan 2015 17:16:53 +0000 (18:16 +0100)]
Bug 2497: Added YIN Export for Effective Schema Context.

Added initial implementation of YIN schema export,
which uses current Schema Context and effective API
to infer model.

Once the parser will be updated to preserve declared model,
this implementation will be hugely simplified only to subset
of current implemention - which is implementation
of StatementTextWriter interface.

Change-Id: I2c57ab90b6cb9f42c6156253c8600709c19b349e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 2444: Added concrete API definitions for YANG statements."
Robert Varga [Wed, 18 Feb 2015 13:45:38 +0000 (13:45 +0000)]
Merge "Bug 2444: Added concrete API definitions for YANG statements."

9 years agoFix maven plugin not recognizing transitive interfaces 59/15459/1
Robert Varga [Wed, 18 Feb 2015 10:46:51 +0000 (11:46 +0100)]
Fix maven plugin not recognizing transitive interfaces

An implenter does not need to directly implement the interface, but can
rely on it being captured somewhere else. Instead of custom magic, use
Class.isAssignableFrom() to check for compatibility.

Change-Id: I1e21b9880eb0a48bbe6027518cea39fef13b6ec6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2444: Added concrete API definitions for YANG statements. 78/14678/12
Tony Tkacik [Thu, 29 Jan 2015 16:39:25 +0000 (17:39 +0100)]
Bug 2444: Added concrete API definitions for YANG statements.

Introduced type captures of DeclaredStatement for RFC6020 statments
along with some convenience getters to decrease need of users
to look up statements in collections.

This getters conveys RFC6020 semantic, but does not prevent
access to any statements which may be introduced in later
versions of YANG.

Change-Id: I7ca3265aa7fc141446515e27f02c37ff3b5903dc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-2179: split logging out of CodeGenerator 88/15388/5
Robert Varga [Mon, 16 Feb 2015 22:10:12 +0000 (23:10 +0100)]
BUG-2179: split logging out of CodeGenerator

Currently SPI requires downstream users to import maven infrastructure
even if they are not using it. Split the two maven-related injection
methods into dedicated interfaces.

MavenLogAware is automatically deprecated, as maven 3.1+ works with
slf4j out of the box, hence Log injection is no longer needed.

Change-Id: Ibedc158d9bdbcf66c2df94fd578929729fa26821
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2179: remove plexus-slf4j-logging 86/15386/3
Robert Varga [Mon, 16 Feb 2015 21:46:01 +0000 (22:46 +0100)]
BUG-2179: remove plexus-slf4j-logging

Maven 3.1.1 already supports slf4j as its native logging API, no need to
pull in the bridge.

Change-Id: Ia436a7e806aba46290c46d8389eb8d017b78f512
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Update Objects->MoreObjects"
Tony Tkacik [Mon, 16 Feb 2015 14:55:57 +0000 (14:55 +0000)]
Merge "Update Objects->MoreObjects"

9 years agoMerge "Do not override inherited groupId"
Tony Tkacik [Mon, 16 Feb 2015 14:55:50 +0000 (14:55 +0000)]
Merge "Do not override inherited groupId"

9 years agoUpdated Json Stream Writer to use gson JsonWriter. 74/13574/14
Peter Kajsa [Thu, 11 Dec 2014 15:43:02 +0000 (16:43 +0100)]
Updated Json Stream Writer to use gson JsonWriter.

Custom implementation of JSON writing methods has been replaced with native
com.google.gson.stream.JsonWriter methods. Among other things, this rework
resolves issues (bugs) with escape characters in string values being written
into Json (e.g. new lines in strings etc.).

Important notice: com.google.gson.stream.JsonWriter enforces that output
must start with '{' and end with '}', otherwise
'java.lang.IllegalStateException:Nesting problem' is thrown.

So our original output looks for an example like:
"my-module:top-container": {
...
}

Now, new output looks as following:
{
  "my-module:top-container": {
  ...
  }
}
.

Change-Id: I8073285d003015721d54887ddbff0484d7db89c8
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
9 years agoMerge "Bug 2512: Added skeleton of Statement Source APIs."
Tony Tkacik [Mon, 16 Feb 2015 09:46:55 +0000 (09:46 +0000)]
Merge "Bug 2512: Added skeleton of Statement Source APIs."

9 years agoUpdate Objects->MoreObjects 29/15329/3
Robert Varga [Sat, 14 Feb 2015 20:34:11 +0000 (21:34 +0100)]
Update Objects->MoreObjects

Guava 18 introduces MoreObjects so it does not clash on naming with
Java7 or later. Also migrate Objects.equal() to Objects.equals().

Change-Id: I467c27b4f3a25c98df68facd9f9a566126c99096
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not override inherited groupId 28/15328/2
Robert Varga [Sat, 14 Feb 2015 20:33:32 +0000 (21:33 +0100)]
Do not override inherited groupId

Change-Id: I09c0e23d3a7991c8068e36b23270cc631de11c5e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove features-builder"
Tony Tkacik [Mon, 16 Feb 2015 09:42:54 +0000 (09:42 +0000)]
Merge "Remove features-builder"

9 years agoMerge "Add a warning about features-test being moved"
Tony Tkacik [Mon, 16 Feb 2015 09:21:20 +0000 (09:21 +0000)]
Merge "Add a warning about features-test being moved"

9 years agoMerge "Remove xtend.version definition"
Tony Tkacik [Mon, 16 Feb 2015 09:21:13 +0000 (09:21 +0000)]
Merge "Remove xtend.version definition"

9 years agoBug 2512: Added skeleton of Statement Source APIs. 65/15165/7
Tony Tkacik [Wed, 11 Feb 2015 20:31:40 +0000 (21:31 +0100)]
Bug 2512: Added skeleton of Statement Source APIs.

Introduces StatementStreamSource and StatementWriter,
in order to support any YANG statement-based serialization
of YANG model without requiring concrete statement model.

This allows common APIs for YANG text and YIN XML parsers
in order to produce enough information to infer effective
model.

Change-Id: Ia1237d0c1969dd81e5b6729eda6ed895fd5db819
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
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 agoRemove features-builder 74/15274/2
Robert Varga [Fri, 13 Feb 2015 18:40:34 +0000 (19:40 +0100)]
Remove features-builder

The functionality has been moved to odlparent, so there's no need to
retain it here.

Change-Id: I270f3e1aa1e9a1c69e744c4df1ffd97996f66188
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd a warning about features-test being moved 73/15273/3
Robert Varga [Fri, 13 Feb 2015 18:37:26 +0000 (19:37 +0100)]
Add a warning about features-test being moved

We have migrated the code away and will be killing this one in Lithium.

Change-Id: I204ee8e33179772853d8bf2eb914e418191df94c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove xtend.version definition 27/15327/1
Robert Varga [Sat, 14 Feb 2015 20:04:26 +0000 (21:04 +0100)]
Remove xtend.version definition

There is no longer a need for it.

Change-Id: I244c1a09d1a7ff065b9cd21751fbce31d87768e1
Signed-off-by: Robert Varga <rovarga@cisco.com>
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>