mdsal.git
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>
5 years agoTeach DynamicBindingAdapter about properties 93/73993/5
Robert Varga [Thu, 12 Jul 2018 21:48:55 +0000 (23:48 +0200)]
Teach DynamicBindingAdapter about properties

We needs to exert some control over how a we re-export services,
like ignoring re-exports and overriding properties.

Define the API contract in ServiceProperties and implement the two
features mentioned.

Change-Id: I37b4ab53517842cd21bf090ea83c8d11a527d49e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded .gitignore 73/74073/1
Robert Varga [Mon, 16 Jul 2018 15:25:09 +0000 (17:25 +0200)]
Remove unneeded .gitignore

This is not really needed and it keeps a bogus directory alive.

Change-Id: I9323d0c39636a6b13a02fff241fc35309d694423
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGenerate stringValue() in union types 50/74050/3
Robert Varga [Sun, 15 Jul 2018 22:00:53 +0000 (00:00 +0200)]
Generate stringValue() in union types

We need to vacate getValue() method name, as that may be specified
by user. Create a new stringValue() method, which additionally
contains a String rather a char[].

Change-Id: I43ff685f941c2eb1e05ad47858bebd2caf1db8bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoTeach binding-dom-codec about actions 95/73995/32
Robert Varga [Thu, 12 Jul 2018 17:32:20 +0000 (19:32 +0200)]
Teach binding-dom-codec about actions

Serialization of actions is slightly different than serialization
of RPCs or notifications. Teach BindingCodecContext how to deal
with them.

Change-Id: Id763d4034af394cf97d5497635f7188d8743fdeb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up service adapter object methods 28/74028/3
Robert Varga [Fri, 13 Jul 2018 16:48:36 +0000 (18:48 +0200)]
Speed up service adapter object methods

Rather than checking the method name twice inline co-locate signature
checks and result return.

Change-Id: Ic64ab8fb9089ef344e999430760155f406004cf6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify DOMOperation{Service,Implementation} 22/74022/7
Robert Varga [Fri, 13 Jul 2018 13:25:29 +0000 (15:25 +0200)]
Simplify DOMOperation{Service,Implementation}

In order to seamlessly bridge Binding->DOM->Binding invocation
without incurring thread safety hits we need to have a way
for the operation implementations to give us a handle.

We therefore should not be bridging the result through a callback,
but rather via a FluentFuture -- eliminate DOMOperationCallback
and make the former bridge methods the only API.

Change-Id: I3d1064b95ca65b44909b27bf028d050594ecbee7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd BindingLazyContainerNode 13/74013/13
Robert Varga [Fri, 13 Jul 2018 11:16:08 +0000 (13:16 +0200)]
Add BindingLazyContainerNode

In order to cleanly migrate LazySerializedContainerNode from
binding-dom-adapter to codec, we need a baseline in codec.api.

BindingLazyContainerNode provides this baseline interface,
and AbstractBindingLazyContainerNode provides a reference
implementation.

We also improve type safety by requiring ContainerNode instead
of a raw NormalizedNode.

Change-Id: Ic1b7c975c55fb0f06ce094a9d27b767d0a1f3b89
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded lambda cast 21/74021/1
Robert Varga [Fri, 13 Jul 2018 13:17:08 +0000 (15:17 +0200)]
Remove unneeded lambda cast

This removes an explicit dependency on Guava's Function.

Change-Id: I9f96ab7a2b9558df1e94e77b2565b013e2abf494
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoLog a message when we are falling back in QName search 15/74015/2
Robert Varga [Fri, 13 Jul 2018 12:40:35 +0000 (14:40 +0200)]
Log a message when we are falling back in QName search

Computing the QName should be mostly unneeded, log at debug
reasons for us having to fall back.

Change-Id: Ia0169665612fc2ae8eb31f0d59d93d3ed2261f3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up Action QName/QNameModule getter 14/74014/1
Robert Varga [Fri, 13 Jul 2018 12:30:34 +0000 (14:30 +0200)]
Speed up Action QName/QNameModule getter

Action has a QNAME field, hence we can access it directly.

Change-Id: Idcd81f6750cbdce5fd91572c4d29789eafaab2c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDeprecate yang.binding.RpcImplementation 09/74009/1
Robert Varga [Fri, 13 Jul 2018 10:21:08 +0000 (12:21 +0200)]
Deprecate yang.binding.RpcImplementation

This is an old tagging interface, which is not used anywhere,
probably since we have started running binding RPCs on top
of DOM infrastructure.

Mark it deprecated for now, we will either remove it if it is not
useful or un-deprecate and documented it if we find a use for it.

Change-Id: If4f69c3202113d521a0992b1478247e2614ae523
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoTag RPC input/output classes with RpcInput/RpcOutput 08/74008/1
Robert Varga [Fri, 13 Jul 2018 10:12:05 +0000 (12:12 +0200)]
Tag RPC input/output classes with RpcInput/RpcOutput

These interfaces are not just plain DataObjects, they have
a specialized meaning. This meaning was not useful when RpcInput
was a DataContainer, but with it being a DataObject, we can do
better.

Change-Id: Ieaa7e006fe73784486931c30a9b258f20fed4e79
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRpcInput/RpcOutput should be DataObjects 07/74007/1
Robert Varga [Fri, 13 Jul 2018 09:11:28 +0000 (11:11 +0200)]
RpcInput/RpcOutput should be DataObjects

RPC code already adds DataObject (instead of RpcInput) here, let's
make sure this is captured in the API contract.

Change-Id: Ibd62a28ecda1f598f34ccf085185475a3a16dd58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd ActionService and ActionProviderService 26/73926/18
Robert Varga [Wed, 11 Jul 2018 11:23:44 +0000 (13:23 +0200)]
Add ActionService and ActionProviderService

These are Binding API interfaces to register action implementations
and invoking actions.

Change-Id: I214198a7a03f5ad44f624afe987ce8e87c495df3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up dom-codec tests 94/73994/4
Robert Varga [Thu, 12 Jul 2018 22:34:33 +0000 (00:34 +0200)]
Speed up dom-codec tests

SchemaContext and BindingRuntimeContext are classloader-invariants,
so we can safely cache them for all tests -- an improvement from
9 to 6 seconds.

Change-Id: Ic0036b4a4c16b6ed7fdbad37b67daeb7833fc962
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoTeach BindingToNormalizedNodeCodec action paths 89/73989/4
Robert Varga [Thu, 12 Jul 2018 15:29:58 +0000 (17:29 +0200)]
Teach BindingToNormalizedNodeCodec action paths

This adds the first step in bridging DOM/Binding action invocation,
which is to acquire the SchemaPath of a particular action.

Change-Id: I8a6c07652a2b7b352ee2e77444b33ad2434011c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdapterFactory should be @NonNullByDefault and @Beta 98/73998/1
Robert Varga [Thu, 12 Jul 2018 23:38:27 +0000 (01:38 +0200)]
AdapterFactory should be @NonNullByDefault and @Beta

This is a new interface, subject to change, mark it as @Beta.
Also require implementations to deal will nullness.

Change-Id: Ida0c78513f324f5785a3ca636dfe0206fcca18a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up RPC prototype lookup 63/73963/7
Robert Varga [Wed, 11 Jul 2018 23:32:37 +0000 (01:32 +0200)]
Speed up RPC prototype lookup

Instead of mashing all the RPCs together, lookup the corresponding
module first and only look at that modules' RPCs.

Change-Id: I852931991b2fa5f64ef07ad5bae3808202a24b49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoExtract AdapterFactory interface and advertise as a service 83/73983/3
Tom Pantelis [Thu, 12 Jul 2018 14:53:27 +0000 (10:53 -0400)]
Extract AdapterFactory interface and advertise as a service

Change-Id: Ie17b4d26b4f334f763f82d4976f112155959f813
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoGenerate QNAME constant for actions 90/73990/1
Robert Varga [Thu, 12 Jul 2018 17:04:07 +0000 (19:04 +0200)]
Generate QNAME constant for actions

This field has been omitted, make sure we generate it to make
life easy for users.

Change-Id: I3e8c320cdd1d1c41c71b1e73bc467666204c5b8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAction should not be @NonNullByDefault 88/73988/1
Robert Varga [Thu, 12 Jul 2018 16:21:50 +0000 (18:21 +0200)]
Action should not be @NonNullByDefault

Since the codegen does not have the concept of annotation use,
hence we cannot use @NonNullByDefault and generate appropriate
annotations in generated code.

Change-Id: Iacb441208484609e7551ba55de37154a40061424
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRequire ContainerNode in input/output 64/73964/5
Robert Varga [Thu, 12 Jul 2018 06:38:15 +0000 (08:38 +0200)]
Require ContainerNode in input/output

Actions/RPCs really take a container, not anything else.

Change-Id: I3aa576bd65143b522d67941a12a5d6bb3483e37b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd action tests 82/73982/1
Robert Varga [Thu, 12 Jul 2018 14:56:51 +0000 (16:56 +0200)]
Add action tests

This adds a very basic test, which uncovered a failure to deal
with actions being multiply-inherited -- and fixes that issue.

Also a test model is added, so higher-layer components can be
tested.

Change-Id: I775341e2860e06f360fd4c6c6f6449e96ed92c64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSwitch DOMExtensibleService to require getExtensions() 38/73938/10
Robert Varga [Wed, 11 Jul 2018 13:25:29 +0000 (15:25 +0200)]
Switch DOMExtensibleService to require getExtensions()

With all implementations switched over to provide getExtensions(),
remove getSupportedExtensions().

Change-Id: I16d2a30a28bd565d91cacc32b49ed5cb1a8388bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd AbstractBindingLoadingAdapter 27/73927/7
Robert Varga [Wed, 11 Jul 2018 11:47:56 +0000 (13:47 +0200)]
Add AbstractBindingLoadingAdapter

There are at least two adapters which are using a weak cache
to track child adapters. Introduce AbstractBindingLoadingAdapter
to host the common functionality.

Change-Id: I31d7ecf21d3174a3c30b22a0ed6b5a031c041314
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSplit out AbstractBindingAdapter 25/73925/6
Robert Varga [Wed, 11 Jul 2018 10:53:25 +0000 (12:53 +0200)]
Split out AbstractBindingAdapter

Most adapters are sharing same fields over and over, split
this common functionality into an abstract superclass.

Change-Id: I9e98ec81865cc94ac3f9d2ce94ef4d10de656654
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoExpose IpAddress(NoZone) string utilities 51/73951/1
Robert Varga [Wed, 11 Jul 2018 18:43:04 +0000 (20:43 +0200)]
Expose IpAddress(NoZone) string utilities

This exposes string utilities for dealing with unions, returning
string values.

Change-Id: Id96e48204097036b1f3f49ec7bce552882058db5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump twirl-api to 1.3.15 44/73944/4
Robert Varga [Wed, 11 Jul 2018 14:34:12 +0000 (16:34 +0200)]
Bump twirl-api to 1.3.15

twirl-api goes to 1.3.15

Change-Id: Icb11c9a8af2e95f353ee2e0cf5077abefb5813a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoIntroduce DOMExtensibleService.getExtensions() 36/73936/4
Robert Varga [Wed, 11 Jul 2018 13:02:24 +0000 (15:02 +0200)]
Introduce DOMExtensibleService.getExtensions()

This adds a properly-typed getExtensions() method, so end users
can acquire extensions in a type-safe manner.

Change-Id: Idab635a970bf9f683d270461cb835c968eaf0755
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd binding ClusteredDataTreeChangeListener 61/73861/5
Tom Pantelis [Tue, 3 Jul 2018 15:48:13 +0000 (11:48 -0400)]
Add binding ClusteredDataTreeChangeListener

Change-Id: I2866ad037acbfed6fd315124ff3c29b4cd12583c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoAdd dom-parent 69/73669/6
Robert Varga [Mon, 2 Jul 2018 21:45:57 +0000 (23:45 +0200)]
Add dom-parent

Adding yangtools/mdsal declarations without running the plugin
is quite useful across our project and in downstreams.

Create dom-parent to hold exactly that.

Change-Id: I837600ff7ab0b432fd68d86784bab85da01a9ef5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGenerate checkers for union member types 13/73713/5
Robert Varga [Tue, 3 Jul 2018 16:28:20 +0000 (18:28 +0200)]
Generate checkers for union member types

Update AbstractTypeProvider to propagate restrictions and update
UnionTemplate to take advantage of common methods already present
in BuilderTemplate.

Change-Id: I7e34c3fcb3859db270647ca434ac02658e2b1316
JIRA: MDSAL-360
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd DOM and binding PingPongDataBroker 68/73668/4
Tom Pantelis [Mon, 2 Jul 2018 22:28:39 +0000 (18:28 -0400)]
Add DOM and binding PingPongDataBroker

Copied from the controller.

Change-Id: I34d22ce2ee1af43338451aa45a62cee43bffe688
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoAdd DOMOperationService and related interfaces 16/64516/19
Jie Han [Thu, 19 Oct 2017 09:31:34 +0000 (17:31 +0800)]
Add DOMOperationService and related interfaces

DOMOperationService supersedes DOMRpcService and unifies execution
of both RPCs and actions.

The design of this interface is inherently asynchronous, where the
system actually executing the action cannot be influenced by the
waiter blocking.

Change-Id: I8ff61f7b1d589cd3b7d32afba0cbd5042dbc5441
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPackage rfc8344 ietf-ip 94/73594/6
Robert Varga [Thu, 28 Jun 2018 22:43:13 +0000 (00:43 +0200)]
Package rfc8344 ietf-ip

This is the NMDA-compliant update, package it, but do not install
yet.

JIRA: MDSAL-358
Change-Id: Ie853d313fdf17facf1f6b306012b48f2ac642574
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPackage rfc8343 ietf-interfaces 93/73593/6
Robert Varga [Thu, 28 Jun 2018 22:34:29 +0000 (00:34 +0200)]
Package rfc8343 ietf-interfaces

This is the NMDA-compliant update, package it, but do not install
yet.

JIRA: MDSAL-358
Change-Id: I67a33a511b50922d20b30489cdcc1c0d084a81ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPackage rfc8342 ietf-datastores, ietf-origin 95/73595/4
Robert Varga [Fri, 29 Jun 2018 00:15:03 +0000 (02:15 +0200)]
Package rfc8342 ietf-datastores, ietf-origin

This is the core model of NMDA, defining how datastores are laid
out. Package it for the identities it provides, which will prove
useful in NMDA MD-SAL design.

JIRA: MDSAL-358
Change-Id: I5de5079495002bdff8677f750301aebf33dcde8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoClarify the event listener failure documentation 80/73880/3
Stephen Kitt [Tue, 10 Jul 2018 14:28:14 +0000 (16:28 +0200)]
Clarify the event listener failure documentation

Change-Id: Ic1f79e926e940a9d3a418b891d28d58603d2d31e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoTake advantage of FluentFutures 62/73862/2
Robert Varga [Mon, 9 Jul 2018 22:12:06 +0000 (00:12 +0200)]
Take advantage of FluentFutures

FluentFutures allow

Change-Id: I8c260174cf6f824827d8a6ff8df15c00d70c81e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize single-value range checks 43/73743/3
Robert Varga [Wed, 4 Jul 2018 13:54:06 +0000 (15:54 +0200)]
Optimize single-value range checks

For 'length 0' we generate a 'length >= 0 && length <= 0' check,
where we can simply use 'length == 0'. Fix that by teaching
the generator that min and max can be equal.

Change-Id: I1334bfcd590db59b18665f6609ee71c48e4646ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd Binding{Data,RpcFuture}Aware bridge interfaces 24/73824/6
Robert Varga [Mon, 9 Jul 2018 02:30:47 +0000 (04:30 +0200)]
Add Binding{Data,RpcFuture}Aware bridge interfaces

We need to be able to communicate the binding future between two
incarnations of LazyDOMRpcResultFuture: controller and mdsal.

Create a migration interface for this purpose, which exposes
the required method. Convert RpcServiceAdapter to use it instead
of relying on LazyDOMRpcResultFuture class.

The same goes for LazySerializedContainerNode, bridged via
BindingDataAware.

JIRA: SFC-222
Change-Id: Icf5df0a2cfb4ec24d404ac6d077c2755692b9d5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix ClusterSingletonServiceRegistration 53/73753/2
Robert Varga [Wed, 4 Jul 2018 14:48:50 +0000 (16:48 +0200)]
Fix ClusterSingletonServiceRegistration

This interface is intended to be a Registration, not an AutoCloseable,
and so is its only implementation.

Switch from AutoCloseable to ObjectRegistration, so users can take
advantage of the simplified API.

Change-Id: I47be557dce38f23e92d9744f019e327fa03c9321
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix GenericEntityOwnershipCandidateRegistration format 52/73752/2
Robert Varga [Wed, 4 Jul 2018 14:48:22 +0000 (16:48 +0200)]
Fix GenericEntityOwnershipCandidateRegistration format

The javadoc has wrong indent, fix that.

Change-Id: I00ff706bb5ab44d82af6d8755776435e7600284c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoEliminate synthetic access to invoke0() 22/73822/3
Robert Varga [Mon, 9 Jul 2018 02:19:37 +0000 (04:19 +0200)]
Eliminate synthetic access to invoke0()

This method is invoked from InvocationStrategy, hence it being
private generates a synthetic accessor method. Change method
visibility to package-private, eliminating this inefficiency.

Change-Id: I74ee9f8c729ba8d0892316fc405a0d99830b5f04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix xtend warnings 12/73712/1
Robert Varga [Tue, 3 Jul 2018 15:40:46 +0000 (17:40 +0200)]
Fix xtend warnings

xtend-maven-plugin-2.14.0 flushes out a few more warnings, fix them.

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