netconf.git
5 years agoBump mdsal to 3.0.8 42/81742/6
Robert Varga [Wed, 24 Apr 2019 12:49:33 +0000 (14:49 +0200)]
Bump mdsal to 3.0.8

This brings in latest fixes and enhancements.

Change-Id: I9ff2b11a7f00a7d9c961aa7704d663aeb9613551
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.10 41/81741/6
Robert Varga [Wed, 24 Apr 2019 12:50:47 +0000 (14:50 +0200)]
Bump yangtools to 2.1.10

This brings in latest fixes and enhancements.

Change-Id: I34ed0f4e30dc12608cafabeefa860817846c7e05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.10 40/81740/5
Robert Varga [Wed, 24 Apr 2019 12:49:55 +0000 (14:49 +0200)]
Bump odlparent to 4.0.10

This brings in significant upstream updates, most notably
mina-sshd-2.2.0.

Change-Id: Ibf0c195e333b2fdad52bba5f12f9262bce0f0133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate away from deprecated put() method 18/81518/2
Robert Varga [Tue, 9 Apr 2019 13:37:43 +0000 (15:37 +0200)]
Migrate away from deprecated put() method

ObjectNode.put(String,JsonNode) has been deprecated in favor
of set()/replace(). Migrate to use set().

Change-Id: I3ebbdefe9238833ea994dac659a75972ebad835f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a085dfac5e7a237d76029bcbb3ae737804ae86f0)

5 years agoReduce use of getDataChildByName() 17/81517/2
Robert Varga [Tue, 9 Apr 2019 13:28:14 +0000 (15:28 +0200)]
Reduce use of getDataChildByName()

findDataChildByName() is a better replacement, use that instead.

Change-Id: I8e6be2dfd68c1146c231e8381ce16d64a35896ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit deb81986a6a314b95137c3809c93d511e827bd3f)

5 years agoReduce the use of AttrBuilders 19/81419/2
Robert Varga [Fri, 5 Apr 2019 21:38:53 +0000 (23:38 +0200)]
Reduce the use of AttrBuilders

NormalizedNode*AttrBuilders are going away, remove them from where
they are not necessary.

Change-Id: I72cb68e6565f9c05864e1c465d5db7611e5a9c02
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 682d341bba757ccc88436a635c19d5c7dec86c81)

5 years agoFix logging arguments 18/81418/2
Robert Varga [Fri, 5 Apr 2019 18:54:50 +0000 (20:54 +0200)]
Fix logging arguments

These are pointed out by upgraded spotbugs, fix them up.

Change-Id: I520c8be21d69c73c0ca9b51d15e63df158fd242a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 07fba4b036ae0df44f814f53b7d13a9fc79c0a75)

5 years agoFix logging arguments 11/81411/1
Robert Varga [Fri, 5 Apr 2019 18:54:50 +0000 (20:54 +0200)]
Fix logging arguments

These are pointed out by upgraded spotbugs, fix them up.

Change-Id: I766f1f26444fd10cc6858e5f064209fcf3d9860a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d41edebb31eda9b92e1d00a054472322e1da7d0a)

5 years agoRemove a FindBugs suppression 28/81328/1
Robert Varga [Thu, 28 Mar 2019 20:21:06 +0000 (21:21 +0100)]
Remove a FindBugs suppression

Use Deque.remove() keeps SpotBugs happy, and does not change
anything, as we know the queue is non-empty at this point.

Change-Id: I307dd22eb9a2a56a9a18490ff1e45aa6d4f2a5e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 998aca7de4bc5ceff15646acefd6be3ed46ca260)

5 years agoBump versions by x.y.(z+1) 69/80969/1
jenkins-releng [Mon, 18 Mar 2019 22:21:51 +0000 (22:21 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I2ad25331e83efebfc7fdf32c9c6b7623bb67441f
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoAllow no payload for RPCs with no input 39/80239/1
Jakub Morvay [Fri, 8 Feb 2019 13:01:16 +0000 (14:01 +0100)]
Allow no payload for RPCs with no input

Do not require empty payload for RPCs with no input defined. Invoking
such RPCs without any payload at all should be also supported.

JIRA: NETCONF-607
Change-Id: Ibf8ca7d65cf25ac54f8283f65f4706ad3f69c5ee
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix Revision confusion 26/80226/1
Robert Varga [Thu, 7 Feb 2019 19:07:27 +0000 (20:07 +0100)]
Fix Revision confusion

yag-library-version is a YANG string, hence the leaf needs to be
set appropriately.

JIRA: NETCONF-606
Change-Id: Iae705bf924de943871b49a8d3b39f7b7b4a55906
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c3338ee3c2a3250ec98a4a6a0f4fcf3322e0dec2)

5 years agoUpdate .gitreview to stable/neon 11/80111/1
jenkins-releng [Fri, 1 Feb 2019 22:43:44 +0000 (22:43 +0000)]
Update .gitreview to stable/neon

Change-Id: I40255bfeb84cdee16a47a2f5232917a5a871a15f
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoAdd custom EXI buffer management 46/76546/7
Robert Varga [Wed, 30 Jan 2019 23:25:02 +0000 (00:25 +0100)]
Add custom EXI buffer management

Exificient's SAXDecoder by default does not free its internal buffer,
and allocates one for each decoder. With version 1.0.4 we have enough
visibility to perform buffer management.

This adds a thread-local buffer, which is reused during parse operation
and retained if it is under 64kB after the operation completes.

Change-Id: Ie2f7c72b1160d389a07c473fda6739b7eb7212cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Bump exificient to 1.0.4"
Jakub Morvay [Thu, 31 Jan 2019 05:30:50 +0000 (05:30 +0000)]
Merge "Bump exificient to 1.0.4"

5 years agoBump exificient to 1.0.4 52/80052/1
Robert Varga [Wed, 30 Jan 2019 22:52:45 +0000 (23:52 +0100)]
Bump exificient to 1.0.4

This brings in a xerces upgrade, allowing us to remove the override
we have been carrying.

Change-Id: If2c8cd061b5c034ad62fedd15d76966785863d97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoInitialize EXISchema grammars lazily 47/80047/7
Jakub Morvay [Wed, 30 Jan 2019 19:19:54 +0000 (20:19 +0100)]
Initialize EXISchema grammars lazily

Creating schema-backed netconf grammar is costly operation. Do not
create it until we actually need it.

This way we do not introduce any performance regression for netconf
sessions that do not want to use schema-informed grammars for EXI
encoding.

Also do not force grammar instantiation when a mismatching option
is specified by the peer.

JIRA: NETCONF-584
Change-Id: I83f5e18f423cd21c1dc993980f42e030f36a12ed
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoremove curious hard-coded yangtools 2.1.8 which seems no longer needed 10/80010/1
Michael Vorburger [Tue, 29 Jan 2019 23:01:48 +0000 (00:01 +0100)]
remove curious hard-coded yangtools 2.1.8 which seems no longer needed

This appears to have been introduced in
I417b22698df04edc8263b57e6fcd5d0a558c6ef4, but with the subsequent "Bump
to mdsal 3.0.6" in I6bbb6fa8af6860d9da08fcdde165a43c4abc6998 (and
"Finish bumping to yangtools 2.1.8" in
I51f7a2b30d40ae2b694df000465d383d165d9a0d) can be removed, given that
mdsal 3.0.6 already pulls yangtools 2.1.8.

Change-Id: Iaefc1c066b13aa7181c93e1f2963d798c43f121b
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoMove BP xml files to standard OSGI-INF/blueprint 64/79964/3
Tom Pantelis [Mon, 28 Jan 2019 16:45:00 +0000 (11:45 -0500)]
Move BP xml files to standard OSGI-INF/blueprint

Change-Id: I879cabdb7591fccfbe22d84cd64d4cdae66a9cc8
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agodestroyInstance() WebSocketServer in two tests 60/79860/1
Michael Vorburger [Wed, 23 Jan 2019 19:03:26 +0000 (20:03 +0100)]
destroyInstance() WebSocketServer in two tests

This is required so that other tests can createInstance() again.

JIRA: NETCONF-604
Change-Id: Id374487105bb71bd24de21717bb5e3fa763062af
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoMerge changes I22b99bc2,I3f296862
Jakub Morvay [Wed, 23 Jan 2019 08:50:04 +0000 (08:50 +0000)]
Merge changes I22b99bc2,I3f296862

* changes:
  Remove netconf-ssh from netconf-artifacts
  Remove netconf-notification

5 years agoMerge "Remove netconf-impl test resources"
Jakub Morvay [Wed, 23 Jan 2019 07:47:21 +0000 (07:47 +0000)]
Merge "Remove netconf-impl test resources"

5 years agoRemove netconf-ssh from netconf-artifacts 38/79838/1
Jakub Morvay [Wed, 23 Jan 2019 07:42:36 +0000 (08:42 +0100)]
Remove netconf-ssh from netconf-artifacts

netconf-ssh does not longer exist, remove it also from
netconf-artifacts.

Change-Id: I22b99bc278c656bf89c3c022463c63e1f7797c63
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove netconf-notification 57/79657/8
Jakub Morvay [Fri, 18 Jan 2019 13:19:43 +0000 (14:19 +0100)]
Remove netconf-notification

Remove netconf-notification project. This project has two
functions. It provides implementation of netconf notifications logic in
netconf servers. The second function is that it also starts netconf
notification infrastructure. This used to be wired with other netconf
server components and together they formed netconf server for css.

css does not longer exist. Get rid of netconf-notification instantiation
logic (Activator and other related classes). It is not longer needed.

Also move other classes to mdsal-netconf-notification project. This
project just starts this notification infrastructure for mdsal netconf
northbound endpoint and now is primary user of this classes.

Change-Id: I3f2968623295beff9bcfbce6aa48c82532ef1502
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove netconf-impl test resources 35/79835/1
Jakub Morvay [Wed, 23 Jan 2019 06:46:29 +0000 (07:46 +0100)]
Remove netconf-impl test resources

netconf-impl test resources do not seem to have any usage. Remove them.

Change-Id: I05e9e5159ca02e72e886f23bcb23d7f85f9b82f6
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove empty monitoring classes 34/79834/1
Jakub Morvay [Wed, 23 Jan 2019 06:11:08 +0000 (07:11 +0100)]
Remove empty monitoring classes

Remove empty remaining monitoring classes. These were missed during
removal of netconf-monitoring project.

Change-Id: Id7d520ebb7f8eb80a7180a3b2691d10d2fb2246f
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoGet rid of netconf-tcp project 54/79654/6
Jakub Morvay [Fri, 18 Jan 2019 11:16:05 +0000 (12:16 +0100)]
Get rid of netconf-tcp project

netconf-tcp includes basic TCP server implementation used in netconf
project. It also contains instantiation logic for tcp server used by
css netconf northbound.

css is no longer in the game. Remove TCP server instantiation logic for
css netconf northbound endpoint. Move NetconfNorthboundTcpServer class
(only class used elsewhere) to mdsal-netconf-tcp projects. This project
is its primary and only user now.

Change-Id: I7dea91f33f3c3f6364d57e5a590505a058fd7957
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Do not start netconf-impl for css netconf endpoint"
Tom Pantelis [Wed, 23 Jan 2019 02:13:37 +0000 (02:13 +0000)]
Merge "Do not start netconf-impl for css netconf endpoint"

5 years agoMerge "Remove netconf-impl's getConfig_candidate.xml"
Tom Pantelis [Wed, 23 Jan 2019 02:13:23 +0000 (02:13 +0000)]
Merge "Remove netconf-impl's getConfig_candidate.xml"

5 years agoDo not start netconf-impl for css netconf endpoint 94/79794/4
Jakub Morvay [Mon, 21 Jan 2019 15:46:17 +0000 (16:46 +0100)]
Do not start netconf-impl for css netconf endpoint

netconf-impl project contains both implementation of APIs defined in
netconf-api and netconf-mapping-api projects and also instantiation
logic of some base netconf server components for netconf css northbound
endpoint. Remove this logic, css is not used anymore, so it is its
netconf endpoint.

Change-Id: Iad381885d229e374957d87087a4a96ba46f75551
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove netconf-impl's getConfig_candidate.xml 95/79795/4
Jakub Morvay [Mon, 21 Jan 2019 16:28:19 +0000 (17:28 +0100)]
Remove netconf-impl's getConfig_candidate.xml

This resource is not used anywhere, get rid of it.

Change-Id: I9ecbecdf2b26db53344cb7362aa716d4b971f9bb
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove netconf-ssh project 24/79624/10
Jakub Morvay [Thu, 17 Jan 2019 17:34:16 +0000 (18:34 +0100)]
Remove netconf-ssh project

netconf-ssh contains logic for setting up ssh servers used in netconf
project (netconf test-tool, mdsal netconf northbound and css netconf
northbound). Moreover it also actually instantiates ssh server for css
netconf northbound.

Since css is no longer around, get rid of the above mentioned ssh server
instantiation logic. Move other classes to mdsal-netconf-ssh project --
it is their primary user now.

Change-Id: Ifffcf97429887cd6533def887c29dca9678ec815
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFinish bumping to yangtools 2.1.8 24/79824/1
Stephen Kitt [Tue, 22 Jan 2019 16:03:45 +0000 (17:03 +0100)]
Finish bumping to yangtools 2.1.8

Change-Id: I51f7a2b30d40ae2b694df000465d383d165d9a0d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to mdsal 3.0.6 12/79812/1
Stephen Kitt [Tue, 22 Jan 2019 08:52:46 +0000 (09:52 +0100)]
Bump to mdsal 3.0.6

Change-Id: I6bbb6fa8af6860d9da08fcdde165a43c4abc6998
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMerge "Bump mdsal to 3.0.5"
Stephen Kitt [Mon, 21 Jan 2019 18:05:52 +0000 (18:05 +0000)]
Merge "Bump mdsal to 3.0.5"

5 years agoMerge "Bump yangtools to 2.1.8"
Jakub Morvay [Mon, 21 Jan 2019 15:49:49 +0000 (15:49 +0000)]
Merge "Bump yangtools to 2.1.8"

5 years agoMerge "Bump to odlparent 4.0.9"
Stephen Kitt [Mon, 21 Jan 2019 14:33:45 +0000 (14:33 +0000)]
Merge "Bump to odlparent 4.0.9"

5 years agoDeprecate odl-restconf-noauth feature 91/79791/2
Jakub Morvay [Mon, 21 Jan 2019 11:18:12 +0000 (12:18 +0100)]
Deprecate odl-restconf-noauth feature

odl-restconf-noauth feature is just a historic relic. It does not really
have any usage and odl-restconf should be use instead (this has the same
functionality but with authentication).

Deprecate odl-restconf-noauth feature.

Change-Id: I5007a0318f75415ecbbec4ea02e123f8f6b35324
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoBump mdsal to 3.0.5 47/79747/4
Robert Varga [Sun, 20 Jan 2019 00:01:43 +0000 (01:01 +0100)]
Bump mdsal to 3.0.5

This aligns with odlparent-4.0.9 and yangtools-2.1.8.

Change-Id: I0a6aed6c6101eef6313b57a3608e56f0ae08f32f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.8 56/79656/4
Robert Varga [Fri, 18 Jan 2019 10:25:59 +0000 (11:25 +0100)]
Bump yangtools to 2.1.8

yangtools-2.1.8 should address compatibility issues with woodstox,
bump to it.

Change-Id: I417b22698df04edc8263b57e6fcd5d0a558c6ef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.9 71/79671/3
Stephen Kitt [Fri, 18 Jan 2019 15:33:15 +0000 (16:33 +0100)]
Bump to odlparent 4.0.9

Change-Id: Ieaf9938f8f0439eed91e001a256612aae1bab2a7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCheck time expiry before attempting to format notification 62/79762/2
Robert Varga [Sun, 20 Jan 2019 16:34:20 +0000 (17:34 +0100)]
Check time expiry before attempting to format notification

If the listener is not started yet, or it has stopped, we should
not try to format the document. This splits the checking into two
phases, improving things and laying the foundation for a complete
factoring out the common bits.

Change-Id: Ibff73a4979a5d67385f10647ca7c9ab64a35f42a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix adapters retaining state 59/79759/2
Robert Varga [Sun, 20 Jan 2019 15:05:22 +0000 (16:05 +0100)]
Fix adapters retaining state

Storing notifications in a field causes them to be retained for
longer than needed.

Pass them as arguments, fixing the leak and making the adapters
stateless.

Change-Id: I3977a912280740a83a3209aadf2c190336fabe1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix bierman02 ListenerAdapter memory leak 58/79758/1
Robert Varga [Sun, 20 Jan 2019 15:05:22 +0000 (16:05 +0100)]
Fix bierman02 ListenerAdapter memory leak

Storing notifications in a field causes them to be retained for
longer than needed. Pass them as arguments, fixing the leak and
making the adapter stateless.

Change-Id: I8cfb335db0ad21d37d5cce79e6fdbe31efc1ab8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify NotificationListenerAdapter 57/79757/1
Robert Varga [Sun, 20 Jan 2019 13:52:19 +0000 (14:52 +0100)]
Simplify NotificationListenerAdapter

There is just no need for the ceremony around what sort of normalized
node a DOMNotification has -- just use ContainerNode.

Change-Id: I66e2e0e72b75b0ce58be359eaa40668bc0c53b81
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Fix NetconfKeystoreAdapter onDataTreeChanged method"
Jakub Morvay [Thu, 17 Jan 2019 15:56:04 +0000 (15:56 +0000)]
Merge "Fix NetconfKeystoreAdapter onDataTreeChanged method"

5 years agoFix NetconfKeystoreAdapter onDataTreeChanged method 18/79618/4
Jakub Morvay [Thu, 17 Jan 2019 14:19:32 +0000 (15:19 +0100)]
Fix NetconfKeystoreAdapter onDataTreeChanged method

Make sure to process all incoming DataObject modifications under
netconf-keystore:keystore container. Do not stop after handling
key-credential list items, handle also modified private-key and
trusted-certificate list items.

JIRA: NETCONF-598
Change-Id: I7e56791c46bd860f98259f73f2832e49abc2e3dc
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix typos in netconf-keystore YANG model 20/79620/1
Jakub Morvay [Thu, 17 Jan 2019 14:34:00 +0000 (15:34 +0100)]
Fix typos in netconf-keystore YANG model

Change-Id: I62d1d2a5fecbffb6c61cfddfc0f407d8e88c0297
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Eliminate XmlUtil.createElement(Document, String)"
Jakub Morvay [Thu, 17 Jan 2019 14:11:46 +0000 (14:11 +0000)]
Merge "Eliminate XmlUtil.createElement(Document, String)"

5 years agoMigrate netconf-console to Karaf 4 way 11/79611/2
Jakub Morvay [Thu, 17 Jan 2019 11:06:09 +0000 (12:06 +0100)]
Migrate netconf-console to Karaf 4 way

Some migration of netconf-console commands has been already done. We
updated commands to use new Karaf shell-related APIs, but we are still
using blueprint XML to create and register these commands.

This does not work with the new API. Avoid using blueprint, use new
available annotations and refactor commands to be more Karaf 4
compliant.

See https://karaf.apache.org/manual/latest/update-notes.html#_commands
for more detail.

JIRA: NETCONF-599
Change-Id: Ib43ecf01e168f77528dadc6a9224dbf70fba4606
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoEliminate XmlUtil.createElement(Document, String) 92/79592/4
Robert Varga [Thu, 17 Jan 2019 01:13:29 +0000 (02:13 +0100)]
Eliminate XmlUtil.createElement(Document, String)

This is just a shorthand for Document.createElement(String), just
migrate users over to that.

Change-Id: Ia20d02b8566c5a2abd2b904c84c5916d63399385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse XMLConstants for "xmlns" and its URI 91/79591/2
Robert Varga [Thu, 17 Jan 2019 00:54:01 +0000 (01:54 +0100)]
Use XMLConstants for "xmlns" and its URI

Rather than spelling this out in XmlUtil, use well-known place
defining these constants. While we are at it, eliminate one copy
of XmlUtil.createElement().

Change-Id: Ie4f91a731b3b5e5ce3584514f69e183506f2097c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Provide NetconfKeystoreService RPCs in clustered topology"
Jakub Morvay [Wed, 16 Jan 2019 18:17:48 +0000 (18:17 +0000)]
Merge "Provide NetconfKeystoreService RPCs in clustered topology"

5 years agoMerge "Remove jackson dependency from restconf"
Jakub Morvay [Wed, 16 Jan 2019 18:17:35 +0000 (18:17 +0000)]
Merge "Remove jackson dependency from restconf"

5 years agoProvide NetconfKeystoreService RPCs in clustered topology 80/79580/1
Jakub Morvay [Wed, 16 Jan 2019 15:55:33 +0000 (16:55 +0100)]
Provide NetconfKeystoreService RPCs in clustered topology

Since now we support Netconf over TLS in odl-netconf-clustered-topology,
we should provide users with RPCs for configuring keys and certificates
used in Netconf over TLS.

Make sure NetconfKeystoreService RPCs are exposed once
odl-netconf-clustered-topology is installed.

JIRA: NETCONF-595
Change-Id: Id435cabe44916e01171203dc4f6b6a9a49f3239b
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoSupport Netconf over TLS in clustered topology 78/79578/1
Jakub Morvay [Wed, 16 Jan 2019 15:40:37 +0000 (16:40 +0100)]
Support Netconf over TLS in clustered topology

Netconf over TLS support is already there, enable it also in
odl-netconf-clustered-topology.

JIRA: NETCONF-594
Change-Id: Ib4c234b070cb96bb6188fe99eab6ebe22efecf59
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove jackson dependency from restconf 77/79577/1
Robert Varga [Wed, 16 Jan 2019 14:55:58 +0000 (15:55 +0100)]
Remove jackson dependency from restconf

Restconf actually does not depend on jackson, but a single test
relies on woodstox-core's XML formatting behavior.

Remove odl-jackson dependency and add a temporary woodstox-core
dependency for testing only.

Change-Id: I34038dbaa7807f25fe03de2514eb9b469b4b7979
JIRA: NETCONF-591
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoModernize generex/automaton 71/79571/3
Robert Varga [Wed, 16 Jan 2019 12:04:33 +0000 (13:04 +0100)]
Modernize generex/automaton

This brings in couple of fixes and optimizations.

Change-Id: Ia496de4efb3e68ed8b9d05cc42b61cfea9423d76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge changes I2e5faece,Ie34e98bd,Id2112fcb
Jakub Morvay [Wed, 16 Jan 2019 12:45:49 +0000 (12:45 +0000)]
Merge changes I2e5faece,Ie34e98bd,Id2112fcb

* changes:
  Eliminate unneeded test dependencies
  Remove org.jboss.resteasy/jaxrs-api dependency
  Remove use of Throwables.propagate()

5 years agoMerge "Propagate error status codes correctly"
Jakub Morvay [Wed, 16 Jan 2019 12:44:40 +0000 (12:44 +0000)]
Merge "Propagate error status codes correctly"

5 years agoMerge "Make swagger generators configurable"
Jakub Morvay [Wed, 16 Jan 2019 12:44:22 +0000 (12:44 +0000)]
Merge "Make swagger generators configurable"

5 years agoEliminate unneeded test dependencies 70/79570/1
Robert Varga [Wed, 16 Jan 2019 11:57:20 +0000 (12:57 +0100)]
Eliminate unneeded test dependencies

These dependencies are declared by odlparent, there is no need to
repeat them.

Change-Id: I2e5faecee173630af746589d50bbc93b982e79d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake swagger generators configurable 09/79509/3
Juraj Veverka [Sun, 16 Dec 2018 09:48:02 +0000 (10:48 +0100)]
Make swagger generators configurable

Swagger generators use configurable base URL paths with defaults:
- BaseYangSwaggerGeneratorDraft02 uses "restconf"
- BaseYangSwaggerGeneratorRFC8040 uses "rests"
Defaults may be overridden per deployment scenario. This makes Swagger
document generator more flexible in out-of karaf deployment scenarios.

Change-Id: I5fdda329dd2911913137d25a48450a5e161af679
Signed-off-by: Juraj Veverka <juraj.veverka@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
(cherry picked from commit 55e2fe2242c35ee2d20168b29f0bc97313327b17)

5 years agoRemove org.jboss.resteasy/jaxrs-api dependency 69/79569/2
Robert Varga [Wed, 16 Jan 2019 11:00:17 +0000 (12:00 +0100)]
Remove org.jboss.resteasy/jaxrs-api dependency

This dependency is superseded by javax.ws.rs-api, use that instead
of this relic.

JIRA: ODLPARENT-196
Change-Id: Ie34e98bd2e9a93a4242cd32e89082d1e0528849d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove use of Throwables.propagate() 66/79566/1
Robert Varga [Wed, 16 Jan 2019 10:47:49 +0000 (11:47 +0100)]
Remove use of Throwables.propagate()

We can throw a checked IOException, do not use a runtime exception
to report errors.

Change-Id: Id2112fcba473c7fce88dc932df135ddeb8064237
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPropagate error status codes correctly 67/79567/1
Tomas Cere [Wed, 16 Jan 2019 10:47:14 +0000 (11:47 +0100)]
Propagate error status codes correctly

All RestconfDocumentedExceptions were being incorrectly
reported with status code 50x since the status code was not
correctly forwared to the underlying WebApplicationException.

Change-Id: Ibe53c560053607abff665a2f36a524dece51a2fc
JIRA: NETCONF-511
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoMerge "Do not check whether two nodes can be merged with reference comparison"
Jakub Morvay [Tue, 15 Jan 2019 16:53:24 +0000 (16:53 +0000)]
Merge "Do not check whether two nodes can be merged with reference comparison"

5 years agoDo not check whether two nodes can be merged with reference comparison 36/79536/2
Tomas Cere [Tue, 15 Jan 2019 13:14:15 +0000 (14:14 +0100)]
Do not check whether two nodes can be merged with reference comparison

These need to be compared with .equals().
Also fixup the wording slightly.

Change-Id: Ib723a9a2de9810234bdbd725326d6ebd7c4c4151
JIRA: NETCONF-600
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoCleanup BaseSchema 32/79532/1
Robert Varga [Tue, 15 Jan 2019 10:03:01 +0000 (11:03 +0100)]
Cleanup BaseSchema

There is no need to throw ExceptionInInitializerError, as that
will be propagated by the class initializer.

Also let's not use Lists.newArrayList(), but rather use variadic
arguments and wrap them with Arrays.asList().

Finally make BaseSchema implement SchemaContextProvider, so that
its getSchemaContext() method is properly documented.

Change-Id: Ic3667f00ff19aaf881eccc1d9076c561fb070449
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize NetconfMessageTransformer.toRpcRequest() 31/79531/1
Robert Varga [Tue, 15 Jan 2019 09:30:44 +0000 (10:30 +0100)]
Optimize NetconfMessageTransformer.toRpcRequest()

YangConstants provides a utility input QName factory method,
which is slighty more efficient than QName.create(), hence we use
that. Since the resulting QName is only used for lookups, we do
not intern it (it is short-lived anyway).

When we are determining the RPC definition, we unnecessarily
consult mappedRpcs twice -- store the result in a local variable
to make it a bit faster.

Change-Id: Iffa1f50af55b18a60c4adef17221f41661a278ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Include namespace in output element of json rpc responses"
Jakub Morvay [Mon, 14 Jan 2019 18:24:51 +0000 (18:24 +0000)]
Merge "Include namespace in output element of json rpc responses"

5 years agoFix preparing of action request 72/79472/7
Anna Bencurova [Thu, 10 Jan 2019 14:58:04 +0000 (15:58 +0100)]
Fix preparing of action request

When the YangInstanceIdentifier used for creation of action request
contained mixin path argument (e.g. list as whole), the list ID was in
request twice. Once for list as whole and once for the list entry.

Change-Id: Ic6507c0137abedb6c87718c4a536c983033488f6
JIRA: NETCONF-566
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoInclude namespace in output element of json rpc responses 11/79511/2
Tomas Cere [Mon, 14 Jan 2019 11:04:39 +0000 (12:04 +0100)]
Include namespace in output element of json rpc responses

According to the rfc these should be present.

JIRA: NETCONF-592
Change-Id: I461a04726ce8ab5bd4963902070000f5f78d5d45
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoAdd shading checker script 97/79497/2
Robert Varga [Sat, 12 Jan 2019 13:32:44 +0000 (14:32 +0100)]
Add shading checker script

This simple script can be used to cheeck whether the shaded jar
does not contain any references which should also be shaded.

Change-Id: I3d62a3921a639a7ade45ba6c867d0d33ac9551da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not suppress module name for top-level elements 16/79416/6
Tomas Cere [Thu, 10 Jan 2019 14:25:45 +0000 (15:25 +0100)]
Do not suppress module name for top-level elements

RFC8040 states that top-level elements should start off fully
qualified -- hence we should disregard initial namespace when
for them.

JIRA: NETCONF-497
Change-Id: I1e638957510fe2efa8a42a430fb4c2ded48082ec
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Fix distribution generation"
Jakub Morvay [Mon, 14 Jan 2019 10:42:25 +0000 (10:42 +0000)]
Merge "Fix distribution generation"

5 years agoMerge "GET on /rests/operations with json always fails with 500"
Jakub Morvay [Mon, 14 Jan 2019 10:40:42 +0000 (10:40 +0000)]
Merge "GET on /rests/operations with json always fails with 500"

5 years agoMerge "Fix preparing result of action"
Jakub Morvay [Mon, 14 Jan 2019 09:36:06 +0000 (09:36 +0000)]
Merge "Fix preparing result of action"

5 years agoGET on /rests/operations with json always fails with 500 70/79470/2
Tomas Cere [Fri, 11 Jan 2019 12:20:41 +0000 (13:20 +0100)]
GET on /rests/operations with json always fails with 500

Stop throwing UnsupportedOperationException in FakeContainerSchemaNode
isPresence() method, since this container is only used for get on /rests/operations
we can assume this container is not a presence container.

JIRA: NETCONF-593
Change-Id: I06692da9d77e4230f32aa19aa25989ab72dd114a
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoShade exificient 71/77471/8
Robert Varga [Thu, 25 Oct 2018 00:02:50 +0000 (02:02 +0200)]
Shade exificient

Shade exificient and xerces, so they do not end up polluting
the container with a full XML stack.

JIRA: CONTROLLER-1867
JIRA: NETCONF-591
Change-Id: If9e5d468de08dd820636a5eeb8ecdb2871fe1a3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix distribution generation 78/79478/1
Robert Varga [Fri, 11 Jan 2019 14:08:41 +0000 (15:08 +0100)]
Fix distribution generation

This is a hot-fix for creation of distro, just to get things
rolling.

Change-Id: Ibbfbf4872bf2561aa7449e0bfb313a75532fabd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix preparing result of action 71/79471/1
Anna Bencurova [Thu, 10 Jan 2019 14:21:17 +0000 (15:21 +0100)]
Fix preparing result of action

NullPointerException was thrown when action with no output
was defined and used and OK reply returned.

Change-Id: I2bcf846c501a650d754c943d2e1dc69e73a8dd37
JIRA: NETCONF-567
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
5 years agoBump mdsal to 3.0.4 33/79433/1
Robert Varga [Thu, 10 Jan 2019 15:46:26 +0000 (16:46 +0100)]
Bump mdsal to 3.0.4

This realigns odlparent/yangtools/mdsal and brings in the latest
improvements.

Change-Id: Ie66c86320c88917eaae481cedd734ccf81f506c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.7 22/79422/1
Robert Varga [Thu, 10 Jan 2019 15:27:54 +0000 (16:27 +0100)]
Bump yangtools to 2.1.7

This realigns odlparent/yangtools and brings in a few minor
improvements.

Change-Id: I7d30b2c61ee7124a44db810efe455aa6458f8b0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.8 64/79364/3
Stephen Kitt [Wed, 9 Jan 2019 14:54:55 +0000 (15:54 +0100)]
Bump to odlparent 4.0.8

Change-Id: I165ea8f9f5f21f0b35185900323758876049c696
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMerge "Fix testtool on input modules without revision"
Jakub Morvay [Thu, 10 Jan 2019 13:00:28 +0000 (13:00 +0000)]
Merge "Fix testtool on input modules without revision"

5 years agoMerge "Remove netconf-monitoring"
Jakub Morvay [Thu, 10 Jan 2019 12:16:39 +0000 (12:16 +0000)]
Merge "Remove netconf-monitoring"

5 years agoFix testtool on input modules without revision 38/79138/3
Jaroslav Tóth [Wed, 2 Jan 2019 14:13:20 +0000 (15:13 +0100)]
Fix testtool on input modules without revision

- According to RFC 7950 revision number in module is not
  mandatory (only recommended) - currently Netconf Testtool fails
  on such modules with NullPointerException because it cannot find
  revision line pattern.
- Revision number doesn't have to be placed in input YANG schema -
  the filename is kept unmodified.
- Regex pattern that matches date in revision is also supplemented
  by revision keyword and optional double-apostrophes - there could
  be a collision with date in include statement.
- YANG module capability model is modified so the revision can be
  null - reurning of Optional.absent().
- DummyMonitoringService sets empty string in place of null
  revision numbers.

Change-Id: I868d39c111d788a0de86251da10f76a448f47de4
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoRemove netconf-monitoring 74/79274/6
Jakub Morvay [Fri, 4 Jan 2019 15:48:49 +0000 (16:48 +0100)]
Remove netconf-monitoring

netconf-monitoring is a forgotten remark of CSS times. It used to be
netconf monitoring implementation for CSS netconf endpoint. CSS is gone
so we do not need to support netconf monitoring for it.

Move GetSchema class to mdsal-netconf-monitoring (only used class
here) and move the parts needed by testtool into testtool monitoring
while we decide what we want to do with them.

JIRA: NETCONF-589
Change-Id: Ic734ddab4e9a94547a8547f61b173f8eed1111ea
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoInstall both restconf northbounds with odl-restconf 43/79343/2
Robert Varga [Wed, 9 Jan 2019 12:49:38 +0000 (13:49 +0100)]
Install both restconf northbounds with odl-restconf

Now that we have separate packaging for both northbounds, make
sure we pull them into odl-restconf.

This eliminates the need for odl-restconf-nb-rfc8040-all, as that
is a subset of odl-restconf-all.

Change-Id: Iafda7f00aeb635414db6230410f055a857db032d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out odl-restconf-nb-bierman02 42/79342/2
Robert Varga [Wed, 9 Jan 2019 12:46:15 +0000 (13:46 +0100)]
Separate out odl-restconf-nb-bierman02

odl-restconf is our user-installable feature which we want to use
to install both northbounds. Separate out odl-restconf-nb-bierman02,
which is authenticated version of bierman02 and pull it in.

Change-Id: Idf8db9d41629824b881ad77145ec4d10c7b057e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out odl-restconf-nb-bierman02-noauth 41/79341/2
Robert Varga [Wed, 9 Jan 2019 12:41:50 +0000 (13:41 +0100)]
Separate out odl-restconf-nb-bierman02-noauth

odl-restconf-noauth is the top-level, default feature, which
we want to use to install both northbounds.

Separate out bierman02 into its own feature and make sure
odl-restconf-noauth depends on it.

Change-Id: Ib703d9a2912a3d6e4b546be6c0be72a93bbbf5c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRename odl-restconf-base to odl-restconf-nb-bierman02-base 40/79340/1
Robert Varga [Wed, 9 Jan 2019 12:35:25 +0000 (13:35 +0100)]
Rename odl-restconf-base to odl-restconf-nb-bierman02-base

This feature is hosting the base bierman02 bundle and configuration,
hence it should be named accordingly.

This reduces confusion a bit and allows us to install both
northbounds simultaneously.

Change-Id: Ie708fe7ab73958c009af0e8494d01f5329587a74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove odl-restconf dependency on jackson 39/79339/1
Robert Varga [Wed, 9 Jan 2019 12:19:17 +0000 (13:19 +0100)]
Remove odl-restconf dependency on jackson

Jackson is part of odl-restconf-common, it should not be in
the user-installable feature.

Change-Id: I2d4019b1aca6cb1942400b4469356a10b2dbbcb0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPrevent duplicate netty packaging 37/79337/1
Robert Varga [Wed, 9 Jan 2019 11:43:36 +0000 (12:43 +0100)]
Prevent duplicate netty packaging

With protocol-framework gone, odl-netty-api is missing
a dependency on odl-netty-4, preventing duplicates. Make sure
we have that in place.

Change-Id: I596502060610087e39d757db788ab715939963e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Migrate NetconfHelloMessage's use of Optional"
Jakub Morvay [Mon, 7 Jan 2019 17:01:42 +0000 (17:01 +0000)]
Merge "Migrate NetconfHelloMessage's use of Optional"

5 years agoMigrate NetconfHelloMessage's use of Optional 40/79240/8
Robert Varga [Fri, 4 Jan 2019 16:14:52 +0000 (17:14 +0100)]
Migrate NetconfHelloMessage's use of Optional

Use java.util.Optional, cascading that to all users.

Change-Id: I3ba97d060c8ea564bec378285bf6d8dbdb6a59d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Replace GsonProvider to JacksonJaxbJsonProvider"
Jakub Morvay [Mon, 7 Jan 2019 15:28:07 +0000 (15:28 +0000)]
Merge "Replace GsonProvider to JacksonJaxbJsonProvider"

5 years agoReplace GsonProvider to JacksonJaxbJsonProvider 38/78838/6
wsd [Mon, 17 Dec 2018 14:05:46 +0000 (22:05 +0800)]
Replace GsonProvider to JacksonJaxbJsonProvider

Problem: GsonProvider uses com.google.gson.Gson to convert a javabean to a json string
and is not compatitble with ApiDelaration which has a defined field:
com.fasterxml.jackson.databind.node.ObjectNode models for the swagger model object.
So it should use ObjectMapper to convert swagger api object instead of google Gson.
Obviously, com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider can achieve this conversion
by using the org.opendaylight.netconf.sal.rest.doc.jaxrs.JaxbContextResolver.

JIRA: NETCONF-588
Change-Id: Iee8a0528a29601a8737ed0247f183fddc9c5ebe5
Signed-off-by: wsd <wusandi@163.com>
5 years agoMerge "Prevent ssh hang during shutdown"
Jakub Morvay [Mon, 7 Jan 2019 12:07:32 +0000 (12:07 +0000)]
Merge "Prevent ssh hang during shutdown"