netconf.git
7 years agoClose read-only transactions 52/55252/2
Robert Varga [Wed, 19 Apr 2017 17:12:53 +0000 (19:12 +0200)]
Close read-only transactions

As noted in API, read-only transactions are resources and must
be closed just as any other external resource.

Change-Id: I0f2d888a31edf242bc48410e6f2d4dfeed43a6b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoBUG-7868: perform checks before starting modifications 05/55205/1
Robert Varga [Wed, 19 Apr 2017 11:10:28 +0000 (13:10 +0200)]
BUG-7868: perform checks before starting modifications

The codepath for makeNormalPost() performs sub-optimal emulation
of create().

This patch changes the logic to first check for presence and then
perform modifications. This saves cycles as continuous modify/read
cycles incur heavy penalty on DataTree and also allows batching
of modification requests.

Change-Id: Ic8e18ada094334948170f2a147da806db7db1a16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoBug 8115: Change URI decoding from ISO-8859-1 to UTF-8 41/54941/1
Ivan Hrasko [Thu, 13 Apr 2017 08:02:00 +0000 (10:02 +0200)]
Bug 8115: Change URI decoding from ISO-8859-1 to UTF-8

Change-Id: I3bcc7cae197aa267a43c8598f54050e987712c9a
Signed-off-by: lbeles <lbeles@frinx.io>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoUpdate .gitreview to stable/carbon 57/54657/1
Anil Belur [Tue, 11 Apr 2017 01:26:30 +0000 (11:26 +1000)]
Update .gitreview to stable/carbon

Change-Id: I05e7984e429355925418639de94a02f85b78a9aa
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoMerge "Fix formatting in callhome-provider"
Tomas Cere [Fri, 7 Apr 2017 12:37:46 +0000 (12:37 +0000)]
Merge "Fix formatting in callhome-provider"

7 years agoMerge "BUG-7529: Karaf 4 Migration"
Jakub Morvay [Thu, 6 Apr 2017 09:52:06 +0000 (09:52 +0000)]
Merge "BUG-7529: Karaf 4 Migration"

7 years agoFix formatting in callhome-provider 14/54314/1
Tomas Cere [Tue, 4 Apr 2017 14:09:38 +0000 (16:09 +0200)]
Fix formatting in callhome-provider

Change-Id: Iaf85efcc8a1233717f947ada3ff9a47ad2a6d328
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoBug 8095: Add operational devices to call home collection. 02/54002/10
Allan Clarke [Tue, 28 Mar 2017 18:36:55 +0000 (19:36 +0100)]
Bug 8095: Add operational devices to call home collection.

Original call home feature has config presence but not operational.
Operational devices are more convenient for monitoring
populations of call home devices (and will be richer model
in future).

Change includes adding a call home status (connected, disconnected, ...)
to operational devices.

Address "functional" checkstyle issues. Turn on checkstyle to list all
issues and fix all that have a non-cosmetic impact (unused imports,
catching exceptions, ...).

Reenable @Ignored unit tests

Change-Id: I3382e67414a9208c65b967c1a2ebaa3247cd4fba
Signed-off-by: Allan Clarke <clarkea@brocade.com>
7 years agoBUG-7529: Karaf 4 Migration 94/54194/2
Claudio D. Gasparini [Fri, 31 Mar 2017 15:37:23 +0000 (17:37 +0200)]
BUG-7529: Karaf 4 Migration

Add missing karaf 4 features to artifacts.

Change-Id: Ie259e875aa8f2c6cf743ee7b821fa25b144bf255
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
7 years agoMerge "Bug 8086 - Cannot mount honeycomb in clustered odl on CentOS"
Tomas Cere [Fri, 31 Mar 2017 11:05:37 +0000 (11:05 +0000)]
Merge "Bug 8086 - Cannot mount honeycomb in clustered odl on CentOS"

7 years agoMerge "Option to receive only leaf nodes in websocket notifs"
Tomas Cere [Thu, 30 Mar 2017 11:43:46 +0000 (11:43 +0000)]
Merge "Option to receive only leaf nodes in websocket notifs"

7 years agoBug 8086 - Cannot mount honeycomb in clustered odl on CentOS 17/54017/2
Jakub Morvay [Wed, 29 Mar 2017 08:22:16 +0000 (10:22 +0200)]
Bug 8086 - Cannot mount honeycomb in clustered odl on CentOS

Change-Id: I596cc8b7e0ed04b224bad6b7fa98555c8ef172e2
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "BUG-1422 Introduce Call-Home functionality for the NETCONF Topology."
Jakub Morvay [Tue, 28 Mar 2017 15:04:01 +0000 (15:04 +0000)]
Merge "BUG-1422 Introduce Call-Home functionality for the NETCONF Topology."

7 years agoBUG-1422 Introduce Call-Home functionality for the NETCONF Topology. 53/49253/21
Balaji [Wed, 11 Jan 2017 17:04:27 +0000 (09:04 -0800)]
BUG-1422 Introduce Call-Home functionality for the NETCONF Topology.

Introduce Call-Home reversed SSH support.

Basic support for host key based white-list and authorization by username/password.
Rebased with master; some code flaws fixed
Addressed minor code fixes
Addressed most of Tomas' review issues
Addressed Jakub's review issues
Addressed more or Tomas' review issues
Removed mistaken hoisting of odl-netconf-callhome-ssh to be topmost feature
Reenabled "ignored" unit tests

Change-Id: If3e3c9fdd0af0c97043f8930b7f922586863cabf
Signed-off-by: Balaji <bvaradar@brocade.com>
Signed-off-by: Mike Arsenault <mike@mike-arsenault.com>
Signed-off-by: Allan Clarke <clarkea@brocade.com>
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
7 years agoBug 8072: Fix decoding of URLs with external identityref 88/53788/3
Marek Gradzki [Fri, 24 Mar 2017 09:49:52 +0000 (10:49 +0100)]
Bug 8072: Fix decoding of URLs with external identityref

Mount point schema (rather than global) should be used
to decode identitirefs defined in external modules.

Change-Id: I51f135fe0cd5ceee39d5a2e6f0fc62631cf4437b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoFix LibraryModulesSchemasTest failure 77/53777/5
Jakub Morvay [Fri, 24 Mar 2017 08:59:11 +0000 (09:59 +0100)]
Fix LibraryModulesSchemasTest failure

LibraryModulesSchemasTest#testCreateInvalidModulesEntries() tests
filtering invalid modules entries during resolving
ietf-netconf-yang-library/modules-state/modules node.

Resolution goes as follows. We parse xml document containing
ietf-netconf-yang-library/modules-state retrieved from the device with
help of DomToNormalizedNodeParserFactory. Then we filter invalid modules
entries from the parsed modules list node. Module entry is considered
invalid if its revision or schema url are invalid.

However, change in yangtools
https://git.opendaylight.org/gerrit/#/c/53553 causes that parsing
invalid revision will fail whole parsing xml process with unchecked
exception.

For now, do not test modules with bad revision. This is intended just as
a temporary solution. We will also need to slightly change our
ietf-netconf-yang-library/modules-state/modules node resolution logic.
Opened BUG 8071 to track that.

Change-Id: If12ae8d7bf94528088aac81e78b24058c5152283
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Handle shcema without namespace."
Jakub Morvay [Wed, 22 Mar 2017 14:21:52 +0000 (14:21 +0000)]
Merge "Handle shcema without namespace."

7 years agoHandle shcema without namespace. 67/52667/12
David Goldberg [Thu, 2 Mar 2017 16:16:03 +0000 (18:16 +0200)]
Handle shcema without namespace.

currently when the ODL connects to a device and recieves a schema
without a namespace it disconnects.
This fix allows the ODL to ignore schemas without namespaces, but still
maintains the connection and handles the rest of the schemas which do
have a namespace.

Change-Id: I9134fce17a85a2b5111e5acd0c63516f4c356db8
Signed-off-by: David Goldberg <gdavid@hpe.com>
7 years agoBug: 8037 YANG Patch using "replace" instead of "merge" 39/53639/2
Wenbo Hu [Tue, 21 Mar 2017 23:46:39 +0000 (10:46 +1100)]
Bug: 8037 YANG Patch using "replace" instead of "merge"

Change-Id: Ic53b0649b52529e9bf244b82d85582d343aa95e9
Signed-off-by: Wenbo Hu <huwenbo1988@gmail.com>
7 years agoFix autorelease by using correct prerequisite version 19/53619/1
Vratko Polak [Tue, 21 Mar 2017 15:25:43 +0000 (16:25 +0100)]
Fix autorelease by using correct prerequisite version

Change-Id: I404274ec27d6f4a0b9306c6a69a0cda174a15e35
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBug 7812: NPE when NetconfDeviceSalProvider.close 46/52346/8
Andrej Mak [Tue, 28 Feb 2017 09:14:50 +0000 (10:14 +0100)]
Bug 7812: NPE when NetconfDeviceSalProvider.close

Clustered connector close logic could be called twice on master.
Add boolean guard field to prevent this.

Add null check to netconf device sal provider close method
to prevent NPE.

Change-Id: Ib84be162826726169fb254a933781bb39dce604a
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoOption to receive only leaf nodes in websocket notifs 73/52173/8
Josh [Wed, 22 Feb 2017 13:06:36 +0000 (15:06 +0200)]
Option to receive only leaf nodes in websocket notifs

Change for Bug-7718 in the netvirt project.

The notifications sent over websockets contain the
entire subtree, even if just one node changed. This is
very inefficient for monitoring subtrees that may have
large numbers of nodes. Point in case, we need to monitor
changes to the port statuses under /neutron/ports/ but we
do not want to have to IO and parse the entire list of
ports for each change. This change proposes a new query
parameter to the "data-change-event-subscription" REST call
that specifies that the subscriber is only interested in
receiving the leaf nodes that have changed. Each leaf node
is (already) accompanied by its path.

Here are examples of the notifications sent with the query
param and without. The notification is generated by one of
two port's status transitioning from DOWN to ACTIVE.

Here it is without the query param. Note how all existing
ports are sent. Note how the status is sent three times
and the port twice (the notification send each level of the
tree in it's entirety):
{
    "notification": {
        "data-changed-notification": {
            "data-change-event": [
                {
                    "data": {
                        "status": {
                            "content": "ACTIVE",
                            "xmlns": "urn:opendaylight:neutron"
                        }
                    },
                    "operation": "updated",
                    "path": "/neutron:neutron/neutron:ports/neutron:port[neutron:uuid='97a251dc-3bbe-49b1-a08f-b164922bb0c3']/neutron:status"
                },
                {
                    "data": {
                        "port": {
                            "status": "ACTIVE",
                            "uuid": "97a251dc-3bbe-49b1-a08f-b164922bb0c3",
                            "xmlns": "urn:opendaylight:neutron"
                        }
                    },
                    "operation": "updated",
                    "path": "/neutron:neutron/neutron:ports/neutron:port[neutron:uuid='97a251dc-3bbe-49b1-a08f-b164922bb0c3']"
                },
                {
                    "data": {
                        "ports": {
                            "port": [
                                {
                                    "status": "ACTIVE",
                                    "uuid": "97a251dc-3bbe-49b1-a08f-b164922bb0c3"
                                },
                                {
                                    "status": "ACTIVE",
                                    "uuid": "2278122f-1e21-4557-8631-c9cef5299ba4"
                                }
                            ],
                            "xmlns": "urn:opendaylight:neutron"
                        }
                    },
                    "operation": "updated",
                    "path": "/neutron:neutron/neutron:ports"
                }
            ],
            "xmlns": "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"
        },
        "eventTime": "2017-02-22T02:42:08+02:00",
        "xmlns": "urn:ietf:params:xml:ns:netconf:notification:1.0"
    }
}

Here is the same exact notification but generated with a registration
using the new query param:
{
    "notification": {
        "data-changed-notification": {
            "data-change-event": {
                "data": {
                    "status": {
                        "content": "ACTIVE",
                        "xmlns": "urn:opendaylight:neutron"
                    }
                },
                "operation": "updated",
                "path": "/neutron:neutron/neutron:ports/neutron:port[neutron:uuid='d6e6335d-9568-4949-aef1-4107e34c5f28']/neutron:status"
            },
            "xmlns": "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"
        },
        "eventTime": "2017-02-22T02:27:32+02:00",
        "xmlns": "urn:ietf:params:xml:ns:netconf:notification:1.0"
    }
}

Here is an example of the REST call with the new query param:
curl -u admin:admin http://10.9.8.1:8181/restconf/streams/stream/data-change-event-subscription/neutron:neutron/neutron:ports/datastore=OPERATIONAL/scope=SUBTREE?odlLeafNodesOnly=true

Also fixed the existing unit test and added one. However,
there are some issues with jersey where sporadically the
InputStream it passes in to read the post data is EoF.

Change-Id: Ic383a28396f32132da73d4d92fc020c93278eb00
Signed-off-by: Josh <jhershbe@redhat.com>
7 years agoFix autorelease fail 86/53386/1
Ivan Hrasko [Thu, 16 Mar 2017 08:28:34 +0000 (09:28 +0100)]
Fix autorelease fail

- fix regression caused by https://git.opendaylight.org/gerrit/#/c/53297

Change-Id: Ib2a53de21d7fd050bcaa37bcf040853ac617f5f7
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 7987: Json HTTP PATCH: Problem parsing simple leaf value 13/53313/2
Ivan Hrasko [Wed, 15 Mar 2017 07:41:54 +0000 (08:41 +0100)]
Bug 7987: Json HTTP PATCH: Problem parsing simple leaf value

Change-Id: I8094797fc2a26bd809631d995a29e111320e664e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 7906: Fixed json parsing on patch request 88/52888/8
David Goldberg [Sun, 5 Mar 2017 12:50:33 +0000 (14:50 +0200)]
Bug 7906: Fixed json parsing on patch request

Currently lists with simple objects (string, int, etc.) are not
supported in the patch request. This commit adds support for that.

Change-Id: I4310a683aa42271b914c5dd8c3349bb2bac9e971
Signed-off-by: David Goldberg <gdavid@hpe.com>
7 years agoSwitch time keeping to java.time interfaces 89/53189/8
Robert Varga [Sun, 12 Mar 2017 00:15:44 +0000 (01:15 +0100)]
Switch time keeping to java.time interfaces

Date-based interfaces are not thread-safe and ambiguous, Java 8
gives us java.time, which has proper domain model.

Change-Id: I6b0fa37c008a96ed6a47afc68a809570fd1848a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoEliminate ListenerConstants 88/53188/7
Robert Varga [Sat, 11 Mar 2017 23:03:08 +0000 (00:03 +0100)]
Eliminate ListenerConstants

These constatns are used only in AbstractNotificationData, inline them
in that class.

lso convert to using Java 8 Time API to fix thread-safety issues with
SimpleDateFormat. Since we need to choose an appropriate API, we choose
to report instants in UTC, so we do not have a dependency on the concept
of the local time zone.

Change-Id: I68153d525960d47e6ff60634df976d472beb2176
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoClean up revision formatting 94/53194/1
Robert Varga [Sun, 12 Mar 2017 10:41:10 +0000 (11:41 +0100)]
Clean up revision formatting

Remove open-coded revision formats and use cached formatted
revisions where available.

Change-Id: I0f41f3f449cb0fd1abab11ef5e93adb636c19b8b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoSimplify data encoding in AbstractNotificationsData 87/53187/1
Robert Varga [Sat, 11 Mar 2017 22:49:39 +0000 (23:49 +0100)]
Simplify data encoding in AbstractNotificationsData

Rather than performing a two-step conversion via a writer,
output stream directly into bytes and then convert the result
into a String via StandardCharsets.UTF_8.

Change-Id: I010c1f46d2a2f78b619cf7af03c565ec68b6b457
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoImprove AbstractQueryParams XML parsing 86/53186/1
Robert Varga [Sat, 11 Mar 2017 22:39:12 +0000 (23:39 +0100)]
Improve AbstractQueryParams XML parsing

Use a shared, hardened, DocumentBuilderFactory and do not pass
the XML via a field but rather as an argument.

Change-Id: Id4a1792598b7d202149e62de6fc8292308c2c170
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMass conversion to static methods 82/53182/4
Robert Varga [Sat, 11 Mar 2017 18:44:41 +0000 (19:44 +0100)]
Mass conversion to static methods

This is mechanic fixup of methods which Eclipse points out as
being potentially-static.

Secondary effect is use of lambdas where the conversion can be made
automatic.

Change-Id: I33d3b81bd4737f2c2b55c5d973ed081ae58a3a0a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoUse UntrustedXML for interfacing with Documents 81/53181/4
Robert Varga [Sat, 11 Mar 2017 18:09:14 +0000 (19:09 +0100)]
Use UntrustedXML for interfacing with Documents

Eliminate duplicated factory setup call sites in favor of using
centralized UntrustedXML.

Change-Id: If302e8551df80d3f5967fcd912be3737fac70616
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoRemove unneded semicolon 80/53180/2
Robert Varga [Sat, 11 Mar 2017 18:08:55 +0000 (19:08 +0100)]
Remove unneded semicolon

This is an eclipse warning, fix it.

Change-Id: I1dd4c24ef69f3a436a2e2f28f01d5d8bbdbcdc13
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoDo not include duplicate models 83/53183/1
Robert Varga [Sat, 11 Mar 2017 19:59:58 +0000 (20:59 +0100)]
Do not include duplicate models

Adding same module into the CrossSourceStatementReactor guarantees
namespace conflicts, which are flushed out by BUG-7424 handling.

Make sure we do not add same modules multiple times.

Change-Id: I76a300c14392e1de02d8f055100c75a5c66fe61b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 7741 - "Please try again" should not result in http code 500 84/51684/19
matus.kubica [Fri, 10 Feb 2017 14:02:34 +0000 (15:02 +0100)]
Bug 7741 - "Please try again" should not result in http code 500

Change ErrorType to TRANSPORT
Change ErrorTag of DocumentedException to RESOURCE_DENIED
Change ErrorSeverity to ERROR
Add mapping in BrokerFacade to 503
Edit RPCError in NetconfReadOnlyTransaction
Add JUnit test for BrokerFacade

Change-Id: I039886d80a89e0ef4d376229617b3b4b7520a04c
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
7 years agoMerge "Bug 6645 - 2 digits milliseconds can not be parsed in notification eventTime"
Jakub Morvay [Tue, 7 Mar 2017 18:17:48 +0000 (18:17 +0000)]
Merge "Bug 6645 - 2 digits milliseconds can not be parsed in notification eventTime"

7 years agoBug 6645 - 2 digits milliseconds can not be parsed in notification eventTime 95/48495/15
Alexis de Talhouët [Fri, 18 Nov 2016 22:02:06 +0000 (17:02 -0500)]
Bug 6645 - 2 digits milliseconds can not be parsed in notification eventTime

Create a Parser and a Formater based of Java 8 DateTimeFormater API, using
the ISO_DATE_TIME format, the UTC time-zone offset, and the local time-zone.

As we're moving away from the pattern approach to parse/format those values,
we have to handle the leap second corner case; it is possible to encounter
time value being 23:59:60, see https://en.wikipedia.org/wiki/Leap_second.
For that reason, if the parsing fails, we catch the exception and check whether
the time has a leap second, and if it has, we replace the second-of-minute of
60 with 59.

Change-Id: I8fcc66f5a18f1781bf14f895c23cd2b890b5b5a7
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoBug 6581 - Make timeout for ask configurable 49/51949/9
miroslav.kovac [Thu, 16 Feb 2017 11:41:49 +0000 (12:41 +0100)]
Bug 6581 - Make timeout for ask configurable

Change-Id: Ie430aa39cc6a7b30e86ef3c73d27b35a10e97dac
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
7 years agoBug 6856: Rpc definition should implicitly define input/output 82/52882/4
Igor Foltin [Mon, 6 Mar 2017 13:41:23 +0000 (14:41 +0100)]
Bug 6856: Rpc definition should implicitly define input/output

Corresponding patch for netconf.

Change-Id: I041a90e222578f43144d42cd72dd2f9457362a4a
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBUG-6859 - Binding generator v1 refactoring 10/52910/1
Robert Varga [Mon, 6 Mar 2017 22:37:18 +0000 (23:37 +0100)]
BUG-6859 - Binding generator v1 refactoring

Fix compilation failure after binding generator move.

Change-Id: Ia0ef876ba477898e0e1f94a165b961b0e13f0293
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Bug-6346: Allow over-ride of non-module capabilities"
Jakub Morvay [Fri, 3 Mar 2017 19:13:46 +0000 (19:13 +0000)]
Merge "Bug-6346: Allow over-ride of non-module capabilities"

7 years agoBug-6346: Allow over-ride of non-module capabilities 97/44897/20
Om Prakash [Wed, 31 Aug 2016 03:33:43 +0000 (23:33 -0400)]
Bug-6346: Allow over-ride of non-module capabilities

This feature will allow user to override non-module based capability like
:writable-running or :candidate capabilities of the device. It can used
for devices that do not report or incorrectly report non-module based
capabilities in their hello message.

Change-Id: I1ba4ac1ca84a528434658e8af7c3db981146edb6
Signed-off-by: Om Prakash <op317q@att.com>
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 6996: Set correct module name to error message 24/52724/2
Andrej Mak [Fri, 3 Mar 2017 07:08:51 +0000 (08:08 +0100)]
Bug 6996: Set correct module name to error message

When module doesn't exist in mountpoint schema context,
error always contained only ""yang-ext" module does not exist in mount
point." Now correct module name is set to error message.

Change-Id: Ia3299acc39b531ccfd6009d1c95c7e6e140f6624
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoMerge "Null write transaction when cancel is called"
Jakub Morvay [Mon, 27 Feb 2017 09:02:23 +0000 (09:02 +0000)]
Merge "Null write transaction when cancel is called"

7 years agoMerge "Bug 5581: Optimize subtree filtering"
Jakub Morvay [Mon, 27 Feb 2017 09:01:29 +0000 (09:01 +0000)]
Merge "Bug 5581: Optimize subtree filtering"

7 years agoMerge changes from topic 'bug7850'
Jakub Morvay [Fri, 24 Feb 2017 15:14:51 +0000 (15:14 +0000)]
Merge changes from topic 'bug7850'

* changes:
  BUG-7850: SourceIdentifier.getRevision() can return null
  BUG-7850: YangLibProvider needs to accept null revisions
  BUG-7850: do not open-code non-existent revision
  BUG-7850: fixup Swagger generator

7 years agoMerge "Refactor netconf-util's configuration service"
Tomas Cere [Fri, 24 Feb 2017 14:11:13 +0000 (14:11 +0000)]
Merge "Refactor netconf-util's configuration service"

7 years agoBUG-7850: SourceIdentifier.getRevision() can return null 48/52248/1
Robert Varga [Fri, 24 Feb 2017 13:04:43 +0000 (14:04 +0100)]
BUG-7850: SourceIdentifier.getRevision() can return null

Fix assumptions which are not in-line with API documentation,
i.e. that getRevision() will return a magic string and never null.

Once the users are fixed, getRevision() will return null as per
its defined contract.

Change-Id: Ia7d45325d9f45ff6dc237461fc4ea4d45901675a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-7850: YangLibProvider needs to accept null revisions 47/52247/1
Robert Varga [Fri, 24 Feb 2017 12:48:50 +0000 (13:48 +0100)]
BUG-7850: YangLibProvider needs to accept null revisions

The API contract indicates that SourceIdentifier.getRevision()
may legally return null. The implementation is currently broken,
so make sure we account for both possibilities.

Also share empty revision object for efficiency, as it is constant.

Change-Id: Iacfe5009eea8d5d9531340da27cbb25d3c6c763f
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-7850: do not open-code non-existent revision 46/52246/1
Robert Varga [Fri, 24 Feb 2017 12:33:43 +0000 (13:33 +0100)]
BUG-7850: do not open-code non-existent revision

Revision 0000-00-00 is reserved and should not be used anywhere
directly.

Change-Id: I0e1c4e38f5719b4ae86df1cde15ff43143f90c6a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-7850: fixup Swagger generator 45/52245/1
Robert Varga [Fri, 24 Feb 2017 12:30:39 +0000 (13:30 +0100)]
BUG-7850: fixup Swagger generator

Remove open-coded "0000-00-00" string and refer to its original
definition. Also use SimpleDateFormatUtil instead of open-coded
formatter and fix methods which can be made static.

Change-Id: I0108cdaa7012ca93ccc41d3cdc454a5b386c6a9c
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 7728 - modules-state conflict kills rest-connector-default-impl 99/52199/7
Ivan Hrasko [Thu, 23 Feb 2017 08:07:52 +0000 (09:07 +0100)]
Bug 7728 - modules-state conflict kills rest-connector-default-impl

-improved workaround:
reset transaction chain to be able to continue writing another data
after transaction fail

Change-Id: I24d608b9a01da10ab237f3b1d9b29a6f30953e0d
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoNull write transaction when cancel is called 98/52198/2
Andrej Mak [Thu, 23 Feb 2017 07:13:36 +0000 (08:13 +0100)]
Null write transaction when cancel is called

Write transaction is finished and can't be used anymore.

Change-Id: Id9efcab3ca0161d5dba4cef3b56e6e568c1b1e6c
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 5581: Optimize subtree filtering 43/51643/9
Andrej Mak [Thu, 9 Feb 2017 13:35:14 +0000 (14:35 +0100)]
Bug 5581: Optimize subtree filtering

If single list entry with key is specified in filter,
only that specific entry is read from datastore, thus
filtering has smaller input to process.

Change-Id: Iae46e3c25067d35f6bcacc40d0997d008da8fb29
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 7728 - modules-state conflict kills rest-connector-default-impl 61/51961/10
Ivan Hrasko [Thu, 16 Feb 2017 13:27:25 +0000 (14:27 +0100)]
Bug 7728 - modules-state conflict kills rest-connector-default-impl

- this is just Carbon workaround for bug
- ignore error when another node is already putting the same data

Change-Id: I091393c27cb4ab8d7db04257ffe0e922d6487843
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoMerge "Fix error reporting for PUT/POST"
Jakub Morvay [Tue, 21 Feb 2017 09:33:01 +0000 (09:33 +0000)]
Merge "Fix error reporting for PUT/POST"

7 years agoBug 7686 - Make notifications defined by yangs automatic loaded 55/51755/10
Jakub Toth [Thu, 9 Feb 2017 14:54:47 +0000 (15:54 +0100)]
Bug 7686 - Make notifications defined by yangs automatic loaded
for streaming

  * make notifications define by yangs initialized by restconf
server
  * subscribe to notifications define by yangs by getting of
location specfici stream
  * fix test

Change-Id: Ib2a3787e5d0252b7200190643f848a180260d167
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoMerge "Remove unused imports in the whole NETCONF project"
Tomas Cere [Mon, 20 Feb 2017 10:53:12 +0000 (10:53 +0000)]
Merge "Remove unused imports in the whole NETCONF project"

7 years agoRemove unused imports in the whole NETCONF project 09/52009/1
Jakub Morvay [Fri, 17 Feb 2017 15:41:32 +0000 (16:41 +0100)]
Remove unused imports in the whole NETCONF project

Change-Id: I03f07fea22fa7c290acf6be8ac86e5aa00970143
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Bug 7295 - Incorrect handling of device transactions in clustered setting"
Tomas Cere [Fri, 17 Feb 2017 15:10:22 +0000 (15:10 +0000)]
Merge "Bug 7295 - Incorrect handling of device transactions in clustered setting"

7 years agoPull in feat-jetty instead of feat-war 59/51959/1
Robert Varga [Thu, 16 Feb 2017 13:19:44 +0000 (14:19 +0100)]
Pull in feat-jetty instead of feat-war

feat-war pulls in jetty 9.2, we need 8.1 for the transition.

Change-Id: I6cdd1354c80a5fe8b9e9c34100c4e68259122d2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix error reporting for PUT/POST 92/51792/5
Tom Pantelis [Mon, 13 Feb 2017 15:13:17 +0000 (10:13 -0500)]
Fix error reporting for PUT/POST

If a datastore failure occurs for PUT or POST, restconf reports the
error message "Problem while PUT operations" which is neither useful
nor grammatically correct.

It used to report the underlying error info however this was broken by
https://git.opendaylight.org/gerrit/#/c/40235/ which changed the code to
use a Future callback with a CountDownLatch but doesn't propagate errors
from the Future. I don't understand why the code was changed in this manner
when it worked fine and was much simpler using checkedGet. I changed the
code back to use checkedGet, in several places.

Change-Id: I2e917d7eedc569702cdf3a54c4aa0321fe229ca1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
7 years agoMerge "BUG-7183: do not hard-code scala version"
Jakub Morvay [Thu, 16 Feb 2017 09:48:07 +0000 (09:48 +0000)]
Merge "BUG-7183: do not hard-code scala version"

7 years agoMerge "Compile-time dependencies matter"
Jakub Morvay [Thu, 16 Feb 2017 09:16:13 +0000 (09:16 +0000)]
Merge "Compile-time dependencies matter"

7 years agoBug 7295 - Incorrect handling of device transactions in clustered setting 75/51875/4
Jakub Morvay [Tue, 14 Feb 2017 16:57:34 +0000 (17:57 +0100)]
Bug 7295 - Incorrect handling of device transactions in clustered setting

Transactions on mounted device in clustered setting are delegated to
leader node and leader node actually configures the device.

Implementation, hovewer, depens only on one transaction at a time.
Delegated calls can interleave together, for example one node can submit
transaction of the other node.

Explicitly open a new tranasction before applying any operations to it.

Change-Id: I0c5715a9cd089dd809b071d411884e71e9793849
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Remove blocking get in read transaction"
Jakub Morvay [Thu, 16 Feb 2017 08:55:38 +0000 (08:55 +0000)]
Merge "Remove blocking get in read transaction"

7 years agoRemove blocking get in read transaction 75/51775/5
Andrej Mak [Mon, 13 Feb 2017 09:30:40 +0000 (10:30 +0100)]
Remove blocking get in read transaction

Change-Id: I6829aea0e2cd1f98c3d845db05b4d52dfad8f75e
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoCompile-time dependencies matter 24/51924/1
Vratko Polak [Wed, 15 Feb 2017 18:31:06 +0000 (19:31 +0100)]
Compile-time dependencies matter

This is an analogy of https://git.opendaylight.org/gerrit/#/c/51921/1

Change-Id: I54f242a462787f0a00bfe294f242791051cc1465
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBUG-7183: do not hard-code scala version 12/51912/3
Robert Varga [Wed, 15 Feb 2017 14:43:34 +0000 (15:43 +0100)]
BUG-7183: do not hard-code scala version

Akka artifacts should be coded against scala.version, not to a specific
version. Also drop scope=test, as it is not needed.

Change-Id: Ib7aeb1d9c78f75697e844e620483ac5fac21f92b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoRefactor netconf-util's configuration service 73/51873/5
Jakub Morvay [Tue, 14 Feb 2017 16:41:21 +0000 (17:41 +0100)]
Refactor netconf-util's configuration service

- log netconf configuration service lifecycle events
- NetconfConfigUtil's getNetconfConfigurationService method fails if
  netconf configuration service is not present
- make properties for netconf configuration service constant
- netconf configuration service does not have to be singleton

Change-Id: I0466a7b83803fc93589f40a138c12cbe369135fd
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoRefactor NetconfDocumentedExceptionTest class 24/48324/3
Jakub Morvay [Mon, 14 Nov 2016 15:27:03 +0000 (16:27 +0100)]
Refactor NetconfDocumentedExceptionTest class

Conform to API changes introduced in
https://git.opendaylight.org/gerrit/#/c/48322/.

Also move test to correct package.

Change-Id: I87beaa009d01b2e01912c4dd783881f1dac20b4f
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Bug 5581: Merge empty map instead of exist check"
Jakub Morvay [Wed, 15 Feb 2017 13:53:15 +0000 (13:53 +0000)]
Merge "Bug 5581: Merge empty map instead of exist check"

7 years agoBug 5581: Merge empty map instead of exist check 66/51866/3
Andrej Mak [Tue, 14 Feb 2017 14:34:50 +0000 (15:34 +0100)]
Bug 5581: Merge empty map instead of exist check

Change-Id: Id48fe23e6e3f7c3f333c1b1bc6b88ffc888e197a
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 5581: Minor Exi decoder optimization 34/51834/3
Andrej Mak [Tue, 14 Feb 2017 08:01:40 +0000 (09:01 +0100)]
Bug 5581: Minor Exi decoder optimization

Initialize DomSource with new document. Otherwise new
document is created by SAX2DOM class, which is more
expensive as it includes creating new
DocumentBuilderFactory etc.

Change-Id: I8511f39c5ae099d55c07fe3844e4aae5b3bd9bbb
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoDeclare -util/-tcp/-ssh prerequisites 69/51869/3
Stephen Kitt [Tue, 14 Feb 2017 15:27:18 +0000 (16:27 +0100)]
Declare -util/-tcp/-ssh prerequisites

This is imperfect since we drop the relationships from the POMs, which
breaks -Psft (running SFT on the features individually). We need to
improve the plugin to handle this more generically.

Change-Id: Ic7ddc583450b3e207eb4a13f837e8994cb3d5ff0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6875: adjust for yangtools requiring getYangVersion working 06/51806/1
Robert Varga [Mon, 13 Feb 2017 17:33:05 +0000 (18:33 +0100)]
BUG-6875: adjust for yangtools requiring getYangVersion working

ModuleDependencySort requires a correct YangVersion, fake version 1.

Change-Id: I2877ee1a5ee1e7d3b56e7bf47c9c422a782b59a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoPull in odl-karaf-feat-war 37/51637/1
Robert Varga [Thu, 9 Feb 2017 16:09:05 +0000 (17:09 +0100)]
Pull in odl-karaf-feat-war

This acts as a proxy feature for karaf's war, pull that in.

Change-Id: I870e56fff2615f10309b79f5c8e9d438d9db16b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Clean ControllerContext up"
Jakub Morvay [Thu, 9 Feb 2017 11:49:28 +0000 (11:49 +0000)]
Merge "Clean ControllerContext up"

7 years agoClean up Rfc8040 14/51614/1
Robert Varga [Thu, 9 Feb 2017 09:47:11 +0000 (10:47 +0100)]
Clean up Rfc8040

- use URI.create() as we know the format is correct
- use SimpleDateFormatUtil
- make sure constants are constant
- QName contants should be interned
- throw ExceptionInInitializerError on constant init failure

Change-Id: Ice3cb7fcff8617217a235d830fd7aa5dec1bd26d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoClean ControllerContext up 11/51611/4
Robert Varga [Fri, 27 Jan 2017 23:54:02 +0000 (00:54 +0100)]
Clean ControllerContext up

ControllerContext is supposed to be an immutable context, which has always
a global instance, which is updated as needed.

Current code mutates the context in an uncoordinated fashion, which means
it can easily end up being inconsistent if a SchemaContext change occurs
while a request is being executed.

Add FIXME markers to issues to be solved in future and clean up various
aspects of the file:
- make sure the URI encoding charset is available
- use lambdas wherever possible
- fix keyword order to match JLS
- trim long lines

Change-Id: I210d5ee6bff7ea9d4853daa7f36411da77388c69
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-7529: provide Karaf 4 features 07/50307/12
Stephen Kitt [Wed, 11 Jan 2017 16:37:32 +0000 (17:37 +0100)]
BUG-7529: provide Karaf 4 features

Change-Id: I649dcae1d60155d5dd656eb3416183889a8f6a14
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 7735 - Update restconf models by RFC 8040 03/51403/3
Jakub Toth [Fri, 3 Feb 2017 14:20:45 +0000 (15:20 +0100)]
Bug 7735 - Update restconf models by RFC 8040

  * rename base class Draft18 -> Rfc8040

Change-Id: I60da9a81472fb86f8a4e2bb2df6d90c0e58ec9e4
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoRemove unused reference to DOMMountPointService 17/51317/1
Alexis de Talhouët [Thu, 2 Feb 2017 01:24:47 +0000 (20:24 -0500)]
Remove unused reference to DOMMountPointService

Change-Id: I4dbe67a6bfe601a88d4c97789dc83e47bd40e300
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
7 years agoMerge "Use yangtools ParserStreamUtils.findSchemaNodeByNameAndNamespace() method"
Tomas Cere [Fri, 27 Jan 2017 15:06:57 +0000 (15:06 +0000)]
Merge "Use yangtools ParserStreamUtils.findSchemaNodeByNameAndNamespace() method"

7 years agoReplace FindBugs :jsr305 by full :annotation (Bug 7663) 99/50899/3
Michael Vorburger [Mon, 23 Jan 2017 20:05:17 +0000 (21:05 +0100)]
Replace FindBugs :jsr305 by full :annotation (Bug 7663)

Change-Id: I17e6f6f75ca4972f433b19a1c518898941bab3e4
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix autorelease - stub channel and eventLoop 85/51085/2
Alexis de Talhouët [Thu, 26 Jan 2017 18:21:39 +0000 (13:21 -0500)]
Fix autorelease - stub channel and eventLoop

Since netty version has been bumped, change are required in the unit test.

Change-Id: I7ff42c9538f4fdfadf1c1677ced81b1afa767e31
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
7 years agoMerge "Prepare upgrade to Netty 4.1"
Tomas Cere [Tue, 24 Jan 2017 09:07:57 +0000 (09:07 +0000)]
Merge "Prepare upgrade to Netty 4.1"

7 years agoReplace mockito-all by mockito-core (see Bug 7662) 72/50872/1
Michael Vorburger [Mon, 23 Jan 2017 18:58:43 +0000 (19:58 +0100)]
Replace mockito-all by mockito-core (see Bug 7662)

Change-Id: Id0be6adaa1c9d07b6b99cd2cde60a02ebd09a3ad
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoPrepare upgrade to Netty 4.1 02/41002/2
Stephen Kitt [Wed, 29 Jun 2016 09:23:35 +0000 (11:23 +0200)]
Prepare upgrade to Netty 4.1

We need to widen the range of allowed versions for odl-netty.

Change-Id: I425f1464f9e97d15e69622701805376da53f6611
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoMerge "Bug 7491 - Ignore exceptions during invoking notification listeners"
Tomas Cere [Tue, 17 Jan 2017 09:18:07 +0000 (09:18 +0000)]
Merge "Bug 7491 - Ignore exceptions during invoking notification listeners"

7 years agoBug 7491 - Ignore exceptions during invoking notification listeners 47/49847/7
Xu Rong [Thu, 29 Dec 2016 08:56:55 +0000 (16:56 +0800)]
Bug 7491 - Ignore exceptions during invoking notification listeners

Change-Id: Ic008f9120ce45dfd2203dad91fd2dfb94fdb9015
Signed-off-by: Xu Rong <xu.rong4@zte.com.cn>
7 years agoClose missing resources when netconf-topolgy goes down 94/48094/4
Alexis de Talhouët [Mon, 7 Nov 2016 23:00:04 +0000 (18:00 -0500)]
Close missing resources when netconf-topolgy goes down

When the connection goes down, we are closing the NetconfDeviceCommunicator
instance but we aren't closing the RemoteDeviceHandler. I believe this is an
oversight, so implementing the Autocloseable interface in NetconfConnectorDTO
that will close both the resources. The consumer of this DTO can then call #close()
to release the resources.

Change-Id: I852a5aa29a73f8454aa1886990dfce9c7a019025
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoBug 5407 - Deprecate Netconf Loopback Mount Through Config Subsystem 06/47906/6
Alexis de Talhouët [Thu, 3 Nov 2016 20:32:57 +0000 (16:32 -0400)]
Bug 5407 - Deprecate Netconf Loopback Mount Through Config Subsystem

Change-Id: I4c413a918a98d82d1a081c297375e68b1105d1a7
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoMerge "Bug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf"
Jakub Morvay [Tue, 10 Jan 2017 13:15:30 +0000 (13:15 +0000)]
Merge "Bug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf"

7 years agoMerge "Bug 7432 - eliminate use of yang-parser-impl internals"
Tomas Cere [Tue, 10 Jan 2017 12:36:37 +0000 (12:36 +0000)]
Merge "Bug 7432 - eliminate use of yang-parser-impl internals"

7 years agoBug 7433 - Remove use of YangSchemaSourceImpl from restconf tests 24/50124/4
Jakub Toth [Mon, 9 Jan 2017 10:35:00 +0000 (11:35 +0100)]
Bug 7433 - Remove use of YangSchemaSourceImpl from restconf tests

Change-Id: I3a5901618cbe162eed07cf0301626e6228df4360
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf 48/49748/5
Jakub Toth [Thu, 22 Dec 2016 17:42:45 +0000 (18:42 +0100)]
Bug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf

  *upgrade paths from 17 to 18

Change-Id: I885e59c0ddc3a6668514f531fc6025ba2effedb0
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBUG-4219: use upstream karaf.version 51/49651/2
Robert Varga [Tue, 20 Dec 2016 14:05:20 +0000 (15:05 +0100)]
BUG-4219: use upstream karaf.version

Rather than hard-coding a specific version, pick it up
from odlparent.

Change-Id: I27c16ba9963cc1fea4e482fc006067a191111662
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-4219: use scope=provided for karaf dependencies 48/49648/3
Robert Varga [Tue, 20 Dec 2016 13:43:34 +0000 (14:43 +0100)]
BUG-4219: use scope=provided for karaf dependencies

We should not be pulling in the dependencies, but rather
require them to be provided.

Change-Id: I9f41c3f35d5b8d0b0a14b871816b66a13347781b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Bug 7206 - Chinese improper code problem."
Jakub Morvay [Thu, 5 Jan 2017 15:09:23 +0000 (15:09 +0000)]
Merge "Bug 7206 - Chinese improper code problem."