mdsal.git
5 years agoUpdate iana-if-type revision and packaging 40/76640/1
Robert Varga [Thu, 4 Oct 2018 10:10:53 +0000 (12:10 +0200)]
Update iana-if-type revision and packaging

This bumps packaged model to the latest available registry
and repackages it to match packaging rules.

Change-Id: I0947f90bedf8c628eaf6e68c21344ef72ed0c6cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup binding spec artifact versions 35/76635/2
Robert Varga [Thu, 4 Oct 2018 09:26:30 +0000 (11:26 +0200)]
Cleanup binding spec artifact versions

This bumps binding specification and related artifacts to version
1.0.0-SNAPSHOT.

Change-Id: Ia9fa86179e13eb5ec4a00a519ebba56311722a64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoHarmonize parent versions with MD-SAL version 33/76633/2
Robert Varga [Thu, 4 Oct 2018 08:38:58 +0000 (10:38 +0200)]
Harmonize parent versions with MD-SAL version

We want to keep entrypoints at the same versions -- i.e.
mdsal-artifacts and all parents, so users have an easier time
figuring out inconsistencies.

Change-Id: I014ef6db9649a9f8b42a2bf5ab76776a8816c467
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove common/parent 34/76634/2
Robert Varga [Thu, 4 Oct 2018 09:13:03 +0000 (11:13 +0200)]
Remove common/parent

This parent is not used anywhere and it is rather dysfunctional,
remove it.

Change-Id: I2f0c78f8a28c612f91997dc1478dd8d296abd6e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove binding2/prototype 32/76632/2
Robert Varga [Thu, 4 Oct 2018 08:18:17 +0000 (10:18 +0200)]
Remove binding2/prototype

This code is not plugged into build, hence it is pure clutter.

Change-Id: I69139ceef2a26136a91e9c8cbc0ad95559eefc8c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup aggregator poms 31/76631/2
Robert Varga [Thu, 4 Oct 2018 08:13:17 +0000 (10:13 +0200)]
Cleanup aggregator poms

Aggregators should not be installed/deployed and should have
a version harmonized with project version (2.7.0-SNAPSHOT).

Change-Id: I6090c70adbef38fbc3cf3e4f93a551e484f664cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoIntroduce features-mdsal-experimental 30/76630/1
Robert Varga [Thu, 4 Oct 2018 07:40:12 +0000 (09:40 +0200)]
Introduce features-mdsal-experimental

This is a repository for experimental features, currently holding
Binding V2.

Change-Id: I7154f1c2f59556cf77b55ae902815a6fae480820
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove model features into top-level directory 14/76614/2
Robert Varga [Wed, 3 Oct 2018 16:14:30 +0000 (18:14 +0200)]
Move model features into top-level directory

This eliminates the second feature directory, concentrating all
features in one place.

Change-Id: Idb86b943d59cf5ad532dda8675b9fc2e781e692e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove features-mdsal-model 13/76613/2
Robert Varga [Wed, 3 Oct 2018 16:11:38 +0000 (18:11 +0200)]
Remove features-mdsal-model

Integrate this feature repository into features-mdsal and remove
it.

Change-Id: I53914985e6001e551720379843b8865093831bd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove features to top-level directory 12/76612/2
Robert Varga [Wed, 3 Oct 2018 16:01:29 +0000 (18:01 +0200)]
Move features to top-level directory

Move our core feature repository and related features to a top-level
directory.

Change-Id: I6324db25c51ce8e43138e63bc0afe0d010b51b1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd ForwardingTransaction 16/76616/3
Robert Varga [Wed, 3 Oct 2018 17:03:27 +0000 (19:03 +0200)]
Add ForwardingTransaction

This is an aspect shared by all three flavors of forwarding
transaction, hence we can factor the code out into a common
subclass for reuse.

Change-Id: I2837d20084f54350337a111a0808dbaa2391145e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit off Read/WriteOperations from Read/WriteTransaction 15/76615/2
Robert Varga [Wed, 3 Oct 2018 16:39:14 +0000 (18:39 +0200)]
Split off Read/WriteOperations from Read/WriteTransaction

It is oftentimes useful to allow access to a transaction's operations
without allowing the state of the transaction to be modified. This
patch splits off operations from transactions, so proper isolation
can be maintained.

This also resolves the issue of ReadWriteTransaction having both
cancel() and close() methods -- since it has a write aspect, it
inherits lifecycle methods from WriteTransaction.

Change-Id: I98c02c0c5cbcac2432f629973860c56cf2818d6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix checkstyle in mdsal-binding2-java-api-generator 63/64863/6
Jie Han [Mon, 30 Oct 2017 06:25:43 +0000 (14:25 +0800)]
Fix checkstyle in mdsal-binding2-java-api-generator

- Fix checkstyle issues and activate enforcement.
Change-Id: Id7400f6eb267c822597cf4ff9adb41ba117d3c70
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoFix checkstyle in mdsal-binding2-generator-util 52/64552/10
Jie Han [Fri, 20 Oct 2017 02:09:21 +0000 (10:09 +0800)]
Fix checkstyle in mdsal-binding2-generator-util

- Fix checkstyle issues and activate enforcement.
Change-Id: I5e83540c54650f899afa9e711d17f4c3efb2e9f0
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoFix checkstyle in mdsal-binding2-generator-impl 13/64513/10
Jie Han [Thu, 19 Oct 2017 08:18:04 +0000 (16:18 +0800)]
Fix checkstyle in mdsal-binding2-generator-impl

 - - Fix checkstyle issues and activate enforcement.
Change-Id: I5fe421e7389e4c3f1c2d809f6321829b9d7559c5
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoMDSAL-361: Deal with restricted types in unions 57/76057/4
han [Thu, 13 Sep 2018 09:56:27 +0000 (17:56 +0800)]
MDSAL-361: Deal with restricted types in unions

- Simply address the issue by adding a numeric suffix
  to member type name of the union.

Change-Id: Ie096f9e4795766ca8729daee6f54947ce90d964b
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBump yangtools to 2.1.1 09/76609/2
Robert Varga [Wed, 3 Oct 2018 12:50:37 +0000 (14:50 +0200)]
Bump yangtools to 2.1.1

This bumps yangtools to 2.1.1 to version-converge with odlparent-4.0.2

Change-Id: I6cbbb0bfe9029551d3ac69e6f56283e02694aae0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove AsyncDataBroker and related classes 16/76516/4
Robert Varga [Mon, 1 Oct 2018 07:33:39 +0000 (09:33 +0200)]
Remove AsyncDataBroker and related classes

DOM and Binding APIs need to evolve separately, remove the common
straightjacket they were using.

Change-Id: I91f49284c61020fff4b4e262aa03c0a7eca70a06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove common.api.TransactionChain 78/76078/9
Robert Varga [Thu, 13 Sep 2018 22:40:22 +0000 (00:40 +0200)]
Remove common.api.TransactionChain

This interface needs specialization for both DOM and Binding
levels. While this was partially done, the TransactionChainListener
inteface ended up being clunky.

Disaggregate the TransactionChain concept, by completely eliminating
it from common-api. BindingTransactionChain already existed,
so rename it and define DOMTransactionChain. Support classes are
refactored as well.

Change-Id: I899f1844a2ba84fdc74ba507d3235b87f6a43887
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd a failing DataBroker 63/76563/3
Stephen Kitt [Tue, 2 Oct 2018 14:19:25 +0000 (16:19 +0200)]
Add a failing DataBroker

This imports DataBrokerFailures from Genius; this is a test class
which allows faults to be injected into a data broker.

Change-Id: I89ac278a9291245ca2a1cdc42e14ced4656695b4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoFix BindingDOMOperationProviderServiceAdapter 10/76510/2
Robert Varga [Mon, 1 Oct 2018 06:39:25 +0000 (08:39 +0200)]
Fix BindingDOMOperationProviderServiceAdapter

This class did not have proper supressions and missing @Override
annotations.

Change-Id: I4850593c95527679462284a61f4d8e036fc50e55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix some raw types 08/76508/4
Robert Varga [Mon, 1 Oct 2018 06:26:44 +0000 (08:26 +0200)]
Fix some raw types

Add trivial parameterization to silence eclipse.

Change-Id: I92642b35426f9582ff4578835c0c34146ced207a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded SuppressWarnings 07/76507/2
Robert Varga [Mon, 1 Oct 2018 06:01:54 +0000 (08:01 +0200)]
Remove unneeded SuppressWarnings

We no longer do unsafe casts, remove suppression.

Change-Id: Id8fbd7b9a156265b4a18457c18561129001402e9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unused import 06/76506/2
Robert Varga [Mon, 1 Oct 2018 06:01:21 +0000 (08:01 +0200)]
Remove unused import

BaseTemplate no longer uses GTO, remove the import.

Change-Id: I43259e05f251ea87083abd382f7e727d4ffd9624
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix KeyedListAction serialization 04/76504/1
Jakub Tóth [Fri, 14 Sep 2018 08:44:14 +0000 (10:44 +0200)]
Fix KeyedListAction serialization

SchemaRootCodecContext needs to understand both Action and
KeyedListAction, as their parameterizations differ.

JIRA: MDSAL-371
Change-Id: I405a73b1a8ca8801ae1786be704cefe674c5fb72
Signed-off-by: Jakub Tóth <jakub.toth@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.2 97/76497/1
Robert Varga [Sat, 29 Sep 2018 07:49:20 +0000 (09:49 +0200)]
Bump odlparent to 4.0.2

This bumps the versions to receive updates of plugins.

Change-Id: If5c9346d221d5c4af6e4357b0c0847bc88465dbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake sure we aggregate sonar reports 94/76394/2
Robert Varga [Sun, 23 Sep 2018 12:46:09 +0000 (14:46 +0200)]
Make sure we aggregate sonar reports

odlparent-4.0.0 is broken w.r.t. sonar, fix this up by aggregating
our execution reports.

Change-Id: I544fb6d196794e25d3892f7fffab44899840793d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to yangtools-2.1.0 65/76265/1
Robert Varga [Wed, 19 Sep 2018 12:15:10 +0000 (14:15 +0200)]
Bump to yangtools-2.1.0

This bumps from snapshot versions to release versions, bringing
us closer to mdsal-3.0.0.

Change-Id: I7cbc43f8814386fd5570ce37c3b96faf2c1f9a91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMDSAL-370: expose LogicalDatastoreType-aware constructor 07/76207/1
Robert Varga [Tue, 18 Sep 2018 08:30:13 +0000 (10:30 +0200)]
MDSAL-370: expose LogicalDatastoreType-aware constructor

This exposes the constructors needed to customize the underlying
data tree instances -- both through direct configuration and via
LogicalDatastoreType.

Change-Id: I056d74f4059cca792aa49e5463570b35e1d0005a
JIRA: MDSAL-370
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b1b71b0d804ed75853e31f92aa61258dcaf503fe)

5 years agoSwitch to odlparent-4.0.0 71/76071/1
Robert Varga [Thu, 13 Sep 2018 17:35:42 +0000 (19:35 +0200)]
Switch to odlparent-4.0.0

Now that odlparent-4.0.0 has been released, we can nail down that
version, getting us closer to our release.

Change-Id: I4669b27c013bd30101db0f45e0ba866da1dbb26e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRequire in-memory datastore 70/75670/3
Robert Varga [Mon, 3 Sep 2018 08:59:58 +0000 (10:59 +0200)]
Require in-memory datastore

mdsal-binding-dom-adapter publishes test-jar for downstreams,
which does not work if IMDS is excluded. Fix that up.

Change-Id: Iefeec6707e5dd94647591dedaba0481cebe07db3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRevert "Avoid depending on immutables.value at runtime" 66/75666/1
Robert Varga [Mon, 3 Sep 2018 08:22:47 +0000 (10:22 +0200)]
Revert "Avoid depending on immutables.value at runtime"

This reverts commit 41896a415dd61236b5c385ee1d00b1a61a61a761. It is
no longer needed with immutables-2.7.1.

Change-Id: I61ca9b18899ad4d4168a0d3f7ba95744d71c8098
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMDSAL-151: Add add/del utility methods to builders 99/67999/10
Jie Han [Wed, 7 Feb 2018 06:52:03 +0000 (14:52 +0800)]
MDSAL-151: Add add/del utility methods to builders

- Add 'addTO{ListFieldName}' and 'removeFrom{ListFieldName}'
  to *Builder if there exists list properties.

Change-Id: Id01e93915ea9b5c7a4c42414fe370118ba8df134
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoMDSAL-17: Binding V2 - Simplify InstanceIdentifer creation 10/67910/16
Jie Han [Mon, 5 Feb 2018 06:49:38 +0000 (14:49 +0800)]
MDSAL-17: Binding V2 - Simplify InstanceIdentifer creation

- Add a static method getInstanceIdentifier to generated interface
  of datastore nodes:

  - If there are list items, just toke its key as inputs, like:
    getInstanceIdentifier(key1, key2,...),

  -Or it would simply be getInstanceIdentifier().

- For choice/case's children data nodes, II does not reference
  choice or case but through them.

- Add unit tests.

Change-Id: Iea592557668fd7a8ab8e6874caaac7b9e834a859
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agomdsal-dom-inmemory-datastore only a test dependency of mdsal-dom-broker 50/75650/3
Michael Vorburger [Fri, 31 Aug 2018 23:20:01 +0000 (01:20 +0200)]
mdsal-dom-inmemory-datastore only a test dependency of mdsal-dom-broker

found in https://github.com/vorburger/opendaylight-etcd/commit/097e0c1c62bc8dac2eef319ff7e2d273aabfd681

Change-Id: I70891d7d30364e0f0cc285fe930af95a5a4288ad
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoRename RFC7277 model artifacts 67/75567/3
Robert Varga [Thu, 30 Aug 2018 12:09:22 +0000 (14:09 +0200)]
Rename RFC7277 model artifacts

This patch renames ietf-ip artifact to follow unified naming.

Change-Id: If1cb032a2e66174d83ab931902e505665e4394ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRename RFC7223 model artifacts 66/75566/3
Robert Varga [Thu, 30 Aug 2018 12:02:37 +0000 (14:02 +0200)]
Rename RFC7223 model artifacts

This patch renames ietf-interfaces artifact to follow unified naming.

Change-Id: Ibc615bc78f16a2b7f281e5eba4ed58f137a0b982
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRename RFC6991 model artifacts 65/75565/3
Robert Varga [Thu, 30 Aug 2018 11:40:30 +0000 (13:40 +0200)]
Rename RFC6991 model artifacts

This patch renames ietf-{inet,yang}-types artifacts to follow
unified naming.

Change-Id: I72e14257f9df4487e8f26940178dee244a4e32cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge branch 'mdsal-trace' from controller
Anil Belur [Wed, 29 Aug 2018 12:33:37 +0000 (18:03 +0530)]
Merge branch 'mdsal-trace' from controller

Moved code from controller.git:opendaylight/md-sal/mdsal-trace
to mdsal.git:opendaylight/md-sal/mdsal-trace

Issue-Id: RELENG-1170
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I653644cd465e069331ca1cffdfa3502515a08771

5 years agoMerge branch 'blueprint' from controller
Anil Belur [Wed, 29 Aug 2018 11:13:08 +0000 (16:43 +0530)]
Merge branch 'blueprint' from controller

Moved code from controller.git:opendaylight/blueprint
to mdsal.git:opendaylight/blueprint

Issue-Id: RELENG-1170
Change-Id: I06d81bd60410e174222762d4eaee1811cac9bcb8
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 years agoExtend BindingNamespaceType 33/68133/10
Jie Han [Sun, 11 Feb 2018 03:23:47 +0000 (11:23 +0800)]
Extend BindingNamespaceType

- Extend BindingNamespaceType with 'Notification' and 'Operation'
  to distinguish data nodes from notifications and operations.
  It's useful to guide renderers to generate code like
  'getInstanceIdentifier' which is only needed by tree data nodes.
- Make binding namespace type of augmented nodes inherit target
  type's.

Change-Id: I5b7b598d1db40b8d2b70707b0d3ba6f41f9b9fd3
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoMDSAL-310 Binding v2 codec - Instance identifier should not reference choice/case. 99/68099/16
Jie Han [Fri, 9 Feb 2018 08:59:18 +0000 (16:59 +0800)]
MDSAL-310 Binding v2 codec - Instance identifier should not reference choice/case.

- Since choice and case are not data tree nodes,
  InstanceIdentifier should not reference choice/case
  as well as YangInstanceIdentifier.

JIRA:MDSAL-310

Change-Id: I881a88bfce337ab3a5d9f2a648cf16ead8214e98
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoLower warn level in AbstractInvokableServiceMetadata
Tom Pantelis [Wed, 22 Aug 2018 16:45:23 +0000 (12:45 -0400)]
Lower warn level in AbstractInvokableServiceMetadata

The warning "interface interface X has no accptable entries, assuming it is satisfied"
is emmitted quite often from RpcServiceMetadata, ie for every routed RPC I believe.
I'm unclear as to why it filters out routed RPCs here and why it's a warning but
we should at least reduce to debug to avoid the noise.

Change-Id: I954a4b7c6b2a5e0d3fdbe7bbd2cc44b47ef01fdc
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoRemove AsciiDoc documentation 80/75280/2
Thanh Ha [Fri, 17 Aug 2018 18:15:45 +0000 (14:15 -0400)]
Remove AsciiDoc documentation

Completed migrating these files to RST so remove the
AsciiDoc copy.

Change-Id: I92862e9bb3cd7e0d1263627da47a753319fb68dd
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoMigrate conceptual-data-tree to RST 79/75279/2
Thanh Ha [Fri, 17 Aug 2018 17:39:36 +0000 (13:39 -0400)]
Migrate conceptual-data-tree to RST

Change-Id: Ic3c417a1f985055b0a80e3162940480c674d4712
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoFix findbugs warnings
Robert Varga [Mon, 20 Aug 2018 23:07:54 +0000 (01:07 +0200)]
Fix findbugs warnings

Upgraded findbugs finds these, fix them up.

Change-Id: Id5a008cddc6616c3a93f0528efca00b86843fc3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix findbugs warnings
Robert Varga [Mon, 20 Aug 2018 23:07:54 +0000 (01:07 +0200)]
Fix findbugs warnings

Upgraded findbugs finds these, fix them up.

Change-Id: Id5a008cddc6616c3a93f0528efca00b86843fc3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBinding2 - Add yang and tests 43/67143/7
Jie Han [Mon, 15 Jan 2018 00:48:04 +0000 (08:48 +0800)]
Binding2 - Add yang and tests

- fix resolve action in generator
- add yang and tests

Change-Id: I81d100f5deb071a8f0f3b9a9a76c36be0051d652
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBinding2 - Do not confuse routed RPC with Action 06/75206/5
Jie Han [Wed, 15 Aug 2018 06:52:29 +0000 (14:52 +0800)]
Binding2 - Do not confuse routed RPC with Action

DO not mix the concepts of RPC and Action which would
mislead users.

Change-Id: Ic3ba521c5365c93e2ebd0e18942127ac7dfac057
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBinding2 - Add ActionServiceAdapter 05/75205/4
Jie Han [Wed, 15 Aug 2018 06:20:58 +0000 (14:20 +0800)]
Binding2 - Add ActionServiceAdapter

Add ActionServiceAdapter to adapt DOMActionService.

Change-Id: I303ab2007561f2b348d4e691fa04d9b49f0eaf1c
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBinding2 - Remove operation invokers 04/75204/4
Jie Han [Tue, 14 Aug 2018 06:57:39 +0000 (14:57 +0800)]
Binding2 - Remove operation invokers

Just remove them as we could call 'invoke' directly.

Change-Id: I0a24937d3171b4c5e3dc46360ada6531b55b287d
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoRework ClusterSingletonServiceGroupImpl locking 49/74449/12
Robert Varga [Wed, 25 Jul 2018 12:16:29 +0000 (14:16 +0200)]
Rework ClusterSingletonServiceGroupImpl locking

The problem we are are seeing is a classic AB/BA deadlock, hence
we need to change how serviceGroup is handled. This patch reworks
ClusterSingletonServiceGroupImpl to separate state tracking from
service startup/shutdown mechanics.

State locking is separated out into three domains:
- entity state, guarded by ClusterSingletonServiceGroupImpl object
- service membership, tracked in a ConcurrentMap
- service instantiation, guarded by a simple CAS-based lock

Furthermore anytime state changes, we mark this fact in a volatile
variable. Whenever we observe dirty state, we attempt to reconcile
it -- if we can also acquire the service instantiation lock.

Each registered service is tracked separately, so we do not have
to have wholesale aggregator futures for stopping services and can
also start newcomer services without causing weird state tracking
disruptions.

Splitting state tracking and service instantiation leads to faster
group shutdown, because when a group is being closed we know we can
unregister the service entity irrespective of the state of user
services. Unit tests, especially asynchronous, are updated to account
for this accelerated shutdown procedure.

This has the benefit of improving inter-node failover latency,
because the process of user service shutdown and service entity
unregistration runs concurrently. That leads to lower likelihood
of the new service entity owner having to block on becoming
the cleanup entity owner, as services which shut down quickly
will have released the cleanup entity by the time the new owner
is selected.

JIRA: MDSAL-362
Change-Id: I7cd82f81da9135591e4242a196cc0f06a78973a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBinding2 - Implement RpcActionProviderService 87/75087/8
Jie Han [Fri, 10 Aug 2018 00:58:11 +0000 (08:58 +0800)]
Binding2 - Implement RpcActionProviderService

Use inner class to simplify implemetation of adapter as
there's only one method 'invoke' in Rpc or Action/ListAction,
we then could take the implementation directly instead of
initiating xxxInvoker for every adapter.

Change-Id: Ide6247c4692aeb496d3bf85c918eef530a4e18cd
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoFix set schema context to action routing table 62/75262/2
Jie Han [Fri, 17 Aug 2018 08:46:44 +0000 (16:46 +0800)]
Fix set schema context to action routing table

Change-Id: I33b400f05a0fafa01f64f64c599e457257f3ae02
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoMake DefaultDOMRpcResult usable with DOMRpcResult redefinition 71/75271/1
Robert Varga [Fri, 17 Aug 2018 13:44:31 +0000 (15:44 +0200)]
Make DefaultDOMRpcResult usable with DOMRpcResult redefinition

Since DOMRpcResult can now return a proper collection, users need
the ability to use that return to instantiate a DefaultDOMRpcResult,
but the constructor mismatch prevents that. Fix it.

Change-Id: Id1720a3b429f27aea6d971529687766090090ddf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDeprecate mdsal.common.api transaction-related interfaces 62/75162/6
Robert Varga [Mon, 13 Aug 2018 09:21:18 +0000 (11:21 +0200)]
Deprecate mdsal.common.api transaction-related interfaces

Sharing these interfaces between DOM and Binding world is actively
hurtful, as we cannot evolve them independently. Deprecate them
as a first step towards their elimination.

This also defines missing interface concretizations, to make
the transition easier.

Dealing with TransactionChains requires a separate patch, as that
cannot easily (if at all) be done breaking APIs.

Change-Id: Ib899f4dbf6c5bfb596a17fb025c913a03e00fa67
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix DataValidationFailedExceptionTest warnings 61/75161/2
Robert Varga [Mon, 13 Aug 2018 08:32:06 +0000 (10:32 +0200)]
Fix DataValidationFailedExceptionTest warnings

Type safety here is easily fixed.

Change-Id: I06b558ab90635c5b95e9ad306edc31ee1c7335fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix typo and broken link in docs 60/75160/1
Ivan Hrasko [Mon, 13 Aug 2018 08:58:55 +0000 (10:58 +0200)]
Fix typo and broken link in docs

Change-Id: I1d85940d7e8d5cd76177f74a4d1e7fbd9f870199
Signed-off-by: Ivan Hrasko <ihrasko@cisco.com>
5 years agoChange InstanceIdentifier serialization format 44/75144/7
Robert Varga [Sat, 11 Aug 2018 15:52:07 +0000 (17:52 +0200)]
Change InstanceIdentifier serialization format

This patch uses serialization proxy in order to get rid of use
of reflection in InstanceIdentifier serialization.

Change-Id: Ic146a80cba0e6e3aeaab75e805c6ca243fe047f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove deprecated InstanceIdentifier methods 42/75142/9
Robert Varga [Sat, 11 Aug 2018 15:00:31 +0000 (17:00 +0200)]
Remove deprecated InstanceIdentifier methods

This removes all deprecated methods in InstanceIdentifier,
slimming each instance down a bit.

Change-Id: I62cfaa9d4ce8f9672355822c3fb5d92f5c833249
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove deprecated BindingGeneratorUtil methods 43/75143/3
Robert Varga [Sat, 11 Aug 2018 15:04:24 +0000 (17:04 +0200)]
Remove deprecated BindingGeneratorUtil methods

These methods have their replacements and have been scheduled
for removal for quite some time. Do that now.

Change-Id: I1572c7a88ad4301704020536185de879fd260952
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove TypeProvider.javaTypeForYangType() 41/75141/3
Robert Varga [Sat, 11 Aug 2018 14:56:49 +0000 (16:56 +0200)]
Remove TypeProvider.javaTypeForYangType()

This has been deprecated for some time, remove it.

Change-Id: I9bb48986a3c72b128934f9539d59bb6b34950f46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove deprecated BindingReflections methods 40/75140/1
Robert Varga [Sat, 11 Aug 2018 14:54:35 +0000 (16:54 +0200)]
Remove deprecated BindingReflections methods

These methods have their replacements directly in YangModuleInfo,
remove them.

Change-Id: Ic38166ec0b94a74e78d6cedcde9358adae7b1fe0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove mdsal-artifacts to toplevel 29/75129/2
Robert Varga [Sat, 11 Aug 2018 08:01:48 +0000 (10:01 +0200)]
Move mdsal-artifacts to toplevel

As per best practices, move mdsal-artifacts to the root of our
project.

Change-Id: Ibb9880aa4875d706a04a3dd7c94e7796dd4ee1ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove mdsal-model-artifacts 28/75128/2
Robert Varga [Sat, 11 Aug 2018 07:59:53 +0000 (09:59 +0200)]
Remove mdsal-model-artifacts

Integrate the declarations into mdsal-artifacts and remove
mdsal-model-artifacts.

Change-Id: I4247d3ebe07cb9d5b689b70ec613782afcc06631
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove references to odlparent-artifacts 15/75115/1
Robert Varga [Sat, 11 Aug 2018 07:27:28 +0000 (09:27 +0200)]
Remove references to odlparent-artifacts

We are getting these already declared, no need to repeat
the declarations.

Change-Id: If2f3b97ce9e42554c518c3f9266b771184e9f978
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEliminate mdsal-model-artifact references 05/75105/4
Robert Varga [Fri, 10 Aug 2018 13:33:53 +0000 (15:33 +0200)]
Eliminate mdsal-model-artifact references

Use mdsal-artifacts instead, or no imports when not needed.

Change-Id: I13d1847c6b9c079e9572091d7988c847c87593bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoInclude mdsal-model-artifacts in mdsal-artifacts 03/75103/2
Robert Varga [Fri, 10 Aug 2018 13:01:39 +0000 (15:01 +0200)]
Include mdsal-model-artifacts in mdsal-artifacts

mdsal-model-artifacts is going away, include it in mdsal-artifacts
so users can be migrated.

Change-Id: I72d9be3b91c866168ebbf24a67483260cba29e15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix mockito deprecation warnings 99/75099/2
Robert Varga [Fri, 10 Aug 2018 11:18:02 +0000 (13:18 +0200)]
Fix mockito deprecation warnings

This fixes up all of the mockito warnings.

Change-Id: Ic0ca9b903c1c7cec001a4df0d2ca4d26b6a9db63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup API components 73/75073/5
Robert Varga [Thu, 9 Aug 2018 22:13:06 +0000 (00:13 +0200)]
Cleanup API components

- migrate to eclipse annotations where feasible
- import static utility methods checkState/requireNonNull

Change-Id: Ic5c36783695086d074cc5f9e3fec0a084c4f5356
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not use com.google.common.base.Predicate 59/74959/8
Robert Varga [Wed, 8 Aug 2018 22:09:18 +0000 (00:09 +0200)]
Do not use com.google.common.base.Predicate

We have Java 8, hence we can reduce the API surface.

Change-Id: I93e9b7e046d3a57ec397bda5b2756a250b1d1c21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate com.google.common.base.Supplier 58/74958/8
Robert Varga [Wed, 8 Aug 2018 22:00:27 +0000 (00:00 +0200)]
Migrate com.google.common.base.Supplier

Java 8 provides and enquivalent, migrate to it.

Change-Id: I93e23cd7548e2135aae9ea20a2734347282901d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate to java.util.function.Function 57/74957/9
Robert Varga [Wed, 8 Aug 2018 21:09:27 +0000 (23:09 +0200)]
Migrate to java.util.function.Function

Migrate to use of Java Function instead of Guava.

Change-Id: I11245ef7eec9df00141f5af0fc6e91f510e5b281
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMass-migrate to java.util.Optional 56/74956/9
Robert Varga [Wed, 8 Aug 2018 20:44:26 +0000 (22:44 +0200)]
Mass-migrate to java.util.Optional

This patch migrates from Guava's Optional to Java Optional, no questions
asked.

Change-Id: If91efb662af08434c584549d86ced61d9a72870a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBinding2 - Make ListAction extend Action 86/75086/3
Jie Han [Fri, 10 Aug 2018 03:27:38 +0000 (11:27 +0800)]
Binding2 - Make ListAction extend Action

Take advantage of this the action implementation adapter would be more
simple as only use one action adapter class to cover Action and ListAction.

Change-Id: If77a205516ea76172aa10aecaf7a63c6d06007a2
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBump odlparent/yangtools versions to 4.0.0/2.1.0-SNAPSHOT 54/74854/17
Robert Varga [Mon, 6 Aug 2018 13:25:02 +0000 (15:25 +0200)]
Bump odlparent/yangtools versions to 4.0.0/2.1.0-SNAPSHOT

This patch snapshot-integrates odlparent/yangtools until
so we can test downstreams more easily.

Change-Id: I0f85ce833bab648ebdfa1969fa016d4880bd8287
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFixup javassist class use 91/75091/2
Robert Varga [Fri, 10 Aug 2018 08:51:45 +0000 (10:51 +0200)]
Fixup javassist class use

We need to cast the returned class, as the Javassist API no longer
does so.

Change-Id: Ib19477ece9e76b735285df3b553ca9504579f8c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCleanup TypeProviderTest 39/74939/4
Robert Varga [Wed, 8 Aug 2018 09:04:29 +0000 (11:04 +0200)]
Cleanup TypeProviderTest

This cleans up the test, reusing SchemaContext, shaving ~2 seconds
from execution time.

Change-Id: If14906a0106e3e2b980a7cc18c24ec6c69b95b1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoActivate BUG-6135 test 40/74940/4
Robert Varga [Wed, 8 Aug 2018 09:10:46 +0000 (11:10 +0200)]
Activate BUG-6135 test

The underlying bug was fixed long time ago, but the corresponding
test was not activated. Fix that.

Change-Id: I97a31722a4cf5145f6f3c6a1ef3eba5f1f213d25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix enumeration leafref lookup 26/74626/13
Robert Varga [Mon, 30 Jul 2018 07:40:05 +0000 (09:40 +0200)]
Fix enumeration leafref lookup

Leafref lookup for straight uses of enumeration typedefs seems
to be failing. The code in question seems to rely on weird assumptions,
hence this patch places a FIXME and turns an alternative branch
into a fallback if the weird code fails to find a definition.

This also activates ietf-hardware models.

JIRA: MDSAL-352
Change-Id: I6d342c7418c1538ee928f85b33f8f58da8aca5c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump versions by x.(y+1).z for next dev cycle 08/75008/1
Anil Belur [Thu, 9 Aug 2018 14:16:56 +0000 (19:46 +0530)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: I81629ad260fcf40f4b1a054c6bbc7891b4546b2a
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 years agoBump versions by x.(y+1).z for next dev cycle 94/74994/1
Anil Belur [Thu, 9 Aug 2018 12:40:15 +0000 (18:10 +0530)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: I783427aabbf6d3e421f14912e4bdfd971064f7d7
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 years agoBump versions by x.(y+1).z for next dev cycle
Anil Belur [Thu, 9 Aug 2018 12:40:14 +0000 (18:10 +0530)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: Ib2fae0d3ecc0b7d95a51ffb43a006685825738a6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 years agoBump versions by x.(y+1).z for next dev cycle
Anil Belur [Thu, 9 Aug 2018 12:40:14 +0000 (18:10 +0530)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: Ib2fae0d3ecc0b7d95a51ffb43a006685825738a6
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 years agoAdd ietf-hardware model 13/74613/13
Robert Varga [Sat, 28 Jul 2018 17:48:51 +0000 (19:48 +0200)]
Add ietf-hardware model

This adds ietf-hardware model, updating previously-defined features.
Unfortunately, this does not wuite work yet, as MDSAL-352 needs to
be fixed.

Change-Id: I6ce999e20cca870e043e42da42f264d9242dc872
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate Architecture doc to RTD 10/74710/3
Thanh Ha [Wed, 1 Aug 2018 01:34:53 +0000 (21:34 -0400)]
Migrate Architecture doc to RTD

Change-Id: Ibed073a93ed1fc660a3b6ea36a608e76d9cc8b1e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoMigrate overview page to RTD 09/74709/2
Thanh Ha [Wed, 1 Aug 2018 01:18:19 +0000 (21:18 -0400)]
Migrate overview page to RTD

Change-Id: I04278ca050c73785929e38451cafb01609fe1601
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoMDSAL-320 Mapping type collisions between yang built-in uint* and int* 33/70633/5
Jie Han [Mon, 9 Apr 2018 01:06:25 +0000 (09:06 +0800)]
MDSAL-320 Mapping type collisions between yang built-in uint* and int*

- Use yang.commom.Uint* instead of java primitive types
  and fix up the correlative UT.

- Add Uint*RangeGenerators, temporarily hard code
  min and max values which would better be provided
  by yang.common.Uint*.

Change-Id: Ieaa04c36f4f8a148cdf9740cdf544283fbecc4a8
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoBump yangtools to 2.0.10
Robert Varga [Mon, 6 Aug 2018 15:44:25 +0000 (17:44 +0200)]
Bump yangtools to 2.0.10

This fixes an issue with actions, hence we need it in Fluorine.

Change-Id: I4b312e3e8ca2eafdd8a63781e78c0c019f4f7a4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.0.10 85/74885/4
Robert Varga [Mon, 6 Aug 2018 15:49:05 +0000 (17:49 +0200)]
Bump yangtools to 2.0.10

This fixes an issue with actions, hence we need it in Fluorine.

Change-Id: I557bc824fdbe3d957a36caada17428e10fd2ab24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAvoid depending on immutables.value at runtime 88/74888/1
Robert Varga [Mon, 6 Aug 2018 16:46:57 +0000 (18:46 +0200)]
Avoid depending on immutables.value at runtime

Change-Id: Ia257d8d30cf51333a30b1244f1cd56886a7569de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd DOMAction(Provider)Service facades 10/74210/19
Robert Varga [Wed, 18 Jul 2018 16:36:33 +0000 (18:36 +0200)]
Add DOMAction(Provider)Service facades

DOMRpcRouter needs to be able to route actions, i.e. implement
DOMActionService and DOMActionProviderService. Add facades
and implement them.

Change-Id: I9f66f3aee5ab5b63c2d0dcb3571831a7913a4650
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix raw type warnings and null safety errors 39/74839/1
Robert Varga [Mon, 6 Aug 2018 08:44:48 +0000 (10:44 +0200)]
Fix raw type warnings and null safety errors

This fixes up warnings.

Change-Id: Ib46adb83ea76cb0c2e62d9976e87d0d81b7275be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove MappingCheckedFuture 25/74825/2
Robert Varga [Sat, 4 Aug 2018 00:56:15 +0000 (02:56 +0200)]
Remove MappingCheckedFuture

This class has been moved to controller.

Change-Id: Ib98d2d7c05d16ce66431ef7cb311a571f75e09e0
JIRA: MDSAL-229
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDeprecate MappingCheckedFuture 24/74824/2
Robert Varga [Sat, 4 Aug 2018 00:55:20 +0000 (02:55 +0200)]
Deprecate MappingCheckedFuture

CheckedFutures are not used anywhere in MD-SAL, this class is moved
to Controller.

JIRA: MDSAL-229
Change-Id: I5ce538edca4c902cc38b8aad0457927563f2f8b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRevert 4cc8455a7232d6833ba88911ad5c45a77ddda3dc 23/74823/1
Robert Varga [Sat, 4 Aug 2018 00:48:39 +0000 (02:48 +0200)]
Revert 4cc8455a7232d6833ba88911ad5c45a77ddda3dc

String utilities are not useful, as the functionality is provided
by generated code -- stringValue() does it for all unions.

Change-Id: I5f93d17d89601ceaa91e176a5f119d5c08e75d5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGet rid of CheckedFutures 22/74822/2
Robert Varga [Sat, 4 Aug 2018 00:07:58 +0000 (02:07 +0200)]
Get rid of CheckedFutures

We do not really need them, so let's replace them where we can.

Change-Id: I06dd05d60018a814fb0610096aa8fe5709669980
JIRA: MDSAL-229
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd DOMActionRoutingTable and DOMActionRoutingTableEntry 74/74374/13
Jie Han [Tue, 24 Jul 2018 08:43:55 +0000 (16:43 +0800)]
Add DOMActionRoutingTable and DOMActionRoutingTableEntry

- Split out AbstractDOMRoutingTable and AbstractDOMRoutingTableEntry
- Provide Action routing table and entry

Change-Id: I6606b2b280344e52d58fb7b6fbec0e76231c2786
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoinc. BindingRuntimeContext details in "Schema .. is not available" 20/73320/6
Michael Vorburger [Thu, 21 Jun 2018 15:56:40 +0000 (17:56 +0200)]
inc. BindingRuntimeContext details in "Schema .. is not available"

but in a debug log, not the IllegalStateException, because it's huge.

JIRA: MDSAL-354
Change-Id: I65c236fc3b675e7cf231cc1d8cdc56fc36131281
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoAllow filtering transaction traces with a minimum
Michael Vorburger [Mon, 30 Jul 2018 13:25:05 +0000 (15:25 +0200)]
Allow filtering transaction traces with a minimum

This adds a "minimum open number of transactions" option to
trace:transactions and print out a clear final message indicating
whether any leaks were found or not.

JIRA: CONTROLLER-1765
Change-Id: Ie9f4ee263ed7defcb84c8b82dc8ec6f1f81ba07d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>