mdsal.git
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 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 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 agoRemove AbstractDOMRpcRoutingTableEntry.invokeRpc 24/74624/2
Jie Han [Mon, 30 Jul 2018 06:20:07 +0000 (14:20 +0800)]
Remove AbstractDOMRpcRoutingTableEntry.invokeRpc

Make routing entry not directly tied to invocation model and
add an inner static class RpcInvocation in DOMRpcRouter
to be used to invoke rpc with routing entries.

Change-Id: I55fa669bff8a18eb182a579b9dd636294d54e460
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoExpose Action(Provider)ServiceAdapter 28/74628/1
Robert Varga [Mon, 30 Jul 2018 08:44:33 +0000 (10:44 +0200)]
Expose Action(Provider)ServiceAdapter

Allow controller reuse of these adapters, as it is defining only
a shim on top of the baselines.

Change-Id: I49c9b5bda5e2d49c6fbbe839181b8a7e4d3f8d20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd iana-hardware and odl-mdsal-model-rfc8348 12/74612/3
Robert Varga [Sat, 28 Jul 2018 17:37:45 +0000 (19:37 +0200)]
Add iana-hardware and odl-mdsal-model-rfc8348

This starts the addition of {iana,ietf}-hardware models.

Change-Id: I586be5c181c2504ddb30c52888b38028850e79e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoClean up BaseTemplate 99/74599/3
Robert Varga [Fri, 27 Jul 2018 22:08:51 +0000 (00:08 +0200)]
Clean up BaseTemplate

Move logic dispatch methods into JavaFileTemplate, where we can
write the same thing in Java. Also makes a few methods static.

Change-Id: I3ac8c16b5378d0420dcb37c31265f06a5f7770a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRework inlined union generation 82/71682/8
Robert Varga [Fri, 27 Jul 2018 19:32:04 +0000 (21:32 +0200)]
Rework inlined union generation

Unions internal to a leaf union end up being incompletely generated,
as they lack stringValue(), hashCode(), equals() and do not correctly
bind to its enclosing builder -- leading to a generated code not being
compilable.

There are multiple issues here, all of which are addressed in this patch:
- hashCode/equals properties are created in the wrong place
- property return type is set to the builder, not its product
- union builder type is not set as a union
- builders for nested types are not correctly emitted
- Class/InterfaceTemplate use different logic to emit the inner classes

JIRA: MDSAL-320
Change-Id: I626fb4ac42ae6528bc98b809bc33756e8daa08b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoWire Action(Provider)Service into mountpoints 00/74600/2
Robert Varga [Fri, 27 Jul 2018 22:57:06 +0000 (00:57 +0200)]
Wire Action(Provider)Service into mountpoints

We need to wire the two adapters so they can be exposed to binding
world from DOM mountpoints.

Change-Id: I63e68b0c7ebfeae2a3fbba64b171196ee9c8e8ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd ActionProviderService adapter 65/74065/13
Robert Varga [Mon, 16 Jul 2018 12:41:01 +0000 (14:41 +0200)]
Add ActionProviderService adapter

A mostly straightforward implementation of ActionProviderService on top
of a DOMOperationProviderService.

Change-Id: I50b7f2d7b03059088be9ba277999c11bc085b385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify DOMOperationService API 96/74596/6
Robert Varga [Fri, 27 Jul 2018 20:53:31 +0000 (22:53 +0200)]
Simplify DOMOperationService API

With DOMRpcService API being cleaned up to use FluentFuture, there
is no need for us to duplicate the API. Introduce a simplistic
DOMActionService API and port all users.

JIRA: MDSAL-283
Change-Id: Id59cd3a8c910dbd79aac87cc6777e8f9d108a749
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd forwarding transactions to binding v1 89/74289/7
Stephen Kitt [Mon, 23 Jul 2018 10:57:25 +0000 (12:57 +0200)]
Add forwarding transactions to binding v1

This ports the forwarding transactions from controller.

Change-Id: I1c1ce1a340424e8fb3f86d7b92fa53d1d623de00
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPull in correct version of yangtools 98/74598/1
Robert Varga [Fri, 27 Jul 2018 21:21:06 +0000 (23:21 +0200)]
Pull in correct version of yangtools

These are new artifacts, they need bumped versions.

Change-Id: I170a9e99dfdaf63a4959dc3ce9f1c2caa8662da6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd forwarding transactions to binding v2 92/74292/7
Stephen Kitt [Fri, 20 Jul 2018 14:08:17 +0000 (16:08 +0200)]
Add forwarding transactions to binding v2

This ports the forwarding transactions from controller.
WriteTransaction::delete is removed to allow WriteTransaction to be
implemented outside its package (it conflicts with
AsyncWriteTransaction::delete).

Change-Id: I7b8c0454b788ef1c5857c7f546005dcd0b4c12a6
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoSimplify code using Java 8 features 88/74588/2
Stephen Kitt [Fri, 27 Jul 2018 15:26:11 +0000 (17:26 +0200)]
Simplify code using Java 8 features

* lambda expressions
* method references
* ThreadLocal::withInitial
* Comparator::comparing
* List::sort
* Map::computeIfAbsent

Change-Id: Ia1eee88a49fe3cb7f07bd90cdaa481ecd5c10003
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump yangtools to 2.0.9 75/74575/1
Robert Varga [Fri, 27 Jul 2018 12:10:13 +0000 (14:10 +0200)]
Bump yangtools to 2.0.9

This patch bumps yangtools to latest release.

Change-Id: I61e0f6549cf21b56bfc5b9c96860b5492c719311
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RFC8349 models 52/74552/15
Robert Varga [Thu, 26 Jul 2018 22:16:39 +0000 (00:16 +0200)]
Add RFC8349 models

This adds  ietf-routing, ietf-ipv4-unicast-routing and
ietf-ipv6-unicast-routing.

JIRA: MDSAL-332
Change-Id: I3bda7f14c617ed1af1b505d1f8511c0bfe31f8a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDetect and repair identity/grouping/typedef conflicts 54/74554/10
Robert Varga [Thu, 26 Jul 2018 23:17:26 +0000 (01:17 +0200)]
Detect and repair identity/grouping/typedef conflicts

We are mapping four distinct YANG namespaces onto a single Java
namespace, which is bound to cause conflicts.

Define a hierarchy of priorities (data, typedef, grouping, identity)
and rename types when a conflict is detected.

JIRA: MDSAL-332
Change-Id: I8f6e5987b2057fba5b7d1534c7688725547a146c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove TypeProviderImpl 60/74560/1
Robert Varga [Fri, 27 Jul 2018 09:25:14 +0000 (11:25 +0200)]
Remove TypeProviderImpl

This compatibility class is no longer used, remove it.

Change-Id: I408828da2ce1783203a55f98f43bbf4a24c0633a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix actions in keyed lists 55/74555/6
Robert Varga [Fri, 27 Jul 2018 01:10:33 +0000 (03:10 +0200)]
Fix actions in keyed lists

When we encounter a keyed list we end up generating an action for
the key, not for the list, which leads to a compilation error.

Change-Id: Iad9a5b449778704a3209d43011060f4a7942b9a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCorrect test name 53/74553/2
Robert Varga [Thu, 26 Jul 2018 23:20:52 +0000 (01:20 +0200)]
Correct test name

mdsal269 -> mdsal161

Change-Id: Idb9d59ad0e47a21aab63ff4f4df93b106693eeb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RFC8294 models 51/74551/4
Robert Varga [Thu, 26 Jul 2018 20:16:48 +0000 (22:16 +0200)]
Add RFC8294 models

This adds ietf-routing-types and iana-routing-types.

Change-Id: I5983462c00215c1cfaa1be7a6253b545cf9d5e8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not confuse nested type with available types 47/74547/2
Robert Varga [Thu, 26 Jul 2018 18:42:56 +0000 (20:42 +0200)]
Do not confuse nested type with available types

Nested types imply the same package, which is not acurate in this
context. Fix this by populating conflictingNames and mark it for
possible future improvement.

Change-Id: Icca087257eaf0c63b9a44204368dd48552da01a4
JIRA: MDSAL-365
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove deprecated methods from DOMDataTreeCommitCohort 73/74473/4
Tom Pantelis [Wed, 25 Jul 2018 18:39:57 +0000 (14:39 -0400)]
Remove deprecated methods from DOMDataTreeCommitCohort

Downstream users have been modified so we can remove the
deprecated default methods from DOMDataTreeCommitCohort.

Change-Id: If298a16298db1537abc0017ea75da387af6fe580
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoConvert CursorAware APIs to FluentFuture 78/74478/6
Tom Pantelis [Wed, 25 Jul 2018 22:25:21 +0000 (18:25 -0400)]
Convert CursorAware APIs to FluentFuture

Corresponding controller patch: https://git.opendaylight.org/gerrit/#/c/74478/

Change-Id: Ie7ff5318506c0d6dcb71fd5b2f205cce35c42593
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoFixup BuilderTemplate decomposition 27/74527/5
Robert Varga [Thu, 26 Jul 2018 09:34:33 +0000 (11:34 +0200)]
Fixup BuilderTemplate decomposition

This patch reworks BuilderTemplate to correctly represent its
generated class layout into GeneratedType hierarchy. This eliminates
a special-case hack in AbstractJavaGeneratedType and fixes overlap
between inherited and imported classes.

JIRA: MDSAL-365
Change-Id: I10affa8fc6e6b6447024744473e95ac1e600cd6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 3.1.3 99/74199/7
Stephen Kitt [Wed, 18 Jul 2018 16:06:40 +0000 (18:06 +0200)]
Bump to odlparent 3.1.3

Change-Id: I032f846fcd8fb037dde7931caa712b3a24eb41b7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAdd Types.builderTypeFor() 99/74499/1
Robert Varga [Thu, 26 Jul 2018 11:05:23 +0000 (13:05 +0200)]
Add Types.builderTypeFor()

This adds a utility accessor to define parameterized builders.

Change-Id: I0de131eefb4674859210703d46b6fb4a69e80f6e
JIRA: MDSAL-365
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBootstrap Sphinx documentation 27/74427/2
Thanh Ha [Wed, 25 Jul 2018 02:20:15 +0000 (22:20 -0400)]
Bootstrap Sphinx documentation

Change-Id: I29052dffa60eff9d32b94e4b43cb0888a45db393
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoUpdate internal structure to pass registrations 47/74447/2
Robert Varga [Tue, 24 Jul 2018 16:29:37 +0000 (18:29 +0200)]
Update internal structure to pass registrations

Within lusterSingletonServiceGroupImpl we need identity-based
lookup, which ObjectRegistration provides.

This is useful for keeping additional per-service state without
relying on user's equals() method.

JIRA: MDSAL-362
Change-Id: I01fd1f34a689a2c8f50ff7efc590f713a0212354
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix up build breakage 46/74446/1
Robert Varga [Wed, 25 Jul 2018 10:12:30 +0000 (12:12 +0200)]
Fix up build breakage

This fixes up a mismerge.

Change-Id: I2364a14b93b81531f3b85f2b0cac1e5830b388b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoChange DOMDataTreeCommitCohort to FluentFuture 15/74415/3
Tom Pantelis [Tue, 24 Jul 2018 19:00:05 +0000 (15:00 -0400)]
Change DOMDataTreeCommitCohort to FluentFuture

CheckedFuture is deprecated. Since this API is already in use
I added a new method that returns FluentFuture and deprecated and
defaulted the existing one. So no downstream breakage. I will
follow-up downstream to change to the new method.

Change-Id: Ia8b76e5daed5bae55f7666b627c317cbbfac97ee
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoChange DOM invokeRpc to FluentFuture 65/74365/5
Tom Pantelis [Tue, 24 Jul 2018 00:05:19 +0000 (20:05 -0400)]
Change DOM invokeRpc to FluentFuture

CheckedFuture is deprecated.

This breaks the controller - corresppnding patch is
https://git.opendaylight.org/gerrit/#/c/74366/

Change-Id: I08f396b872699512171a24732d9473ca96b89778
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoMove BindingMapping 61/74361/10
Robert Varga [Mon, 23 Jul 2018 22:13:00 +0000 (00:13 +0200)]
Move BindingMapping

This class is used only internally in md-sal, move it
mdsal-binding-spec-util, as it is not part of the spec (as viewed
by users).

This requires creating of RegexPatterns, which is a shared component
to ensure consistency.

Change-Id: If572bb97643f28354ba5c69f0addaf0ee02388d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove BindingReflections from yang-binding 48/74348/12
Robert Varga [Mon, 23 Jul 2018 15:41:19 +0000 (17:41 +0200)]
Remove BindingReflections from yang-binding

This is a utility reflection class, it should not be present in
yang-binding itself. It resides now in mdsal-binding-spec-util.

Change-Id: Ic5ecfb9f94f0199c4fe4be9f50a7f7f2977384da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEliminate Union char[] constructor 46/73946/17
Robert Varga [Wed, 11 Jul 2018 16:24:41 +0000 (18:24 +0200)]
Eliminate Union char[] constructor

This is a JMX-specific hack, which we no longer need to support,
remove it. This also removes getValue(), which could conflict with
user-specified type.

JIRA: MDSAL-364
Change-Id: If6e97c453beda1499722359080155720c2da1aaa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd PhysAddress support 62/74362/7
Robert Varga [Mon, 23 Jul 2018 23:11:36 +0000 (01:11 +0200)]
Add PhysAddress support

This adds converions required for efficient PhysAddress support.

Change-Id: Ia07e07361fc0fdea3cc2a2b96e65643d60aef003
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize Ip{Address,Prefix}Builder 49/74349/3
Robert Varga [Mon, 23 Jul 2018 16:39:15 +0000 (18:39 +0200)]
Optimize Ip{Address,Prefix}Builder

These builders are heavily used and are overly defensive, to the point
where they do not follow YANG specification -- which clearly states that
members need to be tried in the order of declaration.

This means there is no ambiguity between ipv4 and ipv6 and if IPv4
succeeds, that's what we'll use. This allows us to reduce number
of regex matches performed, which retaining correctness.

Also remove ugly duplication of patterns are pick them up from the pattern
constants in the class.

Change-Id: Ia35d040881e721375b240dd5848ad9501ae2e192
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove BindingReflections to mdsal-binding-spec-util 47/74347/3
Robert Varga [Mon, 23 Jul 2018 15:25:34 +0000 (17:25 +0200)]
Move BindingReflections to mdsal-binding-spec-util

This is the first stage of movement: create a copy of the class
and migrate the test suite.

Change-Id: I0d229ccd4277b917c99414dd8ba698f497629ec3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove StringValueObjectFactory to mdsal-binding-spec-util 28/74328/11
Robert Varga [Mon, 23 Jul 2018 11:18:50 +0000 (13:18 +0200)]
Move StringValueObjectFactory to mdsal-binding-spec-util

This class does not need to reside in yang-binding, move it out
into mdsal-binding-spec-util.

Change-Id: Ib2f178e579ab814cb8c8977d5740d6077d5fa9e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove DataObjectReadingUtil to mdsal-binding-spec-util 34/74334/6
Robert Varga [Mon, 23 Jul 2018 12:32:52 +0000 (14:32 +0200)]
Move DataObjectReadingUtil to mdsal-binding-spec-util

This moves access utility from yang-binding to mdsal-binding-spec-util,
as it has no place in yang-binding.

Change-Id: Ieda67f69da45183dfcd75d7828cc244839b25cde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove NotificationListenerInvoker to mdsal-dom-adapter 32/74332/5
Robert Varga [Mon, 23 Jul 2018 12:16:39 +0000 (14:16 +0200)]
Move NotificationListenerInvoker to mdsal-dom-adapter

These classes should not be in yang-binding, as their concern lies
in runtime API realization. Move them to mdsal-dom-adapter.

Change-Id: I5fd470796e9251f6c69a8ca3568bb17ddc0ce5a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove RpcServiceInvoker to mdsal-dom-adapter 27/74327/7
Robert Varga [Mon, 23 Jul 2018 10:43:42 +0000 (12:43 +0200)]
Move RpcServiceInvoker to mdsal-dom-adapter

These classes should not be in yang-binding, as their concern lies
in runtime API realization. Move them to mdsal-dom-adapter.

Change-Id: I5640c2f169b6569dcdbc306580768751791fd415
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd NotificationListenerInvoker bridge class 31/74331/1
Robert Varga [Mon, 23 Jul 2018 12:13:16 +0000 (14:13 +0200)]
Add NotificationListenerInvoker bridge class

This adds a migration bridge for controller, so we can safely
move NotificationListenerInvoker from yang-binding.

Change-Id: I0ec360a324fb9cb44a886efb99b85916554b437e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd RpcServiceInvoker bridge class 26/74326/2
Robert Varga [Mon, 23 Jul 2018 10:35:15 +0000 (12:35 +0200)]
Add RpcServiceInvoker bridge class

This adds a migration bridge for controller, so we can safely
move RpcServiceInvoker from yang-binding.

Change-Id: I6b191fc8cb331d6ceff975e9d5b401b059d02709
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPort WriteTransaction constants from controller 94/74294/1
Stephen Kitt [Fri, 20 Jul 2018 15:47:20 +0000 (17:47 +0200)]
Port WriteTransaction constants from controller

This adds the CREATE_MISSING_PARENTS and FAIL_ON_MISSING_PARENTS
constants present in controller’s implementation of WriteTransaction.
(They help make code easier to read.)

Change-Id: I7228734cb101476d2a86b0a3ebe7940880088c54
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoRemove odl-mdsal-models 44/74144/12
Robert Varga [Tue, 17 Jul 2018 18:46:38 +0000 (20:46 +0200)]
Remove odl-mdsal-models

All models have been split up into component odl-mdsal-model-*
features, remove odl-mdsal so it does not get misused for
'give me the world', which we cannot be achieved from here anyway.

JIRA: MDSAL-363
Change-Id: I1491790ce75de9950b3578a748277c03db23a333
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove odl-mdsal-models from features-mdsal 68/74268/2
Robert Varga [Fri, 20 Jul 2018 08:13:25 +0000 (10:13 +0200)]
Remove odl-mdsal-models from features-mdsal

First step in removing odl-mdsal-models, remove it from our
master feature repository.

JIRA: MDSAL-363
Change-Id: I33ee69a10f0cb728f54e85bc0a838ffe1a1c55b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMove DOMRpcRouter implementation methods 09/74209/8
Robert Varga [Wed, 18 Jul 2018 16:13:09 +0000 (18:13 +0200)]
Move DOMRpcRouter implementation methods

This moves actual implementations of DOMRpc*Service into facades,
which allows us to properly support multiple interface, without
leaking them through DOMRpcRouter itself.

JIRA: MDSAL-283
Change-Id: Ie7d2515c35e160ff4827cd999d962bd961b5ad9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUpdate *DataBrokerTest* classes from controller 55/74255/1
Tom Pantelis [Thu, 19 Jul 2018 19:40:17 +0000 (15:40 -0400)]
Update *DataBrokerTest* classes from controller

The equivalent classes in the controller have diverged since
they were first copied so update them in mdsal.

Change-Id: I28af68814949a40dce36233fda41e74c7c5496b8
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoAllow DataObjectModification to address grouping nodes 68/72368/43
Robert Varga [Mon, 28 May 2018 15:37:21 +0000 (17:37 +0200)]
Allow DataObjectModification to address grouping nodes

This adds the API and implementation required to address child
nodes introduced in cases by the use of a grouping.

Change-Id: I70871dcaa3441fbef81dfb15bfd965d133aa0894
JIRA: MDSAL-342
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoConvert binding read to java.util.Optional 38/74238/2
Tom Pantelis [Thu, 19 Jul 2018 13:32:12 +0000 (09:32 -0400)]
Convert binding read to java.util.Optional

Change-Id: I37e56ae9ea86d7742b0510453163e63ff8f660df
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoChange DOM read/exists to FluentFuture 27/74127/9
Tom Pantelis [Tue, 17 Jul 2018 14:59:02 +0000 (10:59 -0400)]
Change DOM read/exists to FluentFuture

CheckedFuture is deprecated. The only user(s) is in controller -
companion patch is https://git.opendaylight.org/gerrit/#/c/74128/.
This breaks the controller so either we merge them together or
coordinate one after the other with a (hopefully) short breakage window.

Change-Id: If69281a6a6710974c5625b2e09a09df611409129
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove DOMRpcRoutingTable.invoke() 08/74208/2
Robert Varga [Wed, 18 Jul 2018 15:37:41 +0000 (17:37 +0200)]
Remove DOMRpcRoutingTable.invoke()

Moving this method makes DOMRpcRoutingTable blissfully ignorant
of the invocation model, simplifying code flow and bringing us one
step towards reuse.

JIRA: MDSAL-283
Change-Id: I207362f00b7051f92f5303ef923eb6fe767f6130
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoShutdown DOMRpcRouter 07/74207/2
Robert Varga [Wed, 18 Jul 2018 16:26:00 +0000 (18:26 +0200)]
Shutdown DOMRpcRouter

Blueprint did not call close(), which means we were leaking threads.

JIRA: MDSAL-283
Change-Id: I96f2e58bf57645ecdba3b9b7fa05b2b86ce78c9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoHarden DOMRpcRouter shutdown 88/74188/2
Robert Varga [Wed, 18 Jul 2018 13:17:09 +0000 (15:17 +0200)]
Harden DOMRpcRouter shutdown

Use AbstractRegistration to get idempotenence. Also remove listener
register prior to shutting down the listener notifier.

JIRA: MDSAL-283
Change-Id: I948510a080c2540d309f81fa8a42591341db595e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDisallow DOMOperationInstance wildcards 87/74187/2
Robert Varga [Wed, 18 Jul 2018 14:29:16 +0000 (16:29 +0200)]
Disallow DOMOperationInstance wildcards

Wildcards will complicate service lookup, let's postpone that to
when we actually need the capability.

JIRA: MDSAL-283
Change-Id: I445fd150424f41d242d7dca6875fe012e3c7891e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMake Rpc/Action extend DOMOperationImplementation 78/74178/4
Robert Varga [Wed, 18 Jul 2018 13:10:47 +0000 (15:10 +0200)]
Make Rpc/Action extend DOMOperationImplementation

This is an API omission preventing implementations from working
with AvailabilityExtension.

Change-Id: Iad2efc6aa5b4fb9c4ef4065c8f81d8eaf312d369
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not retain reference to DOMRpcRouter in registrations 98/74098/4
Robert Varga [Mon, 16 Jul 2018 22:58:50 +0000 (00:58 +0200)]
Do not retain reference to DOMRpcRouter in registrations

Once we have called removeListener() we will not interact with
the DOMRpcRouter, hence there is no need to retain a reference
to it.

Change-Id: I788646e91370ed15e246a95ac5585fbc4c897ac9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit out odl-mdsal-model-rfc7224 41/74141/4
Robert Varga [Tue, 17 Jul 2018 17:39:01 +0000 (19:39 +0200)]
Split out odl-mdsal-model-rfc7224

This is the feature to host iana-if-type, finishing move of
all odl-mdsal-models bundles into smaller chunks.

JIRA: MDSAL-363
Change-Id: Icfb3a924c11936ed9e288ee46a616217f6a5640f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCorrect RFC7227/RFC7277 typo 40/74140/4
Robert Varga [Tue, 17 Jul 2018 17:24:48 +0000 (19:24 +0200)]
Correct RFC7227/RFC7277 typo

Using 7227 is a typo, correct it before someone notices.

Change-Id: I19c46039f66a51378dfef6b2a13234aed3ff2e78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit out odl-mdsal-model-draft-ietf-netmod-iana-afn-safi-00 38/74138/2
Robert Varga [Tue, 17 Jul 2018 17:09:34 +0000 (19:09 +0200)]
Split out odl-mdsal-model-draft-ietf-netmod-iana-afn-safi-00

This feature hosts the iana-afn-safi@2013-07-04.yang model,
which is ot going to go anywhere as the document has explired.

Change-Id: Icc4077c0d096ca2a2eb01ad7d9809377919d787d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove ancient iana-if-type 33/74133/2
Robert Varga [Tue, 17 Jul 2018 16:13:47 +0000 (18:13 +0200)]
Remove ancient iana-if-type

This artifact is not used anywhere, remove it to prevent confusion.

Change-Id: I4b5cb2323d0ac987fd62507a4cbafdba3c085427
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit out odl-mdsal-model-draft-ietf-lisp-lcaf-10 36/74136/2
Robert Varga [Tue, 17 Jul 2018 16:57:26 +0000 (18:57 +0200)]
Split out odl-mdsal-model-draft-ietf-lisp-lcaf-10

This splits out ietf-lisp-address-types into a separate feature.

Change-Id: I3a0138827087ee98125f8661108322b4cb6bd5e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit out odl-l2-types 22/74122/2
Robert Varga [Tue, 17 Jul 2018 14:19:45 +0000 (16:19 +0200)]
Split out odl-l2-types

OpenDaylight L2 types are an independent model, allow it to be
consumed as such.

Change-Id: I254a0b1641ee38705e9addc0fd1709654546c9f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit out odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal 07/74107/2
Robert Varga [Tue, 17 Jul 2018 09:51:50 +0000 (11:51 +0200)]
Split out odl-mdsal-model-draft-clemm-netmod-yang-network-topo-01-minimal

Most of our users are interested in the base topology model only, there
is no need to burden them with other models.

Change-Id: I506d66f8ae7888bd36d364a07a944ec80bb81d7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRework model feature packaging 74/74074/6
Robert Varga [Mon, 16 Jul 2018 15:38:58 +0000 (17:38 +0200)]
Rework model feature packaging

This patch breaks the monolithic odl-mdsal-models into multiple
features, one for each IETF document. This allows us to load only
models specific for a particular use case and documentes where
the modules where imported from.

Change-Id: I4c2fb025c719615cf67f4b0e67f40c1854cd6fb4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEliminate unneeded constant 97/74097/2
Robert Varga [Mon, 16 Jul 2018 22:51:58 +0000 (00:51 +0200)]
Eliminate unneeded constant

Empty YangInstanceIdentifier is available as a constant, use that
instead of building our own.

Change-Id: Ic325c441bc3712e4f65e7b7419f4854fe1bfb733
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoChange binding read to FluentFuture 89/74089/2
Tom Pantelis [Mon, 16 Jul 2018 21:05:01 +0000 (17:05 -0400)]
Change binding read to FluentFuture

CheckedFuture is deprecated. There's no users of this
API yet so safe to change.

Change-Id: Id79fccc6f987465060e0eb45071db47f33435c46
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoAdd ActionService adapter 00/73900/55
Robert Varga [Fri, 13 Jul 2018 20:49:53 +0000 (22:49 +0200)]
Add ActionService adapter

A mostly straightforward implementation of ActionService on top
of a DOMOperationService.

Change-Id: Ibcfd72f3446b5cad0a3b6ced4852a8e77fd7e652
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>