mdsal.git
10 years agoBUG-620: replace xtend version of classes with Java versions
Robert Varga [Tue, 20 May 2014 23:08:23 +0000 (16:08 -0700)]
BUG-620: replace xtend version of classes with Java versions

replace xtend versions of classes with java versions where the java was
generated by hand based on the source of the xtend file as well as leveraging
the code generated from the xtend source

Change-Id: I36a3a61608710543f66c36f7d5179cf976257953
Signed-off-by: David K. Bainbridge <dbainbri.ciena@gmail.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge changes I7c36c88e,I7c5d97c7
Tony Tkacik [Mon, 26 May 2014 19:30:58 +0000 (19:30 +0000)]
Merge changes I7c36c88e,I7c5d97c7

* changes:
  BUG-1070: make BundleContext required
  BUG-1070: allow for URL registration failing

10 years agoBUG-1070: make BundleContext required
Robert Varga [Mon, 26 May 2014 08:05:40 +0000 (10:05 +0200)]
BUG-1070: make BundleContext required

It does not make sense to instantiated
GlobalBundleScanningSchemaServiceImpl without a bundlecontext, so let's
make it required in the constructor, making interactions more clear.

Change-Id: I7c36c88e2e26163e0ef41480ea8f5d1d79353e5f
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-1070: allow for URL registration failing
Robert Varga [Mon, 26 May 2014 07:56:15 +0000 (09:56 +0200)]
BUG-1070: allow for URL registration failing

As part of the error reporting effor, the API contract will change, such
that the URLs can get parsed during registration, potentially throwing a
checked exception. This adds the preparatory groundwork and optimized
the codepath, as it's called repeatedly during controller startup.

Change-Id: I7c5d97c7be6cc488f8b61a99d8e27804ce24e523
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge changes Ieef23a07,I8057763e
Tony Tkacik [Fri, 23 May 2014 15:02:57 +0000 (15:02 +0000)]
Merge changes Ieef23a07,I8057763e

* changes:
  BUG-868: migrate users of CompositeNode.getChildren()
  BUG-731: Warning suppression is not necessary

10 years agoMerge "BUG-509: introduce Version concept"
Tony Tkacik [Fri, 23 May 2014 14:09:24 +0000 (14:09 +0000)]
Merge "BUG-509: introduce Version concept"

10 years agoMerge "BUG-509: fix ModifiedNode locking"
Tony Tkacik [Fri, 23 May 2014 14:08:59 +0000 (14:08 +0000)]
Merge "BUG-509: fix ModifiedNode locking"

10 years agoMerge "BUG-509: migrate to TreeNodes"
Tony Tkacik [Fri, 23 May 2014 14:07:44 +0000 (14:07 +0000)]
Merge "BUG-509: migrate to TreeNodes"

10 years agoMerge "BUG-509: create data tree SPI package"
Tony Tkacik [Fri, 23 May 2014 13:56:42 +0000 (13:56 +0000)]
Merge "BUG-509: create data tree SPI package"

10 years agoMerge "BUG-509: add some documentation"
Tony Tkacik [Fri, 23 May 2014 13:56:17 +0000 (13:56 +0000)]
Merge "BUG-509: add some documentation"

10 years agoMerge "Bug 716: Errors on controller shutdown"
Tony Tkacik [Fri, 23 May 2014 12:42:54 +0000 (12:42 +0000)]
Merge "Bug 716: Errors on controller shutdown"

10 years agoBUG-868: migrate users of CompositeNode.getChildren()
Robert Varga [Fri, 23 May 2014 10:35:19 +0000 (12:35 +0200)]
BUG-868: migrate users of CompositeNode.getChildren()

This converts the callers from getChildren() to getValue(), eliminating
around a hundred of warnings in eclipse.

Change-Id: Ieef23a07ac02b719866ec447a7e3365ab11e150a
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-731: Warning suppression is not necessary
Robert Varga [Fri, 23 May 2014 10:09:44 +0000 (12:09 +0200)]
BUG-731: Warning suppression is not necessary

This removes unnecessary SuppressWarnings.

Change-Id: I8057763e9c9b71a52b2f615b0ffafb0dee3cbe78
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: introduce Version concept
Robert Varga [Thu, 22 May 2014 21:35:02 +0000 (23:35 +0200)]
BUG-509: introduce Version concept

This patch introduces the concept of a Version, which is disconnected
from any ordinal number. This is useful for saving memory, as the
versioning of TreeNodes needs to only detect version mismatches and not
which version is historically newer.

Change-Id: I625d9d945ff3fd416dd82bb3f1ff4268f2001e5a
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: fix ModifiedNode locking
Robert Varga [Thu, 22 May 2014 21:50:05 +0000 (23:50 +0200)]
BUG-509: fix ModifiedNode locking

This removes the 'sealed' flag from ModifiedNode, as it is not a
publicly-visible object. Also drop the synchronized blocks and
reintroduce them in InMemoryDataTreeModification, which is the user
entrypoint.

Change-Id: I6c8be61701134bd8f645b8d4f0a8ef3ae218f0ac
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: migrate to TreeNodes
Robert Varga [Thu, 22 May 2014 20:58:55 +0000 (22:58 +0200)]
BUG-509: migrate to TreeNodes

This patch performs the switchover to SPI-provided TreeNodes. It also
extracts the information needed for checking applicability of a
modification into a separate interface. Also adds some documentation in
the non-trivial write+merge path.

Change-Id: I83f5ca30bff21774759f9b675b19b6e9622076a2
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: create data tree SPI package
Robert Varga [Thu, 22 May 2014 20:49:47 +0000 (22:49 +0200)]
BUG-509: create data tree SPI package

This patch introduces an SPI package, which contains the metadata tree
node abstraction and reference implementation. This will substitute the
StoreMetadataNode class.

Major improvement is the isolation of lifecycle from the rest of the
implementation and major reduction in memory usage, as leaf nodes no
longer need to lug a HashMap around.

Change-Id: I89215672006b1ed6064feaf186c94c05550d299e
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: add some documentation
Robert Varga [Thu, 22 May 2014 05:38:07 +0000 (07:38 +0200)]
BUG-509: add some documentation

Documents AlwaysFailOperation and DataNodeContainerModificationStrategy

Change-Id: Ibb67dc5f4a829547538ba02c3eac4f995a6fe6ef
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: break up SchemaAwareApplyOperation
Robert Varga [Wed, 21 May 2014 11:55:41 +0000 (13:55 +0200)]
BUG-509: break up SchemaAwareApplyOperation

This patch breaks up the SchemaAwareApplyOperation class by moving its
abstract subclasses out, allowing their subclasses to be retained within
them. This will allow to better understand the relationships between the
classes.

Change-Id: I0acf48fa7c38d600fe38a8ec9951858f46be18e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: move snapshotCache get out of try block
Robert Varga [Wed, 21 May 2014 13:21:14 +0000 (15:21 +0200)]
BUG-509: move snapshotCache get out of try block

This just moves the get which cannot throw out of the 'catch Exception'
block.

Change-Id: I936e987fa6b9e8b3eecb35656c586e3afb070046
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-509: merge InMemoryDataTreeModification.resolveSnapshot()"
Tony Tkacik [Wed, 21 May 2014 17:24:58 +0000 (17:24 +0000)]
Merge "BUG-509: merge InMemoryDataTreeModification.resolveSnapshot()"

10 years agoMerge "BUG-509: there is only one createRecursively()"
Tony Tkacik [Wed, 21 May 2014 17:23:52 +0000 (17:23 +0000)]
Merge "BUG-509: there is only one createRecursively()"

10 years agoMerge "BUG-509: Remove unused methods"
Tony Tkacik [Wed, 21 May 2014 17:23:08 +0000 (17:23 +0000)]
Merge "BUG-509: Remove unused methods"

10 years agoMerge "BUG-509: node version is always required"
Tony Tkacik [Wed, 21 May 2014 17:22:30 +0000 (17:22 +0000)]
Merge "BUG-509: node version is always required"

10 years agoBUG-509: merge InMemoryDataTreeModification.resolveSnapshot()
Robert Varga [Wed, 21 May 2014 09:40:36 +0000 (11:40 +0200)]
BUG-509: merge InMemoryDataTreeModification.resolveSnapshot()

This patch adds some minimal documentation and merges the two
resolveSnapshot() methods into one, making the call stack a bit easier
to understand.

Change-Id: Ib23fccdc9d2987aa255483becc63155904ebc332
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: there is only one createRecursively()
Robert Varga [Tue, 20 May 2014 14:25:33 +0000 (16:25 +0200)]
BUG-509: there is only one createRecursively()

The naming and exposure of two and three arugment variants made things
confusing -- let it be clear there is only one version.

Change-Id: If05620e99c2200ee10c1881de8eecd015f18eb9b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: Remove unused methods
Robert Varga [Tue, 20 May 2014 14:12:41 +0000 (16:12 +0200)]
BUG-509: Remove unused methods

These two have no users, so let's remove them to make navigating the
code easier.

Change-Id: I515570db5a8a4095ff525f1ca5614f9f627616df
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: node version is always required
Robert Varga [Tue, 20 May 2014 13:42:32 +0000 (15:42 +0200)]
BUG-509: node version is always required

This just clarifies the requirement to know the node version you are
attempting to build before instantiating a builder. Also remove some
unused methods.

Change-Id: I09406bbedee963624b43a280529d4b8cbc9931c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-509: cleanup StoreMetadataNode"
Tony Tkacik [Wed, 21 May 2014 15:19:53 +0000 (15:19 +0000)]
Merge "BUG-509: cleanup StoreMetadataNode"

10 years agoMerge "BUG-509: Refactor listener walking"
Tony Tkacik [Wed, 21 May 2014 15:19:27 +0000 (15:19 +0000)]
Merge "BUG-509: Refactor listener walking"

10 years agoBUG-509: cleanup StoreMetadataNode
Robert Varga [Tue, 20 May 2014 13:10:29 +0000 (15:10 +0200)]
BUG-509: cleanup StoreMetadataNode

Removes StoreTreeNode<StoreMetadataNode> interface and tightens
visibility of a few methods.

Change-Id: I3bbf303025046f217bdcea81fcc14c420dbf9478
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: Refactor listener walking
Robert Varga [Tue, 20 May 2014 08:52:59 +0000 (10:52 +0200)]
BUG-509: Refactor listener walking

This patch creates a proper abstraction for examining a
DataTreeCandidate for changes. This has the nice property of finishing
the hiding of all implementation details behind proper interfaces, such
that our implementation is free to do proper lifecycle as it pleases.

Also gets rid of the AutoCloseable from candidate. It can be
reintroduced in the need appears.

Change-Id: I13301548594d4ae34e929c7202661997ea5aca90
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Bug 953 - Change the BindingIndependentConnector to handle RpcInvocationStrate...
Tony Tkacik [Tue, 20 May 2014 14:57:56 +0000 (14:57 +0000)]
Merge "Bug 953 - Change the BindingIndependentConnector to handle RpcInvocationStrategies consistently."

10 years agoMerge "BUG-509: Move ModificationApplyOperation"
Tony Tkacik [Tue, 20 May 2014 13:42:35 +0000 (13:42 +0000)]
Merge "BUG-509: Move ModificationApplyOperation"

10 years agoMerge "BUG-509: remove unused code"
Tony Tkacik [Tue, 20 May 2014 13:42:07 +0000 (13:42 +0000)]
Merge "BUG-509: remove unused code"

10 years agoMerge "BUG-509: Move DataTree concepts into separate package"
Tony Tkacik [Tue, 20 May 2014 13:41:49 +0000 (13:41 +0000)]
Merge "BUG-509: Move DataTree concepts into separate package"

10 years agoMerge "BUG-509: simple cleanup of DataTreeModification"
Tony Tkacik [Tue, 20 May 2014 13:39:41 +0000 (13:39 +0000)]
Merge "BUG-509: simple cleanup of DataTreeModification"

10 years agoMerge "BUG-509: Rename MutableDataTree to DataTreeModification"
Tony Tkacik [Tue, 20 May 2014 13:38:12 +0000 (13:38 +0000)]
Merge "BUG-509: Rename MutableDataTree to DataTreeModification"

10 years agoBug 953 - Change the BindingIndependentConnector to handle RpcInvocationStrategies...
Devin Avery [Mon, 12 May 2014 15:52:51 +0000 (11:52 -0400)]
Bug 953 - Change the BindingIndependentConnector to handle RpcInvocationStrategies consistently.

Patch Set 1/2/3
*Combined the RpcInvocationStrategies into a single intelligence class that handles the varying strategies since the majority of the intelligence was overlapped.
*Moved some logic out of the BindingIndependentConnector to simplify it.
*Added an RpcInvocationStrategyTest to validate logic in RpcInvocationStrategy.

Patch Set 4
* Removed tabs and trailing whitespace

Patch Set 6
* Addressed NPE that would happen when no input was provided to a method requiring input.

Change-Id: I8d6916819105c5530c9b501e1ae973cdcb769ea7
Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoMerge "BUG-731: fix warnings from missing generic arguments"
Tony Tkacik [Tue, 20 May 2014 13:19:25 +0000 (13:19 +0000)]
Merge "BUG-731: fix warnings from missing generic arguments"

10 years agoMerge "BUG-1018 Implement BackwardsCompatible BI broker data notifications"
Tony Tkacik [Tue, 20 May 2014 13:11:24 +0000 (13:11 +0000)]
Merge "BUG-1018 Implement BackwardsCompatible BI broker data notifications"

10 years agoMerge "BUG-868: move to use unified ClassLoaderUtils"
Tony Tkacik [Tue, 20 May 2014 12:51:02 +0000 (12:51 +0000)]
Merge "BUG-868: move to use unified ClassLoaderUtils"

10 years agoBUG-509: Move ModificationApplyOperation
Robert Varga [Tue, 20 May 2014 07:45:36 +0000 (09:45 +0200)]
BUG-509: Move ModificationApplyOperation

This patch moves ModificationApplyOperation at al. to the data tree
package, improving its isolation.

Change-Id: I37081222e30c149a87baf6f4a5d3ce2e84f13acb
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: remove unused code
Robert Varga [Tue, 20 May 2014 07:21:43 +0000 (09:21 +0200)]
BUG-509: remove unused code

Removes unused code, writen -> written, adds a FIXME

Change-Id: Id0795edc23f2aef6f73e42d54be877003daf4244
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: Move DataTree concepts into separate package
Robert Varga [Mon, 19 May 2014 09:56:10 +0000 (11:56 +0200)]
BUG-509: Move DataTree concepts into separate package

Create a new package for the data tree and related concepts to clean out
interactions. Also create and document the API and hide implementation
classes from the user itself.

Change-Id: I69f2a9b7bcac863b531f46f669bfd2fcfcd5b743
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: simple cleanup of DataTreeModification
Robert Varga [Mon, 19 May 2014 09:38:38 +0000 (11:38 +0200)]
BUG-509: simple cleanup of DataTreeModification

Rename rootModification to rootNode to clarify what it is
Use field updated to fix seals to save some memory

Change-Id: I0fe7f58a3c15613c15198830b77bc28a84a9006a
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: Rename MutableDataTree to DataTreeModification
Robert Varga [Mon, 19 May 2014 09:30:53 +0000 (11:30 +0200)]
BUG-509: Rename MutableDataTree to DataTreeModification

This name better reflects the semantics of the class. Also add some
javadoc documentation.

Change-Id: I7292c134bf87af8c0518e2905c7bd2b628c37a25
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-731: fix warnings from missing generic arguments
Robert Varga [Mon, 19 May 2014 20:20:29 +0000 (22:20 +0200)]
BUG-731: fix warnings from missing generic arguments

This just goes in and adds wildcard generic arguments where appropriate,
removing ~100 eclipse warnings.

Change-Id: I34269906d6b78618646876f6448d3066bf036105
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-868: move to use unified ClassLoaderUtils
Robert Varga [Sun, 18 May 2014 14:39:10 +0000 (16:39 +0200)]
BUG-868: move to use unified ClassLoaderUtils

This is a follow-up for yangtools patch
https://git.opendaylight.org/gerrit/#/c/7160/ . It updates the imports
to use the newly exposed version of ClassLoaderUtils.

Change-Id: I7178475ae698c3ba7120cf5ddfe56c4094f23d8b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Bug 953 - Enable mounted RPC calls via RestConf"
Tony Tkacik [Mon, 19 May 2014 12:35:53 +0000 (12:35 +0000)]
Merge "Bug 953 - Enable mounted RPC calls via RestConf"

10 years agoMerge "BUG-1027: rework lookup for clarity"
Tony Tkacik [Mon, 19 May 2014 09:28:43 +0000 (09:28 +0000)]
Merge "BUG-1027: rework lookup for clarity"

10 years agoMerge "BUG-509: reorganize data tree abstractions."
Tony Tkacik [Mon, 19 May 2014 09:16:13 +0000 (09:16 +0000)]
Merge "BUG-509: reorganize data tree abstractions."

10 years agoBUG-1018 Implement BackwardsCompatible BI broker data notifications
Maros Marsalek [Mon, 19 May 2014 09:10:14 +0000 (11:10 +0200)]
BUG-1018 Implement BackwardsCompatible BI broker data notifications

Finish support for notifying BI data change listeners in backwards compatible broker.

Change-Id: I221a1e6937c8f9c493444afd0756e6c23fd4b18f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoMerge "BUG-868: do not use InstanceIdentifier.getPath()"
Tony Tkacik [Mon, 19 May 2014 08:42:21 +0000 (08:42 +0000)]
Merge "BUG-868: do not use InstanceIdentifier.getPath()"

10 years agoBUG-868: do not use InstanceIdentifier.getPath()
Robert Varga [Mon, 19 May 2014 06:45:47 +0000 (08:45 +0200)]
BUG-868: do not use InstanceIdentifier.getPath()

This simplifies the NodeMapping class significantly by using the
utility methods shipped in InstanceIdentifier itself.

Change-Id: I1bb79bd4a16da9d78c600d21f67e3ca1926a0445
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: reorganize data tree abstractions.
Robert Varga [Thu, 15 May 2014 13:14:03 +0000 (15:14 +0200)]
BUG-509: reorganize data tree abstractions.

This patch has no functional changes, it only rearranges code such that
the flow of data and object lifecycle becomes more obvious. This will
make metadata lifecycle easier to manage.

Change-Id: I10fd912433b72e25729d163c27699a5a5c47e305
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-1027: rework lookup for clarity
Robert Varga [Sun, 18 May 2014 10:10:21 +0000 (12:10 +0200)]
BUG-1027: rework lookup for clarity

This patch gets rid of the nasty 'catch Exception', making the lookup
fail as soon as a DeserializationException is thrown. We account for
most of the checked exceptions, so this should not be a problem.

Change-Id: I3d0440933ebc30ba32a06690ebe326e18addf613
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Bug 967: Do not translate leaf Instance Identifiers."
Ed Warnicke [Fri, 16 May 2014 15:15:24 +0000 (15:15 +0000)]
Merge "Bug 967: Do not translate leaf Instance Identifiers."

10 years agoBug 967: Do not translate leaf Instance Identifiers.
Tony Tkacik [Fri, 16 May 2014 11:02:33 +0000 (13:02 +0200)]
Bug 967: Do not translate leaf Instance Identifiers.

Improved extraction of Instance Identifiers from
DOM Data Change Event.

Logs in console are poluted with DeserializationException,
which fails to deserialize DOM Instance Identifier
to Binding Instance Identifier.

Added explicit check against schema context to
see if Instance Identifier is representable
in Binding Format, if not we will not report
is as part of subtree Data Change event.

Change-Id: Iaee2390fd089e0a2d66ec658aab4e7dab2a93a46
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBug 953 - Enable mounted RPC calls via RestConf
Devin Avery [Thu, 8 May 2014 13:00:29 +0000 (09:00 -0400)]
Bug 953 - Enable mounted RPC calls via RestConf

Modify RestconfImpl to allow RPC calls via mount points.
===
MountPointImpl - wired pass through call for invokeRpc that was missing.
RestconfImpl - abstract the execution of RPC out to an "RpcExecutor" class.
Remaining classes - added tests to cover new code, including the toaster.yang file (modified from original) to test various RPC calls.

- Patch Set 8 - fixed unit tests which were failing (one failure due to missing future enhancement, another due to missing test rpc in yang file).
- Patch Set 10 - fixed run failure by addressing package import.
- Patch Set 13 - Cleaned up exception throws / used Preconditions checking.
- Patch Set 14 - Rebased
- Patch Set 15 - Added back change that was accidently removed during merge / rebase.

Change-Id: Ib214b4c82ffc487ee2f7b912e65d5c189b82154a
Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoMerge "Bug 509: Improve conflict detection of leaf merges"
Tony Tkacik [Thu, 15 May 2014 15:50:38 +0000 (15:50 +0000)]
Merge "Bug 509: Improve conflict detection of leaf merges"

10 years agoMerge changes Ibe0145be,I0764bfa9
Tony Tkacik [Thu, 15 May 2014 15:50:08 +0000 (15:50 +0000)]
Merge changes Ibe0145be,I0764bfa9

* changes:
  BUG-509: remove DataAndMetadataSnapshot.Builder.getDataTree()
  BUG-509: remove StoreMetadataNode.children()

10 years agoMerge "BUG-509: remove StoreUtils.initialChangeEvent()"
Tony Tkacik [Thu, 15 May 2014 15:49:44 +0000 (15:49 +0000)]
Merge "BUG-509: remove StoreUtils.initialChangeEvent()"

10 years agoMerge "BUG-509: StoreUtils should operate on NormalizedNode"
Tony Tkacik [Thu, 15 May 2014 15:49:11 +0000 (15:49 +0000)]
Merge "BUG-509: StoreUtils should operate on NormalizedNode"

10 years agoBug 509: Improve conflict detection of leaf merges
Robert Varga [Thu, 15 May 2014 14:55:02 +0000 (16:55 +0200)]
Bug 509: Improve conflict detection of leaf merges

Original conflict detection for merge action on leaves
only looked at node version and subtree version, which
caused the transaction to fail even if the leaf was
unmodified and contained the same value.

Conflict detection now checks if the leaves are not same,
and only in that case it checks for concurrent writes.

Change-Id: I5e43233e86adf96e3dad2a93cdcf512b3d17977a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: remove DataAndMetadataSnapshot.Builder.getDataTree()
Robert Varga [Thu, 15 May 2014 12:37:19 +0000 (14:37 +0200)]
BUG-509: remove DataAndMetadataSnapshot.Builder.getDataTree()

This getter and its associated field is completely unused. Remove it to
improve clarity.

Change-Id: Ibe0145bee610c7a2b147852f43d0492ca5061adc
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Cosmetics: fix typo facilitate"
Ed Warnicke [Thu, 15 May 2014 11:12:31 +0000 (11:12 +0000)]
Merge "Cosmetics: fix typo facilitate"

10 years agoBUG-509: remove StoreMetadataNode.children()
Robert Varga [Thu, 15 May 2014 09:10:36 +0000 (11:10 +0200)]
BUG-509: remove StoreMetadataNode.children()

This patch removes the now-unneeded access, which means the children
iteration order is no longer part of StoreMetadataNode, allowing us to
use more memory-efficient HashMap instead of LinkedHashMap. Let's do
precisely that.

Change-Id: I0764bfa9861f9df4d3014151db96edf1024e3f9b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: remove StoreUtils.initialChangeEvent()
Robert Varga [Thu, 15 May 2014 08:56:48 +0000 (10:56 +0200)]
BUG-509: remove StoreUtils.initialChangeEvent()

This method is unused. Remove it, such that StoreUtils are now
completely independent of org.opendaylight.controller.md.sal, making
them a candidate for move to yang-data-*.

Change-Id: Idf945aee6fd4a80f8ca58fc50bcc997880a60ec0
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-509: StoreUtils should operate on NormalizedNode
Robert Varga [Thu, 15 May 2014 08:47:00 +0000 (10:47 +0200)]
BUG-509: StoreUtils should operate on NormalizedNode

This prunes the use of MetadataNode from StoreUtils. It turns out it is
completely unnecessary. This removes the last user of
Metadata.getChildren(), which will be removed in a subsequent patch.

Change-Id: I778e77b826576b8fa53e040a825d615dab7d253f
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBug 967: Fixed incorrect delete was addressing augmentation of augmentation
Tony Tkacik [Wed, 7 May 2014 11:10:40 +0000 (13:10 +0200)]
Bug 967: Fixed incorrect delete was addressing  augmentation of augmentation

DataNormalizationOperation was constructed incorrectly, if augmentation
was already augmented, which leaded to incorrect construction of instance
identifier for delete.

Patchset 2: Fixed normalization in cases of mixin inside mixin
e.g. augmentation containing choice with cases.

Change-Id: I580e5dfe41ce504775ac454b66368037f4d707bb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBUG-981: Fixed incorrect condition in ResolveDataChangeEventsTask
Robert Varga [Tue, 13 May 2014 11:52:10 +0000 (13:52 +0200)]
BUG-981: Fixed incorrect condition in ResolveDataChangeEventsTask

When we insert a new subtree, we need to make sure to call serialization
on the entire, such that any new elements which appear have their
classed attached to paths.

This reuses a previous code path, which pruned the walk tree as soon as
it encountered a node which did not have any listeners attached (thus
improving performance when we're gathering listeners).

In this specific case, though, this check is not correct: we need to
walk the path because it may be placing new data in the subtree.

At the same time add debug statements which made pinpointing this
problem possible.

Change-Id: I1687ba45817a84ea4a888496a90defc5896216c9
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Bug-574 Added a 4th RPC Invocation strategy for the case where the RPC has...
Tony Tkacik [Mon, 12 May 2014 18:48:31 +0000 (18:48 +0000)]
Merge "Bug-574 Added a 4th RPC Invocation strategy for the case where the RPC has an output, but no input"

10 years agoBug-574 Added a 4th RPC Invocation strategy for the case where the RPC has an output...
Mayank Agarwal [Mon, 14 Apr 2014 21:58:31 +0000 (14:58 -0700)]
Bug-574 Added a 4th RPC Invocation strategy for the case where the RPC has an output, but no input

Change-Id: I7d1a596f3bb1362044cc240a15bdb9bb7d094c55
Signed-off-by: Mayank Agarwal <mayagarw@cisco.com>
10 years agoMerge "Bug 508: Improved error reporting for failed canCommit phase."
Ed Warnicke [Mon, 12 May 2014 14:41:49 +0000 (14:41 +0000)]
Merge "Bug 508: Improved error reporting for failed canCommit phase."

10 years agoMerge "Bug 981: Fixed accidental shaddowing of data in Data Change Event."
Giovanni Meo [Mon, 12 May 2014 13:53:28 +0000 (13:53 +0000)]
Merge "Bug 981: Fixed accidental shaddowing of data in Data Change Event."

10 years agoBug 508: Improved error reporting for failed canCommit phase.
Tony Tkacik [Mon, 12 May 2014 10:33:58 +0000 (12:33 +0200)]
Bug 508: Improved error reporting for failed canCommit phase.

Original implementation did not provide enough information
when transaction precondition failed.

Introduced new Exception DataPreconditionFailedException
which captures fail reason and path to subtree
for which precondition failed.

This helps debug accidental overwrites / conflicting
writes between transactions.

Change-Id: I0133fd3fdb8e6492bf457dab7b20efa67fd6e2af
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "Bug 849: Fixed NPE in Translated Data Change Events."
Giovanni Meo [Mon, 12 May 2014 11:05:43 +0000 (11:05 +0000)]
Merge "Bug 849: Fixed NPE in Translated Data Change Events."

10 years agoBug 981: Fixed accidental shaddowing of data in Data Change Event.
Tony Tkacik [Sun, 11 May 2014 20:46:24 +0000 (22:46 +0200)]
Bug 981: Fixed accidental shaddowing of data in Data Change Event.

Not all Normalized DOM InstanceIdentifier has their counterpart
in Binding-Aware representation. Added explicit check to
detect mixin instance-identifiers which could lead to
incorrect deserialization into maps and shadowing parent data.

Change-Id: I66166f50c636ce0dfcd962efac7fc488da622336
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "BUG-648: Improve performance by reusing old data nodes"
Tony Tkacik [Mon, 12 May 2014 07:05:37 +0000 (07:05 +0000)]
Merge "BUG-648: Improve performance by reusing old data nodes"

10 years agoMerge "BUG-731: RoutedRegistration.close() should not throw"
Tony Tkacik [Mon, 12 May 2014 07:03:49 +0000 (07:03 +0000)]
Merge "BUG-731: RoutedRegistration.close() should not throw"

10 years agoMerge "Add serialVersionUID to Serializable"
Tony Tkacik [Mon, 12 May 2014 07:02:33 +0000 (07:02 +0000)]
Merge "Add serialVersionUID to Serializable"

10 years agoMerge "BUG-868: stop using InstanceIdentifier.builder()"
Tony Tkacik [Mon, 12 May 2014 07:02:17 +0000 (07:02 +0000)]
Merge "BUG-868: stop using InstanceIdentifier.builder()"

10 years agoBUG-648: Improve performance by reusing old data nodes
Robert Varga [Thu, 8 May 2014 16:29:30 +0000 (18:29 +0200)]
BUG-648: Improve performance by reusing old data nodes

This patchset gives yang-data-api the chance to optimize copy
operations we execute when creating a new generation.

Change-Id: Ib23a87e116a0a04f7fd4f2b709d7239e213ea744
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoAdd serialVersionUID to Serializable
Robert Varga [Sun, 11 May 2014 07:16:29 +0000 (09:16 +0200)]
Add serialVersionUID to Serializable

Serializable classes have to have serialVersionUID. Add it where it's
missing.

Change-Id: I23689005878280b6ee9f97fb12ae0b15151f20d7
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-868: stop using InstanceIdentifier.builder()
Robert Varga [Sun, 11 May 2014 06:41:18 +0000 (08:41 +0200)]
BUG-868: stop using InstanceIdentifier.builder()

The static helper method has been deprecated. Use either the non-static
one, or child()/augmentation() helpers.

Change-Id: Ic69057d2db669153dde60ba1797e8139623a755c
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-981: remove deprecated use of constructors
Robert Varga [Sun, 11 May 2014 05:35:34 +0000 (07:35 +0200)]
BUG-981: remove deprecated use of constructors

This removes the use of all constructors, such that we initialize in one
go.

Change-Id: Iff461a878fb7061b0ea1c8efea6a34b833645784
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-893: do not store classPool"
Tony Tkacik [Sun, 11 May 2014 16:46:53 +0000 (16:46 +0000)]
Merge "BUG-893: do not store classPool"

10 years agoMerge "BUG-642: get rid of sneakyThrow"
Tony Tkacik [Sun, 11 May 2014 16:46:25 +0000 (16:46 +0000)]
Merge "BUG-642: get rid of sneakyThrow"

10 years agoCosmetics: fix typo facilitate
Flavio Fernandes [Sun, 11 May 2014 03:27:02 +0000 (23:27 -0400)]
Cosmetics: fix typo facilitate

Change-Id: I351e285dd128f1d633f4940624096348b065f16a
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
10 years agoBug 716: Errors on controller shutdown
tpantelis [Tue, 22 Apr 2014 16:05:23 +0000 (12:05 -0400)]
Bug 716: Errors on controller shutdown

    Fixed miscellaneous errors on shutdown:
        -  FlowProvider, GroupProvider and MeterProvider: all throw an
           UnsupportedOperationEx from their close methods with a TODO message.
           Implemented close to close the commitHandlerRegistration.

        - NetconfSSHServer: logs a socket closed exception due to closing the socket
          on shutdown. We can ignore this and not log the error (if 'up' is false).

        - RestconfProvider: NPE in stop method calling session.close.
          The 'session' member is never initialized or otherwise used so removed it.

        - RuntimeMappingModule and SchemaServiceImplSingletonModule:
          IllegalStateException from bundleContext.ungetService() call because the
          bundle has already been shutdown. Ignore ex as this can occur
          normally.

Need someone to commit this!

Change-Id: I31d9d6d66418dda7f5b73c2ad12bb251f3689643
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoBUG-893: do not store classPool
Robert Varga [Sat, 10 May 2014 13:43:45 +0000 (15:43 +0200)]
BUG-893: do not store classPool

This prevents storing a reference to the classPool. It is not necessary
and it makes thinking about accesses much easier.

Change-Id: Iebbdac46c3ca445bbe36ba6efd19d3150d728f7f
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-642: get rid of sneakyThrow
Robert Varga [Sat, 10 May 2014 11:25:21 +0000 (13:25 +0200)]
BUG-642: get rid of sneakyThrow

This patch rids us of unneeded usage of Exceptions.sneakyThrow. It
generally hides problems and is only useful for generated (or sloppy)
code.

Change-Id: Ibb73f4546b1785c4bcb3e6c033249f58efd1d2d6
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-891: do not drop events silently
Robert Varga [Fri, 9 May 2014 15:22:19 +0000 (17:22 +0200)]
BUG-891: do not drop events silently

As it turns out, infrastructure silently drops things on the floor if
exceptions happen. When these exceptions occur, they hint at major
problems. Promote tham to warnings.

Change-Id: Ib4afdc7ff1a17e562211b3cfbb30735a592d0a2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-731: RoutedRegistration.close() should not throw
Robert Varga [Fri, 9 May 2014 10:16:50 +0000 (12:16 +0200)]
BUG-731: RoutedRegistration.close() should not throw

Routed RPC implementations should be allowed to unregister themselves
without incurring a checked exceptions. This allows downstream users to
elide having to deal with raw Exception.

Change-Id: Ia356c6272da3d22a375c954e192f79786ab42395
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Add missing exception to log message in SchemaAwareRpcBroker"
Tony Tkacik [Wed, 7 May 2014 16:46:08 +0000 (16:46 +0000)]
Merge "Add missing exception to log message in SchemaAwareRpcBroker"

10 years agoMerge "Increase mdsal's notification queue size, make it configurable."
Tony Tkacik [Wed, 7 May 2014 15:42:46 +0000 (15:42 +0000)]
Merge "Increase mdsal's notification queue size, make it configurable."

10 years agoAdd missing exception to log message in SchemaAwareRpcBroker
Maros Marsalek [Wed, 7 May 2014 15:13:00 +0000 (17:13 +0200)]
Add missing exception to log message in SchemaAwareRpcBroker

Change-Id: I1e8196babd9f5486fbe1edadba5f610f00d1ac37
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoIncrease mdsal's notification queue size, make it configurable.
Tomas Olvecky [Wed, 7 May 2014 12:56:56 +0000 (14:56 +0200)]
Increase mdsal's notification queue size, make it configurable.

Add System property mdsal.notificationqueue.size to allow tweaking
of queue size.
Increase default queue size from 10 to 1000.

Change-Id: I91e8ac3939092af2b26a7a4d952fe561557b7a46
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Fixed typo in SnapshotBackedWriteTransaction class"
Tony Tkacik [Wed, 7 May 2014 11:14:00 +0000 (11:14 +0000)]
Merge "Fixed typo in SnapshotBackedWriteTransaction class"