yangtools.git
9 years agoMerge "Bug 1991: Ignore AugmentationIdentifier in XML Serialization"
Tony Tkacik [Thu, 23 Oct 2014 07:58:43 +0000 (07:58 +0000)]
Merge "Bug 1991: Ignore AugmentationIdentifier in XML Serialization"

9 years agoMerge "BUG-2022: String Type pattern parsing and resolving fix."
Tony Tkacik [Thu, 23 Oct 2014 07:58:22 +0000 (07:58 +0000)]
Merge "BUG-2022: String Type pattern parsing and resolving fix."

9 years agoMerge changes I296b2805,Iee01f474,I13dab228
Tony Tkacik [Thu, 23 Oct 2014 07:57:54 +0000 (07:57 +0000)]
Merge changes I296b2805,Iee01f474,I13dab228

* changes:
  BUG-1886: implement lock-free InMemoryDataTree.commit()
  BUG-1886: eliminate sychronized blocks
  BUG-1886: split static classes into separate files

9 years agoMerge "bug 1957 StackOverFlowError in YangParserImpl"
Tony Tkacik [Thu, 23 Oct 2014 07:57:18 +0000 (07:57 +0000)]
Merge "bug 1957 StackOverFlowError in YangParserImpl"

9 years agoMerge "BUG-1954: Fix useless Boolean instantiation"
Robert Varga [Wed, 22 Oct 2014 19:51:49 +0000 (19:51 +0000)]
Merge "BUG-1954: Fix useless Boolean instantiation"

9 years agoMerge "Bug 584: Increase test coverage"
Lukas Sedlak [Wed, 22 Oct 2014 13:18:01 +0000 (13:18 +0000)]
Merge "Bug 584: Increase test coverage"

9 years agoMerge "Added test suite for parser builder implementation"
Tony Tkacik [Wed, 22 Oct 2014 13:08:57 +0000 (13:08 +0000)]
Merge "Added test suite for parser builder implementation"

9 years agoMerge "Bug 584: Test coverage increase SchemaContextUtil"
Tony Tkacik [Wed, 22 Oct 2014 13:08:37 +0000 (13:08 +0000)]
Merge "Bug 584: Test coverage increase SchemaContextUtil"

9 years agoMerge "Resolved some sonar issues: Simplify Boolean Expression"
Lukas Sedlak [Wed, 22 Oct 2014 12:58:46 +0000 (12:58 +0000)]
Merge "Resolved some sonar issues: Simplify Boolean Expression"

9 years agobug 1957 StackOverFlowError in YangParserImpl 54/12154/1
Martin Ciglan [Thu, 18 Sep 2014 13:24:56 +0000 (15:24 +0200)]
bug 1957 StackOverFlowError in YangParserImpl

StackOverFlowError exception was replaced by YangParseException

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

9 years agoBUG-1886: implement lock-free InMemoryDataTree.commit() 53/12153/1
Robert Varga [Tue, 16 Sep 2014 13:31:30 +0000 (15:31 +0200)]
BUG-1886: implement lock-free InMemoryDataTree.commit()

This patch reworks the data layout to remove all locking from the hold
codepaths. All state is not encapsulated in DataTreeState which is
atomically replaced.

The allocation, verification and preparation of a modification are
both lock- and wait-free.

Schema context is still synchronized to preventmadness
from concurrent schema context changes.

Commit runs lock-free, but may retry operations if it races with schema
context change -- which should happen rarely if ever.

Change-Id: I296b2805ef2575e76052e004a0d317a098d207df
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 8b5a70355134bfeb6b4d3299bff733817d9eb72b)

9 years agoBUG-1886: eliminate sychronized blocks 99/11199/5
Robert Varga [Mon, 15 Sep 2014 13:22:13 +0000 (15:22 +0200)]
BUG-1886: eliminate sychronized blocks

The tree state is guarded by the read-write lock, so there is no need
for the additional, overly large, critical section. This allows empty
operations to complete completely lockfree.

Change-Id: Iee01f4745a4927e6dc5093252c15d7d4e3959e9a
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 66e428b873f427038424051e00d4a09e8918c667)

9 years agoBUG-2022: String Type pattern parsing and resolving fix. 52/12152/1
Lukas Sedlak [Mon, 22 Sep 2014 11:40:46 +0000 (13:40 +0200)]
BUG-2022: String Type pattern parsing and resolving fix.

Added fix during string type pattern restriction resolution in ParserListenerUtils. Now if pattern statement in yang model contains uncompilable string
the warning is logged and pattern restriction is not among types restrictions.
Each pattern is wrapped between "^"and "$" symbols.

Modified exisiting tests and test resources for testing of transofrmation of incorrect pattern regular expressions.

Change-Id: I86d6066b93e2f21b5c826729469228286a31965d
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
(cherry picked from commit 86fc7992c479c6a82859a8e26718f9adbf215c48)

9 years agoBUG-1954: Fix useless Boolean instantiation 51/12151/1
Robert Varga [Thu, 18 Sep 2014 09:40:15 +0000 (11:40 +0200)]
BUG-1954: Fix useless Boolean instantiation

No need to instantiate booleans for string, just use Boolean.TRUE.

Change-Id: I5156d4a8cafd08ced0802c55812cded7bdbe1cee
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 61b4fa02e7b89bba37ac906c05605c79dead57b2)

9 years agoBug 1991: Ignore AugmentationIdentifier in XML Serialization 50/12150/1
Tony Tkacik [Sat, 20 Sep 2014 08:47:26 +0000 (10:47 +0200)]
Bug 1991: Ignore AugmentationIdentifier in XML Serialization

AugmentationIdentifier is YANGTools/MD-SAL specific
concept which eases navigation in parsed data, but
does not exists in XML Instance Identifier.

AugmentationIdentifier from XML perspective identifies
subset of child nodes of parent element, from which
also next path argument select element from that subset
so it is safe to leave it during serialization.

Change-Id: If42acf6db82f7c4920546283cb89a2cf58f80a6e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit a24c4089733f94528a3e2f4af9bdc6102974bf53)

9 years agoMerge "Bug 1950: Raise memory and permgen limits for featurs-test"
Tony Tkacik [Wed, 22 Oct 2014 12:18:07 +0000 (12:18 +0000)]
Merge "Bug 1950: Raise memory and permgen limits for featurs-test"

9 years agoMerge "Fixed potentional NPE in generateTypesFromChoiceCases"
Tony Tkacik [Wed, 22 Oct 2014 11:50:54 +0000 (11:50 +0000)]
Merge "Fixed potentional NPE in generateTypesFromChoiceCases"

9 years agoMerge "Bug 2219: NPE during copy operation for IdentityrefTypeBuilder"
Tony Tkacik [Wed, 22 Oct 2014 11:49:48 +0000 (11:49 +0000)]
Merge "Bug 2219: NPE during copy operation for IdentityrefTypeBuilder"

9 years agoBUG-1886: split static classes into separate files 46/12146/1
Robert Varga [Tue, 16 Sep 2014 11:40:06 +0000 (13:40 +0200)]
BUG-1886: split static classes into separate files

This is in preparation for better lifecycle management. Also reuses a
single instance of AlwaysFailOperation.

Change-Id: I13dab22841a9311b87bc6e9b79dd479c2792263e
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit fa617231bb83ab0c45e6a5c8cabeec2b8fe1efeb)

9 years agoBug 584: Increase test coverage 42/12142/1
Ladislav Borak [Wed, 22 Oct 2014 11:04:07 +0000 (13:04 +0200)]
Bug 584: Increase test coverage

Change-Id: Iabd86a3e7f72d99e227d76ff563a60d031ef0a86
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoAdded test suite for parser builder implementation 12/11612/10
Lukas Sedlak [Thu, 25 Sep 2014 15:00:22 +0000 (17:00 +0200)]
Added test suite for parser builder implementation

The test suite covers test cases for Builder Utils that are ranked as gighest uncovered in yang parsre builder impl.

Added test suite for ModuleBuilderImpl.
Added test suite for BuilderUtils.
Added test suite for RpcDefinitionBuilderImpl.
Added test suite for RefineUtils.
Added test suite for LeafListSchemaNodeBuilder.
Added test suite for CopyUtils.

Change-Id: If4abe164abe126d590ff35fc92c031948c20086b
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoFixed potentional NPE in generateTypesFromChoiceCases 10/12110/2
Lukas Sedlak [Tue, 21 Oct 2014 14:17:35 +0000 (16:17 +0200)]
Fixed potentional NPE in generateTypesFromChoiceCases

Added check to verify if parent is not null since not all GeneratedTypes can implement ChildOf<parent> definition.

Change-Id: I9b01dc154fa767e2411c563540135051c3aab678
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoBug 584: Test coverage increase SchemaContextUtil 39/12139/1
pkajsa [Wed, 22 Oct 2014 09:00:01 +0000 (11:00 +0200)]
Bug 584: Test coverage increase SchemaContextUtil

Unit test for SchemaContextUtil class.

Change-Id: I889b0a4caf3bfe94b41dd93fae2e5e84cb456371
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoBug 1984, Bug 2005: Changed valueEquals to work with null values. 27/11427/2
Tony Tkacik [Sun, 21 Sep 2014 07:01:36 +0000 (09:01 +0200)]
Bug 1984, Bug 2005: Changed valueEquals to work with null values.

ImmutableNode implementation hashCode and equals did not worked
properly with null values, which are rare, but allowed by
typedef empty statement.

Methods were fixed to work properly with null values and
added comment which explicitly says, that nulls are allowed
because of empty type.

Change-Id: I8fa3431bae19783dfbc0e2d3684c2e981e11da46
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 7f0c1aa806f952584ac71feecbc17f3834705510)

9 years agoBug 2219: NPE during copy operation for IdentityrefTypeBuilder 07/12107/1
Ladislav Borak [Tue, 21 Oct 2014 13:42:04 +0000 (15:42 +0200)]
Bug 2219: NPE during copy operation for IdentityrefTypeBuilder

- added check for IdentityrefTypeBuilder into getData()

Change-Id: I3c69aaa3927f5d50cbd426d13a5e1a354f4f3cea
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 584: test coverage increase"
Lukas Sedlak [Tue, 21 Oct 2014 13:12:58 +0000 (13:12 +0000)]
Merge "Bug 584: test coverage increase"

9 years agoBug 584: test coverage increase 67/12067/2
Martin Ciglan [Mon, 20 Oct 2014 08:16:45 +0000 (10:16 +0200)]
Bug 584: test coverage increase

ModuleImportImpl.java
SchemaNodeUtils.java
StringType.java

Change-Id: I6df004289189bf80557c650dae27d63f895898d0
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 584: Increase test coverage in yang-parser-impl 78/12078/1
Ladislav Borak [Mon, 20 Oct 2014 14:29:42 +0000 (16:29 +0200)]
Bug 584: Increase test coverage in yang-parser-impl

Change-Id: I01c6d81143d3c99b6c703eaa2c7e5ec55dc8c79e
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 584 - Milestone : Increasing unit test coverage, from 44.9% to 60%"
Lukas Sedlak [Mon, 20 Oct 2014 14:14:55 +0000 (14:14 +0000)]
Merge "Bug 584 - Milestone : Increasing unit test coverage, from 44.9% to 60%"

9 years agoBug 584 - Milestone : Increasing unit test coverage, from 44.9% to 60% 94/11694/4
Peter Bandzi [Wed, 1 Oct 2014 11:15:46 +0000 (13:15 +0200)]
Bug 584 - Milestone : Increasing unit test coverage, from 44.9% to 60%

Change-Id: I4bab0d83892c15fa198d72e99c262ee2011d9830
Signed-off-by: Peter Bandzi <pbandzi@cisco.com>
9 years agoMerge "Bug 2191: Invalid use of addType in ChoiceCaseBuilder"
Lukas Sedlak [Mon, 20 Oct 2014 08:51:22 +0000 (08:51 +0000)]
Merge "Bug 2191: Invalid use of addType in ChoiceCaseBuilder"

9 years agoMerge "Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements."
Lukas Sedlak [Mon, 20 Oct 2014 08:50:40 +0000 (08:50 +0000)]
Merge "Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements."

9 years agoMerge "Fix javadoc warnings in common concepts"
Tony Tkacik [Fri, 17 Oct 2014 09:05:02 +0000 (09:05 +0000)]
Merge "Fix javadoc warnings in common concepts"

9 years agoMerge "BUG-868: remove deprecated YangInstanceIdentifier methods"
Tony Tkacik [Fri, 17 Oct 2014 09:04:30 +0000 (09:04 +0000)]
Merge "BUG-868: remove deprecated YangInstanceIdentifier methods"

9 years agoMerge "Bug 584: Test coverage increase"
Tony Tkacik [Fri, 17 Oct 2014 09:04:12 +0000 (09:04 +0000)]
Merge "Bug 584: Test coverage increase"

9 years agoMerge "Bug 584: test coverage increase"
Tony Tkacik [Fri, 17 Oct 2014 09:04:00 +0000 (09:04 +0000)]
Merge "Bug 584: test coverage increase"

9 years agoMerge "BUG-1902: reuse ConcreteTypeImpl instances"
Tony Tkacik [Fri, 17 Oct 2014 09:03:39 +0000 (09:03 +0000)]
Merge "BUG-1902: reuse ConcreteTypeImpl instances"

9 years agoMerge "Bug 584: Test coverage increase"
Tony Tkacik [Fri, 17 Oct 2014 09:03:00 +0000 (09:03 +0000)]
Merge "Bug 584: Test coverage increase"

9 years agoBug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements. 42/12042/1
pkajsa [Fri, 17 Oct 2014 09:00:56 +0000 (11:00 +0200)]
Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements.

Check for duplicity of added elements has been added into add* methods
in the AbstractGeneratedTypeBuilder class.

Change-Id: I9ef4caef0a835c0e171e86c2b322c3452bdaada0
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoMerge "Add all topology models to features"
Tony Tkacik [Fri, 17 Oct 2014 08:57:47 +0000 (08:57 +0000)]
Merge "Add all topology models to features"

9 years agoMerge "Add features artifact"
Tony Tkacik [Fri, 17 Oct 2014 08:57:17 +0000 (08:57 +0000)]
Merge "Add features artifact"

9 years agoBug 2191: Invalid use of addType in ChoiceCaseBuilder 41/12041/1
Ladislav Borak [Fri, 17 Oct 2014 08:04:22 +0000 (10:04 +0200)]
Bug 2191: Invalid use of addType in ChoiceCaseBuilder

1) in CoppyUtils removed from method copy functionality about copying
   typedefs and grouping from old ChoiceCaseBuilder, which throw in
   this implementation YangParseException

2) in AbstractDocumentedDataNodeContainerBuilder removed final modifier
   from method addGrouping because this method must be overriden in
   ChoiceCaseBuilder to throw YangParseException

3) in ChoiceCaseBuilder were overriden addGrouping method to throw
   YangParseException becaouse by RFC 6020 is not allowed that
   choice case has grouping

Change-Id: Ic06524f3489a36c73f07c8b44701895dc0e9896e
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 2202: DerivableSchemaNode API incorrect Javadoc"
Tony Tkacik [Thu, 16 Oct 2014 13:23:58 +0000 (13:23 +0000)]
Merge "Bug 2202: DerivableSchemaNode API incorrect Javadoc"

9 years agoMerge "Bug 2147 - JSON does not properly encode multiline string"
Tony Tkacik [Thu, 16 Oct 2014 12:58:45 +0000 (12:58 +0000)]
Merge "Bug 2147 - JSON does not properly encode multiline string"

9 years agoMerge "Bug 2176 - add property with name == null fix."
Tony Tkacik [Thu, 16 Oct 2014 12:55:03 +0000 (12:55 +0000)]
Merge "Bug 2176 - add property with name == null fix."

9 years agoMerge "Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix"
Tony Tkacik [Thu, 16 Oct 2014 12:51:48 +0000 (12:51 +0000)]
Merge "Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix"

9 years agoBug 2202: DerivableSchemaNode API incorrect Javadoc 06/12006/1
Martin Ciglan [Thu, 16 Oct 2014 12:27:17 +0000 (14:27 +0200)]
Bug 2202: DerivableSchemaNode API incorrect Javadoc

Change-Id: If0c9a986dbd01ed1f51a15275ce78dca4b10ea30
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 2176 - add property with name == null fix. 96/11996/1
pkajsa [Thu, 16 Oct 2014 06:45:01 +0000 (08:45 +0200)]
Bug 2176 - add property with name == null fix.

The Preconditions.checkArgument(name != null,..) check has been added into the
addProperty(String name) method in the AbstractGeneratedTypeBuilder class.

Change-Id: I9db2b718011fa397cf1cd659ae56f8764bb8316e
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoAdd all topology models to features 81/11981/1
Robert Varga [Wed, 15 Oct 2014 15:17:02 +0000 (17:17 +0200)]
Add all topology models to features

We have only partial models in the features. This adds the missing
topology models.

Change-Id: I5ad3cb6a7c2d5d1a62937c421a5fb5381d8c02b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoResolved some sonar issues: Peformance 77/11977/1
Ladislav Borak [Wed, 15 Oct 2014 12:55:56 +0000 (14:55 +0200)]
Resolved some sonar issues: Peformance

- inefficient keySet iterator were changed to entrySet iterator

Change-Id: I61da29807665a804593a435879ad24b3676fc0b7
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBug 2147 - JSON does not properly encode multiline string 75/11975/1
Jan Hajnar [Wed, 15 Oct 2014 12:54:37 +0000 (14:54 +0200)]
Bug 2147 - JSON does not properly encode multiline string

* added newline and return characters to escape list
* updated tests

Change-Id: I48cd418b1633de12e80bdab0b7c7bc91113dbf6d
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBug 584: Test coverage increase 73/11973/1
pkajsa [Wed, 15 Oct 2014 11:08:22 +0000 (13:08 +0200)]
Bug 584: Test coverage increase

Unit tests for:
BindingGeneratorUtil
GeneratedPropertyBuilderImpl
GeneratedPropertyImpl

Change-Id: Ibe6811b8dfafd3cef584ed234ee0e85b7dbeae33
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoAdd features artifact 72/11972/1
Robert Varga [Wed, 15 Oct 2014 09:36:40 +0000 (11:36 +0200)]
Add features artifact

This adds the features artifact so it can be consumed downstream.

Change-Id: I19ec25c7e2ef1da4f101c1e80faf13cd3ecd12ae
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2183: ClassCastException in AbstractTypeMemberBuilder fix 52/11952/1
Martin Ciglan [Tue, 14 Oct 2014 14:46:17 +0000 (16:46 +0200)]
Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix

Change-Id: I0d5a21653f958c630c2a573b9cb90af28e59a627
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoResolved some sonar issues: Simplify Boolean Expression 45/11945/1
Ladislav Borak [Tue, 14 Oct 2014 11:46:29 +0000 (13:46 +0200)]
Resolved some sonar issues: Simplify Boolean Expression

Change-Id: Ie4d9efb2a00330bede69aac80789065cac895710
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBUG-1902: reuse ConcreteTypeImpl instances 53/11253/2
Robert Varga [Tue, 16 Sep 2014 09:53:44 +0000 (11:53 +0200)]
BUG-1902: reuse ConcreteTypeImpl instances

Instantiate a cache which will act as a lookup for commonly-shared
instances. Also creates shared instances for byte[] and char[] primitive
types and reuses them as much as possible.

Change-Id: Ia70f0e9022c3b19e0f9b0eff34e0cf69958e25f0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRework version artifact version tracking 45/11845/13
Robert Varga [Wed, 8 Oct 2014 22:26:58 +0000 (00:26 +0200)]
Rework version artifact version tracking

This patch reworks the way we track our internal artifacts by moving the
definitions from the aprent pom into a dedicated yangtools-artifacts
versions.

This artifact's dependencyManagement section is then imported into the
parent. This may look unnecessary, but it allows our downstream users to
import the same file and have the versioning work.

An interesting side-effect of that is that the properties cannot be
relied on carrying versions of artifacts and then be picked up by the
features.xml file.

This patch fixes that by introducing a script into the build cycle,
which looks at a template features.xml and resolves the versions as
currently visible in the dependency tree of the artifact.

Change-Id: I193586f777478c12520358b9909cfb61e40d14b4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 584: test coverage increase 44/11944/1
Martin Ciglan [Tue, 14 Oct 2014 09:45:48 +0000 (11:45 +0200)]
Bug 584: test coverage increase

MethodSignatureBuilderImpl.java
MethodSignatureImpl.java

Change-Id: Ifdeb3ba32e751625b212d2e93f66bbedbf76ddfc
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 584: Test coverage increase 39/11939/1
pkajsa [Tue, 14 Oct 2014 07:04:55 +0000 (09:04 +0200)]
Bug 584: Test coverage increase

Unit tests for:
AnnotationTypeBuilderImpl
GeneratedTypeBuilderImpl
AbstractGeneratedTypeBuilder
ConstantImpl

Change-Id: I2956ff8a787a1e1db9e6e7db27aa50a5cc159bb5
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoRework feature generation 11/11911/4
Robert Varga [Sun, 12 Oct 2014 08:26:20 +0000 (10:26 +0200)]
Rework feature generation

This patch takes advantage of the features-builder, laying the
preparation work for switching artifact tracking.

Change-Id: I8c325ad4b26ca0b9839edacb919134ea43db46fe
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoIntroduce features-builder 10/11910/3
Robert Varga [Sun, 12 Oct 2014 08:32:04 +0000 (10:32 +0200)]
Introduce features-builder

The planned rework of version handling requires the features artifacts
to stop relying on maven properties for versions. This patch introduces
a base pom (e.g. suitable for being a parent), which provides the
versioning functionality based of dependency tree.

The user will typically use features-builder as their parent pom,
activate the plugins mentioned in pluginManagement and provide a
template features file, where the required version is marked by a
{{VERSION}} placeholder. The location of this template is hard-coded to
src/features, but the file name is controlled by features.file property
(features.xml) by default.

The build process' plugin wiring will take care of processing the
template and looking through the artifact's dependency tree. If a
required version is not found, the build is forced to fail.

Change-Id: If3252ffe8ca2b099ffd10c1cc37b47b3a1ac7698
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRelease: bump odlparent dependency to 1.5.0-SNAPSHOT 22/11922/2
Robert Varga [Mon, 13 Oct 2014 09:20:35 +0000 (11:20 +0200)]
Release: bump odlparent dependency to 1.5.0-SNAPSHOT

Change-Id: I78de18724d587fb1b9b1873f3a59878e79722f69
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove duplicate declarations"
Tony Tkacik [Mon, 13 Oct 2014 15:05:34 +0000 (15:05 +0000)]
Merge "Remove duplicate declarations"

9 years agoMerge "Fixup more javadocs"
Tony Tkacik [Mon, 13 Oct 2014 12:47:38 +0000 (12:47 +0000)]
Merge "Fixup more javadocs"

9 years agoMerge "Deactivate xtend-maven-plugin"
Tony Tkacik [Mon, 13 Oct 2014 12:47:13 +0000 (12:47 +0000)]
Merge "Deactivate xtend-maven-plugin"

9 years agoMerge "Fix link"
Tony Tkacik [Mon, 13 Oct 2014 12:46:42 +0000 (12:46 +0000)]
Merge "Fix link"

9 years agoBUG-868: remove deprecated YangInstanceIdentifier methods 21/11921/2
Robert Varga [Mon, 13 Oct 2014 08:58:56 +0000 (10:58 +0200)]
BUG-868: remove deprecated YangInstanceIdentifier methods

This cleans up the methods which were previously deprecated. We still
retain the getPath() and toInstance() -- these will be fixed up.

Change-Id: I37b869af069de256484b833608b082cb6edfb15a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 584: GeneratedTOBuilder test coverage increase"
Robert Varga [Mon, 13 Oct 2014 09:05:34 +0000 (09:05 +0000)]
Merge "Bug 584: GeneratedTOBuilder test coverage increase"

9 years agoFix link 13/11913/2
Robert Varga [Sun, 12 Oct 2014 23:30:57 +0000 (01:30 +0200)]
Fix link

Change-Id: Id81fbcde22b0afa52630b7031daf45d7e8117316
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix javadoc warnings in common concepts 12/11912/2
Robert Varga [Sun, 12 Oct 2014 11:51:36 +0000 (13:51 +0200)]
Fix javadoc warnings in common concepts

This is a cleanup of warnings currently reported.

Change-Id: I6a7103fbfe8ccf0d94067924cb46489f8c53d29b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFixup more javadocs 20/11920/1
Robert Varga [Mon, 13 Oct 2014 08:53:30 +0000 (10:53 +0200)]
Fixup more javadocs

Fixes invalid links and @see tags.

Change-Id: Iec791aceaf7553130d101a817103b0c61310db28
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 584: MethodParameterImpl test coverage increase 81/11881/2
Martin Ciglan [Fri, 10 Oct 2014 12:29:34 +0000 (14:29 +0200)]
Bug 584: MethodParameterImpl test coverage increase

Change-Id: I63ecbdb35266f4549ebc51c49d9a8009f8b57dcb
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoBug 584: GeneratedTOBuilder test coverage increase 75/11875/2
Martin Ciglan [Fri, 10 Oct 2014 08:45:07 +0000 (10:45 +0200)]
Bug 584: GeneratedTOBuilder test coverage increase

Change-Id: Ifb6d377a6d1911f2f12bb178efdea8809916c26a
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoDeactivate xtend-maven-plugin 64/11864/1
Robert Varga [Fri, 10 Oct 2014 04:04:56 +0000 (06:04 +0200)]
Deactivate xtend-maven-plugin

We have only three artifacts which use xtend, so there is no reason to
mention it in the build section. Move the configuration into
pluginManagement, speeding up the build.

Change-Id: Iac5e6e93a723b5f7e8beeb7dfa0d63d316d2f6e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove duplicate declarations 44/11844/2
Robert Varga [Wed, 8 Oct 2014 22:57:11 +0000 (00:57 +0200)]
Remove duplicate declarations

Change-Id: I7686eddf2a1135e1dd943d6e5e3965dc4ec74343
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2156: Unsupported augment target"
Tony Tkacik [Thu, 9 Oct 2014 16:12:36 +0000 (16:12 +0000)]
Merge "Bug 2156: Unsupported augment target"

9 years agoMerge "BUG-2159: fix sort() conflict"
Tony Tkacik [Thu, 9 Oct 2014 16:07:24 +0000 (16:07 +0000)]
Merge "BUG-2159: fix sort() conflict"

9 years agoMerge "BUG-2159: compilation failure with generics"
Tony Tkacik [Thu, 9 Oct 2014 16:07:03 +0000 (16:07 +0000)]
Merge "BUG-2159: compilation failure with generics"

9 years agoBUG-2159: fix sort() conflict 19/11819/1
Robert Varga [Wed, 8 Oct 2014 16:21:01 +0000 (18:21 +0200)]
BUG-2159: fix sort() conflict

Java 8 introduces a default method into java.util.List, which has a
different signature (and semantics) than the xtend extension. This patch
changes the code to not use the syntactic sugar while retaining the use
of the extension.

Change-Id: I4685937ab4da64cfe384db9aad31859ca51e97d7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: compilation failure with generics 18/11818/1
Robert Varga [Wed, 8 Oct 2014 16:12:29 +0000 (18:12 +0200)]
BUG-2159: compilation failure with generics

http://mail.openjdk.java.net/pipermail/compiler-dev/2013-October/007726.html
seems to be describing why this patch is needed.

Change-Id: Ib23f51e0f319327c3c6a04ff86fb4c89b745e4ae
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2159: bump jacoco version 17/11817/1
Robert Varga [Wed, 8 Oct 2014 16:11:34 +0000 (18:11 +0200)]
BUG-2159: bump jacoco version

0.6.2 does not work with Java 8. Until
https://git.opendaylight.org/gerrit/11816 is merged, this fixes the
problem locally.

Change-Id: I3970e0e176190fb6180f0ea266bd10433c2d5afa
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2156: Unsupported augment target 02/11802/2
pkajsa [Tue, 7 Oct 2014 14:56:59 +0000 (16:56 +0200)]
Bug 2156: Unsupported augment target

Some yang models contain augmentations into unsupported target
(e.g. node in body of extension). This causes maven build failure
(by generation of DTO), even though parsing such models is successful.

Change-Id: I8efff696aa2d3b95c5168ba8e42d49a93d1dff74
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoBUG-2154 Remove duplicity check for unknown nodes 63/11763/1
Maros Marsalek [Mon, 6 Oct 2014 17:41:39 +0000 (19:41 +0200)]
BUG-2154 Remove duplicity check for unknown nodes

Change-Id: I4e40242f4cb02868e2b1fa9b3d5dd4322a3f8238
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoAdded Test suite for testing of TypeProviderImpl. 82/11582/1
Lukas Sedlak [Fri, 5 Sep 2014 08:58:14 +0000 (10:58 +0200)]
Added Test suite for testing of TypeProviderImpl.

Removed commented out blocks of code from TypeProviderImpl.
Fixed invalid typecast in getTypeDefaultConstruction(LeafSchemaNode, defaultValue) in else branch of BitsTypeDefinition processing. The parent value is of type ModuleImpl which cannot
be cast to SchemaNode as originaly was. Instead of we can extract QName direclty from parent value -> no need to typecast at all.

Fixed leafrefToDef method in TypeProviderImpl. This method will now process defaultValue from method parameter instead of parent node. Method leafrefToDef has been called only via getTypeDefaultConstruction(LeafSchemaNode, defaultValue) method where default value has been added implicitly. In case that user calls getTypeDefaultConstruction for leafref schema node
and specifies defaultValue as parameter and not in yang model the method will throw exception. Now behaviour of leafrefToDef depends only and only on parameter passed in getTypeDefaultConstruction.

Created TypeProviderTest which contains whole test suite for testing of TypeProviderImpl class.
TestIntegerTypeDefinition is mock implementation of IntegerTypeDefinition in order to testing null references returned by TypeDefinition object.

TypeProviderModel contains methods for provisiononing of YANG test models from test/resources folder.
Created Mock implementations of LeafrefTypeWithNullToStringInXpath, LeafrefTypeWithNullXpath, TestIntegerTypeDefinition and TestLeafSchemaNode designated
to increase branch coverage in tests and provide fail scenarios.

Change-Id: I5599c9b1e8f02a8553fab27c1771e32f88c38bc6
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "Bug 1848: Make sure that XmlStreamUtils preserve list key order."
Tony Tkacik [Thu, 25 Sep 2014 08:50:35 +0000 (08:50 +0000)]
Merge "Bug 1848: Make sure that XmlStreamUtils preserve list key order."

9 years agoMerge "Adding .DS_Store to the .gitignore"
Robert Varga [Thu, 25 Sep 2014 08:34:28 +0000 (08:34 +0000)]
Merge "Adding .DS_Store to the .gitignore"

9 years agoBug 1423 - Yangtools parser allows 2 cases with same child elements 86/9386/11
Ladislav Borak [Tue, 12 Aug 2014 09:36:09 +0000 (11:36 +0200)]
Bug 1423 - Yangtools parser allows 2 cases with same child elements

- added check in YangParserImpl if two choice cases childs are same
- rework printSchemaNodeInfo() in GeneratorImpl.xtend, where was
  problem after generating java file with uncompatible types Set<TypeDefinition<? extends Object>>
  instead of Set<TypeDefinition<?>>, problem was fixed adding another
  variable with correct type.

Change-Id: I0a612ea9143c6f29ffe3a8ceef7e703136157641
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBug 1906: Fixed bug in Binding leafref to union codec 20/11320/2
Tony Tkacik [Wed, 17 Sep 2014 12:45:33 +0000 (14:45 +0200)]
Bug 1906: Fixed bug in Binding leafref to union codec

In models, where leafref was used to reference type, incorrect
codec (EncapsulatedValueCodec) was used for all cases with
derived type instead of actual codec. EncapsulatedValueCodec
covered most cases except Union and Bits.

Added special handling for leafref, where type definition
for referenced leaf is fetched and codec is used based
on that notion.

Change-Id: Id790554e1e84bcf01179add4f5327a4e7380ebe1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 697925b94246e725412b88151ec097c812a65b39)
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdding .DS_Store to the .gitignore 88/11388/1
Colin Dixon [Fri, 19 Sep 2014 22:02:54 +0000 (17:02 -0500)]
Adding .DS_Store to the .gitignore

Change-Id: I95d2664f4853bfa5d95544a4823bbf2e5887b87a
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoMerge "BUG-1849 Check for duplicate required sources and exclude all redundant"
Tony Tkacik [Thu, 18 Sep 2014 12:55:00 +0000 (12:55 +0000)]
Merge "BUG-1849 Check for duplicate required sources and exclude all redundant"

9 years agoBug 1950: Raise memory and permgen limits for featurs-test 13/11313/1
Ed Warnicke [Thu, 18 Sep 2014 11:23:31 +0000 (06:23 -0500)]
Bug 1950: Raise memory and permgen limits for featurs-test

Change-Id: I7e72e605eac4029835cbc8e64e22d0ecedc1dacc
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBump versions for Lithium 82/11282/1
Robert Varga [Wed, 17 Sep 2014 11:46:44 +0000 (13:46 +0200)]
Bump versions for Lithium

Bumps everything to 0.7.0, models get a .7 suffix.

Change-Id: I63d2f6b3782769043b8efa73ef64abe34e57b97a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1849 Check for duplicate required sources and exclude all redundant 43/11243/2
Maros Marsalek [Tue, 16 Sep 2014 14:35:13 +0000 (16:35 +0200)]
BUG-1849 Check for duplicate required sources and exclude all redundant

Also check for source identifier mismatch

Change-Id: I32fc76a56fd7adb564b7b9c9fc2679c5f36069cb
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBug 1848: Make sure that XmlStreamUtils preserve list key order. 27/11227/1
Tony Tkacik [Tue, 16 Sep 2014 10:28:58 +0000 (12:28 +0200)]
Bug 1848: Make sure that XmlStreamUtils preserve list key order.

Change-Id: I3d7a91c9ae4ec74b1c7130c4af504af73a2f4507
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 576 Fixes of critical issues for YT components"
Tony Tkacik [Mon, 15 Sep 2014 14:52:52 +0000 (14:52 +0000)]
Merge "Bug 576 Fixes of critical issues for YT components"

9 years agoBUG-650: make ReadOnlyTrieMap concurrent 92/11192/1
Robert Varga [Mon, 15 Sep 2014 11:29:08 +0000 (13:29 +0200)]
BUG-650: make ReadOnlyTrieMap concurrent

ReadOnlyTrieMap.delegate() guarded instantiation with a synchronized
block. This is not strictly necessary as readOnly is already volatile.
We can take snapshots concurrently and then perform a simple CAS to see
if we raced with the other thread.

Change-Id: I4e957627a6d7b10bb10fb92a8e210c1d1af22b14
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-650: optimize MapAdaptor a tiny bit 91/11191/1
Robert Varga [Mon, 15 Sep 2014 11:19:38 +0000 (13:19 +0200)]
BUG-650: optimize MapAdaptor a tiny bit

In this context we have already checked the map size, so there is no
need to perform the hasNext() check implied by
Iterables.getOnlyElement().

Change-Id: I12d26053a1bf397b3a026e76c3d07861fd29789c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 576 Fixes of critical issues for YT components 80/10780/4
Lukas Sedlak [Thu, 4 Sep 2014 14:38:23 +0000 (16:38 +0200)]
Bug 576 Fixes of critical issues for YT components

This is fix for https://bugs.opendaylight.org/show_bug.cgi?id=576
Added Nonnull annotations and preconditions checks for annonymous apply methods.
Fixed never reachable if statement in writeValue(final XMLStreamWriter writer, final @Nonnull Node<?> data, final SchemaNode schema) in XmlStreamUtils
since instanceof is doing already null check.
Removed empty if statement in NormalizedNodeContainerModificationStrategy in verifyStructure method.
Removed dead code from in PerRepoTestRunner runnersFromFeatures method.

Change-Id: Icec2a30149a17d8b76497d95ac0054297369e985
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "Bug 1512 - generated builder java file for a leaf containing a union"
Tony Tkacik [Mon, 15 Sep 2014 10:45:46 +0000 (10:45 +0000)]
Merge "Bug 1512 - generated builder java file for a leaf containing a union"

9 years agoMerge "BUG-1431: make sure (Yang)InstanceIdentifier is Serializable"
Tony Tkacik [Mon, 15 Sep 2014 10:09:50 +0000 (10:09 +0000)]
Merge "BUG-1431: make sure (Yang)InstanceIdentifier is Serializable"