netconf.git
9 years agoFix children element lookup in XmlElement
Maros Marsalek [Fri, 25 Jul 2014 11:13:47 +0000 (13:13 +0200)]
Fix children element lookup in XmlElement

Change-Id: I38220acbfedf8f1b8554516f6abda4c1a16dd2ee
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Wiring rest-connector with config subsytem."
Tony Tkacik [Mon, 28 Jul 2014 15:05:01 +0000 (15:05 +0000)]
Merge "Wiring rest-connector with config subsytem."

9 years agoMerge "Improve RESTCONF QName parsing speed"
Tony Tkacik [Mon, 28 Jul 2014 15:02:06 +0000 (15:02 +0000)]
Merge "Improve RESTCONF QName parsing speed"

9 years agoWiring rest-connector with config subsytem.
Ed Warnicke [Thu, 24 Jul 2014 19:12:18 +0000 (14:12 -0500)]
Wiring rest-connector with config subsytem.

Change-Id: If826bb7352101833acd288b81cbcf7cec2f28b43
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoImprove RESTCONF QName parsing speed
Robert Varga [Sat, 26 Jul 2014 04:32:53 +0000 (06:32 +0200)]
Improve RESTCONF QName parsing speed

SchemaContext provides useful (and optimized) methods for looking up
modules. Eliminate home-grown version of findModuleByName(). Requires
https://git.opendaylight.org/gerrit/#/c/9351/ .

Change-Id: I4c4e07e23a614b46b01a87485965af0c066aa693
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Optimize RESTCONF module/node parsing"
Tony Tkacik [Mon, 28 Jul 2014 08:56:53 +0000 (08:56 +0000)]
Merge "Optimize RESTCONF module/node parsing"

9 years agoMerge "Improve RESTCONF thread safety when reconfiguring"
Tony Tkacik [Mon, 28 Jul 2014 08:56:39 +0000 (08:56 +0000)]
Merge "Improve RESTCONF thread safety when reconfiguring"

9 years agoMerge "Allow getChildNodes() to become a Collection"
Tony Tkacik [Mon, 28 Jul 2014 08:56:15 +0000 (08:56 +0000)]
Merge "Allow getChildNodes() to become a Collection"

9 years agoOptimize RESTCONF module/node parsing
Robert Varga [Sat, 26 Jul 2014 04:41:44 +0000 (06:41 +0200)]
Optimize RESTCONF module/node parsing

Profiling has shown that the current implementations are still not upto
par with what they should be: 189 invocations of the two consumed 64ms,
with most of the time being spent splitting and iterating.

Given that the parsing operation is really simple, we can do much better
using String.indexOf() and String.substring().

Change-Id: I06ef0403edb2c8d12cbbc3c7909091e9efc5138e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoImprove RESTCONF thread safety when reconfiguring
Robert Varga [Sat, 26 Jul 2014 04:18:40 +0000 (06:18 +0200)]
Improve RESTCONF thread safety when reconfiguring

There is a race which could see us without a populated mapping while a
schemacontext change is underway. Use a immutablemap guarded by an
atomicreference to allow proper switching. Note that the fix is
incomplete, as the schema context needs to be replaced at the same time.

Change-Id: I7d64fae99a0bc0f7d1ec19f08450c1954cb7af97
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAllow getChildNodes() to become a Collection
Robert Varga [Sat, 26 Jul 2014 04:06:52 +0000 (06:06 +0200)]
Allow getChildNodes() to become a Collection

Preparatory patch for yangtools change -- getChildNodes() will start
returning a Collection, not a Set.

Change-Id: Ie7255757e3f48465e3acd9e65764f1b79a3a9511
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake DOMMountPointService listenable
Maros Marsalek [Thu, 24 Jul 2014 11:43:09 +0000 (13:43 +0200)]
Make DOMMountPointService listenable

Change-Id: Ic44a4bf214f6f6a6d653627b6a62ab2f47bd9963
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG 1144 - response 500 instead of 400
Jozef Gloncak [Wed, 23 Jul 2014 11:55:21 +0000 (13:55 +0200)]
BUG 1144 - response 500 instead of 400

RestconfDocumentedException with error tag INVALID_VALUE (400) was caught and
wrapped to RestconfDocumentedException with error tag OPERATION_FAILED
(500)

Change-Id: I0ad75958e0d8e25d5bf1bdf7cbac5f855cc2b03d
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG 1379 - rpcs behind yang-ext:mount aren't always executed
Jozef Gloncak [Tue, 22 Jul 2014 07:06:11 +0000 (09:06 +0200)]
BUG 1379 - rpcs behind yang-ext:mount aren't always executed

new corrected behavior:
If rpc is from device behing yang-ext:mount and it doesn't exist in
controller then it is ALSO executed.

Change-Id: Ieebf2522b39cd42a8da57b05cf49e528c924f7ba
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoFixed incorrect XML test suites & Usage of removed API
Tony Tkacik [Mon, 21 Jul 2014 11:48:03 +0000 (13:48 +0200)]
Fixed incorrect XML test suites & Usage of removed API

Change in underlying YANG Tools codec, unvereded
that there were test-suites which did string
comparison for testing of XML responses and
any change in XML serialization (valid from
XML point-of-view) triggered this tests to
fail.

Reworked offending tests to use XML W3C Document
for testing instead of string comparison and regexes.

Change-Id: Ib6e35e8d2fe79275666235370d1dda461277a59f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG 1387 - degrade log output from info to debug"
Tony Tkacik [Mon, 21 Jul 2014 09:40:53 +0000 (09:40 +0000)]
Merge "BUG 1387 - degrade log output from info to debug"

9 years agoBUG 1387 - degrade log output from info to debug
Jozef Gloncak [Mon, 21 Jul 2014 08:48:29 +0000 (10:48 +0200)]
BUG 1387 - degrade log output from info to debug

Change-Id: Ia98ab154bb53cc3c43f42270a3bd6c65bd9dee65
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoMerge "Bug 1239 - Clean up and refactor netconf-ssh client"
Tony Tkacik [Mon, 21 Jul 2014 08:08:41 +0000 (08:08 +0000)]
Merge "Bug 1239 - Clean up and refactor netconf-ssh client"

9 years agoMerge "BUG-1384: YangStoreServiceImpl.refresh() should never block"
Tony Tkacik [Fri, 18 Jul 2014 09:07:03 +0000 (09:07 +0000)]
Merge "BUG-1384: YangStoreServiceImpl.refresh() should never block"

9 years agoMerge "BUG-1365 Check if channel was closed when negotiation fails"
Tony Tkacik [Fri, 18 Jul 2014 07:33:35 +0000 (07:33 +0000)]
Merge "BUG-1365 Check if channel was closed when negotiation fails"

9 years agoBUG-1384: YangStoreServiceImpl.refresh() should never block
Robert Varga [Thu, 17 Jul 2014 14:19:32 +0000 (16:19 +0200)]
BUG-1384: YangStoreServiceImpl.refresh() should never block

As descirbed in the bug, we are seeing large amounts of contention on
the monitor when calling refresh(). Rework the safety such that the
refresh path does not block and perform checking for refresh in the
get() path, which is forced to retry should a refresh occur.

With this patch reported contention disappears completely and startup
time is improved by about 8 seconds on stock SP edition.

Change-Id: I4c6109d77324d3d1b700041b54a95dc346e3d372
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1365 Check if channel was closed when negotiation fails
Maros Marsalek [Tue, 15 Jul 2014 13:55:34 +0000 (15:55 +0200)]
BUG-1365 Check if channel was closed when negotiation fails

Also set state only if promise is not yet finished.
Replace custom EOM aggregator with implementation provided by netty.

Change-Id: Iffb740fff1512ca14efe58ed5112f74ce5e75c97
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Deprecated Rpcs and RpcErrors helper classes"
Devin Avery [Wed, 16 Jul 2014 18:31:51 +0000 (18:31 +0000)]
Merge "Deprecated Rpcs and RpcErrors helper classes"

9 years agoBug 1239 - Clean up and refactor netconf-ssh client
Tomas Olvecky [Thu, 26 Jun 2014 11:18:24 +0000 (13:18 +0200)]
Bug 1239 - Clean up and refactor netconf-ssh client

Remove commented and dead code in netconf-netty-util.
Move SshHandler to client package in order to make it package private.
Wrap OutputStream in SSHClientHandler with a buffer.
Remove VirtualSocketException as it was a workaround for
passing context without checking whether session was established.

Change-Id: I992d3b8ba2b2a58b69bd2e8be4ad0e4bdfa36c01
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
9 years agoMerge "BUG-1317 BUG-1351 Fix duplicate connections from netconf connector"
Tony Tkacik [Tue, 15 Jul 2014 09:36:11 +0000 (09:36 +0000)]
Merge "BUG-1317 BUG-1351 Fix duplicate connections from netconf connector"

9 years agoBUG-1317 BUG-1351 Fix duplicate connections from netconf connector
Maros Marsalek [Mon, 14 Jul 2014 16:04:53 +0000 (18:04 +0200)]
BUG-1317 BUG-1351 Fix duplicate connections from netconf connector

Change-Id: I2c3135f3f84ef25f0005744c03003462c96812c1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoApply style rules on whole sal-rest-connector
Jozef Gloncak [Fri, 11 Jul 2014 08:26:07 +0000 (10:26 +0200)]
Apply style rules on whole sal-rest-connector

No changes in function of code, just formatting.

Change-Id: I52bf10a3b84fa61ec35c31145acbbc6b9bf349ec
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoDeprecated Rpcs and RpcErrors helper classes
tpantelis [Thu, 10 Jul 2014 06:49:07 +0000 (02:49 -0400)]
Deprecated Rpcs and RpcErrors helper classes

With the new RpcResultBuilder class, we can deprecate the Rpcs and
RpcErrors classes.

Also migrate all uses of the deprecated classes to RpcResultBuilder in
the controller code.

Change-Id: I86408bba0ce19e70c7d7a41555e94052e54e93f8
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMerge "BUG 1330 - list key counts|values diff in payload and URI"
Tom Pantelis [Fri, 11 Jul 2014 14:55:36 +0000 (14:55 +0000)]
Merge "BUG 1330 - list key counts|values diff in payload and URI"

9 years agoMerge "Introducing simple merge strategy for config subsystem"
Tony Tkacik [Fri, 11 Jul 2014 11:35:41 +0000 (11:35 +0000)]
Merge "Introducing simple merge strategy for config subsystem"

9 years agoIntroducing simple merge strategy for config subsystem
Tomas Olvecky [Wed, 9 Jul 2014 13:27:09 +0000 (15:27 +0200)]
Introducing simple merge strategy for config subsystem

MergeEditStrategy wasn't really merging.
Now it is, but only for ObjectName[].
However, since ObjectName[] is 90% of the interesting
cases, this should get us a long way.

This is needed to be able to handle reasonably
extension, with the ability to wire in multiple
extension modules independently, as we need to do
for things like OF extension.

Change-Id: Ieca579cbc6781d77f489f5f754490c8da8f65188
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
9 years agoMerge "Bug 1341 - Make RESTConf websocket port configurable"
Tony Tkacik [Thu, 10 Jul 2014 08:04:31 +0000 (08:04 +0000)]
Merge "Bug 1341 - Make RESTConf websocket port configurable"

9 years agoBUG 1330 - list key counts|values diff in payload and URI
Jozef Gloncak [Thu, 10 Jul 2014 08:02:00 +0000 (10:02 +0200)]
BUG 1330 - list key counts|values diff in payload and URI

Adds validation whether list key counts or list key values are different
between payload and URI. It difference occures then
RestconfDocumentedException is raised.

Change-Id: I93aaa352cfb8daee298ebf16375cb70987328dbb
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBug 1341 - Make RESTConf websocket port configurable
Richard Kosegi [Wed, 9 Jul 2014 13:31:05 +0000 (15:31 +0200)]
Bug 1341 - Make RESTConf websocket port configurable

Change-Id: I54f4bcadd864eb264b92f00b82b81489e9ebecf0
Signed-off-by: Richard Kosegi <rkosegi@cisco.com>
9 years agoMerge "Bug 1293 - Switch packaging of config-util to bundle"
Tony Tkacik [Wed, 9 Jul 2014 09:09:32 +0000 (09:09 +0000)]
Merge "Bug 1293 - Switch packaging of config-util to bundle"

9 years agoMerge "BUG 1204 - exception if multiple container node occures"
Tom Pantelis [Tue, 8 Jul 2014 18:19:55 +0000 (18:19 +0000)]
Merge "BUG 1204 - exception if multiple container node occures"

9 years agoMerge "Add netconf-cli temporary files to .gitignore"
Ed Warnicke [Tue, 8 Jul 2014 13:36:07 +0000 (13:36 +0000)]
Merge "Add netconf-cli temporary files to .gitignore"

9 years agoBUG 1204 - exception if multiple container node occures
Jozef Gloncak [Tue, 24 Jun 2014 06:13:53 +0000 (08:13 +0200)]
BUG 1204 - exception if multiple container node occures

Container schema node + multiple data nodes ->
 exception RestconfDocumentedException is raised.
List schema node + one data node (e. g. in json is specified as container
"list-name":{} and not "list-name":[{},{}...,{}] -> this is acceptable case because
list can have even only one entry.
Leaf schema node + multiple data nodes -> special check whether at
equal objects is everytime uniqe key. If it isn't so then
RestconfDocumentedException is raised. For Json specific JsonParser was
implemented which is catch duplicity at object level an time of parsing.
For XML this duplicity name check is done during normalization phase.

Change-Id: I0b544c015bcf817e82206276bd24c783093308d6
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBug 1293 - Switch packaging of config-util to bundle
Tomas Olvecky [Tue, 8 Jul 2014 09:17:19 +0000 (11:17 +0200)]
Bug 1293 - Switch packaging of config-util to bundle

Add new bundle to the distribution - config-util, that was previously
packaged as regular jar and copied into where it was required.

Change-Id: I8a28b4a0b19e4dc6cbc2d71e60cf714cca188a84
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
9 years agoAdd netconf-cli temporary files to .gitignore
Tomas Olvecky [Tue, 8 Jul 2014 09:11:40 +0000 (11:11 +0200)]
Add netconf-cli temporary files to .gitignore

Change-Id: Ic5eeab930ad0508a7e373b227d9a814ab4ae0010
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
9 years agoMerge "BUG 1016 - JSON|XML output with|without white chars"
Devin Avery [Mon, 7 Jul 2014 11:04:56 +0000 (11:04 +0000)]
Merge "BUG 1016 - JSON|XML output with|without white chars"

9 years agoMerge "BUG-692 Add log to config persister test."
Tony Tkacik [Fri, 4 Jul 2014 09:24:37 +0000 (09:24 +0000)]
Merge "BUG-692 Add log to config persister test."

9 years agoMerge "Adding a method to process Identities in a YANG Model"
Tony Tkacik [Fri, 4 Jul 2014 08:27:29 +0000 (08:27 +0000)]
Merge "Adding a method to process Identities in a YANG Model"

9 years agoBUG-692 Add log to config persister test.
Maros Marsalek [Fri, 4 Jul 2014 08:04:15 +0000 (10:04 +0200)]
BUG-692 Add log to config persister test.

Change-Id: Id77d577b2d4ff30531ee5de7b401d21a84944511
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "BUG-1041 cli proposal #1"
Tony Tkacik [Fri, 4 Jul 2014 07:48:26 +0000 (07:48 +0000)]
Merge "BUG-1041 cli proposal #1"

9 years agoAdding a method to process Identities in a YANG Model
Jozef Gloncak [Fri, 4 Jul 2014 06:54:34 +0000 (08:54 +0200)]
Adding a method to process Identities in a YANG Model

Change-Id: Ic07025c3c86d847d2882d80fa360e9a5978275df
Signed-off-by: Mayank Agarwal <mayagarw@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG 1016 - JSON|XML output with|without white chars
Jozef Gloncak [Wed, 25 Jun 2014 09:16:05 +0000 (11:16 +0200)]
BUG 1016 - JSON|XML output with|without white chars

Pretty print formating can be turned on for XML | JSON output via URI parameter
prettyPrint=true.
In other cases (prettyPrint=false, other value, missing
URI parameter...) XML | JSON output are returned as stream of characters
without white characters.

Example of URI:
http://localhost:8080/restconf/config/opendaylight-inventory:nodes?prettyPrint=true

Change-Id: I459c9663cdf8bfc78b8df67d7338a44d77c18a5c
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoMerge "Bug 1290 - Swagger Documentation is failing to load - java script exception"
Tony Tkacik [Thu, 3 Jul 2014 14:36:35 +0000 (14:36 +0000)]
Merge "Bug 1290 - Swagger Documentation is failing to load - java script exception"

9 years agoBUG-868: donot use deprecated call
Robert Varga [Wed, 2 Jul 2014 20:32:07 +0000 (22:32 +0200)]
BUG-868: donot use deprecated call

WebSocketServerHandshakerFactory.sendUnsupportedVersionResponse() is the
replacement, so use it instead of
sendUnsupportedWebSocketVersionResponse().

Change-Id: I03116f09e757df9694ac077c9e82296eaf19de90
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1281: optimize JSON codec
Robert Varga [Wed, 2 Jul 2014 19:14:47 +0000 (21:14 +0200)]
BUG-1281: optimize JSON codec

Multiple optimizations made in one go:

- do not use string concatenation for LOG.debug()
- do not use string concatenation in Preconditions.checkState()
- methods which do not need state are made static
- use chars instead of strings where possible
- do not instantiate ArrayList needlessly to access first element in a set
- optimize namespace/localname parsing by not using String.split()
- use Charset constant instead of charset name

Change-Id: If1c4ea50d7d1d2aae4f52d1dc68ff79b901208b0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1281: Optimized CompositeNodeWrapper
Robert Varga [Wed, 2 Jul 2014 18:28:52 +0000 (20:28 +0200)]
BUG-1281: Optimized CompositeNodeWrapper

When wrapping entries, we know how many we will need, so let the
ArrayList know that.

Change-Id: Ic2fc4ef451a5cdc11a8dfebccaf5a1c605e6e66d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1281: optimize ListenerAdapter
Robert Varga [Wed, 2 Jul 2014 19:28:46 +0000 (21:28 +0200)]
BUG-1281: optimize ListenerAdapter

TransformerFactory should be reused, so that's what we're doing here.
Here we do not cache the transformer, as we are called from datastore
thread, which has essentially no business in this. Same goes for
DocumentBuilderFactory.

Also, the transformation to RFC3339 timestamp was compiling the same
regex over and over, so compile it once and reuse it.

Change-Id: Ia66f42fa123bbb4f86b396520757d9bc28f7b9d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1281: cache TransformerFactory and Transformer
Robert Varga [Wed, 2 Jul 2014 19:00:03 +0000 (21:00 +0200)]
BUG-1281: cache TransformerFactory and Transformer

The code used to instantiate a TransformerFactory for each individual
request, where a single factory can be shared between threads as long as
it is not reconfigured.

As a futher optimization, we also create a thread-local cache for
transformers, as they can be use for multiple transformations.

Change-Id: I836148208be62f66cb6b509b0746e9fb92a569f0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1281: optimize ControllerContext"
Tony Tkacik [Thu, 3 Jul 2014 10:49:32 +0000 (10:49 +0000)]
Merge "BUG-1281: optimize ControllerContext"

9 years agoMerge "BUG-1275: drop a marker for follow-up"
Tony Tkacik [Thu, 3 Jul 2014 10:49:20 +0000 (10:49 +0000)]
Merge "BUG-1275: drop a marker for follow-up"

9 years agoMerge "BUG-868: Fix a warning in EmptyNodeWrapper"
Tony Tkacik [Thu, 3 Jul 2014 10:49:05 +0000 (10:49 +0000)]
Merge "BUG-868: Fix a warning in EmptyNodeWrapper"

9 years agoBug 1290 - Swagger Documentation is failing to load - java script
Devin Avery [Thu, 3 Jul 2014 10:04:07 +0000 (06:04 -0400)]
Bug 1290 - Swagger Documentation is failing to load - java script
exception

Fixed how we generated the json model representing yang union types
Fixed json model naming for nested container types.

To validate:
1) deploy fix, and load http://localhost:8080/apidoc/explorer.
2) Verify the page loads and you can expand
opendaylight-inventory:nodes.
3) Search for "node-connector" and expand a node-connector definition.
Verify that the "port-number" type says "integer or string".

Change-Id: I8aae18ba4805c3ee57cbb655807af4f15ee61756
Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoBUG-1281: optimize ControllerContext
Robert Varga [Wed, 2 Jul 2014 19:57:11 +0000 (21:57 +0200)]
BUG-1281: optimize ControllerContext

- use a single instanceof of Splitter
- do not instantiate unneeded collections
- static methods should be static
- do not use string concat in LOG.error()
- do not use String.split()

Change-Id: I16d2232ab2f9ee86f64f7abc95d9b7ce073f0c22
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-1275: drop a marker for follow-up
Robert Varga [Wed, 2 Jul 2014 20:26:33 +0000 (22:26 +0200)]
BUG-1275: drop a marker for follow-up

This class duplicates a lot of code from yangtools, so a proper middle
ground needs to be found. Drop a FIXME: so we do not forget.

Change-Id: I001c2fae9dbc1d9a13c8e91bb04ad9f3f22eaf1b
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-868: Fix a warning in EmptyNodeWrapper
Robert Varga [Wed, 2 Jul 2014 18:29:30 +0000 (20:29 +0200)]
BUG-868: Fix a warning in EmptyNodeWrapper

Simple use of deprecated method to implement the same method. Add
@Deprecated marker to silence the warning.

Change-Id: I274e7afdecdd9ece5b0b8809ad1fee53abbafef3
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-692 Improve log message when negotiation fails"
Tony Tkacik [Wed, 2 Jul 2014 15:00:54 +0000 (15:00 +0000)]
Merge "BUG-692 Improve log message when negotiation fails"

10 years agoMerge "BUG-868: remove InstanceIdentifier.getPath() users"
Tony Tkacik [Wed, 2 Jul 2014 14:13:27 +0000 (14:13 +0000)]
Merge "BUG-868: remove InstanceIdentifier.getPath() users"

10 years agoMerge changes I38344133,Ib209ceed,I3f643034,I2f4ed366
Tony Tkacik [Wed, 2 Jul 2014 14:13:14 +0000 (14:13 +0000)]
Merge changes I38344133,Ib209ceed,I3f643034,I2f4ed366

* changes:
  BUG-868: getChildren() has been superseded by getValue()
  BUG-868: mark inherited methods as deprecated
  BUG-868: remove deprecated use of QName constructors
  BUG-868: do not use deprecated InstanceIdentifier methods

10 years agoBUG-1041 cli proposal #1
Maros Marsalek [Wed, 11 Jun 2014 14:13:03 +0000 (16:13 +0200)]
BUG-1041 cli proposal #1

Generic model based cli for netconf servers.

Command are defined with yang language.

Change-Id: I9da0c764a92707d6ede3853bae021d9df01755d7
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 agoBUG-868: remove InstanceIdentifier.getPath() users
Robert Varga [Tue, 1 Jul 2014 16:18:44 +0000 (18:18 +0200)]
BUG-868: remove InstanceIdentifier.getPath() users

getPath() has been deprecated. Remove the easily call sites to
getPathArguments().

Change-Id: I2058627301404e28b58851c27d8d8117f48a7b9d
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-868: mark inherited methods as deprecated
Robert Varga [Tue, 1 Jul 2014 15:41:16 +0000 (17:41 +0200)]
BUG-868: mark inherited methods as deprecated

These methods are deprecated by the specifying class and we use them
internally. Mark them as deprecated, silencing the warnings.

Change-Id: Ib209ceed988e6407e833e16fafb69c54e350bf75
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-868: remove deprecated use of QName constructors
Robert Varga [Tue, 1 Jul 2014 15:38:34 +0000 (17:38 +0200)]
BUG-868: remove deprecated use of QName constructors

Direct instantiation of QName is deprecated, so remove references to
them.

Change-Id: I3f64303469fc655e2adfdac72377bce38439ab78
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-868: do not use deprecated InstanceIdentifier methods
Robert Varga [Tue, 1 Jul 2014 15:21:37 +0000 (17:21 +0200)]
BUG-868: do not use deprecated InstanceIdentifier methods

This removes the use of the deprecated constructor and some of the
getPath() call sites in favor of getPathArguments() and
InstanceIdentifier.create()/.node() methods.

Change-Id: I2f4ed36645408c6f780031d848af829cbe2a40d6
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-692 Improve log message when negotiation fails
Maros Marsalek [Wed, 2 Jul 2014 09:05:28 +0000 (11:05 +0200)]
BUG-692 Improve log message when negotiation fails

Change-Id: I767094a86d989f9c3eb074928b890391d6e53783
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoBug 762: Fixed bug in CsSnToXmlTest java.
Tony Tkacik [Tue, 1 Jul 2014 16:49:17 +0000 (18:49 +0200)]
Bug 762: Fixed bug in CsSnToXmlTest java.

Change-Id: I5d3621a189bd5609772bf19c1130b13e0a5e53e4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "BUG 1211 - deletion non existing target returns 500"
Tony Tkacik [Tue, 1 Jul 2014 09:18:26 +0000 (09:18 +0000)]
Merge "BUG 1211 - deletion non existing target returns 500"

10 years agoMerge "Bug:1253 - Fix NPE in config pusher"
Tony Tkacik [Mon, 30 Jun 2014 08:09:36 +0000 (08:09 +0000)]
Merge "Bug:1253 - Fix NPE in config pusher"

10 years agoBUG-874 Remove rolback cabaility advertised by config netconf
Maros Marsalek [Tue, 24 Jun 2014 11:54:57 +0000 (13:54 +0200)]
BUG-874 Remove rolback cabaility advertised by config netconf

The rollback on error option is not supported by the netconf server endpoint for config subsystem therefore it cannot advertise rollback on error capability.
If it is present in message, the rpc will fail.

Change-Id: If32113aa77d9ef5d614b143741d1d04fbdc0d22d
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoBug 484 - Anyxml in sal-rest-connector
Jozef Gloncak [Tue, 17 Jun 2014 11:22:24 +0000 (13:22 +0200)]
Bug 484 - Anyxml in sal-rest-connector

- RestconfImpl: handled AnyXmlSchemaNode

- JsonMapper: handled AnyXmlSchemaNode

- CnSnToJsonBasicDataTypesTest: added test cases for anyxml.

This commit depends (therefore is commited as draft) on commits:
- Add Anyxml normalized node to yang-data-api -
https://git.opendaylight.org/gerrit/#/c/7771/1
- Implementation of Anyxml builder -
  https://git.opendaylight.org/gerrit/#/c/8061/

Change-Id: Ib3da88cc6af96d98d139f7c1bbc94408ef9e814d
Signed-off-by: tpantelis <tpanteli@brocade.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoBug:1253 - Fix NPE in config pusher
Tomas Olvecky [Fri, 27 Jun 2014 09:38:37 +0000 (11:38 +0200)]
Bug:1253 - Fix NPE in config pusher

Add better error message when ConfigSnapshotHolder contract is voilated.
Fix
org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigSnapshot
to return empty set instead of null in getCapabilities()

Change-Id: I9783cccbe53ae69e322e1d5660ad1f3b52b007fa
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBUG 1211 - deletion non existing target returns 500
Jozef Gloncak [Tue, 24 Jun 2014 12:29:50 +0000 (14:29 +0200)]
BUG 1211 - deletion non existing target returns 500

It is checked whether data at specified path exists (via method
readConfigurationData). If it isn't so then HTTP response returning code
is set to 200.

Change-Id: I0c0f51c144ffc430ac5bcef118f485f84ae25207
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "Bug:1238 - Revert changes to SshClientAdapter."
Tony Tkacik [Wed, 25 Jun 2014 09:51:20 +0000 (09:51 +0000)]
Merge "Bug:1238 - Revert changes to SshClientAdapter."

10 years agoMerge "BUG 1179 - rpcResult = false but response 200"
Tony Tkacik [Wed, 25 Jun 2014 09:48:07 +0000 (09:48 +0000)]
Merge "BUG 1179 - rpcResult = false but response 200"

10 years agoBUG 1179 - rpcResult = false but response 200
Jozef Gloncak [Mon, 23 Jun 2014 08:59:15 +0000 (10:59 +0200)]
BUG 1179 - rpcResult = false but response 200

Case for case when collection of errors is returned was added to
RestPostOperationTest.

Change-Id: Iea6c830d957001b01996e2640d8869105cf805ca
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoBug:1238 - Revert changes to SshClientAdapter.
Tomas Olvecky [Tue, 24 Jun 2014 10:57:14 +0000 (12:57 +0200)]
Bug:1238 - Revert changes to SshClientAdapter.

Fix bug introduced in 412e6b4 by reverting back to previous state.
Also fix a resource leak in writeImpl.

Change-Id: If43741071d1471280491888078f342bc33269c5f
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Bug 1176: Lower log level when netconf ssh connection fails"
Tony Tkacik [Tue, 24 Jun 2014 09:08:25 +0000 (09:08 +0000)]
Merge "Bug 1176: Lower log level when netconf ssh connection fails"

10 years agoMerge "BUG 484 - XmlReader improve readability"
Tony Tkacik [Tue, 24 Jun 2014 07:34:49 +0000 (07:34 +0000)]
Merge "BUG 484 - XmlReader improve readability"

10 years agoMerge "Fix netconf ssh client"
Tony Tkacik [Tue, 24 Jun 2014 07:18:05 +0000 (07:18 +0000)]
Merge "Fix netconf ssh client"

10 years agoBut 1129: Removing hard coded versions from MD-SAL
Vaishali Mithbaokar [Thu, 19 Jun 2014 21:48:44 +0000 (14:48 -0700)]
But 1129: Removing hard coded versions from MD-SAL

Change-Id: Ic4ea06f1fd644808946dd5111d38152d19b9bf35
Signed-off-by: Vaishali Mithbaokar <vmithbao@cisco.com>
10 years agoMerge "BUG 1129:Removed hard coded version from netconf project as part of the automa...
Ed Warnicke [Mon, 23 Jun 2014 20:17:53 +0000 (20:17 +0000)]
Merge "BUG 1129:Removed hard coded version from netconf project as part of the automated release changes for controller"

10 years agoMerge "BUG-961 Fix Resource leak error from netty."
Tony Tkacik [Mon, 23 Jun 2014 15:48:17 +0000 (15:48 +0000)]
Merge "BUG-961 Fix Resource leak error from netty."

10 years agoBUG 484 - XmlReader improve readability
Jozef Gloncak [Mon, 16 Jun 2014 11:43:38 +0000 (13:43 +0200)]
BUG 484 - XmlReader improve readability

- XmlReader - improve readibility of methods isSimple(Composite) node by
  extracting common logic to method skipCommentsAndWhitespace.

The change comes from patch set
https://git.opendaylight.org/gerrit/#/c/7337/9
which was originally commited by Tom Pantelis. In this commit is selected
only one change which doesn't relate with BUG 484

Change-Id: Icef852da20e8f624b4bc3d61e334d88f4766474d
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoBug 1231 - fix of broken tests in sal-rest-connector
Jozef Gloncak [Mon, 23 Jun 2014 08:18:59 +0000 (10:18 +0200)]
Bug 1231 - fix of broken tests in sal-rest-connector

Dummy values were added to places where null values as SchemaPath were
presented.

Change-Id: I1a7d109ec4b9dfa24ef77adfc7aa9ccff74482c1
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoBUG-961 Fix Resource leak error from netty.
Maros Marsalek [Fri, 20 Jun 2014 15:00:50 +0000 (17:00 +0200)]
BUG-961 Fix Resource leak error from netty.

Release ByteBuf instance in ChannelInputStream.

Change-Id: I5fdf9751e05b6975778693f603e1f12b17bb4ee7
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoBug 977: Return RpcError result on neconf failure
tpantelis [Thu, 29 May 2014 01:36:13 +0000 (21:36 -0400)]
Bug 977: Return RpcError result on neconf failure

NetconfDocumentedException:
   - Added methods to convert to and from XML.

NetconfMessageTransformUtil:
   - Added code to convert a NetconfDocumentedException to an RpcError.
   - Modified checkSuccessReply and checkValidReply to throw
     NetconfDocumentedException instead of IllegalStateException.

NetconfDeviceCommunicator:
   - Modified processMessage to return an RpcError result for invalid
     message and netconf error reply.
   - Modified other places that previously returned an exception in the
     Future to intsead return an RpcError result.
   - Improved  synchronization by removing synchronized from method sigs
     and locking only the code that needs it.

SendErrorExceptionUtil:
   - Modified createDocument to call
     NetconfDocumentedException.toXMLDocument

XmlNetconfConstants:
   - Moved to netconf-api so NetconfDocumentedException could access it.

The rest of the changed files were to change the import for
XmlNetconfConstants.

Change-Id: Id0ef3ac91bbcb85c9a7a198ceac272fb07f4b9f9
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoMerge "Bug 931, Bug 910 - Enhance Restconf Swagger Documentation"
Tony Tkacik [Wed, 18 Jun 2014 16:56:03 +0000 (16:56 +0000)]
Merge "Bug 931, Bug 910 - Enhance Restconf Swagger Documentation"

10 years agoMerge "Bug 225 - added support for depth RESTCONF parameter in URI"
Tony Tkacik [Wed, 18 Jun 2014 12:34:14 +0000 (12:34 +0000)]
Merge "Bug 225 - added support for depth RESTCONF parameter in URI"

10 years agoMerge "BUG-1105: Implement subtree filtering in netconf"
Tony Tkacik [Wed, 18 Jun 2014 12:11:59 +0000 (12:11 +0000)]
Merge "BUG-1105: Implement subtree filtering in netconf"

10 years agoBug 931, Bug 910 - Enhance Restconf Swagger Documentation
Devin Avery [Mon, 16 Jun 2014 13:38:18 +0000 (09:38 -0400)]
Bug 931, Bug 910 - Enhance Restconf Swagger Documentation

    1) We now generate different data models for config and operation data stores
    2) We no longer generate URLs for leaf nodes since RESTConf doesn't support those
    3) We now expose our mount points in our system in a list, which a user can select and view the list of mounted resources
    4) Cleaned up non-ODL branding, adding in ODL branding.

    To test
    A) Add a device which has mounts in your system (consider ping 2.0 https://wiki.opendaylight.org/view/Ping_2.0_-_Discover_and_Model_Plugin or a netconf device)
    B) Navigate to http://localhost:8080/apidoc/explorer)

Patch Set 2: Original Change
Patch Set 3: Rebased, remformmated existing code which used 2 spaces instead of 4
Patch Set 4: Kicking off a second build, since I got mixed build messages.

Change-Id: Ic1f7ad60c6ccd1079d35e66c0dbc4d1a760dd0ec
Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoBUG 1129:Removed hard coded version from netconf project as part of the automated...
Vaishali Mithbaokar [Tue, 17 Jun 2014 01:41:07 +0000 (18:41 -0700)]
BUG 1129:Removed hard coded version from netconf project as part of the automated release changes for controller

Change-Id: If4884987d8a0683a7a7817bc724fa707a93e3628
Signed-off-by: Vaishali Mithbaokar <vmithbao@cisco.com>
10 years agoBug 225 - added support for depth RESTCONF parameter in URI
tpantelis [Wed, 4 Jun 2014 22:53:36 +0000 (18:53 -0400)]
Bug 225 - added support for depth RESTCONF parameter in URI

Modified RestconfImpl to prune the resulting ComositeNode tree
based on the depth parameter, if specified.

A depth of 1 retrieves just the target resource and no children. This is
a way to determine if the resource exists. A depth of 2 retrieves the
target resource and just its direct children - any child container would
be empty.

Change-Id: I44d99f9886e3837a1bb13eda84aec3c4cc6b21ae
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoBug 1176: Lower log level when netconf ssh connection fails
Tomas Olvecky [Fri, 13 Jun 2014 10:53:55 +0000 (12:53 +0200)]
Bug 1176: Lower log level when netconf ssh connection fails

Change-Id: I041a91040d33d055b8d05c3251f357c826e20c09
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoFix netconf ssh client
Tomas Olvecky [Fri, 13 Jun 2014 10:26:33 +0000 (12:26 +0200)]
Fix netconf ssh client

Do not throw exceptions from Runnable, instead log them.

Change-Id: I0e5e6cb2b23eacecc5e4b4a737437d3c4e5058b3
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBUG-272: Fix module whitespace
Robert Varga [Sun, 8 Jun 2014 18:38:17 +0000 (20:38 +0200)]
BUG-272: Fix module whitespace

This patch fixes yang module whitespace to make the structure clear.

Change-Id: I05442cff873b31a2e68f010c630a4b3da2f5c0c3
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBug 951 - Externalize cors definition of restconf
Tomas Olvecky [Wed, 7 May 2014 12:23:08 +0000 (14:23 +0200)]
Bug 951 - Externalize cors definition of restconf

Create new project called filter-valve that allows defining filters
outside of web.xml. An xml file is added to configuration folder
of distribution.

The valve allows any kind of filters to be applied around each
request, mapping contexts and path pattern same way as servlet
specification does. The xml file allows defining filter templates,
each context (WAB) can reuse and modify the common configuration.

Currently only restconf has externalized cors filter definition.

Change-Id: Ia8b6053efdff2b3c1150eec95e63b460d84c457e
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>