yangtools.git
3 months agoFix actions in keyed lists
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>
3 months agoDo not confuse nested type with available types
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>
3 months agoFixup BuilderTemplate decomposition
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>
3 months agoBump to odlparent 3.1.3
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>
3 months agoChange DOM invokeRpc to FluentFuture
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>
3 months agoMove BindingMapping
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>
3 months agoRemove BindingReflections from yang-binding
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>
3 months agoEliminate Union char[] constructor
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>
3 months agoMove BindingReflections to mdsal-binding-spec-util
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>
3 months agoMove StringValueObjectFactory to mdsal-binding-spec-util
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>
3 months agoMove DataObjectReadingUtil to mdsal-binding-spec-util
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>
3 months agoMove NotificationListenerInvoker to mdsal-dom-adapter
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>
3 months agoMove RpcServiceInvoker to mdsal-dom-adapter
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>
3 months agoAdd NotificationListenerInvoker bridge class
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>
3 months agoAdd RpcServiceInvoker bridge class
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>
3 months agoConvert binding read to java.util.Optional
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>
3 months agoGenerate stringValue() in union types
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>
3 months agoTeach binding-dom-codec about actions
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>
3 months agoAdd BindingLazyContainerNode
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>
3 months agoLog a message when we are falling back in QName search
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>
3 months agoSpeed up Action QName/QNameModule getter
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>
3 months agoDeprecate yang.binding.RpcImplementation
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>
3 months agoRpcInput/RpcOutput should be DataObjects
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>
3 months agoSpeed up dom-codec tests
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>
3 months agoSpeed up RPC prototype lookup
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>
3 months agoAction should not be @NonNullByDefault
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>
3 months agoAdd action tests
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>
3 months agoAdd dom-parent
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>
3 months agoGenerate checkers for union member types
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>
3 months agoOptimize single-value range checks
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>
3 months agoFix xtend warnings
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>
3 months agoAllow ipv4-address-no-zone to be parsed
Robert Varga [Thu, 7 Jun 2018 11:50:35 +0000 (13:50 +0200)]
Allow ipv4-address-no-zone to be parsed

Add methods which allow no-zone addresses to be parsed equally
efficiently as ip addresses.

JIRA: BGPCEP-790
Change-Id: Ic119430e3398777addeec2b41ca8e83eaead363b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove maven site configuration
Robert Varga [Mon, 2 Jul 2018 22:16:40 +0000 (00:16 +0200)]
Remove maven site configuration

We are not using maven site, remove its leftovers.

Change-Id: I3321b1564516c9097a9790e9d11bf9edcf619aa5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefactor GeneratorJavaFile
Robert Varga [Wed, 27 Jun 2018 17:06:08 +0000 (19:06 +0200)]
Refactor GeneratorJavaFile

This patch reworks GeneratorJavaFile so that it performs two-step
code generation. This allows us to understand what files are going
to be generated before actually generating them.

For bonus points we have removed a dependency on the ancient
plexus-container-default and made mdsal-binding-java-api-generator
maven-agnostic.

JIRA: MDSAL-350
Change-Id: Ie29865d93cce751a5ca265105a24a24049f4ccdb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump to yangtools 2.0.7
Stephen Kitt [Tue, 26 Jun 2018 16:01:36 +0000 (18:01 +0200)]
Bump to yangtools 2.0.7

Change-Id: Ibf88882e8f5611444e952a73fc2bbcf7e2e1709a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
3 months agoGenerate code for action statements
Robert Varga [Wed, 21 Mar 2018 02:57:21 +0000 (03:57 +0100)]
Generate code for action statements

RFC7950 defines actions, which are similar to RPCs in that they
can be invoked. This patch teaches binding codegen to generate
the interfaces for them.

JIRA: MDSAL-300
Change-Id: I8c2f9566e25948c8604d76ce52d86304b0f8be03
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoOverride xtend-maven-plugin dependencies
Robert Varga [Thu, 28 Jun 2018 17:23:21 +0000 (19:23 +0200)]
Override xtend-maven-plugin dependencies

org.eclipse.equinox.common-3.10.0 seems to be required for some
reason.

Change-Id: I556c934db07148f05f701d1c541fd1f1bfc34219
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEnforce patterns in supertype constructors
Robert Varga [Mon, 18 Jun 2018 12:02:15 +0000 (14:02 +0200)]
Enforce patterns in supertype constructors

We have failed to enforce patterns when being constructed from
a supertype, which would allow creating invalid instances.

Fix that by enforcing patterns consistently.

JIRA: MDSAL-351
Change-Id: I16f4485ec8b6535c7094e3aac018cb6fbb0e5570
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCentralize code generation a bit more
Robert Varga [Wed, 27 Jun 2018 18:33:19 +0000 (20:33 +0200)]
Centralize code generation a bit more

BaseCompilationTest should be used as the baseline for creating
tests which create source code. Refactor it a bit, to allow for
wider reuse.

Change-Id: I69a9d779222439813efb70b25cf88e5b03ac4f7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse String.replace(char, char) instead of splitting
Robert Varga [Wed, 27 Jun 2018 17:28:14 +0000 (19:28 +0200)]
Use String.replace(char, char) instead of splitting

This code really wants to do a simple character substitution,
which has an elegant solution. This means we do not end up
compiling the replacement pattern and use a very efficient method.

Change-Id: I8430ecf9216ae49c3fcc58c24c0315f6510204fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoHide parameterized Types constants
Robert Varga [Mon, 25 Jun 2018 16:24:32 +0000 (18:24 +0200)]
Hide parameterized Types constants

These constants should be accessed via their specializing static
factory methods. Hide them and fix the single offending caller.

Change-Id: Ia0b63a4154b5e1dc86e73645b7935cb34d9c78cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix case-related augment test
Robert Varga [Wed, 27 Jun 2018 09:50:05 +0000 (11:50 +0200)]
Fix case-related augment test

The test model used in this test is not valid, as it introduces
same container/leaf as both an augmentation of the list and as an
augmentation of that list's choice, leading to the leaf/container
being defined twice in the list's data tree hierarchy.

Change-Id: I582b53ea942f71141e98e14aa0f23878af339b86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump odlparent to 3.1.2
Stephen Kitt [Thu, 31 May 2018 07:06:27 +0000 (09:06 +0200)]
Bump odlparent to 3.1.2

Change-Id: Ia9a8df509d9b1b50eb1f93b9c5f0210c1f2828e2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
3 months agoAdd Action and RpcOutput interfaces
Robert Varga [Mon, 18 Jun 2018 20:21:56 +0000 (22:21 +0200)]
Add Action and RpcOutput interfaces

This patch adds the binding interface prototype for actions.
Codegen will attach to specializations of this interface for
concrete generated types.

JIRA: MDSAL-300
Change-Id: I2fc97df50033b0d2d8f96b8281a82999a6b62869
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix root choice targeting
Robert Varga [Mon, 28 May 2018 23:16:38 +0000 (01:16 +0200)]
Fix root choice targeting

InstanceIdentifier codec infrastructure cannot deal with choices
which have only grouping children due to the inability to properly
find the choice schema.

Use the case-assisted addressing mode to allow these items to be
properly resolved.

JIRA: MDSAL-45
Change-Id: I61f88e0baa854abc8286ca5c57edd572638ca63b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoTeach mdsal-binding-dom-codec about cases
Robert Varga [Tue, 29 May 2018 23:45:08 +0000 (01:45 +0200)]
Teach mdsal-binding-dom-codec about cases

With InstanceIdentifier.Item updates we can now carry unambiguous
identifier of grouping-held classes, which needs to be handled
at codec level: case-bearing PathArguments need to be recognized
and produced to ensure grouping items are correctly addressed.

JIRA: MDSAL-45
Change-Id: If6fa332db2f3c9d033ba2a1fb2c9678dc1e94276
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoinclude YANG module QName in "Schema for %s is not available." error
Michael Vorburger [Thu, 21 Jun 2018 14:22:15 +0000 (16:22 +0200)]
include YANG module QName in "Schema for %s is not available." error

JIRA: MDSAL-354
Change-Id: I305299ffb3a40036dd72b858ef955ffcf45f6775
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 months agoValidate augmentation binding class
Robert Varga [Wed, 13 Jun 2018 14:34:39 +0000 (16:34 +0200)]
Validate augmentation binding class

LazyDataObject's DataObject.augmentation(Class) implementation
needs to re-validate if the augmentation we are about to decode
matches user-requested augmentation.

This is needed to ensure that we do not return shape-equivalent
augmentation, such as when the same augmentation is applied to
multiple instantiations of the same grouping. In such a case
type-safety indicates that the grouping can have either of the
augmentations, yet in reality its validity depends on
instantiation.

JIRA: MDSAL-328
Change-Id: I57dd70ddead65fc7f61c72b58da4ef6d26e739f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAdvertise ClassLoadingStrategy service
Tom Pantelis [Thu, 14 Jun 2018 21:47:11 +0000 (17:47 -0400)]
Advertise ClassLoadingStrategy service

The ConfigManagerActivator advertises its ModuleInfoBackedContext
as the ClassLoadingStrategy service but the CSS features are being
removed. Therefore advertise mdsal's ModuleInfoBackedContext instance.

Change-Id: Ie03a25db940d3ae17ae5250cafe9fcc32a5baac7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoReference java.lang.Override through importedName
Robert Varga [Thu, 7 Jun 2018 16:29:30 +0000 (18:29 +0200)]
Reference java.lang.Override through importedName

This looks a bit weird, but we must not assume Override is not
shadowed in our class or really in package, otherwise we could
end up with code which does not compile.

JIRA: MDSAL-349
Change-Id: I701daea54fa7a234d75a8fa694a5bd46360b827e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoPopulate enumeration conflicting names
Robert Varga [Thu, 7 Jun 2018 11:00:51 +0000 (13:00 +0200)]
Populate enumeration conflicting names

Pairs need to be accounted as conflicting names to prevent clashes
with classes used by the enumeration template.

JIRA: MDSAL-348
Change-Id: I22e5c72ec944027e20858813c98fed21553d92bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRPC input/output are always present
Robert Varga [Tue, 5 Jun 2018 09:59:13 +0000 (11:59 +0200)]
RPC input/output are always present

We are always generating input/output and hence we need to properly
bridge the methods. This simplifies the code a bit.

Change-Id: If19b7841692582179664debfba9dfeeb51401d51
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump yangtools to 2.0.5
Robert Varga [Mon, 28 May 2018 10:13:06 +0000 (12:13 +0200)]
Bump yangtools to 2.0.5

Change-Id: Ia6f422cee5b5f9b363dac9d0645076d576d34963
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRename Augmentable.getAugmentation() to augmentation()
Robert Varga [Mon, 23 Apr 2018 23:00:16 +0000 (01:00 +0200)]
Rename Augmentable.getAugmentation() to augmentation()

This patch dodges the conflict with leaves named 'augmentation',
so that models containing them can pass code generation. Also tag
it as returning @Nullable, as that is the API contract.

Change-Id: Iafd2904b570f3aded3e8cbd934e9db5f19c03b26
JIRA: MDSAL-2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRename Identifiable.getKey() to key()
Robert Varga [Mon, 23 Apr 2018 18:21:40 +0000 (20:21 +0200)]
Rename Identifiable.getKey() to key()

Identifiable's getKey() method has a tendency to conflict with models
which define a leaf named 'key'. Rename the method so it does not
conflict with generated getters and unify its definition in
BindingMapping. Also tag it as returning @NonNull, as that is the API
contract.

Since 'key' is a valid property, Builders cannot use a 'setKey' method,
hence it is renamed to 'withKey'.

JIRA: MDSAL-2
Change-Id: Idda720c31fd5519ab21a1722ab5072da5b18fcc9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoTeach InstanceIdentifier about case-based addressing
Robert Varga [Wed, 23 May 2018 20:24:43 +0000 (22:24 +0200)]
Teach InstanceIdentifier about case-based addressing

InstanceIdentifier needs to be able to address items which are
coming from a grouping referenced by uses immediately within
a case statement.

The reason for this is that the items in the grouping do not have
their namespace capture class generated for the instantiation,
hence they are not addressable via the usual ChildOf<> relationship.

With the advent of ChoiceIn<>, we can use the classes generated
for case statements to act as a namespace anchor and pivot to
the grouping member. This patch adds the necessary methods.

JIRA: MDSAL-45
Change-Id: I1cc626e391b450e5b32c505ecf6021c39f55532d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAdd more information to BindingReflections
Robert Varga [Tue, 29 May 2018 12:08:57 +0000 (14:08 +0200)]
Add more information to BindingReflections

Preconditions should provide enough context for diagnostics,
add it.

Change-Id: If6b365d64e6c4a0505aeee5b6347beddd07b5172
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse new ClassLoaderUtils methods
Robert Varga [Tue, 29 May 2018 09:56:21 +0000 (11:56 +0200)]
Use new ClassLoaderUtils methods

There is no need to cast the lambdas with new methods, use those
instead of withClassLoader().

Change-Id: I4eadce6867fe2df7c9732ec74b2dcdcd04ec0eaa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDeprecate InstanceIdentifier.(Identifiable)Item constructors
Robert Varga [Fri, 25 May 2018 12:00:42 +0000 (14:00 +0200)]
Deprecate InstanceIdentifier.(Identifiable)Item constructors

We will need dedicated subclasses to capture the case type and we
do not want to allow external subclasses -- hence we need to deprecate
public constructors.

JIRA: MDSAL-45
Change-Id: If717c9ae507bba9dccec96a27fedd5ca9dc5ea3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoLoosen leader method visibility
Robert Varga [Mon, 28 May 2018 23:08:15 +0000 (01:08 +0200)]
Loosen leader method visibility

createData*Context() methods are called from a nested subclass, hence
access to them generates synthetic accessors. Loosen visibility to
eliminate those accessors.

Change-Id: I558a4b13d4967c7a01ac1bbcfd628df140f90000
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove InstanceIdentifier.builder(InstanceIdentifier)
Robert Varga [Mon, 28 May 2018 13:38:39 +0000 (15:38 +0200)]
Remove InstanceIdentifier.builder(InstanceIdentifier)

This method has been deprecated for 4+ years, remove it.

Change-Id: I93e6ec23c50a8492ac8a5bde97b794fac5caa53f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove InstanceIdentifierBuilder.toInstance()
Robert Varga [Fri, 25 May 2018 11:40:55 +0000 (13:40 +0200)]
Remove InstanceIdentifierBuilder.toInstance()

This method has been deprecated for 3+ years, remove it.

Change-Id: I4de9b386c2f266cebc8114fdfbbc1e662542b60d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoImprove InstanceIdentifier documentation
Robert Varga [Fri, 25 May 2018 11:47:10 +0000 (13:47 +0200)]
Improve InstanceIdentifier documentation

This adds a few javadocs to clarify what is going on.

Change-Id: I9983e7d6715fc06c7d18a61fd74a0660c8d2b4ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix BindingReflections with no revisions
Robert Varga [Mon, 28 May 2018 20:48:28 +0000 (22:48 +0200)]
Fix BindingReflections with no revisions

When a module does not have a revision statement, we end up using
.norev instead of the usual .revXXYYZZ package component. This means
that valid Binding classes are not recognized by
getModelRootPackageName(), throwing IllegalArgumentException.

Fix this by updating matcher pattern to account for .norev being
a possibility.

Change-Id: Ifeede5cd2371a73eca7b189af3f3ac95db4acb9d
JIRA: MDSAL-346
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix YangModuleInfoTemplate
Robert Varga [Mon, 28 May 2018 17:29:06 +0000 (19:29 +0200)]
Fix YangModuleInfoTemplate

Optional is not comparable, hence we need to pass an explicit
Comparator to the TreeMap.

JIRA: MDSAL-344
Change-Id: I79e8000c85ed74d3f14e77da156038f3c781aa59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse java.util.Objects.requireNonNull in InstanceIdentifier
Robert Varga [Fri, 25 May 2018 11:39:24 +0000 (13:39 +0200)]
Use java.util.Objects.requireNonNull in InstanceIdentifier

This migrates InstanceIdentifier to use static imports, making
the code a bit more concise.

Change-Id: I4eb4ea737b6d75a67593db2b0099f61c37407ef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAdd ChoiceIn marker interface
Robert Varga [Wed, 23 May 2018 20:06:54 +0000 (22:06 +0200)]
Add ChoiceIn marker interface

This interface is needed to tie choice interfaces to their definition
parent -- transitively allowing us disambiguate grouping-defined uses
child children. This patch adds the interface and teaches codegen
when to generate it.

JIRA: MDSAL-45
Change-Id: Iecc1d504dd1d016a8fec3c26afe4e3c565b31d9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoImprove QNAME field definition
Robert Varga [Tue, 24 Apr 2018 09:26:46 +0000 (11:26 +0200)]
Improve QNAME field definition

The constant field that contains the QName corresponding to the
generated construct can rely on YangModuleInfo associated with
the generated module. Since that class already contains the module's
QName, we can lift it from there and use it to define the constant.

This has the benefit of not duplicating strings in classes, leading
to smaller footprint and improves startup time, as the strings do not
have to be parsed when the class is loaded.

JIRA: MDSAL-339
Change-Id: Ia7d336e3d386955f83648543b1e98f820ebbaf40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCleanup unchecked casts in InstanceIdentifier
Robert Varga [Wed, 23 May 2018 20:05:16 +0000 (22:05 +0200)]
Cleanup unchecked casts in InstanceIdentifier

Using AbstractPathArgument allows us to retain the required type
capture, allowing us to eliminate a couple of SuppressWarnings.

Change-Id: I73748c7f4a3348a6a1d2961e9377a8740d427e32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMake RPC implementations return ListenableFuture
Robert Varga [Sun, 11 Mar 2018 22:42:29 +0000 (23:42 +0100)]
Make RPC implementations return ListenableFuture

Common implementations are using ListenableFuture and we really
need to make it convenient to attach to RPC results. Change
the signature of returned type to use ListenableFuture<?>.

Change-Id: Ic60a8bbab230ff174f0927a81727f478d4eb3fde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAdd @Nullable annotations on getters
Stephen Kitt [Mon, 12 Mar 2018 18:19:33 +0000 (19:19 +0100)]
Add @Nullable annotations on getters

Generated getters’ documentation states that they can return null if
no value is present; this patch adds a @Nullable annotation to
accompany the comment, allowing null-pointer analysis on generated
bindings.

This would help avoid various NPEs we’ve seen in practice in Genius
and NetVirt.

Change-Id: I8c8cfa9ae24d34f3a7140623065dfb377f5f2a13
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoadd additional (debug) logging to AbstractStreamWriterGenerator
Michael Vorburger [Tue, 8 May 2018 14:59:24 +0000 (16:59 +0200)]
add additional (debug) logging to AbstractStreamWriterGenerator

* LOG.debug() in generateSerializer() to see if in a load test
scenario that ever gets called twice for the same type (it should not)
due to a concurrency bug I'm not seeing.

* reduce the only other LOG.debug() in that class to trace()
because that one will happen more often (constantly?) and make it hard
to see the other one.

* log onBindingRuntimeContextUpdated() on the off chance
that changing the BindingRuntimeContext somehow could cause this
suspected concurrency issue.

* log constructor to better understand the lifecycle of
AbstractStreamWriterGenerator in production.

* add Guava Cache removalListener with logging to see if this is caused
by eviction by GC due to .weakKeys() - ACK to tpantelis for this hunch.

JIRA: MDSAL-213
Change-Id: I2416131fe140ee483cc93740480ee0e37f0ce130
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 months agomake AbstractStreamWriterGenerator loadSerializerFor() delegate
Michael Vorburger [Tue, 8 May 2018 15:22:46 +0000 (17:22 +0200)]
make AbstractStreamWriterGenerator loadSerializerFor() delegate

to the getSerializer() instead of copy/pasting
implementations.getUnchecked(), so that we can possibly add logging
and/or locking in a single place in the future.

JIRA: MDSAL-213
Change-Id: Ida9b0cb387933f83903e0a8d716087959f4d5c4e
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 months agoCleanup JavassistUtils
Robert Varga [Tue, 8 May 2018 20:07:11 +0000 (22:07 +0200)]
Cleanup JavassistUtils

Add explicit assumption that asCtClass() is synchronize and follow
that to AbstractStreamWriterGenerator synchronization.

Change-Id: I0f9141d535d370c0285aa6d5e43f45ab4bd0a1eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCleanup AbstractStreamWriterGenerator
Robert Varga [Tue, 8 May 2018 19:51:42 +0000 (21:51 +0200)]
Cleanup AbstractStreamWriterGenerator

ClassLoaderUtils is providing a lambda-friendly API, take advantage
of that. Also also runs .toString() outside of the class loader,
minimizing the code being run there.

Change-Id: I9ecf5c12a957c508ad5d4d27117d9099ce1f789b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agofix minor typo in DataContainer
Michael Vorburger [Tue, 8 May 2018 15:04:04 +0000 (17:04 +0200)]
fix minor typo in DataContainer

Change-Id: I9a98ab56441b2d49ef6b1b02403c45154d540644
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 months agoremove un-used getChildSizeFromSchema() in StreamWriterGenerator
Michael Vorburger [Tue, 8 May 2018 15:05:38 +0000 (17:05 +0200)]
remove un-used getChildSizeFromSchema() in StreamWriterGenerator

Change-Id: Iac30c3633963bd5e1e049c3861f30305e70705f8
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 months agoCleanup mdsal-binding-java-api-generator compilation tests
Robert Varga [Mon, 7 May 2018 12:48:14 +0000 (14:48 +0200)]
Cleanup mdsal-binding-java-api-generator compilation tests

Various subclasses of BaseCompilationTest have used copy&pasted
code to generate sources using the same pattern.

Rather than doing that, centralize code generation in the base
class, simplifying the test cases.

Change-Id: I75f10d321805de641cd48a4e69c8115e6514ee91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCleanup YangModuleInfoTemplate
Robert Varga [Mon, 7 May 2018 11:43:46 +0000 (13:43 +0200)]
Cleanup YangModuleInfoTemplate

Remove extra space in package declaration and separate imports
from package and body with an empty line.

Change-Id: I4f484f3d3f1a62576d14e7803478fd5edec43cad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse QName's imported name for QNAME constant
Robert Varga [Mon, 23 Apr 2018 21:27:04 +0000 (23:27 +0200)]
Use QName's imported name for QNAME constant

This makes the code a bit more concise, as we do not end up using
a FQCN to locate QName.create().

Change-Id: Iaa3f5f362da8bae43345164ab635c0dc7bf6497f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCleanup EnumTemplate and UnionTemplate
Robert Varga [Mon, 26 Mar 2018 16:44:54 +0000 (18:44 +0200)]
Cleanup EnumTemplate and UnionTemplate

Now that import tracking works correctly, fixup templates which can
be instantiated as inner classes.

JIRA: MDSAL-327
Change-Id: I4c9e7917a8bc2d021d6cdd60c3d6ef41ccb9af59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRework Java import tracking
Robert Varga [Sun, 25 Mar 2018 22:52:44 +0000 (00:52 +0200)]
Rework Java import tracking

In order to get nested class imports working, we need a proper
layer which understands how references inside Java code are
looked up.

Introduce AbstractJavaGeneratedType, which creates a tree structure
of how the class is layed out, thus it knows which types are declared
in a particular type's scope. There are two implementions:
- TopLevelJavaGeneratedType, which is responsible for managing what
  is imported into the compilation unit
- NestedJavaGeneratedType, which does not know about imports per se
  and delegates decisions to its containing type

Templates are updated to properly hook into the type hierarchy, so
their requests for type resolution are properly scoped.

One remaining wrinkle is BuilderTemplate, which abuses the template
system by using its built type as its type. This is worked around
in this patch and will need to be cleaned up later.

JIRA: MDSAL-327
Change-Id: Ie66a93ba85be26b056f118ba9fe14195e8d5a8ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jie Han <han.jie@zte.com.cn>
3 months agoRevert "Add NoZone support"
Robert Varga [Thu, 19 Apr 2018 19:26:30 +0000 (21:26 +0200)]
Revert "Add NoZone support"

This reverts commit 1028d8000e0a0dc93855b85b2c138e2b66fbab86
and commit ca8e1f685d01d9d87f6b550edab1be6dd9a5ccea.

Change-Id: I1a838bd1d16dff096a4337ac3501f13f1402f77b
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBinding codec v1 - fix get codec for typedef of empty type
Jie Han [Tue, 29 Aug 2017 09:19:36 +0000 (17:19 +0800)]
Binding codec v1 - fix get codec for typedef of empty type

- Fix get codec for typedef of empty type,
  the return type of typedef empty type should be
  generated binding class type not boolean.
Change-Id: Icead1cc2d40015e948317095fac9854330630ddf
Signed-off-by: Jie Han <han.jie@zte.com.cn>
3 months agoAdd NoZone support
Robert Varga [Wed, 11 Apr 2018 01:28:40 +0000 (03:28 +0200)]
Add NoZone support

inet-inet-types@2013-07-15 defines no-zone versions of ip-address,
ipv4-address and ipv6-address. These are guaranteed to not contain
a zone, hence are stricter versions of the same types, making them
better candidates for dealing with normal addresses.

Retrofit IetfInetUtil so they return no-zone versions of objects
and also add more efficient convertors to bytes.

Change-Id: I2b0f4775b1656a7b80929e62f03940b1247e1b95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse QName.withModule()
Robert Varga [Mon, 12 Mar 2018 10:53:51 +0000 (11:53 +0100)]
Use QName.withModule()

There are multiple places where we are creating a well-known QName
with a new namespace. Use QName.withModule() so we do not end up
checking localName over and over.

Change-Id: I932bf3762bfb6ae201e6b309f8a7d95887b99b00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump to odlparent 3.1.0 and yangtools 2.0.3
Stephen Kitt [Thu, 22 Mar 2018 17:24:29 +0000 (18:24 +0100)]
Bump to odlparent 3.1.0 and yangtools 2.0.3

Change-Id: Ibd6d5141acc125e9aa5f72149d2add9ae0d7c148
Signed-off-by: Stephen Kitt <skitt@redhat.com>
3 months agoMap identities to interfaces, not abstract classes
Robert Varga [Wed, 7 Mar 2018 14:06:04 +0000 (15:06 +0100)]
Map identities to interfaces, not abstract classes

This changes mapping of identities from abstract class to an interface,
allowing for multiple inheritence, as needed by YANG 1.1.

JIRA: MDSAL-326
Change-Id: I01f636f5f055f929cdcee4ccb61e04ad0a6841b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRework YangModuleInfo
Robert Varga [Wed, 21 Mar 2018 02:56:33 +0000 (03:56 +0100)]
Rework YangModuleInfo

This patch modernizes YangModuleInfo to not use only strings, but
also yang.common classes. ResourceYangModuleInfo is created to serve
as abstract superclass for generated YangModuleInfo classes.

JIRA: MDSAL-325
Change-Id: I2f28868b7083af17bd23f6fd360ec6673b94d3ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMove getRestrictions() into BaseTemplate
Robert Varga [Sun, 25 Mar 2018 20:37:18 +0000 (22:37 +0200)]
Move getRestrictions() into BaseTemplate

JavaFileTemplate does not need this functionality, it is much better
hosted in BaseTemplate.

Change-Id: I38fb774ea1b5df92d43cd7ddd35b9b16bb015232
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoImprove EnumerationCodec
Robert Varga [Sun, 11 Mar 2018 15:25:40 +0000 (16:25 +0100)]
Improve EnumerationCodec

Now that we have proper information from enumerations, we can use
build the codec map as known at generation time and check it against
the type we are receiving, adding proper warnings.

JIRA: MDSAL-317
Change-Id: Ia5bd3d73e44eba2568818b578bc44985fafb6294
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRevert "Fix add imports of nested classes"
Robert Varga [Thu, 22 Mar 2018 17:06:11 +0000 (18:06 +0100)]
Revert "Fix add imports of nested classes"

This reverts commit bbde29c5e18553841ea5771c8a84bb1e4849a9a7.

Concatenating imports does not work as the inner class has to
take into account for containing class name, as that takes
precedence over imports.

Change-Id: I6921b5e923bf6bb48d3f1a118e9beb289c6f6932
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRevert "Rework inlined union generation"
Robert Varga [Wed, 21 Mar 2018 16:26:45 +0000 (17:26 +0100)]
Revert "Rework inlined union generation"

This reverts commit 7401c1d1ea87f3a940745acbad1b32fc0b95b5b1.

Change-Id: Ib1b60da6bae45202671582cd3648d6626d61064b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix setter constant naming
Robert Varga [Tue, 20 Mar 2018 09:19:30 +0000 (10:19 +0100)]
Fix setter constant naming

Bouncing property name through upper/lower case does not really work,
as it breaks with capitalized properties. Also remove the public constant
so we do not retain the input list -- the patterns are not really useful
anyway.

JIRA: MDSAL-323
Change-Id: I7aa5677e27c6dddc13cc25336500ba0b583b021f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRework inlined union generation
Robert Varga [Mon, 19 Mar 2018 08:43:11 +0000 (09:43 +0100)]
Rework inlined union generation

Unions internal to a leaf union end up being incompletely generated,
as they lack getValue(), 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:
- value/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

JIRA: MDSAL-320
Change-Id: I60697c74669d4508922ea3ee22e2f0fe5d99b322
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDisambiguate generated nested enumerations
Robert Varga [Mon, 19 Mar 2018 01:11:45 +0000 (02:11 +0100)]
Disambiguate generated nested enumerations

In case we have an enumeration defined directly in a leaf of the same
name as its containing generated type (list, container, etc.), we can
end up violating JLS section 8.1 class naming requirements.

Detect this condition and munge the type name by appending a '$' to
prevent this conflict.

Change-Id: Ia68cac2a96ac0a95fa38a83cb1cdc1c09540533b
JIRA: MDSAL-321
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoIntegrate JavaTypeName as Identifier
Robert Varga [Mon, 12 Mar 2018 20:33:57 +0000 (21:33 +0100)]
Integrate JavaTypeName as Identifier

This changes 'Type' to implement Identifiable<JavaTypeName>, which
allows us to cleanly manage Java type naming and namespace handling.

Type's base mathods are made default and name tracking is reworked
to always be based on JavaTypeName.

JIRA: MDSAL-321
Change-Id: Id8512d38eb2eed9bd2ce4d6b172937bebde03581
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix add imports of nested classes
Jie Han [Tue, 13 Mar 2018 07:46:02 +0000 (15:46 +0800)]
Fix add imports of nested classes

- Use importedName instead of
  directly hard code class FQN in the template.

Change-Id: Icb39df83f6c09461a2130c3ba3a9b2151a30fb85
Signed-off-by: Jie Han <han.jie@zte.com.cn>
3 months agoMDSAL-292: Binding v1 - Pattern attribute ignored for leaf-list/leaf
Jie Han [Fri, 2 Feb 2018 03:11:34 +0000 (11:11 +0800)]
MDSAL-292: Binding v1 - Pattern attribute ignored for leaf-list/leaf

- Support pattern constraint for leaf-list/leaf

- support modifier statement for pattern of yang 1.1

- Add test yang

Change-Id: I1a2f2b24a023479dee8ee9de08374386d38ba17a
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCleanup mdsal-binding-java-api-generator tests
Robert Varga [Mon, 19 Mar 2018 01:13:58 +0000 (02:13 +0100)]
Cleanup mdsal-binding-java-api-generator tests

We have a lot of copy&pasted code here, trim it down by providing
convenience classes.

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