Maros Marsalek [Wed, 18 Feb 2015 16:31:39 +0000 (17:31 +0100)]
BUG-2635 Netconf monitoring for md-sal netconf northbound
Monitoring for mdsal's netconf stores all available monitoring data in the datastore and provides get-schema operation
Change-Id: I573c5d57e5cf25d7688f3355b602327c7af75c65
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Fri, 13 Feb 2015 12:32:17 +0000 (13:32 +0100)]
BUG-2635 Prepare netconf monitoring service for md-sal monitoring.
So that the monitoring service provides all the information in one place.
Also move get-schema rpc into netconf-monitoring from netconf-impl.
Change-Id: Ia7dc47ea4997df417795f079a7c045709dbaaf47
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Thu, 19 Feb 2015 12:53:38 +0000 (13:53 +0100)]
Remove required source element from Get operation for MDSAL
Change-Id: I2c1495dfac8ecad00605f4df98b310b3d99ac4ed
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Mon, 23 Feb 2015 08:49:48 +0000 (08:49 +0000)]
Merge "Prevent multiple config pushers"
Maros Marsalek [Thu, 19 Feb 2015 10:46:17 +0000 (11:46 +0100)]
Prevent multiple config pushers
Up to this point, it was possible to spawn multiple config pushers.
This was probably already happening with no observable effect other than relatively frequent Optimistic lock failed exceptions from config subsystem.
Change-Id: Idf994c1a184a070a32440c57c5ca55a0740c21d6
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Thu, 19 Feb 2015 08:09:00 +0000 (08:09 +0000)]
Merge "BUG-2634 Config binding for netconf server"
Tony Tkacik [Thu, 19 Feb 2015 08:07:49 +0000 (08:07 +0000)]
Merge "BUG-2633 - Netconf northbound mapping."
Tony Tkacik [Thu, 19 Feb 2015 08:07:18 +0000 (08:07 +0000)]
Merge "BUG-2633 - Added Operation Service Factory Filtering for Netconf."
Maros Marsalek [Mon, 9 Feb 2015 14:44:01 +0000 (15:44 +0100)]
BUG-2634 Config binding for netconf server
MD-SAL based netconf northbound is activated using feature: odl-netconf-mdsal
Change-Id: I6b0ae0db30bb239fcd073883ffe76ff7c5fc0143
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Mon, 16 Feb 2015 09:36:48 +0000 (10:36 +0100)]
BUG-2633 - Netconf northbound mapping.
Supported operations for now are:
get, get-config - candidate and running datastore, without filtering
edit-config - only on candidate datastore
discard-changes
lock, unlock - supported only for compatibility reasons since we don't support locking of running datastore, and each session has it's own candidate datastore.
commit
Change-Id: Idb0bad09dc1d8925674576290fecb47ccd1e5dbd
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Mon, 16 Feb 2015 09:36:38 +0000 (10:36 +0100)]
BUG-2633 - Added Operation Service Factory Filtering for Netconf.
Since getting services is done by class name, we needed to add additional filtering by
name to not get controller subsystem netconf operations mixed up with md-sal northbound.
Change-Id: I6aeb161ae0ace977f590d73e4fcb98c0898b1956
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Kamal Rameshan [Mon, 16 Feb 2015 22:07:17 +0000 (14:07 -0800)]
Fix Guava 18 upgrade issue , Objects to MoreObjects
Change-Id: I0792fc09fa18614b84a7b24601b08b8b3c2c1abf
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
Robert Varga [Mon, 9 Jun 2014 17:35:21 +0000 (19:35 +0200)]
BUG-1173: ensure compatibility with Guava 17+
This migrates the sole user to the Guava-15+ API, as the API is removed
in version 17.
Change-Id: I3bf52fb89116024e7305a142e6b1f6fec9985488
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 9 Jun 2014 17:35:21 +0000 (19:35 +0200)]
BUG-1173: ensure compatibility with Guava 17+
This migrates the sole user to the Guava-15+ API, as the API is removed
in version 17.
Change-Id: Ia587465e0289f5d98ec3da83cc3fc6765f8a8b38
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 13 Feb 2015 09:17:59 +0000 (09:17 +0000)]
Merge "Bug-2674 Notification support for netconf testtool"
Maros Marsalek [Mon, 9 Feb 2015 10:40:57 +0000 (11:40 +0100)]
Bug-2674 Notification support for netconf testtool
Change-Id: Ib301e2cccf85d4eae75629ddf681d9157b0cb585
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Thu, 12 Feb 2015 15:54:19 +0000 (15:54 +0000)]
Merge "BUG-2632 Netconf connector (optionally) reconnects after a schema change is detected"
Tony Tkacik [Thu, 12 Feb 2015 15:52:54 +0000 (15:52 +0000)]
Merge "BUG-2600 Dynamic schemas in netconf server"
Maros Marsalek [Thu, 5 Feb 2015 14:49:44 +0000 (15:49 +0100)]
BUG-2632 Netconf connector (optionally) reconnects after a schema change is detected
A notification listener is used for schema change detection
Change-Id: Ieab4eaf9e87b2b88dd2dc5429039494c8f9b5731
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Tue, 10 Feb 2015 08:15:15 +0000 (09:15 +0100)]
BUG-2600 Dynamic schemas in netconf server
Netconf server does not preserve snapshots of schema contexts for each netconf session anymore
Every netconf session is using current SchemaContext
+ Use notification manager to notify about capability changes
Change-Id: Ie47125e1eb6851b54b09d5e4afe38fee323850de
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Tue, 10 Feb 2015 21:13:46 +0000 (21:13 +0000)]
Merge "BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier"
Tony Tkacik [Tue, 10 Feb 2015 21:13:18 +0000 (21:13 +0000)]
Merge "BUG-2310 - widen yang model for netconf-node."
Tony Tkacik [Tue, 10 Feb 2015 21:06:39 +0000 (21:06 +0000)]
Merge "BUG-2599 Netconf notification manager initial API and Impl"
Maros Marsalek [Thu, 5 Feb 2015 13:54:40 +0000 (14:54 +0100)]
BUG-2599 Netconf notification manager initial API and Impl
Change-Id: I71569f08aff3738ea7fa4d5f1853079b4a2b0fb5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tomas Cere [Tue, 20 Jan 2015 12:18:07 +0000 (13:18 +0100)]
BUG-2310 - widen yang model for netconf-node.
Netconf datastore is now in topology, added connection state,
resolved/unresolved schemas with failure reasons and host to netconf node.
Deprecated old netconf node in inventory.
Change-Id: Id34a17b82420eaf69d03d72b9a1523210cc87cc2
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tony Tkacik [Mon, 9 Feb 2015 10:14:01 +0000 (10:14 +0000)]
Merge "BUG-2599 Add netconf notifications yang models"
Maros Marsalek [Thu, 5 Feb 2015 13:52:34 +0000 (14:52 +0100)]
BUG-2599 Add netconf notifications yang models
Change-Id: Ie35cf3c6cdee89f0bd88ba79b974dff529897809
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Thanh Ha [Mon, 19 Jan 2015 03:44:27 +0000 (22:44 -0500)]
Remove unnecessary declaration of <prerequisites> in netconf
Bug: 2605
Change-Id: Ibfe6c6329b836361248c6e008be8cd1566bbeec7
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Tony Tkacik [Fri, 6 Feb 2015 15:44:01 +0000 (15:44 +0000)]
Merge "BUG-2599 Add base netconf ynag model: ietf-netconf"
Tony Tkacik [Fri, 6 Feb 2015 13:34:49 +0000 (13:34 +0000)]
Merge "Add (un)lock ops to netconf testtool"
Maros Marsalek [Thu, 5 Feb 2015 13:52:04 +0000 (14:52 +0100)]
BUG-2599 Add base netconf ynag model: ietf-netconf
Change-Id: I6f9bcdb5517f0c0433a943f99cebde4bc5a273bc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Thu, 5 Feb 2015 09:53:41 +0000 (10:53 +0100)]
BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier
Change-Id: I76b94b896e138e778f0a6abd6d42a481347f1a13
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Thu, 5 Feb 2015 12:48:17 +0000 (13:48 +0100)]
Add (un)lock ops to netconf testtool
Change-Id: I48ea8e8ce0edeb9428d87f5bcac5ba8d3a2ede22
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Vaclav Demcak [Wed, 21 Jan 2015 09:55:14 +0000 (10:55 +0100)]
bug 2616 - NPE in ControllerContext.toQName method
Method works with globalSchema property without validation and somtimes it could be null.
- add a missing check method call for toQName method
- add a missing check method call for collectPathArguments method (mountpoint - line 549)
Change-Id: I4a568bbeb54720592ef42990d7dcd430df170c12
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Tony Tkacik [Tue, 20 Jan 2015 16:16:43 +0000 (16:16 +0000)]
Merge "Remove import-package instructions from netconf"
Maros Marsalek [Tue, 20 Jan 2015 13:32:54 +0000 (14:32 +0100)]
Remove import-package instructions from netconf
The instructuion set gets outdated, use default settings for import all to prevent startup failures.
Change-Id: I387dda9d823c6edc07bccde4f760acf0151093d4
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tom Pantelis [Sat, 17 Jan 2015 19:04:47 +0000 (19:04 +0000)]
Merge "findModule method refactoring"
Tony Tkacik [Fri, 16 Jan 2015 12:50:26 +0000 (12:50 +0000)]
Merge "Fixed missing dependencies in netconf-netty-util."
Tony Tkacik [Fri, 16 Jan 2015 12:49:55 +0000 (12:49 +0000)]
Merge "Increase timeout in config pusher for conflicting version ex"
Maros Marsalek [Mon, 12 Jan 2015 09:00:27 +0000 (10:00 +0100)]
Increase timeout in config pusher for conflicting version ex
Change-Id: Ie03354ec464f7f3e43a1df236d948533386484e1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tomas Cere [Mon, 12 Jan 2015 11:33:32 +0000 (12:33 +0100)]
Fixed missing dependencies in netconf-netty-util.
Change-Id: I75a7d9c39d537abf3f64e9750f154b0b70484524
Signed-off-by: Tomas Cere <tcere@cisco.com>
Ed Warnicke [Mon, 12 Jan 2015 01:02:35 +0000 (19:02 -0600)]
Removed deprecated methods from BindingAwareProvider
Also deprecated
BindingAwareBroker.registerConsumer(BindingAwareConsumer,BundleContext)
in favor of the newly added:
BindingAwareBroker.registerConsumer(BindingAwareConsumer)
and
BindingAwareBroker.registerProvider(BindingAwareProvider,BundleContext)
in favor of the newly added:
BindingAwareBroker.registerProvider(BindingAwareProvider)
Change-Id: Id256c81a7210640b9a493a3f0fc71a9e0379e317
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Tony Tkacik [Mon, 12 Jan 2015 16:31:29 +0000 (16:31 +0000)]
Merge "Optimize Capability.getLocation()"
Maros Marsalek [Wed, 17 Dec 2014 13:38:35 +0000 (14:38 +0100)]
Cancel transaction on failure in restconf
This allows for proper resource cleanup for e.g. remote netconf transaction
Change-Id: Ib072ca3497a363d1a813c2161f25d10c536c3614
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Jozef Gloncak [Thu, 24 Jul 2014 09:06:09 +0000 (11:06 +0200)]
findModule method refactoring
From method findModule() of RestconfImpl was removed original exception
because the case when data == null can't (before every call of findModule
is checked whether data != null)
New exception was added because just after calling of findModule() method
was always checked whether returning value is != null and if it was so the
exception was raised.
Change-Id: I7023ab50e06e6056bc312a2a702bac8bab48ef0a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Maros Marsalek [Fri, 9 Jan 2015 09:05:54 +0000 (10:05 +0100)]
Optimize Capability.getLocation()
Instead of wrapping a List in an Optional, return a Collection -- when
empty, it is the same thing as Optional.absent(). We can then optimize
some of the object allocations.
Change-Id: I040e1e80d9012c2809370accb89daf038c7cd2e4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tom Pantelis [Thu, 8 Jan 2015 21:48:23 +0000 (21:48 +0000)]
Merge "Fix compilation warnings: replace deprecated junit.framework.Assert"
Tony Tkacik [Thu, 8 Jan 2015 13:34:07 +0000 (13:34 +0000)]
Merge "BUG-2560 Canonical write to remote netconf devices"
Maros Marsalek [Wed, 10 Dec 2014 15:02:27 +0000 (16:02 +0100)]
BUG-2560 Canonical write to remote netconf devices
Current sequence for writing to remote netconf devices:
Writable running only:
- lock running or fail
- edit running (unlock on fail)
- unlock running
Candidate only:
- lock candidate
-- if lock fails, try to discard changes
--- if discard fails, fail
--- if discard succeeds, lock candidate
---- if lock fails, fail
- edit candidate (discard-changes + unlock on fail)
- commit
- unlock candidate
Both writable running and candidate:
- lock running or fail
- SAME AS FOR CANDIDATE ONLY
- unlock running
Change-Id: Ia4e0d43f3131c4072e8505ba72ef09ff441c1fac
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Wed, 7 Jan 2015 09:42:01 +0000 (09:42 +0000)]
Merge "Add timeout to netconf IT test"
Tony Tkacik [Wed, 7 Jan 2015 09:38:58 +0000 (09:38 +0000)]
Merge changes I4ec0efd7,Ia2619921
* changes:
Implement basic locking for candidate in config-netconf-connector
Improve error reporting in ServiceRegistry
Jozef Gloncak [Tue, 16 Dec 2014 15:49:40 +0000 (16:49 +0100)]
BUG 2468 - IdentityValuesDTO to string class cast exception.
If leaf had type which is definined in other module (imported) via typedef
and this type is leafref then it wasn't possible correctly resolve base
type of referenced type.
New method for this resolution was implemented and is now called.
Also test for this case was added
Merge precondition:
yangtools: https://git.opendaylight.org/gerrit/13683
Change-Id: If00db3a6297b5a0ea657acb469f4f49f350f8c63
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Tony Tkacik [Fri, 19 Dec 2014 15:44:44 +0000 (15:44 +0000)]
Merge "BUG-1382: do not instantiate prefixed QNames"
Robert Varga [Tue, 16 Dec 2014 12:41:26 +0000 (13:41 +0100)]
BUG-1382: do not instantiate prefixed QNames
Prefix-aware QName constructor is going away, do not use it. Also fix
all references to QName.getPrefix().
Change-Id: Ife6567a269c2db16019ae97a6eace74a19ac3b23
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 5 Dec 2014 10:36:04 +0000 (11:36 +0100)]
BUG-2459: use ImmutableSet instead of an unmodifieable HashSet
This makes the lookups much more efficient.
Change-Id: I9c9a210b1eef1b5a2850013259191fde9a9c439b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 2 Dec 2014 15:21:14 +0000 (16:21 +0100)]
BUG-2459: reuse EXI Reader
The reader performs an internal reset on each invocation of parse(), so
it can be freely reused as long as we guarantee there are no concurrent
invocations. Our decoder class is not Shared, so netty guarantees this.
Change-Id: Icd575988e48ca5252d6f6716f4e08f83b23c99ca
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 2 Dec 2014 14:57:27 +0000 (15:57 +0100)]
BUG-2459: reuse EXI Transmogrifier
EXI Transmogrifier performs an internal reset whenever we acquire the
SAXTransmogrifier. This means that we are free to reuse the instance
between individual invocations as long as we can guarantee there are no
concurrent access. That is guaranteed by our Handler not being Shared.
Change-Id: Iba141915000b016579b273d4413ecd205f8da777
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 18 Dec 2014 14:22:32 +0000 (14:22 +0000)]
Merge changes Ic8cadf33,If59b1dd3
* changes:
Bug-2342: Add stress test with more threads and start of testtool device.
Bug-2342: Fixing rpc-reply messages id's get mixed up
Tony Tkacik [Thu, 18 Dec 2014 14:20:29 +0000 (14:20 +0000)]
Merge changes Icd18348e,I0e642b1b,I304bec5e
* changes:
BUG-2459: maintain a cache of grammar caches
BUG-2459: cache GrammarCache
BUG-2459: centralize codec allocation
Maros Marsalek [Tue, 16 Dec 2014 12:40:56 +0000 (13:40 +0100)]
Add timeout to netconf IT test
Also remove blocking call from celanup.
Change-Id: I9663ae8fd8afb605a6713232c518782ec15d431e
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Tue, 2 Dec 2014 17:47:36 +0000 (18:47 +0100)]
BUG-2459: maintain a cache of grammar caches
This just reuses instances across multiple sessions, since the
cardinality is usually low.
Change-Id: Icd18348eee51295f50e224572c103e3b5572963b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 2 Dec 2014 14:55:20 +0000 (15:55 +0100)]
BUG-2459: cache GrammarCache
The GrammarCache without a schema is used as a template, so it is
expliticly okay to reuse it across multiple instances. Make sure we
reuse it as much as possible.
Change-Id: I0e642b1b580051e997de9602020ab0dace7dbcac
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 2 Dec 2014 14:59:06 +0000 (15:59 +0100)]
BUG-2459: centralize codec allocation
This moves EXI codec allocation into AbstractNetconfSession, so it is
can be standardized for both client and server.
Change-Id: I304bec5e19efaa6c3ff63ac66f2bd0d9c55c6b7a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 15 Dec 2014 13:38:25 +0000 (14:38 +0100)]
BUG-2511: disable external entitiy resolution with EXI
OpenEXI transmogrifier can resolve external entities. This should never
be necessary in NETCONF context, so disallow that. The same goes for the
reader, but there we need to add a custom EntityResolver.
Change-Id: Idf4b7faf13063c88624f2ba16f3871679c072b3e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Gary Wu [Mon, 15 Dec 2014 21:52:41 +0000 (13:52 -0800)]
Fix compilation warnings: replace deprecated junit.framework.Assert
Replace deprecated junit.framework.Assert with org.junit.Assert.
Change-Id: I94fb065d9015955f2abc91a95be0a4137717e485
Signed-off-by: Gary Wu <gary.wu@gmail.com>
Maros Marsalek [Wed, 10 Dec 2014 13:13:29 +0000 (14:13 +0100)]
Implement basic locking for candidate in config-netconf-connector
Change-Id: I4ec0efd7b1ac1bc33f90289d11cd28ca685e348b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Wed, 10 Dec 2014 13:12:17 +0000 (14:12 +0100)]
Improve error reporting in ServiceRegistry
Change-Id: Ia2619921a8c5dab2d0613a7e6ba724512f077bfa
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Mon, 15 Dec 2014 14:57:59 +0000 (14:57 +0000)]
Merge "BUG-2511 Fix possible XXE vulnerability in restconf"
Tony Tkacik [Mon, 15 Dec 2014 14:57:22 +0000 (14:57 +0000)]
Merge "Allow rpc definition for RuntimeMXBeans to come from groupings"
Marian Dubai [Thu, 4 Dec 2014 11:53:42 +0000 (12:53 +0100)]
Bug-2342: Add stress test with more threads and start of testtool device.
Change-Id: Ic8cadf339d330d9e165db4b0eafe8e8408601abd
Signed-off-by: Marian Dubai <mdubai@cisco.com>
Marian Dubai [Thu, 4 Dec 2014 09:03:41 +0000 (10:03 +0100)]
Bug-2342: Fixing rpc-reply messages id's get mixed up
Change-Id: If59b1dd30c6552efa93df7bb8d776396a9c7bafb
Signed-off-by: Marian Dubai <mdubai@cisco.com>
Tony Tkacik [Mon, 15 Dec 2014 13:20:47 +0000 (13:20 +0000)]
Merge "BUG-2511 Fix XXE vulnerability in Netconf"
Maros Marsalek [Tue, 25 Nov 2014 17:02:02 +0000 (18:02 +0100)]
Allow rpc definition for RuntimeMXBeans to come from groupings
Change-Id: I796b43e8a4b01277bcb0c73f5ac86bc710839061
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Mon, 15 Dec 2014 11:19:11 +0000 (12:19 +0100)]
BUG-2511 Fix possible XXE vulnerability in restconf
Change-Id: I16eaf8a743b94ec26e3ac427fb777d0c769ec3c2
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Mon, 15 Dec 2014 10:03:56 +0000 (11:03 +0100)]
BUG-2511 Fix XXE vulnerability in Netconf
Change-Id: Ifc1d63fc632e7395a46d85fc2ccb9095e7008430
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Mon, 15 Dec 2014 08:06:17 +0000 (08:06 +0000)]
Merge "Reuse PEM provider in netconf-testtool."
Tony Tkacik [Mon, 15 Dec 2014 07:51:47 +0000 (07:51 +0000)]
Merge "BUG-2459: use thread-local cache of transformers"
Tony Tkacik [Mon, 15 Dec 2014 07:50:52 +0000 (07:50 +0000)]
Merge "Cache TransformerFactory"
Robert Varga [Tue, 2 Dec 2014 19:01:53 +0000 (20:01 +0100)]
BUG-2459: use thread-local cache of transformers
As it turns out, we can reuse transformers in the encode path. Do
precisely that, keeping them in thread-local variables. This is safe in
context of Netty, as we are invoked only from the netty threadpool. This
has the benefit of reusing the transformers across all sessions
associated with the threadpool.
Change-Id: If57933f68a9c9196b649baea17353fd2bd472e09
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 11 Dec 2014 10:11:59 +0000 (11:11 +0100)]
Cache TransformerFactory
Instantiating a transformerfactory is costly, so cache and reuse it.
Change-Id: I43561ef36cdd10ef077b77c71673840d4dc83fbd
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 11 Dec 2014 10:08:26 +0000 (11:08 +0100)]
BUG-2459: do not instantiate factories in fastpath
This caches the factories in static fields rather than instantiating
them on each call.
Change-Id: I4dfee7724320914f2c7c9724192e4653deea3cde
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 12 Dec 2014 11:07:45 +0000 (12:07 +0100)]
BUG-2506: split out maven binding
Maven integration needs to be split out of the runtime implementation,
simply because we do not want to pull the requisite runtime into our
containers. It would never be used there anyway.
Change-Id: Ided36e3b06316739a3829d758889ba523e7e19ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 10 Dec 2014 15:34:14 +0000 (15:34 +0000)]
Merge "BUG-2475: Do not issue garbage collection on when pushing configurations"
Tony Tkacik [Wed, 10 Dec 2014 09:11:31 +0000 (09:11 +0000)]
Merge topic 'checkstyle'
* changes:
Fix checkstyle if-statements must use braces liblldp
Fix checkstyle if-statements must use braces hosttracker
Fix checkstyle if-statements must use braces bundlescanner
Fix checkstyle if-statements must use braces ClusterManager
Fix checkstyle if-statements must use braces HostTrackerCallable
Fix checkstyle if-statements must use braces ConnectionManagerNorthbound
Fix checkstyle if-statements must use braces HostTrackerNorthbound
Fix checkstyle if-statements must use braces BridgeDomainNorthbound
Fix checkstyle if-statements must use braces adsal/northbound/staticrouting
Fix checkstyle if-statements must use braces adsal/northbound/statistics
Fix checkstyle if-statements must use braces adsal/protocol_plugins
Fix checkstyle if-statements must use braces adsal/sal/connection
Fix checkstyle if-statements must use braces adsal/samples/loadbalancer
Fix checkstyle if-statements must use braces adsal/usermanager
Fix checkstyle if-statements must use braces config-persister-file-xml-adapter
Fix checkstyle if-statements must use braces logback-config
Fix checkstyle if-statements must use braces yang-jmx-generator-plugin
Fix checkstyle if-statements must use braces yang-jmx-generator
Fix checkstyle if-statements must use braces sal-common-impl
Fix checkstyle if-statements must use braces sal-common-util
Fix checkstyle if-statements must use braces sal-dom-xsql
Fix checkstyle if-statements must use braces sal-netconf-connector
Fix checkstyle if-statements must use braces sal-rest-docgen
Fix checkstyle if-statements must use braces md/statistics
Fix checkstyle if-statements must use braces netconf
Thanh Ha [Tue, 9 Dec 2014 22:32:21 +0000 (17:32 -0500)]
Fix checkstyle if-statements must use braces sal-rest-docgen
Change-Id: Id08ad375b27838637497dd507df0c076bf2b63df
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Tue, 9 Dec 2014 22:28:38 +0000 (17:28 -0500)]
Fix checkstyle if-statements must use braces netconf
Change-Id: I2e5b8cc264acee74530ccbb990014b54649764b1
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Robert Varga [Tue, 9 Dec 2014 15:11:48 +0000 (16:11 +0100)]
BUG-2475: Do not issue garbage collection on when pushing configurations
This gc() call used to make sense when we were running this code as a
one-shot initialization (e.g. Hydrogen container). With the Karaf
changes, this was moved into a persistent codepath -- which does not
make sense at all.
Change-Id: I0e3d4a2b674241c80d682630b031fb3517621251
Signed-off-by: Robert Varga <rovarga@cisco.com>
Marian Dubai [Tue, 18 Nov 2014 11:53:01 +0000 (12:53 +0100)]
Additional checkstyle fixes. Checkstyle validation fail enabled
Change-Id: Ie6052a2ed10e2964f3da56f1832a797e700dc2f6
Signed-off-by: Marian Dubai <mdubai@cisco.com>
Tony Tkacik [Mon, 8 Dec 2014 14:58:28 +0000 (14:58 +0000)]
Merge changes I26ca5aba,Ia615dbd4
* changes:
BUG-2459: optimize NetconfOperationRouterImpl operations
BUG-2459: Reuse SAXTransformerFactory in EXI decoder
Tony Tkacik [Mon, 8 Dec 2014 09:57:43 +0000 (09:57 +0000)]
Merge "BUG-2459: do not convert NetconfMessage"
Robert Varga [Fri, 5 Dec 2014 09:38:26 +0000 (10:38 +0100)]
BUG-2459: optimize NetconfOperationRouterImpl operations
Ensure operations are created immutable at initialization, thus removing
the need for synchronization and speeding up lookups.
Change-Id: I26ca5aba435d989689994364c53b4d27c7eccd84
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 8 Dec 2014 09:07:36 +0000 (09:07 +0000)]
Merge "Fix channelInactive event handling in the netty pipeline for netconf."
Tony Tkacik [Mon, 8 Dec 2014 09:07:27 +0000 (09:07 +0000)]
Merge "Remove logged unstubbed exception in test for netconf-monitoring"
Robert Varga [Tue, 2 Dec 2014 13:19:49 +0000 (14:19 +0100)]
BUG-2459: Reuse SAXTransformerFactory in EXI decoder
Rather than allocating the same factory over and over, create a single
instance for reuse.
Change-Id: Ia615dbd462527addadb03a5f2e54618438fb1612
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 4 Dec 2014 22:55:47 +0000 (23:55 +0100)]
BUG-2459: do not convert NetconfMessage
Router's onNetconfMessage shows up as a hotspot in performance traces,
which turns out to be another case of coversion of XML document to a
string just for debugging/error handling purposes.
In case of a debug + error we are taking the hit of one toString()
operation, but that should be fine. We make that up by being smarter
about creating maps in the error path.
Change-Id: I78ec6ad44c4689b67bbc51184465c5092b0d8657
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Mon, 8 Dec 2014 09:02:25 +0000 (09:02 +0000)]
Merge "Speed up chunked framing"
Maros Marsalek [Fri, 5 Dec 2014 13:31:09 +0000 (14:31 +0100)]
Reuse PEM provider in netconf-testtool.
Change-Id: Iedc005d2e2c717dc75320234a4605791e5307e53
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Fri, 5 Dec 2014 12:37:41 +0000 (13:37 +0100)]
Speed up chunked framing
Instead of allocating temporary byte arrays and ByteBufs, insert chunk
headers explicitly and transfer bytes directly from input message to
output.
Change-Id: Id300cbb9bc39b36e9a07def3d50c948edda7f570
Signed-off-by: Robert Varga <rovarga@cisco.com>
Maros Marsalek [Fri, 5 Dec 2014 13:28:31 +0000 (14:28 +0100)]
Fix channelInactive event handling in the netty pipeline for netconf.
Reoreding events from AsyncSshHandler.
+ Moving ClosedChannelHandler from Reconnect promise at the end of the pipeline.
+ Add channel id to toString() of abstract netconf session
Change-Id: I9884c2b8d8b2d89878e2fe5cb43fda7a98be5b23
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Wed, 3 Dec 2014 16:45:23 +0000 (17:45 +0100)]
Remove logged unstubbed exception in test for netconf-monitoring
Change-Id: I68d3cac8626c2d555ee4775add14394cbbbe94e6
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>