Be sure to shutdown instance when destroyed

This cleans up any resources held by the instance.

Change-Id: I669264d01c5e77b6cd59cab807e15e9bbf24c16d
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1493: activate recursion elision

Previous patch prepared the infrastructure for elision, but it did not
actually activate it. This patch flips the switch on.

Change-Id: Ic02af3ccc7f5ee5f8ae4d0617562b8fdffc771c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Bug 1593 - Flow Statistics manager is updating store with incorrect key
Statistics manager cache the metadata related to stats data of all the entities (flow,group,
meter,queue) like when was their respective stats were updated in operational data store.
If statistics manager see that stats are not being updated from last two stats fetch cycle,
it consider it stale and remove it. Object that it uses as keys for hash map cache contains
some variant data (counters/durations) that varies in every stats fetch cycle. It creats
duplicate entry in the cache for the same entity. After two fetch cycle statistics manager
find old entry stale and removes it, but in actual that's not the case. This exception is
thrown when it tries to remove the stats related to next duplicate entry (which was already
removed ). Fixed it by using invariant key for caching the metadata to avoid the duplication.

Change-Id: Iad5823ab70938a66fd3d024dc921b74e0852c204
Signed-off-by: Anil Vishnoi <avishnoi@in.ibm.com>
Bug 1598: Cleanup stale ShardReadTransactions

For read-only Tx, a FinalizablePhantomReference is created with the
TransacionProxy instance as the referent and is added to a static
FinalizableReferenceQueue. The FinalizablePhantomReference is subclassed
to hold the TransactionProxy's remoteTransactionPaths map. When the
TransactionProxy instance in GC'ed, the FinalizablePhantomReference is
notified and calls closeTransaction on each TransactionContext to clean it up.

Also to handle potentially stale Tx's due to disconnects, nodes prematurely
shutting down etc, I set set an idle time out (default 10 min) on ShardTransaction
actors via setReceiveTimeout. If the actor is idle with no messages
after the timeout, the actor self-destructs.

I made the idle timeout configurable via the config yang file. This
setting needs to be passed down from the module, thru the ShardManager
to the Shards to the ShardTransactions. I created a ShardCOntext class
to hold the idle timeout and other data that's passed down. This will
also make it easier in the future if additonal config data needs to be
passed down.

In the config yang file, I created a data-store-properties grouping to
avoid having to duplicate the config properties for the operational and
config data stores.

Many unit tests fail when running from Eclipse due to creating anonymous inner
Creator class instances in the static props methods. The akka code doesn't like this -
if the Creator instance class is enclosed in another class it expects
the class to be static. However this runs fine when running unit tests
from mvn and when running the production controller. I suspect the
difference is b/c the JDK compiler generates the anonymous class as
static since they're enclosed in static methods but the Eclipse compiler
doesn't. Anyway, to avoid this I refactored all the anonymous inner
Creator classes to private static classes. I think this is safer and
will avoid potential future issues with different JDK compilers or JDK upgrades.

Change-Id: Ie644612cb34e7219dc089b8add6d397a11bffdda
Signed-off-by: tpantelis <tpanteli@brocade.com>
Optimized version of NormalizedNode Serialization

This commit contains the following,
- Conversion of NormalizedNode to Protocol Buffer using simple tree traversal
- Encoding of QNames and other values to small sized codes to reduce the size of the protobuf message
- Also we now do not use SchemaContext for decoding a NormalizedNode

In addition to these changes I have snuck in an unrelated change to the pom files
to get the appropriate jacoco settings in it.

Change-Id: I6ab48c9f53cf76d6d0c865cf6e5522ff27a30e3f
Signed-off-by: Moiz Raja <moraja@cisco.com>
BUG-1617 Extract AuthProvider from netconf ssh

Change-Id: Ib6f47c0dca5b4b3604b639ae8bca3565f8dd934c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Added AAA AuthN filter to RESTConf web.xml

Change-Id: I78d57335e805165c99038b4a6f89f8c5229253a5
Signed-off-by: Liem Nguyen <liem_m_nguyen@hp.com>
Bug 1446: Add JMX stats for in-memory data store

    Added stats, available via JMX,  to track data for the various thread
    pool executors used by the in-memory data store. Also added commit stats.

Change-Id: Ica8dff7aef8989f2b23b1fc8c100a535998273b1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Adding sal-compatibilty feature

Change-Id: Ifbafc7cea387e0ab5248c1d9dae10426913ed2f9
Signed-off-by: Ed Warnicke <eaw@cisco.com>
Merge "Adding sal-compatibilty feature"
BUG-1520 coverage tests for config-api

Change-Id: I497ad8717ad98ca58f34a1b5052b779481b6a665
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation

This commit also cleans up the usage of ForwardedBackwardsCompatibleDataBroker from DataBrokerTestCustomizer

Change-Id: Icfb078eb54f7dae6c436ff41e7c1657b0cf4175f
Signed-off-by: Moiz Raja <moraja@cisco.com>
BUG-1621 Fix reconnecting.

Netconf-connector did not reconnect after recent changes (Ssh mina integration)
SshHandler was in pipeline after listener in reconnect, thats why the listener received no event about session down.

Change-Id: Id39062f51bc3a0caf066ca49682a2acc837b06ef
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
BUG-1622 Fix handling of non-downloadable schemas from remote netconf device

Change-Id: I1b7a5b379e7d25fcbceba105dce6354dfa49c8af
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Merge "BUG-1493: activate recursion elision"
Hotfix for resolving of remote yang schemas.

Added hotfix for proper resolving of yang schemas when they are stated as identities and prefixed.

Change-Id: If5dc421095f273bb720f54c104a96a61c94dc5e5
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
Merge "Cleanup DOMStoreReadTransaction/DOMDataReadTransaction exists API documentation"
Merge "BUG-1621 Fix reconnecting."
Merge "BUG-1622 Fix handling of non-downloadable schemas from remote netconf device"
Bug 1088 - flow id in operational not matched; after removal not removed completely
Added comparator to compare ethernet address string in case (upper/lower case) agnostic way

Change-Id: Ia7ed9bc098d65bc8dff754fbb50b0eade2605136
Signed-off-by: Anil Vishnoi <avishnoi@in.ibm.com>