netconf.git
9 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>
9 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 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>
10 years agoBug 1062 - Disallow implicit serviceref creation.
Tomas Olvecky [Thu, 22 May 2014 09:46:21 +0000 (11:46 +0200)]
Bug 1062 - Disallow implicit serviceref creation.

Remove auto registration of service references by netconf. Old behaviour
was adding ref_ + module name for each interface module implements even
if it is not declared in /services node.

Fix code style warning in config-netconf-connector.

Change-Id: I8dc2b4dffac212d9b8b8243ccd7aaf290b87499b
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBug 735 - Part 2 - Modify controller to reference new yang-types bundle and and ietf...
Devin Avery [Tue, 20 May 2014 15:03:07 +0000 (11:03 -0400)]
Bug 735 - Part 2 - Modify controller to reference new yang-types bundle and and ietf-bundles.

Patch 1: Set up the restconf bundle to reference the ietf-restconf and ietf-yangtypes-2013 bundles respectively.

Patch 2: Kick off another jenkins build now that dependent artifacts exist.

Patch 3/4: Fixed version issue.

Change-Id: I68b8edc577f5b2e84661a8a4eaed2078c0623aab
Signed-off-by: Devin Avery <devin.avery@brocade.com>
10 years agoMerge "Bug 992 - Fix broken netconf xml serialization."
Tony Tkacik [Wed, 21 May 2014 16:18:51 +0000 (16:18 +0000)]
Merge "Bug 992 - Fix broken netconf xml serialization."

10 years agoCouple of warnings
Robert Varga [Tue, 20 May 2014 10:05:49 +0000 (12:05 +0200)]
Couple of warnings

This fixes a couple of warnings about pom.xml declaring duplicate things
(groupId, version).

Change-Id: Idb6e362a78cfa5d96609db6ebcc581e9349a08a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "Bug 624 - Separate netty and exi specific classes from netconf-util."
Ed Warnicke [Mon, 19 May 2014 12:39:04 +0000 (12:39 +0000)]
Merge "Bug 624 - Separate netty and exi specific classes from netconf-util."

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 "Store yang store snapshot cache using soft reference."
Ed Warnicke [Mon, 19 May 2014 12:28:20 +0000 (12:28 +0000)]
Merge "Store yang store snapshot cache using soft reference."

10 years agoBug 992 - Fix broken netconf xml serialization.
Tomas Olvecky [Wed, 14 May 2014 15:34:11 +0000 (17:34 +0200)]
Bug 992 - Fix broken netconf xml serialization.

Empty commit and restart triggered xml deserialization errors
in netconf. The problem is in type and name elements - they
should not be prefixed with 'prefix:'.

This fix triggers other bugs in md-sal modules, tracked
as dependencies of this bug. To test proper (de)serialization
with this fix, 01-netconf-connector.xml and 02-clustering.xml
must be delted.

Change-Id: I54d6ab23ec27ccbed924bf6abff95736f49dd5a3
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Trigger a GC once initial configuration has been pushed"
Tony Tkacik [Mon, 19 May 2014 09:50:34 +0000 (09:50 +0000)]
Merge "Trigger a GC once initial configuration has been pushed"

10 years agoBug 624 - Separate netty and exi specific classes from netconf-util.
Tomas Olvecky [Tue, 13 May 2014 13:26:28 +0000 (15:26 +0200)]
Bug 624 - Separate netty and exi specific classes from netconf-util.

As preparation step for splitting netconf into service and protocol,
create netconf-netty-util bundle with classes dependent on protocol
handlers - netty, exi, ssh.

Change-Id: I22ba17d0fa4f86c5f64cb3258a55f2c54da85dee
Signed-off-by: Tomas Olvecky <tolvecky@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 1002 - REST POST transaction is not commited"
Tony Tkacik [Thu, 15 May 2014 12:02:38 +0000 (12:02 +0000)]
Merge "Bug 1002 - REST POST transaction is not commited"

10 years agoBug 1002 - REST POST transaction is not commited
Vaclav Demcak [Wed, 14 May 2014 12:39:10 +0000 (14:39 +0200)]
Bug 1002 - REST POST transaction is not commited

fix REST POST create workflow (create data only), fix according to specification
  http://tools.ietf.org/html/draft-bierman-netconf-restconf-03#section-2.4

I'm missing implementation for ietf-restconf:errors, so I can't do more for now
  http://tools.ietf.org/html/draft-bierman-netconf-restconf-03#page-48

* fix a check for an existing node in DataStore
* add warn log and a correct ResponseException
* fix tests for BrokerFacade

Change-Id: I68c95e831f42cae4df0608a40c585251a631693f
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
10 years agoTrigger a GC once initial configuration has been pushed
Robert Varga [Wed, 14 May 2014 22:04:17 +0000 (00:04 +0200)]
Trigger a GC once initial configuration has been pushed

This introduces a single run of GC once we complete the initial
configuration.

The reasoning behind that is that we generate a fair amount of metadata
which we are likely to retain unmodified for extended periods of time.
We take care to store it in both memory and CPU efficient format, which
unfortunately requires us to do some copying around to compact it,
leaving a sizeable chunk of garbage on the heap.

Change-Id: I81af7d317e3b6f82a431e78b5fb439d8cb5f1997
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG 1001 Failing test - RestGetOperationTest.getStreamsTest"
Tony Tkacik [Wed, 14 May 2014 10:16:45 +0000 (10:16 +0000)]
Merge "BUG 1001 Failing test - RestGetOperationTest.getStreamsTest"

10 years agoBUG 1001 Failing test - RestGetOperationTest.getStreamsTest
Jozef Gloncak [Wed, 14 May 2014 08:23:24 +0000 (10:23 +0200)]
BUG 1001 Failing test - RestGetOperationTest.getStreamsTest

responseBody variable now contained some data and therefore it wasn't xml
tag <streams/> but <streams></streams>

Change-Id: I73004f848f0dfc5f2929f8f8ea2dbd6afc25d35a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "Bug 617: Remove extend files from sal-rest-connector"
Tony Tkacik [Tue, 13 May 2014 15:02:41 +0000 (15:02 +0000)]
Merge "Bug 617: Remove extend files from sal-rest-connector"

10 years agoMerge "BUG-704 Remove pax from netconf identity-ref test."
Tony Tkacik [Mon, 12 May 2014 16:35:07 +0000 (16:35 +0000)]
Merge "BUG-704 Remove pax from netconf identity-ref test."

10 years agoStore yang store snapshot cache using soft reference.
Tomas Olvecky [Mon, 12 May 2014 12:58:53 +0000 (14:58 +0200)]
Store yang store snapshot cache using soft reference.

Change-Id: I9b159db83ba204b4a636f2314fd4fc2e7b6f654c
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoBUG-704 Remove pax from netconf identity-ref test.
Maros Marsalek [Fri, 9 May 2014 12:58:08 +0000 (14:58 +0200)]
BUG-704 Remove pax from netconf identity-ref test.

Make this test a regular unit test without pax.

Change-Id: I0f9767d860f25bb60494ded2011e3f398fbcf43f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
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 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-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 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 agoMerge "Bug 946: Fixed eclipse errors with nagasena projects"
Tony Tkacik [Wed, 7 May 2014 11:14:22 +0000 (11:14 +0000)]
Merge "Bug 946: Fixed eclipse errors with nagasena projects"

10 years agoBug 617: Remove extend files from sal-rest-connector
tpantelis [Sun, 4 May 2014 17:29:22 +0000 (13:29 -0400)]
Bug 617: Remove extend files from sal-rest-connector

Converted ControllerContext and BrokerFacade xtend code to java.

Addressed review comments:
  - Removed SupressWarnings "all"
  - Converted use of xext classes to guava
  - Removed sneakyThrow

Patch set 4: mistake - no changes

Patch set 5: Converted RestconfImpl

Patch set 6: removed xtend plugin anf dependencies from pom file

Change-Id: I45c22b22fee07a178faba9fcb9e52d3ff12a6697
Signed-off-by: tpantelis <tpanteli@brocade.com>
10 years agoMerge "Bug: 627 Added RESTConf API Explorer that dynamically generates API documentat...
Tony Tkacik [Tue, 6 May 2014 06:52:40 +0000 (06:52 +0000)]
Merge "Bug: 627 Added RESTConf API Explorer that dynamically generates API documentation and serves it through swagger UI. Details are documented in this wiki: https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf_API_Explorer"

10 years agoMerge changes I05e784af,Ie975a2ec
Tony Tkacik [Tue, 6 May 2014 06:49:43 +0000 (06:49 +0000)]
Merge changes I05e784af,Ie975a2ec

* changes:
  BUG-693 Config module for netconf client dispatcher.
  BUG-938 Fix negotiation error when using exi

10 years agoMerge "Skip from the surefire execution plugins that can step over guava feet"
Ed Warnicke [Mon, 5 May 2014 12:10:39 +0000 (12:10 +0000)]
Merge "Skip from the surefire execution plugins that can step over guava feet"