netconf.git
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 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>
10 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"

10 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>
10 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>
10 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>
10 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>
10 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>
10 years agoMerge "BUG-1281: optimize ControllerContext"
Tony Tkacik [Thu, 3 Jul 2014 10:49:32 +0000 (10:49 +0000)]
Merge "BUG-1281: optimize ControllerContext"

10 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"

10 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"

10 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>
10 years agoMerge changes I52e0dd0d,I6dbf3316,Iafae27bc,Ibbb1250b,Icdb56d14,I7ede1482,Ib335fd1d...
Tony Tkacik [Tue, 10 Jun 2014 19:33:30 +0000 (19:33 +0000)]
Merge changes I52e0dd0d,I6dbf3316,Iafae27bc,Ibbb1250b,Icdb56d14,I7ede1482,Ib335fd1d,I6ce09820,I621fa3a4

* changes:
  BUG-272: fix issues in sal-rest-docgen
  BUG-272: fix sal-binding-api
  BUG-272: fix sal-compatibility
  BUG-272: fix sal-dom-spi
  BUG-272: fix sal-dom-broker
  BUG-272: fix sal-remoterpc-connector
  BUG-272: fix remoterpc-routingtable
  BUG-272: fix sal-dom-api
  BUG-272: fix sal-binding-broker

10 years agoMerge changes I63383291,I1c9f10e9,I9cac529f,I269d373b,I7ede3ba5,I4afc1e15
Tony Tkacik [Tue, 10 Jun 2014 17:32:19 +0000 (17:32 +0000)]
Merge changes I63383291,I1c9f10e9,I9cac529f,I269d373b,I7ede3ba5,I4afc1e15

* changes:
  BUG-272: fix sal-common-api
  BUG-272: fix sal-netconf-connector
  BUG-272: fix toaster-consumer
  BUG-272: cleanup sal-rest-connector
  BUG-272: use L for long suffix
  BUG-272: remove empty statements

10 years agoBUG-272: fix issues in sal-rest-docgen
Robert Varga [Tue, 10 Jun 2014 12:51:08 +0000 (14:51 +0200)]
BUG-272: fix issues in sal-rest-docgen

This fixes some small issues in sal-rest-docgen.

Change-Id: I52e0dd0d4aaed1363f203e81acf3922b4dd285b5
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-272: cleanup sal-rest-connector
Robert Varga [Tue, 10 Jun 2014 09:15:04 +0000 (11:15 +0200)]
BUG-272: cleanup sal-rest-connector

Preparatory patch, expand wildcard imports to get rid of checkstyle
failures. Save action added final keywords where appropriate.

Change-Id: I269d373bed9fd83d3837f9ed4d3ff7fc105d7305
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-272: remove empty statements
Robert Varga [Tue, 10 Jun 2014 09:05:54 +0000 (11:05 +0200)]
BUG-272: remove empty statements

Preparatory patch: removes reported empty statements.

Change-Id: I4afc1e15efe6edd5d48ea8f40e189ee1e1774d4e
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-272: remove tabs from Java files"
Tony Tkacik [Tue, 10 Jun 2014 11:02:28 +0000 (11:02 +0000)]
Merge "BUG-272: remove tabs from Java files"

10 years agoMerge "BUG-272: remove trailing whitespace from Java files"
Tony Tkacik [Tue, 10 Jun 2014 10:47:22 +0000 (10:47 +0000)]
Merge "BUG-272: remove trailing whitespace from Java files"

10 years agoMerge "BUG-272: remove trailing whitespace from XML files"
Tony Tkacik [Tue, 10 Jun 2014 10:46:50 +0000 (10:46 +0000)]
Merge "BUG-272: remove trailing whitespace from XML files"

10 years agoMerge "BUG-272: remove tabs from XML files"
Tony Tkacik [Tue, 10 Jun 2014 10:46:37 +0000 (10:46 +0000)]
Merge "BUG-272: remove tabs from XML files"

10 years agoBUG-272: remove tabs from Java files
Robert Varga [Tue, 10 Jun 2014 09:02:29 +0000 (11:02 +0200)]
BUG-272: remove tabs from Java files

Preparatory patch: bulk-convert tabs to 4 spaces.

Change-Id: I4c24c763faf41cb4fcfd0277f8b3c7511269e9b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-272: remove trailing whitespace from Java files
Robert Varga [Tue, 10 Jun 2014 08:58:26 +0000 (10:58 +0200)]
BUG-272: remove trailing whitespace from Java files

Preparatory patch, bulk-removes all trailing whitespace from Java files.

Change-Id: I1fbef5746df7277b3865429d4faa82fc8ba8cbb5
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-272: remove trailing whitespace from XML files
Robert Varga [Tue, 10 Jun 2014 08:56:20 +0000 (10:56 +0200)]
BUG-272: remove trailing whitespace from XML files

Preparatory patch, bulk-removes trailing whitespace.

Change-Id: I32287893c6ed3079aa7926567f8d0705f8607564
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-272: remove tabs from XML files
Robert Varga [Tue, 10 Jun 2014 08:54:33 +0000 (10:54 +0200)]
BUG-272: remove tabs from XML files

Preparatory patch, replaces tabs with 4 spaces.

Change-Id: I84bff9c83d19b9252cf277f23d2931e2ba8dd6de
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-1105: Implement subtree filtering in netconf
Tomas Olvecky [Thu, 5 Jun 2014 15:43:20 +0000 (17:43 +0200)]
BUG-1105: Implement subtree filtering in netconf

Implement subtree filtering according to RFC 6241 section 6.
Current implementation first gathers response XML, then
applies filtering. Since netconf server is pluggable,
modules that might consume significant amount of time
to build their response can read the filter and optimize
their result. Even if modules do not support filtering,
their result is filtered by SubtreeFilter right before
sending out the aggregated response.

Change-Id: Ica04f8f3adfe06599e54a577fceca0508554d667
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBUG-981: Fix XML serialization test
Robert Varga [Sun, 8 Jun 2014 18:56:59 +0000 (20:56 +0200)]
BUG-981: Fix XML serialization test

Since commit 7624eedc495e85d12c2c2c56efb09dfd9406f977 changed XML
resolution rules such that XML namespace is required to properly
identify a node.

This broke serialization tests, which did not provide module/revision
identification -- which meant serialized data was being handled by
String encoder. The string encoder does not do the right thing for
arrays -- which broke the bits and binary encoding tests.

Fix the tests to specify module/revision, thus matching conforming to
schema.

Change-Id: I5cbee0e19b85ebe3a5cf181a0e2d2ca044bfe07e
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Checkstyle plugin check - config & netconf"
Tony Tkacik [Fri, 6 Jun 2014 08:19:33 +0000 (08:19 +0000)]
Merge "Checkstyle plugin check - config & netconf"

10 years agoMerge "BUG 624 - Make netconf TCP port optional."
Tony Tkacik [Fri, 6 Jun 2014 08:14:13 +0000 (08:14 +0000)]
Merge "BUG 624 - Make netconf TCP port optional."

10 years agoMerge "Bug 762: Fix sal-rest-connector unit tests"
Ed Warnicke [Thu, 5 Jun 2014 16:06:54 +0000 (16:06 +0000)]
Merge "Bug 762: Fix sal-rest-connector unit tests"

10 years agoCheckstyle plugin check - config & netconf
Milos Fabian [Wed, 4 Jun 2014 14:13:04 +0000 (16:13 +0200)]
Checkstyle plugin check - config & netconf

-violations do not fail build
-rules defined in yangtools/common/checkstyle-logging:
https://git.opendaylight.org/gerrit/#/c/7595/
https://git.opendaylight.org/gerrit/#/c/7108/

Change-Id: I2b1c458c09068c4a520afe37b3adb26e503882ba
Signed-off-by: Milos Fabian <milfabia@cisco.com>
10 years agoBug 762: Fix sal-rest-connector unit tests
tpantelis [Sun, 25 May 2014 04:04:21 +0000 (00:04 -0400)]
Bug 762: Fix sal-rest-connector unit tests

The cnsn-to-json/simple-data-types/xml/data.xml test file used by
CnSnToJsonBasicDataTypesTest actually contains some invalid union type data.
The tests currently pass because union type input data isn't currently
validated. Patch https://git.opendaylight.org/gerrit/#/c/7367/
in yangtools adds validation so the unit tests must be fixed before
that patch is merged.

In addition, the yangtools patch changes some static fields in
TypeDefinitionAwareCodec to private which breaks compilation of
CnSnToXmlTest. This patch modifies CnSnToXmlTest to not use the static
fields.

Change-Id: I020ffacd4a6c96265a191fa74f982de807e336a4
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoMerge "Do not use deprecated destroyConfigBean in config tests"
Tony Tkacik [Wed, 4 Jun 2014 14:25:52 +0000 (14:25 +0000)]
Merge "Do not use deprecated destroyConfigBean in config tests"

10 years agoDo not use deprecated destroyConfigBean in config tests
Tomas Olvecky [Wed, 4 Jun 2014 09:32:54 +0000 (11:32 +0200)]
Do not use deprecated destroyConfigBean in config tests

Replace org.opendaylight.controller.config.util.ConfigTransactionJMXClient
destroyConfigBean with destroyModule in tests.
Test resource leaks in FixedThreadPoolConfigBeanTest.

Change-Id: If3847d3cb9211d9e830006400c258dad9e6ffb35
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Bug 1100 - Invoking an RPC with no input should not throw 500 when expected"
Tony Tkacik [Tue, 3 Jun 2014 16:21:56 +0000 (16:21 +0000)]
Merge "Bug 1100 - Invoking an RPC with no input should not throw 500 when expected"

10 years agoBUG 624 - Make netconf TCP port optional.
Tomas Olvecky [Tue, 27 May 2014 10:41:16 +0000 (12:41 +0200)]
BUG 624 - Make netconf TCP port optional.

Previously netconf-impl opened a TCP port with no authentication on
localhost, and netconf-ssh used it as a bridge to forward trafic
after processing authentication and encryption.

This patch creates new project netconf-tcp and modifies netconf-impl
to open the netconf server on LocalAddress. Both tcp and ssh modules
now communicate with this local server.
Config ini is modified so that the TCP port (8383) is not enabled
by default.

Change-Id: I74bded660f10b20d09535d32308aff5b2ae611d9
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBug 981: Converted test to use BitsType.create()
Tony Tkacik [Fri, 30 May 2014 14:39:36 +0000 (16:39 +0200)]
Bug 981: Converted test to use BitsType.create()

Change-Id: I759c55c48de64e48c5757aba5b7665f2478aa0fb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "Bug 1003: Restconf - remove whitespace on input"
Tony Tkacik [Fri, 30 May 2014 12:33:04 +0000 (12:33 +0000)]
Merge "Bug 1003: Restconf - remove whitespace on input"

10 years agoBug 1100 - Invoking an RPC with no input should not throw 500 when expected
Devin Avery [Thu, 29 May 2014 20:42:03 +0000 (16:42 -0400)]
Bug 1100 - Invoking an RPC with no input should not throw 500 when expected

Patch Set 3:
*Modified the Json/Xml readers to not throw an except if the content is empty
*Moved the validation of non empty object into restconf where the knowledge
of what is expected exists.

Change-Id: I4e689770d1a6843e99ce498bd12cecc5e1817eaa
Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoBug 1010: Implement restconf error responses
tpantelis [Thu, 8 May 2014 18:25:02 +0000 (14:25 -0400)]
Bug 1010: Implement restconf error responses

- RestconfError (new): encapsulates error information as defined in the
  RESTCON RFC.

- RestconfDocumentedException (new): exception that wraps RestconError info.

- RestconfDocumentedExceptionMapper (new): JAX-RS ExceptionMapper that
  translates a RestconfDocumentedException appropriately to XML or
  JSON depending on the user's mime type.

- JsonMapper: modified to handle null child schema as restconf error-info
  is defined as 'anyxml' and thus no schema may be present.

- ControllerContext: added getRestconfModuleErrorsSchemaNode method to
  obtain the 'errors' container schema from the ietf-restconf module.

- Removed ResponseException and changed occurrences in various classes that
  threw ResponseException to throw RestconfDocumentedException instead.

- Added unit tests for new classes and modified existing ones
  accordingly.

Change-Id: Idbe6f6cae9b40ba14701ee05dfadfdd51e961c6b
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoMerge "BUG-624 make netconf tcp address optional in config.ini with default value...
Tony Tkacik [Mon, 26 May 2014 19:49:08 +0000 (19:49 +0000)]
Merge "BUG-624 make netconf tcp address optional in config.ini with default value set to 127.0.0.1:8383"

10 years agoMerge "Bug 1036 - Allow using container in case stmt to preserve uniqueness."
Tony Tkacik [Mon, 26 May 2014 19:48:32 +0000 (19:48 +0000)]
Merge "Bug 1036 - Allow using container in case stmt to preserve uniqueness."

10 years agoBUG-624 make netconf tcp address optional in config.ini with default value set to...
Tomas Olvecky [Mon, 26 May 2014 09:49:00 +0000 (11:49 +0200)]
BUG-624 make netconf tcp address optional in config.ini with default value set to 127.0.0.1:8383

Change-Id: I2a5732bd6bbb010b03d7daebb6bf30633ad536fb
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBug 1003: Restconf - remove whitespace on input
tpantelis [Mon, 26 May 2014 05:47:18 +0000 (01:47 -0400)]
Bug 1003: Restconf - remove whitespace on input

JsonReader, XmlReader:
   - Trimmed whitespace on leaf data input

AbsractRpcExecutor, BrokerRpcExecutor, MountPointRpcExecutor:
   - Modified to handle IllegalArgumentEx and UnsupportedOperationEx
     thrown from invokeRpc to throw appropriate ResconfDocumentedEx.

ResconfDocumentedExeptionMapper, RestconfError, RestconfErrorTest:
   - I discovered that the Response.Status.NOT_IMPLEMENTED jaxrs enum
     is defined in the enum class that is used at compile time but
     isn't defined in the run time enum class provided by jersey.
     So I changed RestconfError.ErrorTag to store the integer status
     code (501) instead of the enum. Ideally compile and run time
     should use the same lib.

- SchemaAwareRpcBroker:
   - Modified to throw UnsupportedOperationEx if no RPC impl is found
     so the restconf front-end can yield the appropriate
     501 (Not Implemented) status code.

Change-Id: Ibfa1dc7ff1526b6d352b9f4e6be2aae0d19ab655
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoMerge changes I8dc2b4df,I09e448f4
Tony Tkacik [Fri, 23 May 2014 15:11:10 +0000 (15:11 +0000)]
Merge changes I8dc2b4df,I09e448f4

* changes:
  Bug 1062 - Disallow implicit serviceref creation.
  Bug 1062 - Allow multiple service references with same name.

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 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 agoMerge "Bug 735 - Part 2 - Modify controller to reference new yang-types bundle and...
Tony Tkacik [Fri, 23 May 2014 12:34:21 +0000 (12:34 +0000)]
Merge "Bug 735 - Part 2 - Modify controller to reference new yang-types bundle and and ietf-bundles."

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 1036 - Allow using container in case stmt to preserve uniqueness.
Tomas Olvecky [Tue, 20 May 2014 12:26:07 +0000 (14:26 +0200)]
Bug 1036 - Allow using container in case stmt to preserve uniqueness.

Modify yang-jmx-generator and config-netconf-connector to allow adding
dummy container node.
This allows declaring multiple config modules with same attributes within
single yang module.

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