Jakub Morvay [Tue, 22 May 2018 14:32:30 +0000 (14:32 +0000)]
Merge "Slave mount point registration hardening/resiliency"
JakubToth [Thu, 17 May 2018 20:30:14 +0000 (20:30 +0000)]
Merge "Allow specification of ODL's HELLO message"
Jakub Morvay [Thu, 17 May 2018 16:56:37 +0000 (16:56 +0000)]
Merge "Make CapabilityChangeNotificationProducer AutoClosable"
Ryan Goulding [Wed, 16 May 2018 15:20:55 +0000 (11:20 -0400)]
Bring in org.json
It appears that RESTCONF actually relies on org.json as a runtime
dependency and currently relies on AAA bringing it in. AAA plans
to remove any dependency on org.json ideally in Fluorine. As
such, have RESTCONF properly declare its dependency.
Change-Id: Ib94aef9fafd12d9646f492f63cd63be9b3e2cb09
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Marek Gradzki [Wed, 16 May 2018 06:21:17 +0000 (08:21 +0200)]
Make CapabilityChangeNotificationProducer AutoClosable
the CapabilityChangeNotificationProducer has AutoClosable dependencies
and already implements close() method.
Change-Id: I463df6b5285deb441586fcc786fd1bb53ab6734b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Ryan Goulding [Mon, 9 Apr 2018 22:47:29 +0000 (18:47 -0400)]
Allow specification of ODL's HELLO message
Some devices are very particular about what they will accept
for a HELLO message. This change allows specification of a custom
message per device mount. If one is not specified, then the
existing default is utilized.
Additionally, certain tests were using very out of date versions of
netconf-node-topology. This is due to the fact that the test
yang files are located in src/test/resources, and were out of date
with the netconf-node-topology used in src/main/yang. These were
updated to the most up-to-date version as of this patch.
JIRA: NETCONF-543
Change-Id: I4049a87a7781655d8d396bb35eb43aab2eca0223
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Tom Pantelis [Thu, 10 May 2018 01:38:01 +0000 (21:38 -0400)]
Slave mount point registration hardening/resiliency
- It's possible for a message to the master to timeout in which
case the slave mount point doesn't get registered so add retries
for the AskForMasterMountPoint message in NetconfNodeManager and
schema resolution in NetconfNodeActor. The AskForMasterMountPoint
and RegisterMountPoint messages were changed to pass the
slave/master ActorRefs in order to send a success/failure reply to
the original caller.
- In NetconfNodeActor, preserve actor safety by executing
ListenableFuture callbacks via the actor's dispatch queue
(using executeInSelf) if the callback accesses actor state.
- Hardened synchronization in NetconfNodeManager and NetconfNodeManager.
- Added UTs for NetconfNodeManager to cover the slave mount point
registration scenarios.
- Added more logging where appropriate
Change-Id: I31c2d6584d56cb87c1b266565bc4b6f4a48ff303
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Jakub Morvay [Thu, 10 May 2018 07:52:54 +0000 (07:52 +0000)]
Merge "Convert yanglib to new web API"
Jakub Morvay [Wed, 9 May 2018 15:10:49 +0000 (15:10 +0000)]
Merge "Convert apidocs to new web API"
Jakub Morvay [Wed, 9 May 2018 15:07:35 +0000 (15:07 +0000)]
Merge "Implement AsyncWriteTransaction.commit()"
Tom Pantelis [Mon, 7 May 2018 22:10:58 +0000 (18:10 -0400)]
Remove controller DCL-related references
DataChangeListener, DataChangeScope and friends are being removed
from the controller. The DataChangeScope enum is part of the NB data
change stream registration API although the implementation was removed
in Oxygen when it was internally changed to use DTCL. We may still
want/need to support the scope on top of DTCL so the enum was copied
to restconf-common.
Change-Id: If2ebe7b863975b4cae63c838d60f83b33e9e37b4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Thu, 3 May 2018 14:44:55 +0000 (10:44 -0400)]
Convert yanglib to new web API
Change-Id: I10b287d2aa2cb44ad11c30b69dbccc7fc725e815
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Marek Gradzki [Wed, 28 Mar 2018 19:52:41 +0000 (21:52 +0200)]
NETCONF-536: support for <candidate> validation
Provides support <validate> RPC, as defined in:
https://tools.ietf.org/html/rfc4741#section-8.6.
Only <candidate> datastore is supported.
Support for test-option and capability advertisement
are not included in this patch.
The actual implementation of validation process is delegated to
DOMDataTransactionValidator - an DOMDataBrokerExtension.
Change-Id: I4bbaba18d2e630787d127a51c26918d05fd7e648
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Tom Pantelis [Thu, 26 Apr 2018 14:08:55 +0000 (10:08 -0400)]
Convert apidocs to new web API
The ApiDocGenerator and MountPointSwagger classes were overloaded to
handle draft02 and rfc8040 differences via a 'newDraft' flag. To
facilitate elimination of the static instances, the classes were
refactored to remove the flag and implement the differences via
abstract methods and derived classes.
Change-Id: I950dfceac40b0aee1bafb4d8b78d36d1ef67eadc
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Sun, 29 Apr 2018 22:51:36 +0000 (18:51 -0400)]
Implement AsyncWriteTransaction.commit()
Implement the new commit() method which uses FluentFuture
instead of the deprecated CheckedFuture. The commit() method
is defaulted in the interface but, as soon as all implementations
implement commit(), the deprecated submit() method will be defaulted
instead.
Change-Id: If053be0d3864513685a231a320a7f47931f76684
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Jakub Morvay [Fri, 27 Apr 2018 09:01:44 +0000 (09:01 +0000)]
Merge "NETCONF-540: do not ignore namespace when building error rpc-reply"
Jakub Morvay [Fri, 27 Apr 2018 07:10:41 +0000 (07:10 +0000)]
Merge "Convert rcf8040 from web.xml to programmtic web API"
Marek Gradzki [Fri, 20 Apr 2018 05:57:38 +0000 (07:57 +0200)]
NETCONF-540: do not ignore namespace when building error rpc-reply
use Element.getLocalName() + Element.getNamespaceURI()
instead of Element.getTagName()
to support clients using namespace prefixes.
Change-Id: I29bfa55e6ac043be6306b8da026ae5228ec9344e
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Tom Pantelis [Tue, 24 Apr 2018 18:48:30 +0000 (14:48 -0400)]
Convert rcf8040 from web.xml to programmtic web API
To simplify, the noauth feature was removed. Since this is
a new API, it's been decided not to carry it forward. The
noauth feature for the bierman02 implementation was put in
and kept for legacy reasons.
Change-Id: Ic432b175fae62caee8cc641bb77c19f38a5ab6f6
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Marek Gradzki [Wed, 25 Apr 2018 09:20:09 +0000 (11:20 +0200)]
Move TestSessionNegotiator class to separate file
Change-Id: I20ba4048cc65c40b0b1247e3412abb5c5cb6caed
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Marek Gradzki [Wed, 25 Apr 2018 07:32:57 +0000 (09:32 +0200)]
NETCONF-539: use netconf namespace in base:1.1 capability check
Use Document.getElementsByTagNameNSgetElementsByTagNameNS
with urn:ietf:params:xml:ns:netconf:base:1.0 namespace
instead of getElementsByTagName
to support clients using namespace prefixes in the hello message.
Change-Id: I333bb4522aca566b74db3e4411be1c90ec419aec
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Jakub Morvay [Thu, 26 Apr 2018 10:38:38 +0000 (10:38 +0000)]
Merge changes from topic 'rem_web_xml'
* changes:
Remove RestConnectorProvider
Use DOMMountPointServiceHandler non-statically
Use SchemaContextHandler non-statically
Remove static TransactionChainHandler instance
Tom Pantelis [Fri, 20 Apr 2018 18:58:40 +0000 (14:58 -0400)]
Remove RestConnectorProvider
RestConnectorProvider has been reduced to just initialize the
ServiceWrapper instance so is no longer needed. Also the ServiceWrapper
interface is no longer needed and, as a result, the ServicesWrapperImpl
class was renamed to just ServiceWrappers. The ServiceWrappers
is now instantiated/initiated via blueprint. The static instance
remains temporarily for the RestconfApplication.
Change-Id: I643d18a6980b5f51262396c49af281515b94868f
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Fri, 20 Apr 2018 13:30:32 +0000 (09:30 -0400)]
Use DOMMountPointServiceHandler non-statically
Removed the static field in RestConnectorProvider and made the
DOMMountPointServiceHandler instance static temporarily for the
RestconfApplication but converts the rest of the code to reference
it non-statically. The static DOMMountPointServiceHandler will be
removed in a subsequent patch.
Change-Id: I92e98c4f8c15a8e77bc2e0b970e74e3fe56d58a5
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Thu, 19 Apr 2018 22:16:03 +0000 (18:16 -0400)]
Use SchemaContextHandler non-statically
Removed the static SchemaContext field and made the SchemaContextHandler
instance static temporarily for the RestconfApplication but converts the
rest of the code to reference it non-statically. The static SchemaContextHandler
will be removed in a subsequent patch.
Change-Id: I9763ad472acdefbade511c47ee7e2f140f9d6ca1
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Thu, 19 Apr 2018 14:17:47 +0000 (10:17 -0400)]
Remove static TransactionChainHandler instance
RestConnectorProvider maintained a static instance in order
to reset the DOMTransactionChain statically. The reset logic
was moved to TransactionChainHandler and call sites in the
static Utils were modified to pass the TransactionChainHandler via
the TransactionVarsWrapper and call reset. This allows the static
instance to be removed. The TransactionChainHandler singleton is now
created via blueprint.
Change-Id: I483ac83103286146bc636b7f1e6ba0df70f2f5a6
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Wed, 18 Apr 2018 01:39:22 +0000 (21:39 -0400)]
Convert bierman02 from web.xml to programmtic web API
To handle auth vs noauth, 2 new bundles were added that
import a new Bierman02WebRegistrar service advertised by
the restconf-nb-bierman02 bundle and simply invoke the
appropriate register*Authentication method.
The odl-restconf no longer installs odl-restconf-noauth nor
the aaa-shiro-act bundle. Both bundles install a new
odl-restconf-base feature and their respective
restconf-nb-bierman02-auth/restconf-nb-bierman02-noauth
bundle.
Change-Id: I93f58e791d8b9666083bd379c99a548bff6e8971
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Mon, 16 Apr 2018 21:40:31 +0000 (17:40 -0400)]
Remove static RestconfImpl
The RestconfImpl does not need to be static as it is indirectly
shared between the web and blueprint instantiated components via
the StatisticsRestconfServiceWrapper. Also code using the
StatisticsRestconfServiceWrapper was modified to reference it
non-statically except for the RestconfApplication. This will be
cleaned up when converted to use the new programmtic web API.
Change-Id: I96a0c7724c642db9b2fbe0d78dc79c9c6efc47ad
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Mon, 16 Apr 2018 18:24:59 +0000 (14:24 -0400)]
Use BrokerFacade non-statically
Similar to the previous patch that was done for ControllerContext.
keeps the static BrokerFacade instance temporarily
for the RestconfApplication but converts the rest of the code to
reference it non-statically.
Change-Id: Iafdb26200f8d645a8ed61c7006edd0b106d7d976
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Fri, 13 Apr 2018 23:19:10 +0000 (19:19 -0400)]
Use ControllerContext non-statically
This is a preliminary patch for removing the web.xml and converting
to the new programmtic web API which will allow us to remove the
static instances that bridge between the web-instantiated
and blueprint-instanriated components. First up is the
ControllerContext - this patch keeps the static instance temporarily
for the RestconfApplication but converts the rest of the code to
inject the ControllerContext instance and reference it non-statically.
This patch touches a lot of files but most are UTs.
Change-Id: I08e2ee24e518c01bb1d5fdb5796abd9354dccfa2
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Stephen Kitt [Fri, 13 Apr 2018 09:01:31 +0000 (11:01 +0200)]
Add missing synchronisation
AbstractNetconfSessionNegotiator synchronises access to state in
changeState(); this also needs to be done in ifNegotiatedAlready.
(FindBugs now flags this and fails the build.)
Change-Id: Id2209e1987429f3b754a2c7afc1a7e47dc4135ab
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Anil Belur [Fri, 13 Apr 2018 02:49:10 +0000 (02:49 +0000)]
Merge "Bump to odlparent 3.1.0 and yangtools 2.0.3"
Jakub Morvay [Thu, 12 Apr 2018 14:20:59 +0000 (14:20 +0000)]
Merge "fix failure during connecting device when channelActive happens later than handleMessage"
Jakub Morvay [Thu, 12 Apr 2018 07:13:10 +0000 (07:13 +0000)]
Merge "Specify necessary dependencies"
Ryan Goulding [Wed, 11 Apr 2018 16:47:49 +0000 (12:47 -0400)]
Specify necessary dependencies
odl-restconf-common relies on AAA bringing in Jersey 1.X dependencies.
Relying on transitive dependencies is not good practice, since it
binds the upstream to providing them continuously. AAA is undergoing
cleanup related to Jersey implementation, part of which is an experiment
to switch on Jersey 2. In order to do this, we remove the Jersey 1
"com.sun.jersey" dependencies. This causes RESTCONF to have missing
runtime dependencies. This patch fixes this issue properly.
Change-Id: Idb32f44573684770b9a57675dfadf010d8a16c9e
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Jakub Morvay [Wed, 11 Apr 2018 07:23:04 +0000 (07:23 +0000)]
Merge "Fix yanglib SFT failure"
Tom Pantelis [Fri, 6 Apr 2018 22:35:29 +0000 (18:35 -0400)]
Fix yanglib SFT failure
For some reason the YangLibRestApp doesn't get created which causes
BP to timeout b/c it advertises an OSGi service referenced by the
BP xml. Instead of using a service I changed it to use a static
to bridge between BP and the web app, as is done elsewhere.
Change-Id: Ia606514258d2082bf041ac81ab890f53f999ee2c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit
c734a43d922f4603c0463e6de86c99f0ca317887)
Jakub Morvay [Tue, 10 Apr 2018 16:40:46 +0000 (18:40 +0200)]
Specify explicit javax.ws.rs version in yanglib
This is a follow-up patch to
https://git.opendaylight.org/gerrit/#/c/68255/. We should specify
explicit javax.ws.rs version also in netconf yanglib.
Change-Id: I4c255c5ba6ef3728226d264f755a62019e5e56ef
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
LiGuosheng [Fri, 30 Mar 2018 06:07:25 +0000 (14:07 +0800)]
Add TLS option to NetonfConnectDeviceCommand.
Add parameter protocol to support connection to a netconf device via TLS.
Change-Id: I9744e2fad71886de1c4f1f8a2d020d96d7947828
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Stephen Kitt [Thu, 22 Mar 2018 17:24:26 +0000 (18:24 +0100)]
Bump to odlparent 3.1.0 and yangtools 2.0.3
Change-Id: I9a3afa42f9995598686daf3b2d3885e556fff70b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Tom Pantelis [Thu, 5 Apr 2018 15:47:42 +0000 (11:47 -0400)]
Remove dependency on controller config-util
netconf uses a few classes from config-util, including
DocumentedException, XmlElement, XmlUtil, Capability etc
so copy them to netconf-api. config-util will be removed
later.
Change-Id: I440b7bcf03b5d612a81c46a16d001699bd0515da
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Thu, 5 Apr 2018 17:12:49 +0000 (13:12 -0400)]
Remove the config-netconf-connector
The config system is being removed in Flourine.
Change-Id: I97efbe7263773ddbf5776be51de08502717af39d
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Jakub Morvay [Thu, 5 Apr 2018 16:10:10 +0000 (16:10 +0000)]
Merge "Remove unused controller config dependencies"
Robert Varga [Sat, 31 Mar 2018 15:31:00 +0000 (17:31 +0200)]
Do not needlessly bridge promises
Channel has an alternative writeAndFlush() method, which takes
a promise to complete. Using it saves allocation of two objects
and required listener synchronization.
Change-Id: I96c933de6e3406116b30f735d480462ef6d161d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tom Pantelis [Wed, 4 Apr 2018 15:51:43 +0000 (11:51 -0400)]
Remove unused controller config dependencies
Change-Id: I1cf7a694cc514359ca24ac0f646dbd3f163598a1
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Jakub Morvay [Wed, 4 Apr 2018 08:34:19 +0000 (08:34 +0000)]
Merge "NETCONF-526 : edit-config payload default-operation needs to be set to default-value"
Robert Varga [Sat, 31 Mar 2018 15:10:39 +0000 (17:10 +0200)]
Remove unneeded lambda casts
These callsites do not require disambiguation, remove unneeded
casts, lowering explicit dependencies.
Change-Id: Ie253a3eb48d3d18f1ca84ffe5f967c38b1f85b53
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jakub Morvay [Sat, 31 Mar 2018 18:27:41 +0000 (18:27 +0000)]
Merge "Fix findbugs violations in netconf"
Tom Pantelis [Fri, 30 Mar 2018 16:49:20 +0000 (12:49 -0400)]
Remove checkstyle config from child poms
The checkstyle config is now in the parent pom.
Change-Id: Idc68c3f669d9072f45ec1503e275398a4251f043
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
jiang.wei [Wed, 21 Mar 2018 07:17:36 +0000 (15:17 +0800)]
fix failure during connecting device when channelActive happens later than handleMessage
fix bug NETCONF-533
--https://jira.opendaylight.org/browse/NETCONF-533
Change-Id: I46e4a85fc7be1bc221cfbb43386eae95768ac5ac
Signed-off-by: jiang.wei <351183359@qq.com>
Tom Pantelis [Thu, 29 Mar 2018 23:29:44 +0000 (19:29 -0400)]
Fix findbugs violations in netconf
- Field is a mutable collection which should be package protected
- Unchecked/unconfirmed cast of return value from method
- May expose internal representation by returning reference to mutable object
- May expose internal representation by incorporating reference to mutable object
- Field should be package protected
- Parameter must be non-null but is marked as nullable
- Nullcheck of value previously dereferenced
- Inconsistent synchronization
- Method ignores return value
- Boxing/unboxing to parse a primitive
- Boxed value is unboxed and then immediately reboxed
- Unchecked/unconfirmed cast
- Class implements same interface as superclass
- Switch statement found where one case falls through to the next case
- Field not initialized in constructor but dereferenced without null check
- Reliance on default encoding
- Private method is never called
- Method invokes toString() method on a String
- Possible null pointer dereference
- Consider using Locale parameterized version of invoked method
- Field not guarded against concurrent access
- Method does not release lock on all exception paths
- Inefficient use of keySet iterator instead of entrySet iterator
- Load of known null value
- Redundant nullcheck of value known to be non-null
- Non-transient non-serializable instance field in serializable class
- Class is Externalizable but doesn't define a void constructor
- Class is Serializable, but doesn't define serialVersionUID
- Class defines field that masks a superclass field
- Should be a static inner class
- Repeated conditional tests
- Format string should use %n rather than \n
- Method may fail to close stream
- Unconditional wait
- Wait not in loop
- Method concatenates strings using + in a loop
- Dead store to local variable
- Possible null pointer dereference due to return value of called method
- Useless object created
Change-Id: If4b7fe5431a4b957f344ecc4307982a40241c97b
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Jakub Morvay [Thu, 29 Mar 2018 10:49:53 +0000 (10:49 +0000)]
Merge "Rename restconf-binding-parent -> restconf-parent"
Jakub Morvay [Wed, 28 Mar 2018 21:30:43 +0000 (23:30 +0200)]
Rename restconf-binding-parent -> restconf-parent
This unifies the parent names across netconf project.
Change-Id: Ic4f75b6de44d0a85e499e8a13f5cff2be570ba67
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
LiGuosheng [Thu, 29 Mar 2018 01:38:20 +0000 (09:38 +0800)]
Fix NetconfDisconnectDeviceCommand logic error.
The validation check of deviceIp and devicePort should be OR, not AND.
Change-Id: I8a4ca1642d0bc6b196222ee60b6af9bf19f6330d
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Jakub Morvay [Wed, 28 Mar 2018 22:52:16 +0000 (22:52 +0000)]
Merge "Add netconf parent pom"
Tom Pantelis [Mon, 26 Mar 2018 19:25:07 +0000 (15:25 -0400)]
Add netconf parent pom
This centralizes common configurations for checkstyle, findbugs etc
Change-Id: Ic0b766644991a167b22b19966c494096f465f5d7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Jakub Morvay [Wed, 28 Mar 2018 20:55:04 +0000 (20:55 +0000)]
Merge changes Id70838c2,I6201e5b7,I4eb2d1d1
* changes:
Introduce AbstractNetconfOperationTest to decrease code duplication
Introduce common parent for EditConfig and CopyConfig operations
NETCONF-529: add support for <copy-config>
Marek Gradzki [Mon, 19 Mar 2018 13:00:50 +0000 (14:00 +0100)]
Introduce AbstractNetconfOperationTest to decrease code duplication
Moves common code for NetconfOperation testing
to AbstractNetconfOperationTest.
Change-Id: Id70838c2b0c29cccb36c7a4e0c53519f65fd5bd7
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Marek Gradzki [Sun, 18 Mar 2018 21:21:42 +0000 (22:21 +0100)]
Introduce common parent for EditConfig and CopyConfig operations
<copy-config> and <edit-config> handling shares many common patterns.
Common code was moved to AbstractEdit class
(following AbstractGet naming)
in order to reduce code duplication
and simplify implementation of both operations.
Change-Id: I6201e5b7fde6a307058e8ed20ac41f5622742024
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Marek Gradzki [Wed, 14 Mar 2018 17:09:20 +0000 (18:09 +0100)]
NETCONF-529: add support for <copy-config>
While <edit-config> is enough to configure any Netconf device,
<copy-config> is more user friendly in scenarios,
when entire configuration has to be written in single request, e.g.
there is no need for explicit delete of nodes that were present in DS.
This patch adds support for <copy-config> to mdsal-netconf-connector.
Only <candidate/> is supported.
To be included in subsequent patches:
- move common test code to AbstractNetconfOperationTest
- move common edit-config and copy-config code to AbstractEdit class
Change-Id: I4eb2d1d1c82e60acc1502b01265de5ec3aab4cd8
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Jakub Morvay [Wed, 28 Mar 2018 14:40:42 +0000 (14:40 +0000)]
Merge "Remove deprecated AsyncWriteTransaction#commit method"
Jakub Morvay [Wed, 28 Mar 2018 13:41:49 +0000 (13:41 +0000)]
Merge "Use odl-jackson-2.8"
Tom Pantelis [Thu, 22 Mar 2018 23:38:01 +0000 (19:38 -0400)]
Remove deprecated AsyncWriteTransaction#commit method
This method has been deprecated for quite some time and now has a
default implementation so can be safely removed from sub-classes.
Change-Id: I118d749f744d7253651f06927f490d8f17718832
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Balaji Varadaraju [Wed, 14 Mar 2018 06:40:46 +0000 (01:40 -0500)]
NETCONF-526 : edit-config payload default-operation needs to be set to default-value
For the PUT/POST calls right now default-operation tag in the edit-config is set to
"none". As per RFC with this value devices can reject a config operation when
elements present in the request whose structure is not already present in the tree.
For example a nested parent-child structure where parent structure does not yet exist
yet in the tree may result in an error based on implementation.
We should leave this field out ( which will default to merge) and let the device make
the right decision.
Change-Id: I8b85ef072785381897a19724dc94003b8f315bd4
Signed-off-by: Balaji Varadaraju <bvaradar@luminanetworks.com>
Jakub Morvay [Wed, 28 Mar 2018 13:07:47 +0000 (13:07 +0000)]
Merge "NETCONF-241: Switch to using Exificient"
Robert Varga [Wed, 17 Jan 2018 18:38:27 +0000 (19:38 +0100)]
NETCONF-241: Switch to using Exificient
Exificient has a bit nicer API, it is available from maven central and
has a friendly (MIT) license, plus the source code is on GitHub. Switch
to using it instead of OpenEXI.
Change-Id: I2cb7bf244361b021afb4cdc275e2442f5b778056
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
LiGuosheng [Wed, 28 Mar 2018 04:49:10 +0000 (12:49 +0800)]
Fix NetconfCommand test case error
In testDisconnectDeviceCommand case, there should not appear
connectDevice, but disconnectDevice.
Change-Id: Ie4e980c1400612fb33300e9a9ccbff57e85c0067
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Stephen Kitt [Mon, 26 Mar 2018 23:52:34 +0000 (16:52 -0700)]
Use odl-jackson-2.8
We should use the odl-jackson-2.8 feature to fulfill our dependencies
on Jackson.
Change-Id: I9ed683e1221d381635eb05885e2fb25bd42eed71
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Jakub Tóth [Mon, 19 Mar 2018 11:05:05 +0000 (12:05 +0100)]
NETCONF-530 - netconf-testtool failed on start with NullPointerException
missing revisions in default names of YANG models
Change-Id: I52c09699989b38ab828f99070081634dac9853ce
Signed-off-by: Jakub Tóth <jakub.toth@pantheon.tech>
Ryan Goulding [Sun, 25 Mar 2018 17:20:42 +0000 (13:20 -0400)]
Remove unused test method
This is done in preparation of Jackson removal.
Change-Id: Ie919f9a8a548f6498ab21a67b8eedd295ee898bd
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
JakubToth [Mon, 26 Mar 2018 09:48:14 +0000 (09:48 +0000)]
Merge "Remove unused reference to Broker in NetconfDeviceSalProviderTest"
JakubToth [Mon, 26 Mar 2018 09:02:35 +0000 (09:02 +0000)]
Merge "Depend on odl-aaa-shiro-act feature instead of bundle"
Tom Pantelis [Fri, 23 Mar 2018 15:25:44 +0000 (11:25 -0400)]
Remove unused reference to Broker in NetconfDeviceSalProviderTest
The Broker et el interfaces are being deprecated so remove references.
Change-Id: I17706b065f0e5503e83b37bfabe66596d563d5f1
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Ryan Goulding [Sun, 25 Mar 2018 22:22:55 +0000 (18:22 -0400)]
Depend on odl-aaa-shiro-act feature instead of bundle
This is related to AAA-164, which involves exposing a feature for
AAA activation instead of a bundle.
JIRA: AAA-164
Change-Id: I032e7dc8afef4b053d2162194454cde73cf85f45
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Ryan Goulding [Sun, 25 Mar 2018 22:48:37 +0000 (18:48 -0400)]
Properly specify Jackson runtime dependencies
Properly list feature dependencies for Jackson instead of relying on
AAA bringing these deps in.
Change-Id: I4857bf8498b7a64ddd12716c0a5e0b7d1d1d1928
JIRA: NETCONF-531
Signed-off-by: Ryan Goulding <ryandgoulding@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>
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>
LiGuosheng [Mon, 19 Mar 2018 01:16:37 +0000 (09:16 +0800)]
Add the entry for using TLS protocol type
Add TLS protocol type to the method getClientConfig of class
AbstractNetconfTopology. Add test case.
Change-Id: Ia0d32c629d21c48a65d12edc76bc0decc2a3a9f6
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
JakubToth [Wed, 21 Mar 2018 08:02:42 +0000 (08:02 +0000)]
Merge "NETCONF-525: fix netconf AuthProvider packaging"
Ryan Goulding [Tue, 20 Mar 2018 17:01:47 +0000 (13:01 -0400)]
NETCONF-525: fix netconf AuthProvider packaging
Change-Id: I79fe7d68d6f026ce22d2ced158531c26270d5105
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Robert Varga [Tue, 13 Mar 2018 14:57:10 +0000 (15:57 +0100)]
Use YinExportUtils.writeModuleAsYinText()
This removes the use of deprecated SchemaNode-based writer in favor
of EffectiveModuleStatement-based one.
Change-Id: I89b465ad25e34be6cb23344446a4078edacd8cf5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
LiGuosheng [Wed, 14 Mar 2018 06:40:51 +0000 (14:40 +0800)]
Add branch for creating TLS client
Add TLS case to NetconfClientDispatcherImpl for creating TLS
clients.
Change-Id: I7da44d1c7c074633e7ae08b2863b4c3466066a4f
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
LiGuosheng [Thu, 8 Mar 2018 01:52:46 +0000 (09:52 +0800)]
Add TLS client channel initializer
The initializer will use the SslHandlerFactory to create
SslHandler each time the channel is active.
Change-Id: Id7010f3e47d60723b4be4bd0d6f99ffcf3a67aa2
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Tom Pantelis [Sat, 3 Mar 2018 18:43:55 +0000 (13:43 -0500)]
Convert rfc8040 ListenerAdapter to DOMDataTreeChangeListener
DOMDataChangeListener is scheduled for removal - the bierman02
ListenerAdapter was already converted. Also modified the
ListenerAdapter to use the org.json lib instead of the jackson
lib as the UT revealed that the jackson lib doesn't convert
the XML to JSON correctly and the bierman02 ListenerAdapter
was recently converted to use org.json.
Change-Id: I9e6778a206f412bb8498297cdcb94b77ebba25dd
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
LiGuosheng [Thu, 8 Mar 2018 08:40:15 +0000 (16:40 +0800)]
Add SslHandlerFactory to NetconfClientConfiguration
If client protocol is TLS, then add a SslHandlerFactory instance to
NetconfClientConfiguration instead of SSH AuthenticationHandler.
Change-Id: Ie0d06a31e1cfca7f78dc0721a76b4995d69cd529
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
Robert Varga [Thu, 8 Mar 2018 14:25:07 +0000 (15:25 +0100)]
Bump yangtools to 2.0.2
This patch bumps yangtools to 2.0.2.
Change-Id: I35fce822efbf72b0f88e842e6f078e646c8161d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tom Pantelis [Mon, 12 Mar 2018 22:55:08 +0000 (18:55 -0400)]
Fix compile errors in UTs
This was caused by a recent controller patch which converted
CDS to implement the msdal APIs. Modified the affected UTs
to use the SerializedDOMDataBroker so as not to depend in CDS
implementation.
Change-Id: I1317310fe601387c03892a1ddd53ac79f1704f71
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
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>
LiGuosheng [Fri, 23 Feb 2018 06:34:39 +0000 (14:34 +0800)]
Add interface SslHandlerFactory
This factory is used by the TLS clients to create SslHandler that will
be added to the channel pipeline when the channel is active. TLS
versions are configurable.
Change-Id: I95c2a0ff105020ac84b02d82207f830d70ef7197
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
JakubToth [Wed, 7 Mar 2018 11:32:47 +0000 (11:32 +0000)]
Merge "Eliminate duplicate dependency"
Josh [Thu, 18 Jan 2018 11:43:22 +0000 (13:43 +0200)]
Websocket Uri should have scheme wss if registration is https
Change-Id: I870e704e3859eaa7a01c4a70d148bbfdc452da2c
Signed-off-by: Josh <jhershbe@redhat.com>
Robert Varga [Wed, 7 Mar 2018 09:52:23 +0000 (10:52 +0100)]
Eliminate duplicate dependency
Fixes a maven warning.
Change-Id: I4b07bacdff4f401503bc92e72c0045052de1f7b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Mar 2018 18:25:57 +0000 (19:25 +0100)]
Add dependency on mdsal-binding-dom-codec
One of the upstreams has removed it, add it back.
Change-Id: I18e1d695c5dc2a7cb35a1a9ef95c434030c192c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
JakubToth [Mon, 5 Mar 2018 20:54:25 +0000 (20:54 +0000)]
Merge "Remove deprecated registerDataChangeListener method"
Tom Pantelis [Fri, 2 Mar 2018 18:27:56 +0000 (13:27 -0500)]
Enable findbugs in restconf-binding-parent
Change-Id: I1746a4340a28749ba9c593c9cb9209695d9c8f94
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Thu, 1 Mar 2018 15:25:02 +0000 (10:25 -0500)]
Fix findbugs violations in sal-rest-docgen-maven
- Method ignores exceptional return value
- Method may fail to close stream on exception
- Reliance on default encoding
Change-Id: I854a7eee9960645a4c4a9d867a284bf202826786
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Thu, 1 Mar 2018 14:15:53 +0000 (09:15 -0500)]
Fix findbugs violations in sal-rest-docgen
- Reliance on default encoding
- Field is a mutable collection
- Write to static field from instance method
- Exception is caught when Exception is not thrown
- Field not initialized in constructor but dereferenced without null check
- Useless object created
Change-Id: Iff717b38d3a5bee082e7a9fb30969a0d755bf4c2
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Wed, 28 Feb 2018 23:58:03 +0000 (18:58 -0500)]
Fix findbugs violations in restconf-nb-rfc8040
- Possible null pointer dereference
- Method call passes null for non-null parameter
- Nullcheck of value previously dereferenced
- Consider using Locale parameterized version of invoked method
- Reliance on default encoding
- Inconsistent synchronization
- Inefficient use of keySet iterator instead of entrySet iterator
- Should be a static inner class
- Useless assignment in return statement
- Method uses the same code for two branches
- Method uses the same code for two switch clauses
- Write to static field from instance method
- Redundant nullcheck of value known to be non-null
- Exception is caught when Exception is not thrown
- Useless control flow
Change-Id: I217a81d9dc487fe7f8e62a9c882c7335815ae052
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Tom Pantelis [Sun, 4 Mar 2018 03:37:43 +0000 (22:37 -0500)]
Remove deprecated registerDataChangeListener method
registerDataChangeListener is scheduled for removal. The
method now has a default implementation in the interface so
the methods can be removed from the 2 DOMDataBroker implementations.
Change-Id: I1f3ead35f0cfdfd95bbbf35d9163b1f1309c8b90
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
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>