yangtools.git
10 years agoBUG-981: remove use of deprecated getPath() 59/6859/1
Robert Varga [Sat, 10 May 2014 14:27:42 +0000 (16:27 +0200)]
BUG-981: remove use of deprecated getPath()

Here we're only iterating through, so there's no need to get the
Collection.

Change-Id: I32f9005dafc8df8ae059bb5da2c6d57132749219
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-893: improve ClassLoaderUtils safety 58/6858/2
Robert Varga [Sat, 10 May 2014 14:00:17 +0000 (16:00 +0200)]
BUG-893: improve ClassLoaderUtils safety

There is a slight possiblity for
ClassLoaderUtils.withClassLoaderAndLock() to not release the lock. Fix
this by refactoring it properly and letting users pick which flavor of
the method they want to use.

Change-Id: I07edd05323d26bfdf6800fbcd28ad9c150599a74
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-893: do not use deprecated contructor 57/6857/1
Robert Varga [Sat, 10 May 2014 13:50:03 +0000 (15:50 +0200)]
BUG-893: do not use deprecated contructor

This gets rid of using JavassistUtils' deprecated contructor. It also
removes storage of ClassPool, so it makes it easier to reason about it.

Change-Id: I2deb15e7ce85527bdfb7fb79ae46bb5d25466ca2
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-983: remove the use of xtend Conversions 51/6851/1
Robert Varga [Sat, 10 May 2014 10:27:14 +0000 (12:27 +0200)]
BUG-983: remove the use of xtend Conversions

This removes the last remnant of xtend for this codebase. As it turns
out, it make the code much more efficient, too.

Change-Id: Ie6f67ae308075c9af79a2a849309002d501dc646
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-983: prepare for proper wrapping 50/6850/1
Robert Varga [Sat, 10 May 2014 10:04:17 +0000 (12:04 +0200)]
BUG-983: prepare for proper wrapping

This patch introduces a factory method to get instances, such that there
only ever is a single instance for a particular class pool. This fixes
the potential issue of adding a class path multiple times.

Change-Id: Ia8ff47674b768bd85ae50200734b8f14927f8a5c
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-983: convert sneakyThrow into checked exception 49/6849/1
Robert Varga [Sat, 10 May 2014 09:45:08 +0000 (11:45 +0200)]
BUG-983: convert sneakyThrow into checked exception

This documents the type of exceptions the utility classes can throw.

Change-Id: I98433a4650872d2c0c379ab2784cb25f97da7757
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-893: fix loaderClassPaths safety 48/6848/1
Robert Varga [Sat, 10 May 2014 09:29:28 +0000 (11:29 +0200)]
BUG-893: fix loaderClassPaths safety

This fixes thread safety of loaderClassPaths, as there was a
TOCTOU error. Furthermore this actually populates the map, such that we
do not continue to add classloaders.

Drive-bys include final keywords and cleanup on utility classes.

Change-Id: I3c96a4e98b242d34d7036bcb81f71f36ff88223c
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-981: harden exception handling 47/6847/1
Robert Varga [Sat, 10 May 2014 09:00:38 +0000 (11:00 +0200)]
BUG-981: harden exception handling

This patch hardens the RuntimeGeneratedMappingServiceImpl error handling
by eliminating the use of sneakyThrow and properly chaining/logging
error causes.

Change-Id: Ia974c8cce3aab8c0f12dd318e4168932a025bb07
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoRevert "Add ietf-inet-types@2013-07-15 and ietf-yang-types@2013-07-15. Rename" 13/6813/1
Robert Varga [Thu, 8 May 2014 09:38:22 +0000 (11:38 +0200)]
Revert "Add ietf-inet-types@2013-07-15 and ietf-yang-types@2013-07-15.  Rename"

This reverts commit a0862137aa3baf9c47ff54a3ca81dfff846baef4. The reason
is incomplete patch, which is missing key features. It also breaks
upstram (controller) build.

Change-Id: I0d4f0dc089cc7afd324dace1386cc88234480401
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Add ietf-inet-types@2013-07-15 and ietf-yang-types@2013-07-15. Rename older...
Jan Medved [Thu, 8 May 2014 04:14:12 +0000 (04:14 +0000)]
Merge "Add ietf-inet-types@2013-07-15 and ietf-yang-types@2013-07-15.  Rename older versions as ietf-inet-types@2010-09-24.yang and ietf-yang-types@2010-09-24.yang."

10 years agoBUG-970: Fix bug in BindingMapping.getClassName. 81/6781/3
Martin Vitez [Wed, 7 May 2014 10:37:42 +0000 (12:37 +0200)]
BUG-970: Fix bug in BindingMapping.getClassName.

Numeric class name prefix was not handled.

Change-Id: I88bc2d6324e87b7837f1c04abda53b1cb3b73f62
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoMerge "BUG-592: Introduce InstanceIdentifier.relativeTo()"
Tony Tkacik [Wed, 7 May 2014 12:24:25 +0000 (12:24 +0000)]
Merge "BUG-592: Introduce InstanceIdentifier.relativeTo()"

10 years agoBUG-731: do not throw declared Exception 77/6777/2
Robert Varga [Wed, 7 May 2014 08:54:36 +0000 (10:54 +0200)]
BUG-731: do not throw declared Exception

Change-Id: Icbd9e700873702bcf3a8acfd066820263dd9f2ff
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-731: do not use raw exceptions"
Tony Tkacik [Wed, 7 May 2014 11:08:40 +0000 (11:08 +0000)]
Merge "BUG-731: do not use raw exceptions"

10 years agoMerge "BUG-731: remove empty while() loop"
Tony Tkacik [Wed, 7 May 2014 11:08:32 +0000 (11:08 +0000)]
Merge "BUG-731: remove empty while() loop"

10 years agoMerge "BUG-731: remove unused methods"
Tony Tkacik [Wed, 7 May 2014 11:08:23 +0000 (11:08 +0000)]
Merge "BUG-731: remove unused methods"

10 years agoBUG-592: Introduce InstanceIdentifier.relativeTo() 37/6037/5
Robert Varga [Thu, 10 Apr 2014 21:32:03 +0000 (23:32 +0200)]
BUG-592: Introduce InstanceIdentifier.relativeTo()

This centralizes another useful utility method.

Change-Id: Ifbc1dbb08150ff1d9805f27bad3416b5f1afece0
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-731: do not use raw exceptions 76/6776/1
Robert Varga [Wed, 7 May 2014 08:43:53 +0000 (10:43 +0200)]
BUG-731: do not use raw exceptions

Instead of throwing Exception, but use Preconditions. Also remove
declaration of Exception being thrown, and throw concrete exceptions.

Change-Id: I861e7c6d93080ba01ef9474ccd9dbf1b443f9e2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-731: remove empty while() loop 75/6775/1
Robert Varga [Wed, 7 May 2014 08:29:36 +0000 (10:29 +0200)]
BUG-731: remove empty while() loop

This loop is completely unused, as it just busy-waits on the same
condition, which is implied by Future.get().

Also fix generic parameter naming clash while we're here.

Change-Id: I9b43e9db7b018459ddf925369ac7fa323f0173e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge changes I412fb3fc,Iccef8d2e
Tony Tkacik [Wed, 7 May 2014 08:35:22 +0000 (08:35 +0000)]
Merge changes I412fb3fc,Iccef8d2e

* changes:
  BUG-592: introduce InstanceIdentifier.child()
  BUG-592: Format BI InstanceIdentifier

10 years agoBUG-731: remove unused methods 74/6774/1
Robert Varga [Wed, 7 May 2014 08:23:50 +0000 (10:23 +0200)]
BUG-731: remove unused methods

This removes unused private contructor and superfluous equals() methods.

Change-Id: I3bf31ebfbce92c55a04491d88229a7d1d469c073
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoAdd ietf-inet-types@2013-07-15 and ietf-yang-types@2013-07-15. Rename 57/6757/1
Rob Adams [Tue, 6 May 2014 21:20:07 +0000 (14:20 -0700)]
Add ietf-inet-types@2013-07-15 and ietf-yang-types@2013-07-15.  Rename
older versions as ietf-inet-types@2010-09-24.yang and
ietf-yang-types@2010-09-24.yang.

Change-Id: I1df03675f6796440c71ad4ab41b0e04a20f5a716
Signed-off-by: Rob Adams <readams@readams.net>
10 years agoBUG-832 Fix deserialization of identity-ref leaves 24/6624/2
Maros Marsalek [Wed, 30 Apr 2014 13:00:02 +0000 (15:00 +0200)]
BUG-832 Fix deserialization of identity-ref leaves

Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoBUG-832 Fix deserialization of Empty type leaves. 21/6621/3
Maros Marsalek [Wed, 30 Apr 2014 11:29:09 +0000 (13:29 +0200)]
BUG-832 Fix deserialization of Empty type leaves.

Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Change-Id: I4474f6790a7c17b9f3a0b5fb54a9fdc93dc0e72c

10 years agoBUG-114: added artifact version check in yang-maven-plugin. 24/6724/2
Martin Vitez [Wed, 30 Apr 2014 09:35:14 +0000 (11:35 +0200)]
BUG-114: added artifact version check in yang-maven-plugin.

This patch bypasses use of maven aether due to version incompatibility between maven 3.0.x and 3.1.x.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
Change-Id: If1c09a59353ef32a320131f7cbdbe92aa66acae2

10 years agoAdd a feature directory for yangtools that could support karaf 63/6663/6
Ed Warnicke [Fri, 2 May 2014 18:45:12 +0000 (13:45 -0500)]
Add a feature directory for yangtools that could support karaf

Many thanks to Heath Kesler <heath@gmail.com> who did most of the real
work :)

Change-Id: Idae8bdd6c96477a0ecd186269247eefcca40a764
Signed-off-by: Ed Warnicke <eaw@cisco.com>
10 years agoBUG-592: introduce InstanceIdentifier.child() 36/6036/4
Robert Varga [Thu, 10 Apr 2014 20:52:15 +0000 (22:52 +0200)]
BUG-592: introduce InstanceIdentifier.child()

These methods return an immediate descendant of the base identifier.
It turns out these utility methods are open-coded on quite a few places.

Change-Id: I412fb3fcdf538a71fca1d4cb180ac4bc2a9eaeb1
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-592: Format BI InstanceIdentifier 34/6034/2
Robert Varga [Wed, 30 Apr 2014 15:55:59 +0000 (17:55 +0200)]
BUG-592: Format BI InstanceIdentifier

This is the initial commit which formats the file, adding final keywords
and fixing missing braces, etc. No functional change is made.

Change-Id: Iccef8d2e7d80621ecd7fb077202eb19ecf09727b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG 274 nicer formating of output error message 59/6359/2
Jozef Gloncak [Thu, 24 Apr 2014 14:05:21 +0000 (16:05 +0200)]
BUG 274 nicer formating of output error message

Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoRevert "Fix for Bug 114." 10/6610/1
Martin Vitez [Wed, 30 Apr 2014 07:14:51 +0000 (09:14 +0200)]
Revert "Fix for Bug 114."

This reverts commit 47538f5568578658ba89f62281a46bab28e81974.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoBug 527: fixed augment deserialization from xml. 01/6001/16
Martin Vitez [Thu, 3 Apr 2014 11:07:04 +0000 (13:07 +0200)]
Bug 527: fixed augment deserialization from xml.

Refactored deserialization process to work with augment target node InstanceIdentifier.
Codec for augmentation binded to augment target node InstanceIdentifier.
Added method isAcceptable to AugmentationCodec.
Added new interface AugmentableCodec.
Updated tests.

Change-Id: I8d83e21183b8dd55e197f3d0ad1efc68c962c842
Signed-off-by: Martin Vitez <mvitez@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoFix for Bug 114. 87/5287/12
Martin Vitez [Wed, 12 Feb 2014 13:46:16 +0000 (14:46 +0100)]
Fix for Bug 114.

Added check for artifact versions pulled by project against ones declared in plugin dependencies.

Change-Id: Ib7663eaa775fa6799ae11a3132fbd7ca080cb0e7
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoBUG-592: Migrate users to new build() method 87/5787/4
Robert Varga [Wed, 26 Mar 2014 20:38:08 +0000 (21:38 +0100)]
BUG-592: Migrate users to new build() method

The static builder method is deprecated, move users off of it.

Change-Id: I2b6758c13e2eb4c6357b97f37de327594a1a7faf
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-592: Optimize equals() a bit 86/5786/4
Robert Varga [Wed, 26 Mar 2014 18:50:06 +0000 (19:50 +0100)]
BUG-592: Optimize equals() a bit

This commit optimizes the equals() method by attempting to bypass the
full check of iterables by looking at cached state that is derived from
them.

Change-Id: I10b6e7164874992ae0dc041cffd934d292e61694
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-592: Rework instance identifier"
Tony Tkacik [Wed, 23 Apr 2014 08:04:32 +0000 (08:04 +0000)]
Merge "BUG-592: Rework instance identifier"

10 years agoBug 808: Added representation for unordered and ordered lists. 10/6310/1
Tony Tkacik [Tue, 22 Apr 2014 12:52:49 +0000 (14:52 +0200)]
Bug 808: Added representation for unordered and ordered lists.

Change-Id: I9d86a3a137f589c4538b1e101a7bcb7ea4104fbc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBUG-592: Rework instance identifier 78/5778/6
Robert Varga [Wed, 26 Mar 2014 14:18:50 +0000 (15:18 +0100)]
BUG-592: Rework instance identifier

This patch reworks the way InstanceIdentifier is implemented, gearing it
up for performance.

The entire implementation is based on Iterables instead of Lists, which
allows us to avoid copying them over and over as we construct new
identifiers. Simple .child() operation is a lot quicker, saving
instantiation of two intermediate classes.

The implementation gets rid of constructors, such that there is no
direct construction, but rather all paths are validated for content.
This also acts as a gate-keeper, enforcing the immutable nature of the
identifier.

Another optimization is that the hashCode() value is now built
incrementally as more members are added and cached.

InstanceIdentifierBuilder, now a full class, does not explictly copy the
base identifier, but reuses it -- there is no reason not to, as the base
identifier is immutable.

Change-Id: I0826ed3169a107c8f4b6e3026569e87387305ce0
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Bug 735 - Part 1 - add ietf-restconf.yang back into yang-tools."
Tony Tkacik [Wed, 16 Apr 2014 13:23:00 +0000 (13:23 +0000)]
Merge "Bug 735 - Part 1 - add ietf-restconf.yang back into yang-tools."

10 years agoMerge "Bug 595 - Failed to maps instance-identifier (XML node) into Java InstanceIden...
Tony Tkacik [Wed, 16 Apr 2014 07:22:53 +0000 (07:22 +0000)]
Merge "Bug 595 - Failed to maps instance-identifier (XML node) into Java InstanceIdentifier"

10 years agoBug:700 Mapped description from the yang file to the generated java file 21/6221/1
Debolina Bandyopadhyay [Tue, 15 Apr 2014 22:55:58 +0000 (15:55 -0700)]
Bug:700 Mapped description from the yang file to the generated java file

Change-Id: I732d7d4b2c708295ec1358994b4078d35de1769b
Signed-off-by: Debolina Bandyopadhyay <dbandyop@cisco.com>
10 years agoBug 595 - Failed to maps instance-identifier (XML node) into Java InstanceIdentifier 92/6192/4
Jozef Gloncak [Thu, 10 Apr 2014 07:24:12 +0000 (09:24 +0200)]
Bug 595 - Failed to maps instance-identifier (XML node) into Java InstanceIdentifier

The case for instance identifier was added to
XmlDocumentUtils.toSimpleNodeWithType() method. If according to schema XML
element is InstanceIdentifier then it is attempted to deserialize as
InstanceIdentifier via specific codec - InstanceIdentifierForXmlCodec.
Deserialize method acceot as input parameter Element and Schema context.
Serialize method accept as input parameter InstanceIdentifier and Element.

Change-Id: I27b91e98479dfb4b0134294b5f3e608a8bf8ad4d
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoBug 735 - Part 1 - add ietf-restconf.yang back into yang-tools. 82/6182/3
Devin Avery [Mon, 14 Apr 2014 18:45:54 +0000 (14:45 -0400)]
Bug 735 - Part 1 - add ietf-restconf.yang back into yang-tools.

Added a bundle into yang-tools to ship the ietf-restconf.yang yang file, required by MD-SAL.

NOTE: We are adding the first draft (00) of the ietf-restconf.yang so we
dont have to upgrade all of the other core yang files. It appears that
ietf-yang-types would need to be upgraded as well if we went with the
latest ietf releases. That should happen, but as part of an intention
upgrade to all ietf core.

Note: Gerrit DRAFT https://git.opendaylight.org/gerrit/#/c/6185 provideds
the fixes to the controller project to resolve the issue with the restconf
/modules endpoint, but we can not push that one forward until the yangtools
(this CS) is pushed to master because of dependencies.

Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoBUG-457 Fix TODOs and FIXMEs in yang-data-impl schema package. 00/5800/6
Maros Marsalek [Fri, 28 Mar 2014 13:08:08 +0000 (14:08 +0100)]
BUG-457 Fix TODOs and FIXMEs in yang-data-impl schema package.

Also add custom exceptions for data validation.

Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Change-Id: I59f3a85a7b7796b0276b49cd02226299fbea2271

10 years agoBug 613: Minimize use of xtend in binding-generator-impl. 38/5838/4
Martin Vitez [Tue, 1 Apr 2014 08:20:39 +0000 (10:20 +0200)]
Bug 613: Minimize use of xtend in binding-generator-impl.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoMerge changes Iaac9f7e2,I9c336a30
Tony Tkacik [Tue, 8 Apr 2014 11:44:55 +0000 (11:44 +0000)]
Merge changes Iaac9f7e2,I9c336a30

* changes:
  Fix for Bug 364.
  Fix for Bug 394.

10 years agoMerge "Bug 447 - Yang documentation generator improvements"
Tony Tkacik [Tue, 8 Apr 2014 09:53:38 +0000 (09:53 +0000)]
Merge "Bug 447 - Yang documentation generator improvements"

10 years agoMerge "Fix for Bug 586."
Tony Tkacik [Tue, 8 Apr 2014 09:51:29 +0000 (09:51 +0000)]
Merge "Fix for Bug 586."

10 years agoBUG-648: expose copy builders 49/5949/1
Robert Varga [Fri, 4 Apr 2014 11:42:58 +0000 (13:42 +0200)]
BUG-648: expose copy builders

This patch exposes the ability to have builders pre-seeded from existing
nodes. Also adds the ability to remove children, such that the users can
be simplified.

The end result of this patch is to be able to completely elide copying
data when it's not necessary, e.g. the implementations can choose to
switch to a persistent data structure and optimize the copy away.

Change-Id: I37d3540038bf2cbde8fb4ab456e9eb03f18a66f6
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-692: Rename mappedChildren to children 73/5873/7
Robert Varga [Wed, 2 Apr 2014 16:24:31 +0000 (18:24 +0200)]
BUG-692: Rename mappedChildren to children

This clarifies the relationship of children/mappedChildren.

Change-Id: Iebbe739902d2c5356ecf0abc8cadd2bb462b6473
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-648: Provide framework for eliding copying builder maps 72/5872/7
Robert Varga [Wed, 2 Apr 2014 15:49:34 +0000 (17:49 +0200)]
BUG-648: Provide framework for eliding copying builder maps

This patch introduces builder-side safeguards which will cause the
builder take the copying hit after the target object was built. This is
an improbable operation, as most builders are forgotten after single
use.

Also make use of that knowledge and do not instantiate ImmutableMaps in
the nodes.

Change-Id: I98ef73f04a1f85c7355388eaaaafc99143b396f3
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-648: Fixup hashCode/equals 71/5871/6
Robert Varga [Wed, 2 Apr 2014 20:15:56 +0000 (22:15 +0200)]
BUG-648: Fixup hashCode/equals

The baseline hashCode/equals implementation relied on the copied maps
for correctness. Iterable<?> in and of itself does not really have a
equals contract, so let's reimplement it and make it very explicit.

This patch is required for getting rid of the copied maps without
breaking users.

Change-Id: I2fcd2bc8775b60cf89bf03a5679f97a266cf1c1e
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-576: Fix concepts description"
Tony Tkacik [Mon, 7 Apr 2014 11:25:58 +0000 (11:25 +0000)]
Merge "BUG-576: Fix concepts description"

10 years agoMerge "BUG-648: Document AttributesBuilder expectation"
Tony Tkacik [Mon, 7 Apr 2014 07:34:50 +0000 (07:34 +0000)]
Merge "BUG-648: Document AttributesBuilder expectation"

10 years agoBug 447 - Yang documentation generator improvements 94/5894/2
Milos Fabian [Thu, 3 Apr 2014 14:29:11 +0000 (16:29 +0200)]
Bug 447 - Yang documentation generator improvements

-added summaries at the top of page + linked localy
-added nested child nodes of grouping and augmentation nodes
-added local links between type definitions and their users
-minor fixes

Change-Id: I573f4ee257e66c140e52327534e840801f7b3c5f
Signed-off-by: Milos Fabian <milfabia@cisco.com>
10 years agoMerge "Bug 631: made QName Comparable."
Robert Varga [Wed, 2 Apr 2014 22:19:21 +0000 (22:19 +0000)]
Merge "Bug 631: made QName Comparable."

10 years agoBUG-648: Document AttributesBuilder expectation 70/5870/2
Robert Varga [Wed, 2 Apr 2014 13:44:47 +0000 (15:44 +0200)]
BUG-648: Document AttributesBuilder expectation

This patch just clarifies the expectation that the attributes map does
not change once it is passed in.

Change-Id: Ifd22f5cad85d97cd6bc8f408ad22ac634ed6df16
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoFix concurrent verify jobs 74/5874/1
Robert Varga [Wed, 2 Apr 2014 18:46:03 +0000 (20:46 +0200)]
Fix concurrent verify jobs

This uses URI instead of String to costruct paths, restoring
testability. Also fix a pom.xml warning while we're in the neighborhood.

Change-Id: I8df7573782b43326869e274e95720daf9d528e80
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-576: Fix concepts description 68/5868/1
Robert Varga [Wed, 2 Apr 2014 09:14:52 +0000 (11:14 +0200)]
BUG-576: Fix concepts description

Fixes a copy-n-pasted description.

Change-Id: I8f3c92af7329f16e12d8201242ce8c4978a30de2
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBug 631: made QName Comparable. 61/5861/3
Martin Vitez [Wed, 2 Apr 2014 08:08:43 +0000 (10:08 +0200)]
Bug 631: made QName Comparable.

Added test.

Change-Id: I1967ae3f2d188ed1dc6533a342219de1a6ac31b1
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoFix build failure in yang-data-operations. Add yang-parser-impl test dependency 59/5859/1
Maros Marsalek [Wed, 2 Apr 2014 07:55:02 +0000 (09:55 +0200)]
Fix build failure in yang-data-operations. Add yang-parser-impl test dependency

Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoMerge "Implement edit-config operations for NormalizedNode yang-data-api"
Tony Tkacik [Wed, 2 Apr 2014 07:24:41 +0000 (07:24 +0000)]
Merge "Implement edit-config operations for NormalizedNode yang-data-api"

10 years agoMerge "Remove executable bit"
Tony Tkacik [Mon, 31 Mar 2014 07:32:31 +0000 (07:32 +0000)]
Merge "Remove executable bit"

10 years agoMerge changes I16a5683b,I6081dc12
Tony Tkacik [Mon, 31 Mar 2014 07:31:58 +0000 (07:31 +0000)]
Merge changes I16a5683b,I6081dc12

* changes:
  Add guava-based object cache
  Introduce Object Cache API and no-op implementation

10 years agoCleanup run-time dependencies 16/5816/1
Robert Varga [Sun, 30 Mar 2014 10:56:19 +0000 (12:56 +0200)]
Cleanup run-time dependencies

We should not depend on yang-parser-impl, but rather the model-api/util
packages. The yang-parser-impl dependency has only test scope.

Change-Id: I223bfd831e8ee77757a83f6f532c67a8374f9e7c
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoRemove executable bit 10/5810/1
Robert Varga [Fri, 28 Mar 2014 12:33:10 +0000 (13:33 +0100)]
Remove executable bit

Change-Id: I521733f08a74d2f868d357c577e14c4d3c69c13c
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoFix for Bug 586. 03/5803/2
Martin Vitez [Fri, 28 Mar 2014 14:56:36 +0000 (15:56 +0100)]
Fix for Bug 586.

Fixed generation of list key properties.
Updated test.

Change-Id: Icfe7e1fa6a5bfb3c8c2b4bedf808e5fbae797359
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoImplement edit-config operations for NormalizedNode yang-data-api 70/5670/19
Maros Marsalek [Wed, 19 Mar 2014 08:54:15 +0000 (09:54 +0100)]
Implement edit-config operations for NormalizedNode yang-data-api

Placed in a new module yang-data-operations

Supported operations: all defined in http://tools.ietf.org/html/rfc6241
Multiple positive and negative test cases added. Testing yang schema can be found under src/test/resources

Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Change-Id: I897c6479cf14e7073a6fb954565cfe2b376a6c40

10 years agoFix for Bug 527. 51/5751/2
Martin Vitez [Mon, 24 Mar 2014 09:23:28 +0000 (10:23 +0100)]
Fix for Bug 527.

Fixed codec loading for choice case nodes.
Fixed bug in parser when handling uses/augment target path.
Helper methods from BindingGeneratorImpl moved to SchemaContextUtil class.
Added test.

Change-Id: Id1b835150cdad2c278bd9c125d5369822b75639a
Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoFix for Bug 588. 92/5792/1
Martin Vitez [Thu, 27 Mar 2014 10:22:42 +0000 (11:22 +0100)]
Fix for Bug 588.

Removed xtend dependency from yang-model-util.
Reworked SchemaContextUtil from xtend to java.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoMerge "Fix for Bug 589."
Robert Varga [Wed, 26 Mar 2014 16:22:48 +0000 (16:22 +0000)]
Merge "Fix for Bug 589."

10 years agoBug 525 : Document the InstanceIdentifier API 67/5767/2
Moiz Raja [Wed, 26 Mar 2014 00:50:07 +0000 (17:50 -0700)]
Bug 525 : Document the InstanceIdentifier API

Change-Id: If42682fe4dfd715d95f5f081eae8027836f316e0
Signed-off-by: Moiz Raja <moraja@cisco.com>
10 years agoFix of failing tests in yang-data-json 75/5775/2
Jozef Gloncak [Wed, 26 Mar 2014 14:36:07 +0000 (15:36 +0100)]
Fix of failing tests in yang-data-json

Method loadModules in TestUtils was changed to accept URI type input parameter
instead String type.

Change-Id: I27edf31788880d50cdca8deba754bcffd14da0b8
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoFix for Bug 589. 70/5770/1
Martin Vitez [Wed, 26 Mar 2014 08:47:43 +0000 (09:47 +0100)]
Fix for Bug 589.

Removed xtend dependency from yang-parser-impl.
Rewrited ParserUtils from xtend to java.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoMerge "Remove unused code from Immutables"
Tony Tkacik [Tue, 25 Mar 2014 20:55:43 +0000 (20:55 +0000)]
Merge "Remove unused code from Immutables"

10 years agoMerge "Parsing and serialization of composite and simple node to normalized nodes"
Robert Varga [Tue, 25 Mar 2014 11:21:21 +0000 (11:21 +0000)]
Merge "Parsing and serialization of composite and simple node to normalized nodes"

10 years agoParsing and serialization of composite and simple node to normalized nodes 58/5658/9
Jozef Gloncak [Fri, 21 Mar 2014 08:58:00 +0000 (09:58 +0100)]
Parsing and serialization of composite and simple node to normalized nodes

Added implementation of base classes from yang-data-impl artifact for
serializer and for parser
+ simple test

Change-Id: Ic7353e1be7ef6e00546595304c23b205f7580cee
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoUse a random port in test server 03/5703/2
David K. Bainbridge [Wed, 19 Mar 2014 18:04:51 +0000 (11:04 -0700)]
Use a random port in test server

This patch updates the test server to bind to a random port number and expose
this port number via a Future can be fetched by the test client so that it
knows to which port to connect.

Version 2:
Modified the code to use the guava SettableFuture as opposed to a custom built
future, as well as cleaned up a few other things, including makding sure that
the message was received from the server before considering the test passed.
was seeing different behavior on different platforms without this (i.e. some
times the message was display, sometimes not). Also, failed the test case wh
exceptions were caught.

Change-Id: Ia11c374bfbf206a6214d2afe3ba328b1231d6fad
Signed-off-by: David K. Bainbridge <dbainbri@ciena.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoRemove unused code from Immutables 89/5689/4
Robert Varga [Wed, 19 Mar 2014 16:35:16 +0000 (17:35 +0100)]
Remove unused code from Immutables

Change-Id: Ied0ba65a6ded0cb8d9ebfd57d3af7d87a355629b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoAdd guava-based object cache 33/5733/4
Robert Varga [Mon, 24 Mar 2014 19:41:01 +0000 (20:41 +0100)]
Add guava-based object cache

This object cache is bound by the garbage collector, as it uses soft
references internally. It can be grown later to implement a caching
policies based on object type.

Change-Id: I16a5683bdc587dd5fe7a3c9c8e1e5a14cb85d09b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoIntroduce Object Cache API and no-op implementation 32/5732/4
Robert Varga [Mon, 24 Mar 2014 19:32:00 +0000 (20:32 +0100)]
Introduce Object Cache API and no-op implementation

This introduces a statically-bound cache for objets. This is primarily
useful for implementing CPU/memory tradeoffs for limiting duplicate
instances of common objects.

Change-Id: I6081dc121c8cc3defd029fe4da1e29fdabea68d0
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Global cleanup of restconf client dependencies"
Tony Tkacik [Tue, 25 Mar 2014 05:17:50 +0000 (05:17 +0000)]
Merge "Global cleanup of restconf client dependencies"

10 years agoMerge "Bump javax.ws.rs-api version to 2.0"
Tony Tkacik [Tue, 25 Mar 2014 05:17:32 +0000 (05:17 +0000)]
Merge "Bump javax.ws.rs-api version to 2.0"

10 years agoMerge "Remove needless references to xtend library"
Tony Tkacik [Tue, 25 Mar 2014 05:17:09 +0000 (05:17 +0000)]
Merge "Remove needless references to xtend library"

10 years agoMerge "Do not depend on jersey-client"
Tony Tkacik [Tue, 25 Mar 2014 05:16:47 +0000 (05:16 +0000)]
Merge "Do not depend on jersey-client"

10 years agoMerge "Update interface to hide Dispatcher"
Tony Tkacik [Tue, 25 Mar 2014 05:15:35 +0000 (05:15 +0000)]
Merge "Update interface to hide Dispatcher"

10 years agoMerge "Introduce the concept of ProductAwareBuilder"
Tony Tkacik [Tue, 25 Mar 2014 05:08:42 +0000 (05:08 +0000)]
Merge "Introduce the concept of ProductAwareBuilder"

10 years agoMerge "Introduce common directory"
Tony Tkacik [Tue, 25 Mar 2014 05:07:43 +0000 (05:07 +0000)]
Merge "Introduce common directory"

10 years agoGlobal cleanup of restconf client dependencies 48/5748/1
Robert Varga [Tue, 25 Mar 2014 01:54:55 +0000 (02:54 +0100)]
Global cleanup of restconf client dependencies

Change-Id: I4f94360010fa068f2e77a51f112218da6bb366fe
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBump javax.ws.rs-api version to 2.0 47/5747/1
Robert Varga [Tue, 25 Mar 2014 00:55:56 +0000 (01:55 +0100)]
Bump javax.ws.rs-api version to 2.0

Change-Id: Iff730e66741f4824092690bdc0cdf8299ec344ce
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoRemove needless references to xtend library 46/5746/1
Robert Varga [Tue, 25 Mar 2014 02:13:07 +0000 (03:13 +0100)]
Remove needless references to xtend library

There is simply no need to use the xtend runtime library. Let's simply
write clean code.

Change-Id: Id6ab24f701612ecc2be4408d62f7ee3b99d732e9
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoDo not depend on jersey-client 45/5745/1
Robert Varga [Tue, 25 Mar 2014 00:41:39 +0000 (01:41 +0100)]
Do not depend on jersey-client

JAX-RS annotations do not require full-blown client, so import only the
API bundle.

Change-Id: I12918068ac6b67d1279c73ee3060d47861c45bfe
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoIntroduce the concept of ProductAwareBuilder 31/5731/1
Robert Varga [Mon, 24 Mar 2014 19:28:23 +0000 (20:28 +0100)]
Introduce the concept of ProductAwareBuilder

A ProductAwareBuilder is an builder which can act as a proxy
for its product in collections (obviously provided it is not
mutated while its used this way).

This functionality is useful for implemeting caches, where
the toInstance() call can be skipped as long as there is an
existing equal object.

Change-Id: I24c98dcb41491ba6265b373c34667e2a0ddfed86
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoIntroduce common directory 30/5730/1
Robert Varga [Sun, 23 Mar 2014 09:38:55 +0000 (10:38 +0100)]
Introduce common directory

This directory will host code common to the various submodules, some of
which are candidates from moving into an upstream repository.

Populate this directory with concepts and mockito-configuration, thus
making sure the top-level POM has no direct code children.

Change-Id: Id7ac3aa68886841f408f047d05c740a563d8f957
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoAnother set of warning fixes 81/5681/2
Robert Varga [Wed, 19 Mar 2014 15:46:08 +0000 (16:46 +0100)]
Another set of warning fixes

Change-Id: Ic2bd07eb6490174e7f6a8808652dabeec122866c
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoUpdate interface to hide Dispatcher 11/5711/1
Robert Varga [Fri, 21 Mar 2014 16:56:57 +0000 (17:56 +0100)]
Update interface to hide Dispatcher

Dispatcher is really an internal implementation thing. Expose a parser
factory instead.

Change-Id: I1a597d3c4417dd09b8f7fcce0785b0eb5a8a3856
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoAdd attributes to nodes that can take attributes 10/5610/19
Maros Marsalek [Wed, 19 Mar 2014 13:03:57 +0000 (14:03 +0100)]
Add attributes to nodes that can take attributes

The following types of nodes seem to be able to accept attributes,
- LeafNode
- ContainerNode
- LeafSetEntryNode
- MapEntryNode

Also added parsing of Attributes

Change-Id: I524efde134e06d5b30a68379c8abdb65bba60cb2
Signed-off-by: Moiz Raja <moraja@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoAbstract infrastructure for normalized nodes translation. 94/5594/23
Maros Marsalek [Wed, 19 Mar 2014 10:31:56 +0000 (11:31 +0100)]
Abstract infrastructure for normalized nodes translation.

With implementation for dom <-> normalized nodes.

Change-Id: Ic2c08d2955177bc335d6493d64076a77d2cc7d62
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Ladislav Borak <lborak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoFix for Bug 364. 53/5553/3
Martin Vitez [Thu, 6 Mar 2014 11:19:13 +0000 (12:19 +0100)]
Fix for Bug 364.

Fixed parsing of config statement:

Modified DataSchemaNodeBuilder:
- changed isConfiguration return type from Boolean to boolean
- changed setConfiguration parameter return type from Boolean to boolean
Updated YangParserListenerImpl and DataSchemaNodeBuilder implementations.
Fixed bug in ContainerSchemaNodeBuilder.build() method.
Fixed bug in GroupingBuilderImpl.

Signed-off-by: Martin Vitez <mvitez@cisco.com>
10 years agoMerge "Fixed possible NPE in CodecMapping."
Robert Varga [Wed, 19 Mar 2014 11:49:07 +0000 (11:49 +0000)]
Merge "Fixed possible NPE in CodecMapping."

10 years agoAdded NormalizedNodeContainerBuilder and helpers. 46/5646/5
Tony Tkacik [Tue, 18 Mar 2014 17:06:26 +0000 (18:06 +0100)]
Added NormalizedNodeContainerBuilder and helpers.

   - NormalizedNodeContainerBuilder is common root
     to builders which produces NormalizedNodeContainer,
     this allows to write more generic code using builders.

   - NormalizedNodeUtils - provides helper functions to process
     normalized date tree, such as findNode which look up
     subtree based on provided InstanceIdentifier.

   - Added Immutable marker interface to existing builders.

Change-Id: Id842742432c48d76cdf78dab40352af27e10360f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>