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>
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>
(cherry picked from commit
d87064cc88b59c970a02cb2567cd34fc7eb421ce)
Tony Tkacik [Tue, 18 Nov 2014 09:36:11 +0000 (09:36 +0000)]
Merge "Bug 2326 - NormalizeNode equals fails when NormalizeNodes being compared contain binary data which is identical." into stable/helium
Tony Tkacik [Tue, 18 Nov 2014 08:36:53 +0000 (08:36 +0000)]
Merge "BUG-2386: ISIS Yang model compilation issue" into stable/helium
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>
Reinaldo Penno [Thu, 6 Nov 2014 06:30:45 +0000 (22:30 -0800)]
BUG-2386: ISIS Yang model compilation issue
This patch fixes a slight typo, which prevents the resulting Pattern from being useful.
Change-Id: Ib4bc98ad68237ebea4eccf5522dfd79db88a7906
Signed-off-by: Reinaldo Penno <rapenno@gmail.com>
(cherry picked from commit
980409656693d454ad12e438d6c9ecd764ebd7c1)
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>
(cherry picked from commit
edb26746369bb57488887115e10e19e2f52526b2)
Thanh Ha [Tue, 11 Nov 2014 03:35:26 +0000 (22:35 -0500)]
Revert "Revert "BUG 2282 - JSON top level element without module name""
To undo revert commit
b1135e4f2e6e6856322d012eb732a01d6f7b68ed for
Helium SR1.
Change-Id: I58fc5c4ed5dd02aed8355155e86bff3a61326c9a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Tue, 11 Nov 2014 03:34:46 +0000 (22:34 -0500)]
Revert "Revert "BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema""
To undo revert commit
4c307b829542f6411ecdabba01f65601acc56a76 for
Helium SR1.
Change-Id: Ibb4994b31a298802b0b1e9e34c549d5d4168ec5d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Colin Dixon [Mon, 10 Nov 2014 20:34:12 +0000 (14:34 -0600)]
Bumping versions by 0.0.1 after the Helium.1 release
Change-Id: I030a544c44f438b4182b99313d209e839fb580bd
Signed-off-by: Colin Dixon <colin@colindixon.com>
Colin Dixon [Mon, 10 Nov 2014 20:33:42 +0000 (14:33 -0600)]
Applying the Helium.1 release patch
Change-Id: I479fb9962aa03910dfdea35976ce26bc6fbff608
Signed-off-by: Colin Dixon <colin@colindixon.com>
Colin Dixon [Mon, 10 Nov 2014 20:33:02 +0000 (14:33 -0600)]
Revert "BUG-2329 Add handling of anyxml nodes in XmlDocumentUtils with schema"
To roll back to the same code as in the git hash
8c0ae36b12e57323dea7fbd9fa7a79da84dab980 before applying the Helium.1
release patch.
This reverts commit
7aab20756b858bc7f0ca8ca5a8b24d98067373b4.
Change-Id: I825bcfcdc15a236b4d46051fcf0791f02a175226
Signed-off-by: Colin Dixon <colin@colindixon.com>
Colin Dixon [Mon, 10 Nov 2014 20:32:04 +0000 (14:32 -0600)]
Revert "BUG 2282 - JSON top level element without module name"
To roll back to the same code as in the git hash
8c0ae36b12e57323dea7fbd9fa7a79da84dab980 before applying the Helium.1
release patch.
This reverts commit
6eee2a1ce9e69a7b653a7b4427573eff67588d1f.
Change-Id: Id14020c2ee1dcf9869d602bfbd1815d65ced0755
Signed-off-by: Colin Dixon <colin@colindixon.com>
Tony Tkacik [Fri, 7 Nov 2014 10:18:28 +0000 (10:18 +0000)]
Merge "BUG 2282 - JSON top level element without module name" into stable/helium
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>
Tony Tkacik [Wed, 5 Nov 2014 13:31:54 +0000 (13:31 +0000)]
Merge "Bug 2271: Fixed potentional NPE in generateTypesFromChoiceCases" into stable/helium
Lukas Sedlak [Tue, 21 Oct 2014 14:17:35 +0000 (16:17 +0200)]
Bug 2271: 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>
(cherry picked from commit
e296c756501bc50b1295a84a6ddd085850a71e32)
Jozef Gloncak [Mon, 3 Nov 2014 15:02:54 +0000 (16:02 +0100)]
BUG 2282 - JSON top level element without module name
Json top level element now doesn't have to contain module name prefix.
If namespace of some child element was changed and only one child with
specified name exist in schema then its namespace is used by default.
If more then one potential child in various namespaces exists then
exception is raised. Exception is also raised if no such element as
specified in JSON input exists in YANG schema.
Change-Id: I8a38fde4f2e9b79562f6bf7c79acafd51c7bff32
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Loi Pan [Fri, 31 Oct 2014 22:59:49 +0000 (23:59 +0100)]
Fix Bug 2291
Change-Id: Ie86cd6f61648aefc81c80c53866e2421216cd111
Signed-off-by: Loi Pan <mr.loipan@gmail.com>
Tony Tkacik [Fri, 31 Oct 2014 08:47:28 +0000 (08:47 +0000)]
Merge "Remove module name prefix from top level element" into stable/helium
Tony Tkacik [Thu, 30 Oct 2014 15:18:04 +0000 (15:18 +0000)]
Merge "Bug 2279 - top level element should be entry and not list" into stable/helium
Jozef Gloncak [Thu, 30 Oct 2014 15:02:20 +0000 (16:02 +0100)]
Remove module name prefix from top level element
Previous patch added condition which caused that name of every top level
JSON element was printed also with module name prefix.
It caused that some test failing.
Purpose of this patch is revert this change.
Change-Id: I3c6a992048e76fe0fa5ad0369c474710999502d4
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Jozef Gloncak [Thu, 30 Oct 2014 09:04:32 +0000 (10:04 +0100)]
Bug 2279 - top level element should be entry and not list
JSON input which contains at top level list entry data is now converted
to normalized node structure with top level element of entry type.
Previous status: top level element element was returned as list which
contained list entries.
Change-Id: Ie632f02819aab5a4dc2512b818c729d1074d98dc
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Jozef Gloncak [Tue, 23 Sep 2014 13:21:21 +0000 (15:21 +0200)]
BUG 1975 - yang unkeyed list is transformed to map node
Parsers and serializer for base, for concrete DOM type anf for composite
node structure to normalized node conversion were
added/modified to make it possible parse|serialize unkeyed list to|from
UnkeyedListNode and parse OrderedListNode.
yang-data-operations artifact - was added UnkeyedListNodeModification
class to handle cases when unkeyed list is loaded from input stream
Change-Id: Ia3a9554dea00bb9d424495a2b6ed1f96765be738
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Jozef Gloncak [Fri, 24 Oct 2014 08:43:48 +0000 (10:43 +0200)]
BUG 2155 - depth parameter in NormalizedNodeWriter
For stable helium
- NormalizedNodeWriter - added depth class field (maxDepth, currentDepth)
to make it possible to manage how deeply will be normalized node
structure walked during generating output strea (JSON, XML).
Presence of various normalized node will change current depth as
follows:
- ContainerNode = +1,
- ListEntryNode (MapEntryNode, UnkeyedListEntryNode) = +1,
- calling of endNode() method will decrease currentDepth by 1.
Change-Id: I7342581f4a1de25f8e8bb50ac0933258d7e3bce5
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Tue, 28 Oct 2014 13:26:52 +0000 (13:26 +0000)]
Merge "Parent schema node input parameter in JsonParserStream" into stable/helium
Jozef Gloncak [Fri, 24 Oct 2014 08:43:48 +0000 (10:43 +0200)]
Parent schema node input parameter in JsonParserStream
For stable helium
- JsonParserStream - added input parameter to create() factory method which
specify parent schema node of schema node which is at top level of JSON
input. Usually it is schema context.
Change-Id: I15ca2bdd0f8ace617d834040cd9a6745b40ee78a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Mon, 27 Oct 2014 11:37:07 +0000 (11:37 +0000)]
Merge "Bug 2117: Inner grouping used in outer grouping's choice case" into stable/helium
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>
(cherry picked from commit
6bb1dccf4fa701f1fa6bb77dba1047812d7e268e)
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>
(cherry picked from commit
9b67d090d24d46f137e022d934d3f5e163147548)
Tony Tkacik [Thu, 23 Oct 2014 07:54:13 +0000 (07:54 +0000)]
Merge "Bug 2172 - AbstractGeneratedTypeBuilder check for duplicate elements." into stable/helium
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>
(cherry picked from commit
5eb73b6c47326147af391608ee22ab8f8ab2c87c)
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>
(cherry picked from commit
b1e2b02d59a05fdca07cb469712d9872a1d84bb1)
Tony Tkacik [Fri, 17 Oct 2014 09:00:29 +0000 (09:00 +0000)]
Merge "Bug 2147 - JSON does not properly encode multiline string" into stable/helium
Tony Tkacik [Fri, 17 Oct 2014 09:00:11 +0000 (09:00 +0000)]
Merge "Bug 2156: Unsupported augment target" into stable/helium
Tony Tkacik [Fri, 17 Oct 2014 08:59:51 +0000 (08:59 +0000)]
Merge "Bug 2202: DerivableSchemaNode API incorrect Javadoc" into stable/helium
Tony Tkacik [Fri, 17 Oct 2014 08:59:03 +0000 (08:59 +0000)]
Merge "Bug 2183: ClassCastException in AbstractTypeMemberBuilder fix" into stable/helium
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>
(cherry picked from commit
23e82385c675216762588f9400ff8244b68bd8cd)
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>
(cherry picked from commit
b741f59e2b57c1812af40e89c89782a8a717a394)
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>
(cherry picked from commit
7dc18da2dd06e4b4e2d69e3607e82e027d46819c)
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>
(cherry picked from commit
e6c3a206a204de77c70df1c0940a088493401749)
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>
(cherry picked from commit
48387f2188ee83a3c8e909df01e109ebd3e7c89c)
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>
Colin Dixon [Tue, 7 Oct 2014 14:23:20 +0000 (09:23 -0500)]
Changing .gitreview to use the stable/helium branch
Change-Id: Iaac1e293b35f5ca9265737642db1c4de38e8c060
Signed-off-by: Colin Dixon <colin@colindixon.com>
Colin Dixon [Fri, 3 Oct 2014 16:44:46 +0000 (11:44 -0500)]
Incrementing versions by 0.0.1 for post-Helium stability branch
Change-Id: I72548306616a45edb87d66312f6452723af1f460
Signed-off-by: Colin Dixon <colin@colindixon.com>
Colin Dixon [Fri, 3 Oct 2014 16:44:31 +0000 (11:44 -0500)]
Applying the Helium release patch for yangtools
Change-Id: I38c8930662caaedbbbbddbef5fe81d6ad166ba37
Signed-off-by: Colin Dixon <colin@colindixon.com>
Robert Varga [Mon, 22 Sep 2014 15:59:05 +0000 (15:59 +0000)]
Merge "BUG-2022: String Type pattern parsing and resolving fix." into stable/helium
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>
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>
Tony Tkacik [Mon, 22 Sep 2014 14:08:22 +0000 (14:08 +0000)]
Merge "BUG-1954: Fix useless Boolean instantiation" into stable/helium
Robert Varga [Sun, 21 Sep 2014 18:22:58 +0000 (18:22 +0000)]
Merge "Bug 1984, Bug 2005: Changed valueEquals to work with null values." into stable/helium
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>
Tony Tkacik [Sat, 20 Sep 2014 14:48:10 +0000 (14:48 +0000)]
Merge "Bug 1950: Raise memory and permgen limits for featurs-test" into stable/helium
Robert Varga [Sat, 20 Sep 2014 09:23:13 +0000 (09:23 +0000)]
Merge "Bug 1991: Ignore AugmentationIdentifier in XML Serialization" into stable/helium
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>
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>
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>
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>
Tony Tkacik [Thu, 18 Sep 2014 22:11:20 +0000 (22:11 +0000)]
Merge "Bug 1960: Revert "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23"" into stable/helium
Tony Tkacik [Thu, 18 Sep 2014 21:31:56 +0000 (21:31 +0000)]
Bug 1960: Revert "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23"
After bumping version to 0.2.23, it seems TrieMap have problem with large
datasets. During stress testing structures from other instance of TrieMap
started leaking to other map.
This reverts commit
ef4042ba45dcdf9882781931a03f93610c03557c.
Change-Id: If6c29da670de32b4fe061218b6ec842f118a4f44
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
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)
Tony Tkacik [Thu, 18 Sep 2014 14:37:47 +0000 (14:37 +0000)]
Merge "BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23" into stable/helium
Robert Varga [Thu, 18 Sep 2014 13:17:59 +0000 (13:17 +0000)]
Merge "Bug 1848: Make sure that XmlStreamUtils preserve list key order." into stable/helium
Robert Varga [Thu, 18 Sep 2014 13:15:12 +0000 (15:15 +0200)]
BUG-1956: bump java-concurrent-hash-trie-map version 0.2.23
Change-Id: Idde0cb420818fb4ba65128b45fc9fbeb9bbf8ffd
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 18 Sep 2014 12:54:36 +0000 (12:54 +0000)]
Merge "BUG-1849 Check for duplicate required sources and exclude all redundant" into stable/helium
Tony Tkacik [Wed, 17 Sep 2014 14:10:07 +0000 (14:10 +0000)]
Merge "BUG-1902: reuse ConcreteTypeImpl instances" into stable/helium
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>
(cherry picked from commit
2d56be8a89b494cd8423a6377c9574966067aa88)
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>
Robert Varga [Tue, 16 Sep 2014 09:53:44 +0000 (11:53 +0200)]
BUG-1902: reuse ConcreteTypeImpl instances
Creates shared instances for byte[], char[], Serializable and QName
and reuses them as much as possible. Unfortuntely this Helium-specific
patch does not have an explicit cache due to maven interactions, which
prevent us from useing Guava cache classes.
Change-Id: I6d9b57418e4a7dbbe4878f9f9fd1ed57ddb4362d
Signed-off-by: Robert Varga <rovarga@cisco.com>
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>
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>
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>
Tony Tkacik [Mon, 15 Sep 2014 14:52:52 +0000 (14:52 +0000)]
Merge "Bug 576 Fixes of critical issues for YT components"
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>
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>
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>
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"
Tony Tkacik [Mon, 15 Sep 2014 10:09:50 +0000 (10:09 +0000)]
Merge "BUG-1431: make sure (Yang)InstanceIdentifier is Serializable"
Robert Varga [Mon, 15 Sep 2014 10:04:56 +0000 (10:04 +0000)]
Merge "yangtools cannot release, so fixing it"
Robert Varga [Mon, 15 Sep 2014 09:47:38 +0000 (09:47 +0000)]
Merge "Bug 1869: Fixed binding-data-codec to work with empty type"
Ladislav Borak [Fri, 15 Aug 2014 07:41:59 +0000 (09:41 +0200)]
Bug 1512 - generated builder java file for a leaf containing a union
- added clarification for location of builder class for union types
into javadoc
- remove redundant check in YangTempla.writeRpcInput() and
YangTemplate.writeRpcOutput() methods
- added return type for GeneratorImpl.printAugmentedNode() method
(problem to infer return type in recursivecalled method)
- added local set of typedefinitions into
GeneratorImpl.printSchemaNodeInfo() to to remove error in geterated java
file
Change-Id: If4ad960a998254868a0347bb836c79aac7dd19d8
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Robert Varga [Mon, 15 Sep 2014 09:39:03 +0000 (09:39 +0000)]
Merge "Added Nonnull annotation for get operation"
Giovanni Meo [Fri, 5 Sep 2014 15:50:19 +0000 (17:50 +0200)]
yangtools cannot release, so fixing it
- yangtools cannot release because the projetc.version dependency in
dependency management keep changing with the project that includes it,
so fixing it
- restconf dependency and other version should not be duplicated in
multiple poms
- the version property in the common/parent/pom.xml file need to be
the authoritative versions else the features file cannot relay on it
Change-Id: Ic99c1f3818efbdf6ff9c514d4c842164d4228fc4
Signed-off-by: Giovanni Meo <gmeo@cisco.com>
Robert Varga [Mon, 15 Sep 2014 09:36:01 +0000 (09:36 +0000)]
Merge "very basic tests for yang-binding-util"
Robert Varga [Sat, 13 Sep 2014 14:25:51 +0000 (16:25 +0200)]
BUG-1431: make sure (Yang)InstanceIdentifier is Serializable
This works around the fact that an Iterable cannot be serialized by
forcing instantiation of the legacy path. The read side then just does
the opposite.
For InstanceIdentifier the situation is similar, except we perform the
writeout/read-in ourselves.
Bumps the serialization format for InstanceIdentifier and
YangInstanceIdentifier to 2 and 3 respectively.
Change-Id: I668e2aeebde20b99cfe3b41594b3925697295d05
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 15 Sep 2014 09:22:45 +0000 (09:22 +0000)]
Merge "BUG-650: use weakCompareAndSwap()"
Tony Tkacik [Mon, 15 Sep 2014 08:39:43 +0000 (10:39 +0200)]
Bug 1869: Fixed binding-data-codec to work with empty type
Empty type is special case, which does not contain value,
but has only presence characteristic and in Binding Specification v1
it was converted to boolean (true = present, false or null not present)
but new codecs did not have that special handling for empty type
which caused some models to fail.
Fixed places affected by this bug and added test case which now
explicitly tests empty type support.
Change-Id: Idec541dc9da987cebcd46ee65d24c17b7cf9a567
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Mon, 15 Sep 2014 09:17:32 +0000 (09:17 +0000)]
Merge "BUG-1813: rework the interface to allow multiple implementations"
Robert Varga [Thu, 11 Sep 2014 18:12:07 +0000 (20:12 +0200)]
BUG-1813: rework the interface to allow multiple implementations
This introduces two largely independent implementations. Unfortunately
we cannot make DurationStatsTracker abstract, simply because users are
relying on the implicit empty constructor. We create
DurationStatisticsTracker to take that role and introduce two distinct
static factory methods to create a particular instance.
Change-Id: I0e4c6688e0d21066ae857647ba642b65073e8543
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 12 Sep 2014 22:32:04 +0000 (00:32 +0200)]
BUG-650: Use lazy set in YangInstanceIdentifier/SchemaPath caches
These cached values are just derived from immutable state, so we do not
need to force them to be visible by other threads -- they can calculate
them on their own and at some point one of the versions wins.
Change-Id: I3ecf272d151c693ef3adc519c33a065aa9dba94b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Sat, 13 Sep 2014 15:06:33 +0000 (15:06 +0000)]
Merge "BUG-650: improve modification sealing performance"
Tony Tkacik [Sat, 13 Sep 2014 15:05:52 +0000 (15:05 +0000)]
Merge "BUG-1851: fix potential visibility problem"
Robert Varga [Fri, 12 Sep 2014 21:47:17 +0000 (23:47 +0200)]
BUG-650: improve modification sealing performance
The seal operation is on a fast path, so performing synchronization is
not really advised. Downgrade synchronized blocks to volatile
modifications, which have better effects on the optimizer. We introduce
a SynchronizedDataTreeModification which the users can use when they
require a serialized thread-safe access.
Change-Id: Ieffcf1f5fef4d4df32fcdc30f992672d79dcf7bf
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 11 Sep 2014 14:25:58 +0000 (16:25 +0200)]
BUG-1813: fix DurationStatsTracker performance
This fixes the performance issues without affecting the behaviour in the
contended case. This lowers the overhead by moving to an LongAdder,
splitting out the duration/timestamp structure and moving the division
into the read path.
A follow-up patch will rework the code organization to allow for two
different implementations, where this one is useful for highly-contented
deployments. The other implementation will use synchronized block and be
useful for things which are not likely to be contended.
Change-Id: Ic8a1d5df9d1d64460670723bac7e644733237ef7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 12 Sep 2014 22:17:13 +0000 (00:17 +0200)]
BUG-1851: fix potential visibility problem
formattedRevision is a normal field, which may be reordered. Make it
volatile and initialize it as needed. Format operation is simple enough
so we do not require a full synchronization, worst that can happen is
that two racing threads will format it twice.
Change-Id: I52bf2f22cccd9dbb115858dd98f08bc63c3001b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 12 Sep 2014 14:46:16 +0000 (16:46 +0200)]
Bug 1818: Do not relly on xml.isNameSpaceRepairing
Last code path which indirectly relied on name space
repairing was write out of writeStartElement.
This was converted to look into parent namespace
and writeStartElement and writeDefaultNamespace
when namespace change.
Change-Id: I511436e9eab98e0c35eb100dfe0627cd5edd53b6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 11 Sep 2014 11:53:45 +0000 (13:53 +0200)]
Bug 1761: Fixed missing module name prefix for augmentations.
Migration to more state tracking introduced regression
where module name prefix was left out for containers
and lists which were augmented, which was inconsistent
with case augmentations, which were serialized properly.
Draft draft-lhotka-netmod-yang-json-02 allows previous
behaviour (without module names for augmented items),
but that may cause changing textual representation
after conflicting augmentation is introduced,
so we opted to always report module name for top level
items of augmentation, which is also allowed from spec.
Change-Id: Icbb1b2aeed1a154a06e7f90f0dacc199a7df6bcc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 12 Sep 2014 14:59:13 +0000 (14:59 +0000)]
Merge "BUG-1770: emit proper namespaces"
Tony Tkacik [Fri, 12 Sep 2014 13:58:03 +0000 (13:58 +0000)]
Merge "Bug 1817 - Add in ietf-restonf to the yangtools-models feature."
Robert Varga [Tue, 9 Sep 2014 13:47:11 +0000 (15:47 +0200)]
BUG-1770: emit proper namespaces
We add calls to setPrefix() and only use the calls with explicit
namespace prefix to emit elements.
Change-Id: Ib603567b3080388c6016ece5e34cac6a723ef8c0
Signed-off-by: Robert Varga <rovarga@cisco.com>