Tom Pantelis [Wed, 28 Feb 2018 19:13:38 +0000 (14:13 -0500)]
Restconf 8040 should return 204 for delete and put
restconf was returning 200 Ok but according to RCF8040, for put,
"If an existing resource is modified, a "204 No Content"
status-line is returned."" and for delete, "If the DELETE request
succeeds, a "204 No Content" status-line is returned.".
Change-Id: I7133cdd747c1869d6b640c873bbcdccd437e8900
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Mon, 26 Feb 2018 19:19:01 +0000 (14:19 -0500)]
NETCONF-514: Use exists instead of read for PUT
The PUT operation needs to check if the path already exists
in order to return the proper response code according to the RFC
however calling exists instead of read is more efficient on the
back end.
Change-Id: Ibd7e99324c6a151aae91083e0c90bdf877161dee
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Robert Varga [Thu, 22 Mar 2018 17:59:06 +0000 (18:59 +0100)]
Fix odl-config-netconf-connector
It should not be pulling in notifications-impl, but rather pull
it in via a feature.
Change-Id: Id49b573358df1d72685fba001247f0f1404af9cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a54728badc9bd59e60788baf22b2739f1d1f04be)
Robert Varga [Thu, 22 Mar 2018 15:57:12 +0000 (16:57 +0100)]
Add odl-restconf-common
Restconf features and up duplicating a lot of common infrastructure,
make sure we package it in a common feature.
Change-Id: Ia8f69fcf5668010e3f62a6204828bf819745ca87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
042fc8536a957c4b1accab6fbad101a38be7e458)
jenkins-releng [Thu, 22 Mar 2018 16:57:43 +0000 (16:57 +0000)]
Bump versions by x.y.(z+1)
Change-Id: I97656ef12dcb5bd468879129a35e96d3048869c6
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Luis Gomez [Thu, 8 Mar 2018 04:21:20 +0000 (20:21 -0800)]
NETCONF-521: Replace literal '\n' by newline
This fixes the private key decoding error in NETCONF-521.
Change-Id: Iddcd29ea8ce513068e49071c0bdabbb788c11064
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
Tom Pantelis [Wed, 14 Feb 2018 17:13:05 +0000 (12:13 -0500)]
Specify explicit javax.ws.rs version in restconf
This seems to fix the intermittent issue where restconf
fails to install due to 2 versions of javax.ws.rs and
javax.annotation.
Change-Id: I6b106d700b89df575ee975f45e047cedb8c03e02
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Thanh Ha [Wed, 28 Feb 2018 16:11:59 +0000 (16:11 +0000)]
Merge "NETCONF-512: Add cases for missing NormalizedNode types" into stable/oxygen
Ryan Goulding [Tue, 24 Oct 2017 21:23:10 +0000 (17:23 -0400)]
Convert netconf-util, netconf-ssh, netconf-tcp to blueprint
netconf-util, netconf-ssh, and netconf-tcp still used a BundleActivator
and accompanying ServiceTracker for service instantiation. netconf-ssh
and netconf-tcp depend on netconf-util for NetconfConfiguration, so it
was decided to do the conversion of all three bundles in one patch.
netconf-util utilizes blueprint-cm to instantiate NetconfConfiguration
based on the ManagedService identified by the "netconf" PID.
Tests that were aimed at testing bespoke Activator logic were removed,
since the accompanying Activators were removed. ServiceTrackers were
removed in favor of bean references. Scaffolding used to locate the
NetconfConfiguration ManagedService was also removed since it is now
directly referenced using blueprint.
JIRA: NETCONF-510
Change-Id: I27452ea509bc50333ffc00c6d1d8de3133e8b850
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7072e63a98485bbbfa686a639d28002377972aa0)
Tom Pantelis [Sat, 24 Feb 2018 01:17:02 +0000 (20:17 -0500)]
NETCONF-512: Add cases for missing NormalizedNode types
ReadDataTransactionUtil.prepareData was missing cases for
LeafSetNode, OrderedLeafSetNode, OrderedMapNode and UnkeyedListNode.
Change-Id: Iaf44ce9b24044584e37d524835ec4a51843acd32
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit
c7e371eb1e23ba3b86747a27172acca78a449706)
Anil Belur [Mon, 26 Feb 2018 06:59:45 +0000 (16:59 +1000)]
Update .gitreview to stable/oxygen
Change-Id: I68819e98b43d5653babd67fed6ec04cad83e73db
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Stephen Kitt [Fri, 2 Feb 2018 15:57:30 +0000 (16:57 +0100)]
Closed nested JSON writers
With I9c597fe96937867cffdcbeeddd4b1507de20f2ee,
JSONNormalizedNodeStreamWriter.createNestedWriter() leaves it up to
the caller to close the provided JsonWriter. This patch ensures that
that is the case.
Change-Id: If20a596db06e40d1636de168dd11677372964364
Signed-off-by: Stephen Kitt <skitt@redhat.com>
(cherry picked from commit
b6be299466349d775d860ab45d785028e6b899f7)
LiGuosheng [Wed, 7 Feb 2018 08:24:56 +0000 (16:24 +0800)]
Modify NetconfKeystoreAdapter to expose private keys and certificates
Supply a method of using private keys and trusted certificates to
create JDK KeyStore. Improve code and test cases.
Change-Id: I56dff8cec16eeb320b4765a5d8c5bd3ffe562556
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Igor Foltin [Tue, 20 Feb 2018 09:30:52 +0000 (10:30 +0100)]
Fix root data node QName equality check
This fixes the http error status 500 when trying to read
the whole mounted datastore using the new restconf
implementation based on RFC8040.
When serializing a NormalizedNode that represents
the data root we need to serialize only its children.
Change-Id: Ia87ea7d5244199680f528901ce85f9b78f9d5e3e
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
Robert Varga [Tue, 13 Feb 2018 18:23:20 +0000 (19:23 +0100)]
Clean up NetconfHelloMessage
- do not invoke toString() during message checking
- use UntrustedXML directly to instantiate documents
- use Optional.fromNullable()
- Invert equality calls, making sure we invoke them on constants
- eliminate the need to catch DocumentedException
Change-Id: I6bb2165cc7b0644c5236e4c5967b03915d978e3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 13 Feb 2018 18:25:07 +0000 (19:25 +0100)]
Fix a NetconfDocumentedException warning
Exceptions are serializable, hence thei need a version.
Change-Id: I3fcc125fc5bbd0ce661ce5ec2c63ffd5c0094d7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 13 Feb 2018 19:30:32 +0000 (20:30 +0100)]
Depend on odl-config-util
Rather than packaging config-util in this project, rely on packaging
provided by controller.
JIRA: NETCONF-508
Change-Id: I156ca6948ac4db5bc1ac977b3cdfa98259c12c55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Evan Zeller [Wed, 14 Feb 2018 23:15:41 +0000 (15:15 -0800)]
NETCONF-509: no-input RPCs should use RestconfDocumentedException
When invoked with an "input" value currently the implementation throws
IllegalStateException up to the servlet container which results in the
ugly jetty default error page and reveals stack trace information.
Provide a clear message that the invoked RPC should not take any input values.
Change-Id: Id13499b80bed9a2ea7666a3aa6d775da341055ab
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
Evan Zeller [Mon, 22 Jan 2018 20:12:38 +0000 (12:12 -0800)]
Don't include stacktraces in REST responses
OWASP best practices recommend user facing error messages should not
contain stack traces or line numbers. The full stack trace should still be available in karaf.log.
Change-Id: Ia8ffed91ecdbf8a1d299c90c33882bbc18d55b50
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
Robert Varga [Tue, 13 Feb 2018 12:49:37 +0000 (13:49 +0100)]
Fix odl-restconf-noauth packaging yangtools bundle
Depend on the corresponding feature and cleanup versions.
Change-Id: Ic3086cab94515b6c508cacc472ddc7095a51436c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
JakubToth [Sat, 10 Feb 2018 00:10:54 +0000 (00:10 +0000)]
Merge "NETCONF-506: fix YII deserialization in FilterContentValidator"
LiGuosheng [Tue, 6 Feb 2018 11:39:59 +0000 (19:39 +0800)]
Add test cases for NetconfSalKeystoreService
Test cases for adding private keys and trusted certificates into
the keystore.
Change-Id: I493e3f88e636ee7c53363e1cbf54ba6c1714d156
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Marek Gradzki [Tue, 30 Jan 2018 19:27:17 +0000 (20:27 +0100)]
NETCONF-506: fix YII deserialization in FilterContentValidator
Treat leafref keys in the same way as indentityref keys.
Follows https://git.opendaylight.org/gerrit/#/c/53996/
See also NETCONF-384.
Change-Id: I36a67b12e23c7da43f4e5c6002de8ae031d18e6a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
LiGuosheng [Tue, 30 Jan 2018 09:35:11 +0000 (17:35 +0800)]
jira NETCONF-489 Add TLS support for connecting to a netconf device
The X.509 certificate yang model definition and rpc implementation.
Change-Id: Ic125707f80a23f21e183fa732adfb0083f853bca
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Marek Gradzki [Tue, 30 Jan 2018 11:45:07 +0000 (12:45 +0100)]
NETCONF-505: fix decoding of URLs with external leafref
Use mount point schema rather than global.
Change-Id: Id386bc462961b42103cf0e3f2e984f4e034bba76
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Ryan Goulding [Thu, 25 Jan 2018 16:09:48 +0000 (11:09 -0500)]
NETCONF-502: Use GSON for swagger serdes
This utilized the GsonProvider currently in AAA to do serdes
for odl-mdsal-apidocs. This will not pass until the
subsequent AAA patches are merged.
Change-Id: Iba67d65b3f72f26f0507b62327a41e570fc3cea4
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
JakubToth [Thu, 25 Jan 2018 23:14:06 +0000 (23:14 +0000)]
Merge "Add missing 'Path' annotations in jax-rs implementations for REST services"
Robert Varga [Thu, 25 Jan 2018 14:30:31 +0000 (15:30 +0100)]
odl-restconf-nb-rfc8040-noauth depends on odl-yangtools-export
Rather than pulling in dependency bundle, make sure we reference
the correct feature in which it is packaged.
Change-Id: I1b61b12655217cbee44ea82a8401b90523c63206
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Jan 2018 14:20:31 +0000 (15:20 +0100)]
Drop references to object-cache
object-cache artifacts are experimental and not used anymore,
drop them from netconf features.
Change-Id: Ife39dfd2fb7dc967745b810f52472d3fd94c2220
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Igor Foltin [Thu, 25 Jan 2018 12:55:06 +0000 (13:55 +0100)]
Add missing 'Path' annotations in jax-rs implementations for REST services
Change-Id: I1d666b4ea2017f79adf079fe76dcf8827516f8b1
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
Luis Gomez [Sat, 20 Jan 2018 00:06:04 +0000 (16:06 -0800)]
NETCONF-501: Remove feature prerequisite
Change-Id: I8e18996cb2fe1d05bc07d30de160912eef3ca970
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
Robert Varga [Fri, 19 Jan 2018 14:31:17 +0000 (15:31 +0100)]
NETCONF-494: use RFC7951 JSON codecs
RFC8040 requires us to use a different codec for encoding instance
identifiers. Update the RFC8040 northbound to select this codec.
Also update the bierman02 northbound to explicitly bind to
the legacy LHOTKA codec.
Change-Id: I436e17b7c7695aaf75a27e7967b1bcfaf4815686
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Jan 2018 22:54:03 +0000 (23:54 +0100)]
Minimize yangtools dependencies and bump to 2.0.1
Squash dependencies so that netconf features are pulling in
the bare minimum set of yangtools features directly and use
version ranges for them.
Properties should be avoided and inter-project dependencies should
be expressed via ${upstream}-artifacts dependencyManagement import.
yangtools-2.0.1 contains a fix to multi-revision modules, which are
badly broken in 2.0.0. It also introduces APIs we require to fix
compliance with RFC8040 (i.e. follow RFC7159).
Change-Id: I0e0e63841d511123243560f166db50c2fc9270fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jakub Morvay [Fri, 12 Jan 2018 14:00:54 +0000 (14:00 +0000)]
Merge "Clean up netconf-parent root pom"
Robert Varga [Thu, 12 Oct 2017 12:33:55 +0000 (14:33 +0200)]
Adjust to yangtools-2.0.0/odlparent-3.0.0 changes
This also bumps sshd-core to 1.6.0, as that is what karaf ships
by default.
Change-Id: I064b1621bfa729c58e3b3ef6646787a6112301aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Robert Varga [Thu, 12 Oct 2017 11:40:28 +0000 (13:40 +0200)]
Bump yangtools to 2.0.0
This bumps odlparent to 3.0.2 and yangtools to 2.0.0. Feature
references are updated so the reactor is consistent, build failures
are addressed in a follow-up patch.
Change-Id: I186d0900d361a3e33e779629f7ce60329fd61143
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Ryan Goulding [Tue, 9 Jan 2018 16:44:11 +0000 (11:44 -0500)]
Clean up netconf-parent root pom
The root pom had some long running xml fields and other small
formatting issues. Additionally, it introduced a profile that
was unused ("integrationtests"). I also cleaned up the modules
so that they are listed in alphabetic order.
Change-Id: I1ca3e40d7520fb1fc0cd5aa277c802db8d052275
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
李国胜10121395 [Wed, 27 Dec 2017 11:50:04 +0000 (19:50 +0800)]
BUG: jira NETCONF-493 ReconnectPromise throws IllegalStateException continuously
ReconnectPromise will execute method setFailure() more than once
if reconnecting to a netconf device failed more than once, and the
setFailure() method will start throwing IllegalStateException at
the second time invocation, so there should add limitation to the
call of setFailure() to avoid IllegalStateException.
Change-Id: I2d6802e6ac643215192527319d565da36a16caf5
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
李国胜10121395 [Tue, 26 Dec 2017 03:06:27 +0000 (11:06 +0800)]
Bug jira NETCONF-492: netconf:list-devices throws a NullPointerException
When initiate a connection to a netconf device, the operational data store of this device
will be set to failure if the negotiation fails, but the write to the operational data
store just involve ConnectionStatus and ConnectedMessage, and this will cause
netconf:list-devices to throw a NullPointerException, and we can get nothing from this
command.
Change-Id: I64529d7408c315222b3ceabe4e2b2748038faa01
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Juraj Veverka [Mon, 18 Dec 2017 20:48:33 +0000 (21:48 +0100)]
Added more configuration options for NetconfDeviceSimulator
- yang resourves loaded from classpath
- username / password AuthProvider
- public key authenticator
all changes are backwards compatible
Change-Id: Iba2c3106d456050ed84a2bbbaf1da2a227fa3566
Signed-off-by: Juraj Veverka <juraj.veverka@pantheon.tech>
HeYunBo [Wed, 29 Nov 2017 12:20:36 +0000 (20:20 +0800)]
Using writeAndFlush to response PingWebSocketFrame with PongWebSocketFrame, instead of write
Change-Id: Icc749f3a5255cf7385274dd546251160bcd0f8aa
Signed-off-by: HeYunBo <he.yunbo@zte.com.cn>
wusandi [Thu, 14 Sep 2017 06:58:56 +0000 (14:58 +0800)]
BUG-9160: fix ReadDataTransactionUtil creating two adapters
It should not directly add all of NotificationListenerAdapter objects
for XML stream to the list of NotificationListenerAdapter for JSON stream.
And to fix it, just to concat them together instead of putting one to
another.
Change-Id: I2c8eedc04281f10ea6742db854309d8182b1966b
Signed-off-by: wusandi <wusandi@163.com>
Tomas Cere [Thu, 30 Nov 2017 14:59:46 +0000 (14:59 +0000)]
Merge "Support for patch command"
Balaji Varadaraju [Sat, 18 Nov 2017 02:50:10 +0000 (20:50 -0600)]
Support for patch command
The internal JSON libary did not have support for HTTP PATCH command.
This patch provides the support for the PATCH command. Support is
provided in both deprecated and new RESTCONF libraries.
Change-Id: I2bb81fe46bab5ec49fac3bff156e04f9a1b7c227
Signed-off-by: Balaji Varadaraju <bvaradar@brocade.com>
Jakub Toth [Thu, 23 Nov 2017 23:14:50 +0000 (00:14 +0100)]
Remove duplicated schema service in provider
Change-Id: I24bc553e2b0bcff8c598d86fe0956bd4ff4f8cb2
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
Jakub Toth [Thu, 23 Nov 2017 14:46:06 +0000 (15:46 +0100)]
Fix harcoded port in location of streams
Change-Id: I449772b7233186f29df97a3968f65b19204f79ca
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
Tomas Cere [Tue, 21 Nov 2017 15:45:42 +0000 (16:45 +0100)]
Fix NPE when trying to download restconf provided yang files
Restconf throws a NPE when trying to download the provided yang files
due to using Module.getSource() which is deprecated an @Nullable.
Switch this to using DOMSchemaService.
This fixes the NPE only in the rfc8040 implementation,
draft02 still most likely has it.
Change-Id: Ic8fc94a26a1e29e037872dfdc16c97ef19fcf115
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Jakub Toth [Sun, 12 Nov 2017 17:04:52 +0000 (18:04 +0100)]
Add update method of handlers for REST services
Change-Id: I64a7f7a47f43566a50839ce1a83ba0fdd4034ed9
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
Marek Gradzki [Thu, 9 Nov 2017 12:49:00 +0000 (13:49 +0100)]
Fix KeyPairProvider initialization in NetconfSshServerProvider
As a side offect of https://git.opendaylight.org/gerrit/#/c/60138,
RSA private key is stored unencrypted on disk.
Without additional countermeasures this might not be a good idea.
This patch sets DEFAULT_PRIVATE_KEY_PATH to null which disables
key pair serialization.
Change-Id: Ibbf51f702bc47d768db16d6a3f406a1b2ec906fb
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Tomas Cere [Thu, 9 Nov 2017 10:56:20 +0000 (10:56 +0000)]
Merge "Remove netconf-cli"
Jakub Toth [Tue, 7 Nov 2017 10:41:09 +0000 (11:41 +0100)]
Make ServicesWrapperImpl as argument in provider
Change-Id: Id491309eb0f1bc75337ace02072248f25d60a1b9
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
Tomas Cere [Tue, 7 Nov 2017 13:42:36 +0000 (14:42 +0100)]
Remove netconf-cli
This was living in limbo for some time, I think it's time to say goodbye.
The overhead for keeping this buildable is a wasted effort I think, so remove this.
Change-Id: Icc45c9a78afa380c2e96ea373c02c47f644191a1
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Mon, 30 Oct 2017 11:40:59 +0000 (12:40 +0100)]
Restore the deprecated credentials name.
Renaming caused downstream breakage so restore the old name.
Change-Id: I835b178d8f62b1c693f81f11316eeb67c146bf8c
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Fri, 27 Oct 2017 14:43:25 +0000 (14:43 +0000)]
Merge "Remove the default loopback mount from the old connector feature"
Tomas Cere [Fri, 27 Oct 2017 13:27:22 +0000 (13:27 +0000)]
Merge changes from topic 'keyauth-refactor'
* changes:
BUG-9261: rename pair-id to key-id
BUG-9262 Add rpc for remove-device
BUG-9261: Move keystore to use Config datastore.
Do not return null in RpcHandlerDefault
BUG-9261: Add basic public key auth to testtool
BUG-9261: Add credential handler for PublicKey auth
BUG-9261: introduce netconf keystore service
BUG-9261: introduce new Credential types
Tomas Cere [Fri, 27 Oct 2017 09:39:52 +0000 (11:39 +0200)]
Remove the default loopback mount from the old connector feature
This is conflicting in sft when two projects pull in the old feature
and the new clustered topology feature. Cfg subsystem should have no
users now so remove it.
Change-Id: I97819282f39af332fa78bf58cbb99321ffa79ae0
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Fri, 27 Oct 2017 11:19:20 +0000 (13:19 +0200)]
BUG-9261: rename pair-id to key-id
Makes more sense since we are not dealing with pairs.
Change-Id: I3f15304506844a23232541703182c73a7256379d
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Wed, 25 Oct 2017 13:57:00 +0000 (15:57 +0200)]
BUG-9262 Add rpc for remove-device
Change-Id: I0abb373b29e6c3e89b4b2c0b424782c57c70418e
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Tue, 24 Oct 2017 12:31:44 +0000 (14:31 +0200)]
BUG-9261: Move keystore to use Config datastore.
We want the keystore persisted since we want to keep the
configuration valid across restarts so keep this in the persisted ds.
Change-Id: I806271f4fac3b66113253616baeedae42784896c
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Tue, 24 Oct 2017 11:59:41 +0000 (13:59 +0200)]
Do not return null in RpcHandlerDefault
Change-Id: I692a03a65e1bd8dbd471ec2756320d374e397261
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Tue, 24 Oct 2017 11:14:20 +0000 (13:14 +0200)]
BUG-9261: Add basic public key auth to testtool
Adds public key authenticator that accepts every connection to
testtool.
Change-Id: I49e98613cf5fb5dc33c8ccb465cdc16044b33f5e
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Thu, 19 Oct 2017 13:10:51 +0000 (15:10 +0200)]
BUG-9261: Add credential handler for PublicKey auth
Change-Id: I073188bede6fb592147da5891793cf84abced276
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Thu, 19 Oct 2017 10:21:34 +0000 (12:21 +0200)]
BUG-9261: introduce netconf keystore service
Change-Id: I97e1e65029c339bd28557787841d485392cf9c44
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Wed, 25 Oct 2017 09:26:58 +0000 (09:26 +0000)]
Merge "Add missing flush() on buffered writer."
Tomas Cere [Tue, 17 Oct 2017 13:06:43 +0000 (15:06 +0200)]
BUG-9261: introduce new Credential types
Introduces credential types for:
-encrypted passwords
-unencrypted passwords
-key-pair authentication
While keeping backwards compatibility with the old way of storing
credentials as a deprecated case.
Change-Id: Ifb7cfaa5284467639d6c0e1d8bac2b4b5876bedc
Signed-off-by: Tomas Cere <tcere@cisco.com>
Andrej Záň [Mon, 23 Oct 2017 14:02:07 +0000 (16:02 +0200)]
Add missing flush() on buffered writer.
Missing flush caused, that backing ByteArrayOutputStream was empty
and thus mounted resources was not showing up in apidoc.
Change-Id: I14445b9f85cea1918321e59519129e21cb37dd81
Signed-off-by: Andrej Záň <andrej.zan@pantheon.tech>
Juraj Veverka [Fri, 20 Oct 2017 07:39:53 +0000 (09:39 +0200)]
Testtool functionality enhanced. User now may
inject own implementation of NetconfOperationService
using configuration object.
Change-Id: I41ac6d807db56ee07fbfde9d9b5bb80e714b7ca2
Signed-off-by: Juraj Veverka <juraj.veverka@pantheon.tech>
David Suarez [Wed, 18 Oct 2017 13:53:23 +0000 (15:53 +0200)]
Remove explicit default super-constructor calls
The default constructor is called by default (hence its name), no need
to call it explicitly.
Change-Id: I7ea6f1ab540b424f4812b8cfdea048a43a73f469
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
Tomas Cere [Wed, 18 Oct 2017 11:11:24 +0000 (11:11 +0000)]
Merge "Fix some sonar/checkstyle issues"
David Suarez [Tue, 17 Oct 2017 17:40:53 +0000 (19:40 +0200)]
Fix some sonar/checkstyle issues
Change-Id: Id38d1e320f68ca12625dedfc19ea81cd81ea3005
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
David Suarez [Tue, 17 Oct 2017 22:02:53 +0000 (00:02 +0200)]
Remove deprecated CheckedFuture from callhome-provider module
Some other changes regarding checkstyle, sonar and annotations.
Change-Id: I361e2fc1928620ac1ed178f77beb397d5110a761
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
Tomas Cere [Mon, 16 Oct 2017 08:39:28 +0000 (08:39 +0000)]
Merge changes from topic 'ListenerAdapterTreeMigration'
* changes:
Transition ListenerAdapter to ClusteredDOMDataTreeListener
Add unit tests for ListenerAdapter
Josh [Tue, 19 Sep 2017 07:42:39 +0000 (10:42 +0300)]
Transition ListenerAdapter to ClusteredDOMDataTreeListener
Solves this: https://bugs.opendaylight.org/show_bug.cgi?id=9147
This is in general an issue with ListenerAdapter which does not
currently work in a clustered deployment.
ListenerAdapterTest needed to be adjusted for two reasons:
1. There was a bug in ListenerAdapter where if leafNodesOnly
was set the leafNodesOnly logic was not applied in delete
notifications. The new ListenerAdapter code fixes that so
ListenerAdapterTest needed to be adjusted.
2. In DomDataTreeEtc, merge operations cause the key node
to count as "WRITE"-en for notifications even if it was not
changed. ListenerAdapterTest was adjusted accordingly. Bug
for this here: https://bugs.opendaylight.org/show_bug.cgi?id=9179
Change-Id: I3c40e02551d8f04354489e5ffb8c66f111bb3b96
Signed-off-by: Josh <jhershbe@redhat.com>
Josh [Sun, 17 Sep 2017 12:16:51 +0000 (15:16 +0300)]
Add unit tests for ListenerAdapter
Test that json generated by ListenerAdapter is correct
for regular notifications and "leaf nodes only" notifications.
Change-Id: I62fa22b1e30ca6a8632b3d2614558e9ced0abf54
Signed-off-by: Josh <jhershbe@redhat.com>
Robert Varga [Fri, 13 Oct 2017 09:00:03 +0000 (11:00 +0200)]
Fix augmentation node lookup
This fixes an issue where we erroneously checked instanceof
against optional rather than its content -- which is obviously
wrong.
Change-Id: I1b60d35c5ca85444fd7f6595606e82f72f06f1d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 12 Oct 2017 12:31:11 +0000 (14:31 +0200)]
Import MappingCheckedFuture from mdsal
yangtools is getting rid of this class, import it from its new home
in mdsal.
Change-Id: Iff6f19893816ac576faaaaef0d62295341b8c842
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tomas Cere [Thu, 12 Oct 2017 10:18:08 +0000 (10:18 +0000)]
Merge "Bug 9256: Add websocket server config knob for ip"
Tomas Cere [Thu, 12 Oct 2017 10:17:57 +0000 (10:17 +0000)]
Merge "BUG 9112: NPE in karaf cli when device is still connecting"
Tomas Cere [Thu, 12 Oct 2017 10:17:48 +0000 (10:17 +0000)]
Merge "BUG-9048 Fix actor crash when writing incorrect data"
Tomas Cere [Wed, 11 Oct 2017 13:37:37 +0000 (13:37 +0000)]
Merge "NetConf test tool improved so now it can be used as library not only as CLI tool."
Tomas Cere [Wed, 11 Oct 2017 12:54:32 +0000 (12:54 +0000)]
Merge "Replace deprecated Futures.addCallback by the newer version"
Juraj Veverka [Wed, 11 Oct 2017 11:27:58 +0000 (13:27 +0200)]
NetConf test tool improved so now it can be
used as library not only as CLI tool.
Change-Id: I14ca03d0b2cec0f6fe8b5994b3e195fa6de8a4d2
Signed-off-by: Juraj Veverka <juraj.veverka@pantheon.tech>
Ryan Goulding [Wed, 4 Oct 2017 17:13:25 +0000 (13:13 -0400)]
Remove unnecessary bouncycastle dependencies
These are provided through the JRE's JCE, and should logically be
thought of as being provided through by the underlying environment
rather than direct dependencies. This removes the places where
the dependency exists but is not needed.
Change-Id: I5c68f138d94db678aa77fba3ca645b50232dd757
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Tomas Cere [Tue, 10 Oct 2017 08:50:57 +0000 (10:50 +0200)]
Bug 9256: Add websocket server config knob for ip
Also cleans up a couple of ugly NPE catches.
Change-Id: Ifd164aa76c406cc2082d603df8732d636f6e06a1
Signed-off-by: Tomas Cere <tcere@cisco.com>
Robert Varga [Mon, 9 Oct 2017 18:45:30 +0000 (20:45 +0200)]
BUG-9218: pull odl-mdsal-model-inventory
Rather than packaging controller's model, use if from the upstream
feature.
Change-Id: I41a1bc09beaed3b1caa8acc33807f29a59d2eb36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
David Suarez [Mon, 9 Oct 2017 08:21:47 +0000 (10:21 +0200)]
Replace deprecated Futures.addCallback by the newer version
The method addCallback(ListenableFuture<V> future,
FutureCallback<? super V> callback) is deprecated and will be replaced
by a new its new version addCallback(ListenableFuture<V> future,
FutureCallback<? super V> callback, Executor executor) in April 2018.
Some other minor changes to pass the new version of checkstyle.
Change-Id: I0aaf43e913ab241fd74e53ff91d7852e77b699b3
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
Tomas Cere [Fri, 6 Oct 2017 13:07:13 +0000 (15:07 +0200)]
BUG 9112: NPE in karaf cli when device is still connecting
Change-Id: I753e1870ce5b86535163e43acd4a20b5f4d83df5
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Fri, 6 Oct 2017 11:50:43 +0000 (11:50 +0000)]
Merge "Directly inject CredentialAuth dependency"
Tomas Cere [Wed, 27 Sep 2017 10:49:02 +0000 (12:49 +0200)]
BUG-9048 Fix actor crash when writing incorrect data
We need to catch all unechecked exceptions when writing data
in the clustered implementation since these will crash the actor
running and cause problems down the line.
Change-Id: Ib9d243d1db0f6e29e55c97f794a122f307420055
Signed-off-by: Tomas Cere <tcere@cisco.com>
Ryan Goulding [Mon, 14 Aug 2017 19:48:46 +0000 (15:48 -0400)]
Directly inject CredentialAuth dependency
In today's blueprint-oriented OSGi DI, it is more efficient to
express the dependency on AAA's CredentialAuth API rather than to
spin waiting for a ServiceReference using a ServiceTracker. This
change specifies direct injection of AAA's CredentialAuth Service
through blueprint wiring.
Change-Id: Iec02f8acc4763922505881a772ff128f1f9d9986
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Robert Varga [Fri, 29 Sep 2017 09:53:39 +0000 (11:53 +0200)]
BUG-9218: fix features to not duplicate upstream bundles
Restructures dependencies to pull in upstream features which
provide the bundles we need.
Change-Id: I7e1cf306abd100a1a50cc4248de78d85dc91df9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ccce725613d3078a0ad18f3f8fbfa5e1d9aea68c)
Evan Zeller [Thu, 28 Sep 2017 01:15:31 +0000 (18:15 -0700)]
BUG-9132: don't provide a value for restconf/streams/events
The yang type of events leaf is 'type empty', meaning there should be no value.
As of Carbon performing a GET on restconf/streams causes a cast
exception due to the empty string value here. See EmptyJSONCodec in
yangtools.
Change-Id: If0501b9c5459f4255096a4f070968c87a749407e
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
Stephen Kitt [Wed, 27 Sep 2017 13:34:28 +0000 (15:34 +0200)]
Bump odlparent 2.0.4 to 2.0.5
Change-Id: I8ec7b8adcc7f2805e0a214ac3aee64368df40291
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Anil Belur [Thu, 28 Sep 2017 07:40:31 +0000 (17:40 +1000)]
Bump netconf to use yangtools 1.2.0
Also reverts I1914426b96029d7d2377f77b9f7df8beb14e607a to downgrade
yangtools properly.
Jira: releng-485
Change-Id: Ie344af870af6a85e859b1e35ca268f5bf988b00b
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tomas Cere [Wed, 27 Sep 2017 16:15:25 +0000 (16:15 +0000)]
Merge "Adjust test-tool to yangtools changes"
Jakub Morvay [Wed, 27 Sep 2017 13:10:47 +0000 (15:10 +0200)]
Adjust test-tool to yangtools changes
yang-maven-plugin adds revision to packaged yang file name. Netconf
test-tool should register yang resources with valid filenames, i.e
name@revision.yang, when preparing for assembly of its schema context.
Change-Id: I1914426b96029d7d2377f77b9f7df8beb14e607a
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Tom Pantelis [Tue, 12 Sep 2017 16:03:00 +0000 (12:03 -0400)]
Add local MultivaluedHashMap implementation
The JSONRestconfService implementation contains a local UriInfo
implementation, SimpleUriInfo, that uses a MultivaluedHashMap
implementation from javax.ws.rs.core. This class is provided by
the dependency used at compile time however, the runtime bundle
that provides the javax.ws.rs.core interfaces doesn't provide
MultivaluedHashMap. Therefore I added our own local MultivaluedHashMap
class based on the external class. I also refactored SimpleUriInfo into
it's own class as it's used by both JSONRestconfService implementations.
Change-Id: I1af0771327d46c72e55facf14c41038fd583e0ed
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Atul Gosain [Tue, 22 Aug 2017 00:46:01 +0000 (17:46 -0700)]
Minor cleanup of blueprint config
The path for private file was left here due to which the netconf module
looks for the private key file and shows error in the log which is a false alarm.
Cleaning up the configuration
Change-Id: Ied9cc137ab67cab158318a6c2f34da19dc174fe0
Signed-off-by: Atul Gosain <atul.gosain@gmail.com>
Signed-off-by: Atul Gosain <agosain@brocade.com>
Atul Gosain [Fri, 21 Jul 2017 04:44:33 +0000 (21:44 -0700)]
RPC for netconf node addition. Supports encrypt option for password encryption.
Change-Id: I34beb880cbe2ccc6a3fe8e5f6cd4253f7e1938f4
Signed-off-by: Atul Gosain <atul.gosain@gmail.com>
Signed-off-by: Atul Gosain <agosain@brocade.com>
Tomas Cere [Thu, 21 Sep 2017 08:56:56 +0000 (08:56 +0000)]
Merge "Bug 8988 - Check for empty payload properly"