yangtools.git
9 years agoMerge "Remove unused declarations"
Tony Tkacik [Mon, 1 Dec 2014 09:15:44 +0000 (09:15 +0000)]
Merge "Remove unused declarations"

9 years agoMerge "Bug 2271 - NPE during generation of java binding for case list-grouping-choice"
Tony Tkacik [Mon, 1 Dec 2014 08:32:39 +0000 (08:32 +0000)]
Merge "Bug 2271 - NPE during generation of java binding for case list-grouping-choice"

9 years agoMerge "Fix logging checkstyle"
Robert Varga [Sun, 30 Nov 2014 20:52:31 +0000 (20:52 +0000)]
Merge "Fix logging checkstyle"

9 years agoRemove unused declarations 04/13204/2
Robert Varga [Fri, 28 Nov 2014 07:08:15 +0000 (08:08 +0100)]
Remove unused declarations

These properties are defined in odlparent, no need to repeat them here.

Change-Id: I34e05fa5bdf4d0937c967405c23d40c41c1b4187
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Add model parent"
Tony Tkacik [Fri, 28 Nov 2014 10:12:36 +0000 (10:12 +0000)]
Merge "Add model parent"

9 years agoBug 2271 - NPE during generation of java binding for case list-grouping-choice 66/12566/5
pkajsa [Thu, 6 Nov 2014 12:24:25 +0000 (13:24 +0100)]
Bug 2271 - NPE during generation of java binding for case list-grouping-choice

The SchemaContextUtil class does not find some types of schema elements nested
in other elements (e.g. groupings in groupings - Bug 2117, groupings in lists,
groupings in Rpcs, groupings in rpc outputs and inputs, groupings in
notifications etc...). Therefore complete rework of findNodeInModule and
related methods has been performed. This version of patch set (i.e. 5) works
also with yang modules containing siblings with the same name.

Change-Id: Ia5f9d437c05ace6d94999eac17308a756c439f82
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoMerge "Resolved some sonar issues: If Stmts Must Use Braces"
Robert Varga [Tue, 25 Nov 2014 16:25:17 +0000 (16:25 +0000)]
Merge "Resolved some sonar issues: If Stmts Must Use Braces"

9 years agoResolved some sonar issues: Hide Utility Class Constructor 30/11930/4
Ladislav Borak [Mon, 13 Oct 2014 18:12:49 +0000 (20:12 +0200)]
Resolved some sonar issues: Hide Utility Class Constructor

Change-Id: I369df97a4de6c32dcb30a87516b0ec174368d38a
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoFix logging checkstyle 10/12910/3
Milos Fabian [Tue, 18 Nov 2014 11:20:09 +0000 (12:20 +0100)]
Fix logging checkstyle

-allow literal string concatenation in log message

Change-Id: Iab33788f5db8e0e640c1f5d3a34494d84c2254d4
Signed-off-by: Milos Fabian <milfabia@cisco.com>
9 years agoMerge "Introduce QNameModule.toString()"
Tony Tkacik [Tue, 25 Nov 2014 08:52:35 +0000 (08:52 +0000)]
Merge "Introduce QNameModule.toString()"

9 years agoResolved some sonar issues: If Stmts Must Use Braces 18/11918/2
Ladislav Borak [Mon, 13 Oct 2014 07:50:27 +0000 (09:50 +0200)]
Resolved some sonar issues: If Stmts Must Use Braces

Change-Id: I904bf50a98ba72f6887c540970a10b951c4f8beb
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoIntroduce QNameModule.toString() 75/13075/1
Robert Varga [Mon, 24 Nov 2014 15:09:22 +0000 (16:09 +0100)]
Introduce QNameModule.toString()

Rather than using the default, let's add a ToStringHelper based
toString().

Change-Id: Ib9240564db8f710d36f9281054b5e2825d9790a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1953: perform proper string validation 70/13070/1
Robert Varga [Thu, 18 Sep 2014 12:51:15 +0000 (14:51 +0200)]
BUG-1953: perform proper string validation

Activates the use ot Patterns to enforce the string value has the format
specified by the yang file. Also fixes mutability of the exposed list,
which may have been attacked, injecting wrong strings.

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

9 years agoMerge "Bug 1677 - Parser: ListSchemaNodeBuilder keys needs to be a LinkedHashSet"
Tony Tkacik [Thu, 20 Nov 2014 11:37:05 +0000 (11:37 +0000)]
Merge "Bug 1677 - Parser: ListSchemaNodeBuilder keys needs to be a LinkedHashSet"

9 years agoDo not use YangInstanceIdentifier#getPath() 75/12975/1
Robert Varga [Wed, 19 Nov 2014 21:02:56 +0000 (22:02 +0100)]
Do not use YangInstanceIdentifier#getPath()

Moves TreeNodeUtils away from using deprecated getPath().

Change-Id: Ida7edbd89b08d7365d30d20a1e9657a106886c10
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2157 - Race condition when adding a RPC implementation with an output"
Tony Tkacik [Thu, 20 Nov 2014 08:51:58 +0000 (08:51 +0000)]
Merge "Bug 2157 - Race condition when adding a RPC implementation with an output"

9 years agoMerge "Improve InstanceIdentifier.keyOf()"
Tony Tkacik [Thu, 20 Nov 2014 08:44:04 +0000 (08:44 +0000)]
Merge "Improve InstanceIdentifier.keyOf()"

9 years agoMerge "Fix indentation"
Tony Tkacik [Thu, 20 Nov 2014 08:40:05 +0000 (08:40 +0000)]
Merge "Fix indentation"

9 years agoMerge "BUG-2402: add FIXMEs and javadoc"
Tony Tkacik [Thu, 20 Nov 2014 08:39:10 +0000 (08:39 +0000)]
Merge "BUG-2402: add FIXMEs and javadoc"

9 years agoMerge "Reduce SchemaContext cache to weak values"
Tony Tkacik [Thu, 20 Nov 2014 08:38:40 +0000 (08:38 +0000)]
Merge "Reduce SchemaContext cache to weak values"

9 years agoImprove InstanceIdentifier.keyOf() 54/12954/1
Robert Varga [Wed, 19 Nov 2014 17:04:10 +0000 (18:04 +0100)]
Improve InstanceIdentifier.keyOf()

Rather than throwing a ClassCastException, this documents that the
keyOf() method can throw an IllegalArgumentException.

Change-Id: I5d5b9e10c7329c6bc909b28b07c7bc6500cfcd5a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2304 Fix SchemaContextUtil for augmented nodes."
Tony Tkacik [Wed, 19 Nov 2014 14:04:15 +0000 (14:04 +0000)]
Merge "BUG-2304 Fix SchemaContextUtil for augmented nodes."

9 years agoMerge "Bug 1781: Fix serialization of leafrefs"
Tony Tkacik [Wed, 19 Nov 2014 14:02:57 +0000 (14:02 +0000)]
Merge "Bug 1781: Fix serialization of leafrefs"

9 years agoBUG-2304 Fix SchemaContextUtil for augmented nodes. 85/12785/5
Jozef Gloncak [Tue, 18 Nov 2014 08:52:38 +0000 (09:52 +0100)]
BUG-2304 Fix SchemaContextUtil for augmented nodes.

Also keep backwards compatibility for invalid leafrefs
+ Fix the serialization in XMLStreamNormalizedNodeStreamWriter (btw. interesting name for a class)

Change-Id: I46cfcef46c97267c7e9b5bfebe03e42e9071e1e7
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBug 1781: Fix serialization of leafrefs 66/12666/4
Jozef Gloncak [Thu, 13 Nov 2014 15:40:47 +0000 (16:40 +0100)]
Bug 1781: Fix serialization of leafrefs

- fixed search leafref node specified with relative xpath

Change-Id: I4b6eb6ab94b954ab5b28129dc332590d32b8a7c4
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG-2402: add FIXMEs and javadoc 25/12925/1
Robert Varga [Tue, 18 Nov 2014 17:48:47 +0000 (18:48 +0100)]
BUG-2402: add FIXMEs and javadoc

This adds an explanation about the interfaces being used and makes an
explicit warning for users to not use the exposed method.

Change-Id: I07753bea7380f7d92165b8ecb1840ee07d36dc06
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2401: remove LOG.warn() from entrySet() 24/12924/1
Robert Varga [Tue, 18 Nov 2014 17:37:32 +0000 (18:37 +0100)]
BUG-2401: remove LOG.warn() from entrySet()

As it turns out, entrySet() is called from
AbstractImmutableDataContainerNodeBuilder when it modifies children (via
HashMap(Map) contructor). Remove the warning and add explanation about
what is going on.

Change-Id: Ifbd99458c83d8afa25c3be7778fb28b579d4b2d8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix indentation 14/12814/3
Robert Varga [Thu, 13 Nov 2014 13:47:00 +0000 (14:47 +0100)]
Fix indentation

Fixes wrong indentation and import ordering.

Change-Id: Ibb5593118a32b79d74edc97bed0ac2dceaa5b881
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2354: Fixed parsing of block comments between statement and argument"
Tony Tkacik [Tue, 18 Nov 2014 10:16:56 +0000 (10:16 +0000)]
Merge "Bug 2354: Fixed parsing of block comments between statement and argument"

9 years agoMerge "Remove unused imports"
Tony Tkacik [Tue, 18 Nov 2014 09:20:26 +0000 (09:20 +0000)]
Merge "Remove unused imports"

9 years agoMerge changes Ic8e48ed1,Ie6bc9bbf,I3e94c637,I84c8ac42
Tony Tkacik [Tue, 18 Nov 2014 08:34:47 +0000 (08:34 +0000)]
Merge changes Ic8e48ed1,Ie6bc9bbf,I3e94c637,I84c8ac42

* changes:
  BUG-2390: Use child size hints
  BUG-2390: Lower HashMap allocation defaults
  BUG-2384: improve ImmutableUnkeyedListNode efficiency
  BUG-2377: introduce internal UnmodifiableChildrenMap

9 years agoBUG-2390: Use child size hints 38/12838/2
Robert Varga [Fri, 14 Nov 2014 09:50:08 +0000 (10:50 +0100)]
BUG-2390: Use child size hints

This patch makes sure we pass down the sizing hints into the
implementation. This will allow us to make better decisions when
resizing maps.

Change-Id: Ic8e48ed108e20381aa0c91a5d8f7e3bb57acf180
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2390: Lower HashMap allocation defaults 37/12837/2
Robert Varga [Fri, 14 Nov 2014 09:50:17 +0000 (10:50 +0100)]
BUG-2390: Lower HashMap allocation defaults

This lowers the default hashmap capacity to 4, hopefully lowering our
overall overhead. It also introduces sizeHint arguments, to the maps can
be better-sized in the future.

Change-Id: Ie6bc9bbf79e7c5c63c3dd0000585660cbc09d368
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2384: improve ImmutableUnkeyedListNode efficiency 21/12821/4
Robert Varga [Thu, 13 Nov 2014 17:23:43 +0000 (18:23 +0100)]
BUG-2384: improve ImmutableUnkeyedListNode efficiency

With moderately-loaded BGP instance we are using quite a few on empty
unkeyed list nodes. The fact they are empty means we waste about 8 bytes
per instance just tracking empty list. Introduce a dedicated class to
take care of this common special case.

Change-Id: I3e94c637f5d7d47d39d274bae96850307f5c439d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2377: introduce internal UnmodifiableChildrenMap 15/12815/4
Robert Varga [Thu, 13 Nov 2014 13:47:26 +0000 (14:47 +0100)]
BUG-2377: introduce internal UnmodifiableChildrenMap

This new class acts a replacement of java.util.Collection's version of
the same. Unlike the standard class, this one does not retain cached
versions of keySet and entrySet, since those are unused anyway. We can
also perform an instanceof check, which should speed up operations.
Finally, we check for map emptiness and use Collections.emptyMap()
when possible.

Change-Id: I84c8ac428d6b207fafccf8cc898f0555b104a4ee
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused imports 08/12808/3
Robert Varga [Thu, 13 Nov 2014 12:38:35 +0000 (13:38 +0100)]
Remove unused imports

These imports are unused, creating eclipse warnings.

Change-Id: Id4e9a51131489ec426537a6af32ed77cd0ff161f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG 2353 : LeafSetEntryBuilder does not compare byte array values correctly 20/12820/2
Moiz Raja [Thu, 13 Nov 2014 17:08:04 +0000 (09:08 -0800)]
BUG 2353 : LeafSetEntryBuilder does not compare byte array values correctly

Use Object.deepEquals to compare the value of the NodeIdentifier and the actual
value to be set on the LeafSetEntry

Change-Id: I4482b19d029058a0f78d3b19508d6f7797448710
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoReduce SchemaContext cache to weak values 44/12844/1
Robert Varga [Fri, 14 Nov 2014 13:32:06 +0000 (14:32 +0100)]
Reduce SchemaContext cache to weak values

While constructing a SchemaContext is potentially costly, we do not need
to retain them if they are not used for long periods of time. Soft
references attempt to retain the context until the memory pressure is
pretty high, while weak references are cleared as soon as the object is
proven to be weakly reachable.

Change-Id: I2df2a78218d3b439edadda2192ff541e4c1c0fee
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2354: Fixed parsing of block comments between statement and argument 81/12781/3
Martin Ciglan [Wed, 12 Nov 2014 11:28:42 +0000 (12:28 +0100)]
Bug 2354: Fixed parsing of block comments between statement and argument

Lexer didn't contain BLOCK_COMMENT_MODE in VALUE_MODE,
therefore parser tried to parse comments instead of skipping them

Change-Id: I6d131a45df121570537686006aa31397124ea6ca
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoMerge "Bug 2326 - NormalizeNode equals fails when NormalizeNodes being compared conta...
Tony Tkacik [Thu, 13 Nov 2014 13:42:24 +0000 (13:42 +0000)]
Merge "Bug 2326 - NormalizeNode equals fails when NormalizeNodes being compared contain binary data which is identical."

9 years agoBug 2157 - Race condition when adding a RPC implementation with an 86/12786/2
Jan Hajnar [Wed, 12 Nov 2014 09:21:03 +0000 (10:21 +0100)]
Bug 2157 - Race condition when adding a RPC implementation with an
output

* added wait for schema in 'getRpcQnamesFor()' method

Change-Id: I2baa71f4237a1125db9a6e5ec8077237dc8ef544
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBug 2326 - NormalizeNode equals fails when NormalizeNodes being 60/12760/2
pkajsa [Tue, 11 Nov 2014 07:08:38 +0000 (08:08 +0100)]
Bug 2326 - NormalizeNode equals fails when NormalizeNodes being
compared contain binary data which is identical.

Change-Id: If049e215156f5338eb3ff0ab95d19eecd622defd
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoMerge "ISIS Yang model compilation issue"
Robert Varga [Mon, 10 Nov 2014 22:05:29 +0000 (22:05 +0000)]
Merge "ISIS Yang model compilation issue"

9 years agoBug 1677 - Parser: ListSchemaNodeBuilder keys needs to be a LinkedHashSet 36/10836/5
Ladislav Borak [Fri, 5 Sep 2014 06:14:55 +0000 (08:14 +0200)]
Bug 1677 - Parser: ListSchemaNodeBuilder keys needs to be a LinkedHashSet

- changed type of kyes in ListSchemaNodeBuilder

Change-Id: I838d51b76f70f6446169f72407db8da43fb5ee03
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoBUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema 75/12575/2
Maros Marsalek [Thu, 6 Nov 2014 14:27:14 +0000 (15:27 +0100)]
BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema

Change-Id: I32fe0658aa495f98b75e804cec58ad9dcea02cf3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Bug 1781: Fix serialization of leafrefs"
Tony Tkacik [Thu, 6 Nov 2014 13:25:40 +0000 (13:25 +0000)]
Merge "Bug 1781: Fix serialization of leafrefs"

9 years agoBug 1781: Fix serialization of leafrefs 18/12518/6
Ladislav Borak [Thu, 6 Nov 2014 09:09:38 +0000 (10:09 +0100)]
Bug 1781: Fix serialization of leafrefs

- added functionality to read schema node which is type of leaf ref and
  points to leaf ref, identity ref, instanceidentifier or typedef node.

Change-Id: I150847b859ac0616c2cf160192bb712aea8202bb
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoAdd model parent 83/12083/2
Robert Varga [Mon, 20 Oct 2014 17:19:56 +0000 (19:19 +0200)]
Add model parent

This patch adds an explicit parent pom which can be used by downstream
projects to build API bundles containing a yang model.

Change-Id: I37b9ef0a457679d1909a790b8cbd98edad64da39
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoISIS Yang model compilation issue 42/12542/1
Reinaldo Penno [Thu, 6 Nov 2014 06:30:45 +0000 (22:30 -0800)]
ISIS Yang model compilation issue

Change-Id: Ib4bc98ad68237ebea4eccf5522dfd79db88a7906
Signed-off-by: Reinaldo Penno <rapenno@gmail.com>
9 years agoBUG-1956: bump java-concurrent-hash-trie-map version 0.2.23 55/12155/3
Robert Varga [Fri, 19 Sep 2014 07:46:39 +0000 (09:46 +0200)]
BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23

Bump the version again, this time accounting for the late API change.

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

9 years agoEliminate warnings 02/12402/1
Robert Varga [Fri, 31 Oct 2014 14:01:52 +0000 (15:01 +0100)]
Eliminate warnings

- unused imports
- unused warning suppression
- legacy class usage

Change-Id: Ibcd4debf265c04ad45846ba087a2400376e6e08c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 584: Increate test coverage in binding-generator-util"
Tony Tkacik [Wed, 29 Oct 2014 12:06:02 +0000 (12:06 +0000)]
Merge "Bug 584: Increate test coverage in binding-generator-util"

9 years agoBUG-2195 Add additional javax.crypto.* packages to pax-exam karaf tests 83/12283/1
Maros Marsalek [Tue, 28 Oct 2014 09:19:24 +0000 (10:19 +0100)]
BUG-2195 Add additional javax.crypto.* packages to pax-exam karaf tests

Change-Id: I186ea4691460ae11845ba42d7b5d9a10b7d10501
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix features not being published where they should be 68/12268/1
Robert Varga [Mon, 27 Oct 2014 16:12:05 +0000 (17:12 +0100)]
Fix features not being published where they should be

During refactoring I mistakenly changed the artifact name, causing new
features not being pushed.

Change-Id: I2ff856c91344ea2e9b28f3dc8ea53258c3d54dd9
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 584: Increate test coverage in binding-generator-util 76/11476/3
Ladislav Borak [Tue, 23 Sep 2014 06:30:26 +0000 (08:30 +0200)]
Bug 584: Increate test coverage in binding-generator-util

Change-Id: I3b6d4b5d579b77b89fc6acf058c5bce277609027
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Bug 2117: Inner grouping used in outer grouping's choice case"
Tony Tkacik [Mon, 27 Oct 2014 09:39:53 +0000 (09:39 +0000)]
Merge "Bug 2117: Inner grouping used in outer grouping's choice case"

9 years agoMerge "Bug 2180 - schema aware builders for ordered list and leaf-list are absent"
Tony Tkacik [Mon, 27 Oct 2014 09:33:36 +0000 (09:33 +0000)]
Merge "Bug 2180 - schema aware builders for ordered list and leaf-list are absent"

9 years agoBug 2180 - schema aware builders for ordered list and leaf-list are 22/12222/2
Jan Hajnar [Wed, 22 Oct 2014 13:39:08 +0000 (15:39 +0200)]
Bug 2180 - schema aware builders for ordered list and leaf-list are
absent

* added builders that provide ordered list and ordered leaf-list nodes
* added tests to check ordered node parsing

NOTE: this patch is based on patches by Tony Burke<tony@iservice.com>

Change-Id: I351e841c9fd1e02678b94598f7f5d46ab00a8334
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Signed-off-by: Tony Burke <tony@iservice.com>
9 years agoBUG-2195 Make javax.crypto visible in pax-exam karaf tests 32/12232/1
Maros Marsalek [Fri, 24 Oct 2014 13:05:23 +0000 (15:05 +0200)]
BUG-2195 Make javax.crypto visible in pax-exam karaf tests

Change-Id: I03e918768bc45326b36a98d75fb35d6e93935bba
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBug 2220: Incorrect override of getUnknownNodes in TypeDefinitionBuilderImpl 57/12157/3
pkajsa [Wed, 22 Oct 2014 13:13:13 +0000 (15:13 +0200)]
Bug 2220: Incorrect override of getUnknownNodes in TypeDefinitionBuilderImpl

In TypeDefinitionBuilderImpl there is override of getUnknownNodes method
which returns Collections.emptyList().
The override method has been removed from TypeDefinitionBuilderImpl.

Change-Id: I7a7121965848b7feceeac2e6e832b2f93049b576
Signed-off-by: pkajsa <pkajsa@cisco.com>
9 years agoBug 2117: Inner grouping used in outer grouping's choice case 17/12217/1
Martin Ciglan [Fri, 24 Oct 2014 08:55:17 +0000 (10:55 +0200)]
Bug 2117: Inner grouping used in outer grouping's choice case

Inner grouping(s) of outer grouping(s) found and handled properly

Change-Id: I09853215febf47312b431976ad096d1ee774c9f6
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
9 years agoFix for resolving leafSchemaNode asProperty in BindingGeneratorImpl 59/12159/3
Ladislav Borak [Wed, 22 Oct 2014 13:37:30 +0000 (15:37 +0200)]
Fix for resolving leafSchemaNode asProperty in BindingGeneratorImpl

Change-Id: Ia844e18de49ff569a027cba7df77551ba2fa763d
Signed-off-by: Ladislav Borak <lborak@cisco.com>
9 years agoMerge "Remove deprecated concepts.util.ListenerRegistry"
Tony Tkacik [Thu, 23 Oct 2014 08:10:50 +0000 (08:10 +0000)]
Merge "Remove deprecated concepts.util.ListenerRegistry"

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"