netconf.git
9 years agoMerge "BUG-2599 Add base netconf ynag model: ietf-netconf"
Tony Tkacik [Fri, 6 Feb 2015 15:44:01 +0000 (15:44 +0000)]
Merge "BUG-2599 Add base netconf ynag model: ietf-netconf"

9 years agoMerge "Add (un)lock ops to netconf testtool"
Tony Tkacik [Fri, 6 Feb 2015 13:34:49 +0000 (13:34 +0000)]
Merge "Add (un)lock ops to netconf testtool"

9 years agoBUG-2599 Add base netconf ynag model: ietf-netconf
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>
9 years agoAdd (un)lock ops to netconf testtool
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>
9 years agobug 2616 - NPE in ControllerContext.toQName method
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>
9 years agoMerge "Remove import-package instructions from netconf"
Tony Tkacik [Tue, 20 Jan 2015 16:16:43 +0000 (16:16 +0000)]
Merge "Remove import-package instructions from netconf"

9 years agoRemove 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>
9 years agoMerge "findModule method refactoring"
Tom Pantelis [Sat, 17 Jan 2015 19:04:47 +0000 (19:04 +0000)]
Merge "findModule method refactoring"

9 years agoMerge "Fixed missing dependencies in netconf-netty-util."
Tony Tkacik [Fri, 16 Jan 2015 12:50:26 +0000 (12:50 +0000)]
Merge "Fixed missing dependencies in netconf-netty-util."

9 years agoMerge "Increase timeout in config pusher for conflicting version ex"
Tony Tkacik [Fri, 16 Jan 2015 12:49:55 +0000 (12:49 +0000)]
Merge "Increase timeout in config pusher for conflicting version ex"

9 years agoIncrease 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>
9 years agoFixed missing dependencies in netconf-netty-util.
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>
9 years agoRemoved deprecated methods from BindingAwareProvider
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>
9 years agoMerge "Optimize Capability.getLocation()"
Tony Tkacik [Mon, 12 Jan 2015 16:31:29 +0000 (16:31 +0000)]
Merge "Optimize Capability.getLocation()"

9 years agoCancel transaction on failure in restconf
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>
9 years agofindModule method refactoring
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>
9 years agoOptimize Capability.getLocation()
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>
9 years agoMerge "Fix compilation warnings: replace deprecated junit.framework.Assert"
Tom Pantelis [Thu, 8 Jan 2015 21:48:23 +0000 (21:48 +0000)]
Merge "Fix compilation warnings: replace deprecated junit.framework.Assert"

9 years agoMerge "BUG-2560 Canonical write to remote netconf devices"
Tony Tkacik [Thu, 8 Jan 2015 13:34:07 +0000 (13:34 +0000)]
Merge "BUG-2560 Canonical write to remote netconf devices"

9 years agoBUG-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>
9 years agoMerge "Add timeout to netconf IT test"
Tony Tkacik [Wed, 7 Jan 2015 09:42:01 +0000 (09:42 +0000)]
Merge "Add timeout to netconf IT test"

9 years agoMerge changes I4ec0efd7,Ia2619921
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

9 years agoBUG 2468 - IdentityValuesDTO to string class cast exception.
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>
9 years agoMerge "BUG-1382: do not instantiate prefixed QNames"
Tony Tkacik [Fri, 19 Dec 2014 15:44:44 +0000 (15:44 +0000)]
Merge "BUG-1382: do not instantiate prefixed QNames"

9 years agoBUG-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>
9 years agoBUG-2459: use ImmutableSet instead of an unmodifieable HashSet
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>
9 years agoBUG-2459: reuse EXI Reader
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>
9 years agoBUG-2459: reuse EXI Transmogrifier
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>
9 years agoMerge changes Ic8cadf33,If59b1dd3
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

9 years agoMerge changes Icd18348e,I0e642b1b,I304bec5e
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

9 years agoAdd timeout to netconf IT test
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>
9 years agoBUG-2459: maintain a cache of grammar caches
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>
9 years agoBUG-2459: cache GrammarCache
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>
9 years agoBUG-2459: centralize codec allocation
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>
9 years agoBUG-2511: disable external entitiy resolution with EXI
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>
9 years agoFix compilation warnings: replace deprecated junit.framework.Assert
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>
9 years agoImplement basic locking for candidate in config-netconf-connector
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>
9 years agoImprove error reporting in ServiceRegistry
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>
9 years agoMerge "BUG-2511 Fix possible XXE vulnerability in restconf"
Tony Tkacik [Mon, 15 Dec 2014 14:57:59 +0000 (14:57 +0000)]
Merge "BUG-2511 Fix possible XXE vulnerability in restconf"

9 years agoMerge "Allow rpc definition for RuntimeMXBeans to come from groupings"
Tony Tkacik [Mon, 15 Dec 2014 14:57:22 +0000 (14:57 +0000)]
Merge "Allow rpc definition for RuntimeMXBeans to come from groupings"

9 years agoBug-2342: Add stress test with more threads and start of testtool device.
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>
9 years agoBug-2342: Fixing rpc-reply messages id's get mixed up
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>
9 years agoMerge "BUG-2511 Fix XXE vulnerability in Netconf"
Tony Tkacik [Mon, 15 Dec 2014 13:20:47 +0000 (13:20 +0000)]
Merge "BUG-2511 Fix XXE vulnerability in Netconf"

9 years agoAllow rpc definition for RuntimeMXBeans to come from groupings
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>
9 years agoBUG-2511 Fix possible XXE vulnerability in restconf
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>
9 years agoBUG-2511 Fix XXE vulnerability in Netconf
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>
9 years agoMerge "Reuse PEM provider in netconf-testtool."
Tony Tkacik [Mon, 15 Dec 2014 08:06:17 +0000 (08:06 +0000)]
Merge "Reuse PEM provider in netconf-testtool."

9 years agoMerge "BUG-2459: use thread-local cache of transformers"
Tony Tkacik [Mon, 15 Dec 2014 07:51:47 +0000 (07:51 +0000)]
Merge "BUG-2459: use thread-local cache of transformers"

9 years agoMerge "Cache TransformerFactory"
Tony Tkacik [Mon, 15 Dec 2014 07:50:52 +0000 (07:50 +0000)]
Merge "Cache TransformerFactory"

9 years agoBUG-2459: use thread-local cache of transformers
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>
9 years agoCache TransformerFactory
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>
9 years agoBUG-2459: do not instantiate factories in fastpath
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>
9 years agoBUG-2506: split out maven binding
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>
9 years agoMerge "BUG-2475: Do not issue garbage collection on when pushing configurations"
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"

9 years agoMerge topic 'checkstyle'
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

9 years agoFix checkstyle if-statements must use braces sal-rest-docgen
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>
9 years agoFix checkstyle if-statements must use braces netconf
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>
9 years agoBUG-2475: Do not issue garbage collection on when pushing configurations
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>
9 years agoAdditional checkstyle fixes. Checkstyle validation fail enabled
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>
9 years agoMerge changes I26ca5aba,Ia615dbd4
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

9 years agoMerge "BUG-2459: do not convert NetconfMessage"
Tony Tkacik [Mon, 8 Dec 2014 09:57:43 +0000 (09:57 +0000)]
Merge "BUG-2459: do not convert NetconfMessage"

9 years agoBUG-2459: optimize NetconfOperationRouterImpl operations
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>
9 years agoMerge "Fix channelInactive event handling in the netty pipeline for netconf."
Tony Tkacik [Mon, 8 Dec 2014 09:07:36 +0000 (09:07 +0000)]
Merge "Fix channelInactive event handling in the netty pipeline for netconf."

9 years agoMerge "Remove logged unstubbed exception in test for netconf-monitoring"
Tony Tkacik [Mon, 8 Dec 2014 09:07:27 +0000 (09:07 +0000)]
Merge "Remove logged unstubbed exception in test for netconf-monitoring"

9 years agoBUG-2459: Reuse SAXTransformerFactory in EXI decoder
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>
9 years agoBUG-2459: do not convert NetconfMessage
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>
9 years agoMerge "Speed up chunked framing"
Tony Tkacik [Mon, 8 Dec 2014 09:02:25 +0000 (09:02 +0000)]
Merge "Speed up chunked framing"

9 years agoReuse PEM provider in netconf-testtool.
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>
9 years agoSpeed up chunked framing
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>
9 years agoFix channelInactive event handling in the netty pipeline for netconf.
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>
9 years agoRemove logged unstubbed exception in test for netconf-monitoring
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>
9 years agoMerge changes I07a18f32,I8a1a0129
Tony Tkacik [Fri, 5 Dec 2014 11:22:17 +0000 (11:22 +0000)]
Merge changes I07a18f32,I8a1a0129

* changes:
  Implement NetconfMessage.toString()
  Cleanup message logging in netconf handlers

9 years agoMerge "BUG-2459: Default to byte-aligned encoding"
Tony Tkacik [Fri, 5 Dec 2014 11:21:57 +0000 (11:21 +0000)]
Merge "BUG-2459: Default to byte-aligned encoding"

9 years agoMerge "BUG-2477 Remove unused pax-exam plugin from netconf-it"
Anil Vishnoi [Fri, 5 Dec 2014 10:48:48 +0000 (10:48 +0000)]
Merge "BUG-2477 Remove unused pax-exam plugin from netconf-it"

9 years agoMerge "BUG-2459: Fix netconf-monitoring not reusing JAXB context"
Tony Tkacik [Fri, 5 Dec 2014 09:56:25 +0000 (09:56 +0000)]
Merge "BUG-2459: Fix netconf-monitoring not reusing JAXB context"

9 years agoImplement NetconfMessage.toString()
Robert Varga [Tue, 2 Dec 2014 22:26:38 +0000 (23:26 +0100)]
Implement NetconfMessage.toString()

Rather than explicitly converting the internal document intoa string
before logging it, teach NetconfMessage how to do toString(). This way
we do not have to check Logger configuration and pass NetconfMessages
directly. The logger will cann toString() as needed.

Change-Id: I07a18f32a1500784b81f52f0412acd73123a161e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCleanup message logging in netconf handlers
Robert Varga [Tue, 2 Dec 2014 13:14:39 +0000 (14:14 +0100)]
Cleanup message logging in netconf handlers

This wraps LOG.trace() invocations in LOG.isTraceEnabled(), as they
construct potentially big objects which may end up being unused.

Also cleans up method declarations to not use Exception, as Sonar warns
about these.

Change-Id: I8a1a01291b04eea0823b72e254f9ca4cc11557ea
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2477 Remove unused pax-exam plugin from netconf-it
Vaclav Demcak [Thu, 4 Dec 2014 21:15:38 +0000 (22:15 +0100)]
BUG-2477 Remove unused pax-exam plugin from netconf-it

+ remove version depend. in for pax-exam in adsal/commons/integrationtest

Change-Id: Ib077603f23072a1c56f6d39c51ad29bb7d7d8ad7
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG-2459: Fix netconf-monitoring not reusing JAXB context
Robert Varga [Thu, 4 Dec 2014 16:22:16 +0000 (17:22 +0100)]
BUG-2459: Fix netconf-monitoring not reusing JAXB context

JAXBContext can be freely reused, so cache it, as it has significant
footprint in testing tool.

Change-Id: If2f53b9dfd4a1d30390580fd800aa2f5eb4e2b72
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2459: Default to byte-aligned encoding
Robert Varga [Thu, 4 Dec 2014 19:06:13 +0000 (20:06 +0100)]
BUG-2459: Default to byte-aligned encoding

Switches from preCompress encoding, and optimizes things a bit more.

Change-Id: I77afc3e7c105d5a5711852f3f63a63bada96613f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Do not force toString() in NetconfClientSession"
Tony Tkacik [Wed, 3 Dec 2014 10:28:18 +0000 (10:28 +0000)]
Merge "Do not force toString() in NetconfClientSession"

9 years agoMerge "Fix checkstyle warnings in netconf-util"
Tony Tkacik [Wed, 3 Dec 2014 09:26:34 +0000 (09:26 +0000)]
Merge "Fix checkstyle warnings in netconf-util"

9 years agoDo not force toString() in NetconfClientSession
Robert Varga [Tue, 2 Dec 2014 17:27:20 +0000 (18:27 +0100)]
Do not force toString() in NetconfClientSession

Passing 'this' will cause toString() to be invoked if needed.

Change-Id: I3859cee6aafd26bf57107f66fb20695b3df15c93
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Handle more specific BindException and IOException"
Ed Warnicke [Tue, 2 Dec 2014 16:21:52 +0000 (16:21 +0000)]
Merge "Handle more specific BindException and IOException"

9 years agoMerge "Fix allowable Unix ports range 1024 - 65535"
Ed Warnicke [Tue, 2 Dec 2014 16:20:59 +0000 (16:20 +0000)]
Merge "Fix allowable Unix ports range 1024 - 65535"

9 years agoHandle more specific BindException and IOException
Thanh Ha [Thu, 27 Nov 2014 20:22:54 +0000 (15:22 -0500)]
Handle more specific BindException and IOException

It is good pratice to handle specific exceptions rather than using the
catch all generic Exception.

This code change handles the java.net.BindException such that if an port
is already in use we skip creating the simulated device on that port.

IOException will display the failure message and exception and not cause
additional attempts.

Change-Id: I7cbf3aa7016b0589f8fdd3f6476006954068a9a0
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoFix allowable Unix ports range 1024 - 65535
Thanh Ha [Thu, 27 Nov 2014 19:38:07 +0000 (14:38 -0500)]
Fix allowable Unix ports range 1024 - 65535

The well known ports / system ports are actually only in the range
between 0 - 1023. The port 1024 should be usable. Also now handles the
max allowable port of 65535.

Change-Id: I5ec944abfe40156467ac53b9f5731a0aa6776596
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoMerge "Fix checkstyle warnings in netconf-usermanager"
Tony Tkacik [Mon, 1 Dec 2014 10:19:01 +0000 (10:19 +0000)]
Merge "Fix checkstyle warnings in netconf-usermanager"

9 years agoMerge "Fix checkstyle warnings in netconf-tcp"
Tony Tkacik [Mon, 1 Dec 2014 10:18:09 +0000 (10:18 +0000)]
Merge "Fix checkstyle warnings in netconf-tcp"

9 years agoMerge "BUG-2340 Fix improper cleanup of resources in netconf ssh handler"
Tony Tkacik [Mon, 1 Dec 2014 08:25:10 +0000 (08:25 +0000)]
Merge "BUG-2340 Fix improper cleanup of resources in netconf ssh handler"

9 years agoBUG-2340 Fix improper cleanup of resources in netconf ssh handler
Maros Marsalek [Fri, 28 Nov 2014 11:19:19 +0000 (12:19 +0100)]
BUG-2340 Fix improper cleanup of resources in netconf ssh handler

This commit also fixes proper reconnect scheduling for netconf-connector.

Change-Id: I1d848af57fddc35e73596fc47f8c7318b8747130
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Netconf-cli compilable and included in project"
Tony Tkacik [Fri, 28 Nov 2014 10:00:35 +0000 (10:00 +0000)]
Merge "Netconf-cli compilable and included in project"

9 years agoFix checkstyle warnings in netconf-util
Marian Dubai [Fri, 14 Nov 2014 15:25:53 +0000 (16:25 +0100)]
Fix checkstyle warnings in netconf-util

Change-Id: I0fbe00cc76f3b84a8b2673f1716b8ceb08c2b52b
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoFix checkstyle warnings in netconf-usermanager
Marian Dubai [Fri, 14 Nov 2014 14:58:58 +0000 (15:58 +0100)]
Fix checkstyle warnings in netconf-usermanager

Change-Id: Id4cc11b487f98e6b33985c16f7a95a434c01dd74
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoFix checkstyle warnings in netconf-tcp
Marian Dubai [Fri, 14 Nov 2014 14:57:14 +0000 (15:57 +0100)]
Fix checkstyle warnings in netconf-tcp

Change-Id: I95e776dde2645288734f7687c22fc158ee7b486d
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoFix checkstyle warnings in netconf-ssh.
Marian Dubai [Fri, 14 Nov 2014 14:55:54 +0000 (15:55 +0100)]
Fix checkstyle warnings in netconf-ssh.

Change-Id: I01cee96432edcf361b463f89c648823042165b9e
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoFix checkstyle warnings in netconf-netty-util
Marian Dubai [Fri, 14 Nov 2014 14:52:51 +0000 (15:52 +0100)]
Fix checkstyle warnings in netconf-netty-util

Change-Id: I123c7cbff15c1267a1bdb537e100c1bf2f9894d7
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoCleanup temporary test files
Thanh Ha [Sun, 23 Nov 2014 23:41:57 +0000 (18:41 -0500)]
Cleanup temporary test files

A properly defined test should correctly cleanup after itself when the
tests have completed execution.

Change-Id: I9887558e698a2ee823a9f91727cde5eccc2348f2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoMerge "Bug-915: Adding static document generation. Currently the API Explorer can...
Moiz Raja [Wed, 26 Nov 2014 17:35:38 +0000 (17:35 +0000)]
Merge "Bug-915: Adding static document generation. Currently the API Explorer can only be accessed from a running server. With this change, the API Explorer will be generated as static html pages at build time in the features folder."

9 years agoNetconf-cli compilable and included in project
Marian Dubai [Tue, 25 Nov 2014 16:33:30 +0000 (17:33 +0100)]
Netconf-cli compilable and included in project

Change-Id: Ia08396f52c98ea2661e13f60a3787b18c4ae50d6
Signed-off-by: Marian Dubai <mdubai@cisco.com>