yangtools.git
7 years agoCleanup SchemaNodeIdentifierBuildNamespace 19/47419/3
Robert Varga [Mon, 24 Oct 2016 13:50:09 +0000 (15:50 +0200)]
Cleanup SchemaNodeIdentifierBuildNamespace

Remove unnecessary branches.

Change-Id: I151c304ed2a2790181f0152fa95c811ab031bfd8
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoPrevent a boxing operation 38/47438/2
Robert Varga [Mon, 24 Oct 2016 15:14:12 +0000 (17:14 +0200)]
Prevent a boxing operation

Eclipse warns about boxing to a Boolean, so use a constant
Boolean.TRUE instead of a boolean.

Change-Id: Ida3bccbec591189390fc34983bd6107e3dea44d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-4456: rework leaker integration 51/47451/3
Robert Varga [Mon, 24 Oct 2016 16:27:14 +0000 (18:27 +0200)]
BUG-4456: rework leaker integration

Rather than spreading the use of leaker across three
classes, centralize its use in ExtensionEffectiveStatementImpl
by exposing a protected method which can be overridden.

This is a bit cleaner solution and should end up being more
performant, as other statements do not end up touching
the thread-local variable.

Change-Id: I6f26dca90c0e5a907e98c65aa953f52ef87364e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6972: optimize SourceSpecificContext 57/47457/3
Robert Varga [Mon, 24 Oct 2016 17:59:48 +0000 (19:59 +0200)]
BUG-6972: optimize SourceSpecificContext

Statement supports are singletons, do not instantiate
them more than once.

Also make sure we grow importedNamespaces lazily, as there
typically are only a few imports.

Change-Id: Iadfc078fbd4d5e1d6b8b6bfe9e8721ae852ddc07
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoImprove parser reactor logging 91/47391/8
Robert Varga [Sun, 23 Oct 2016 14:36:23 +0000 (16:36 +0200)]
Improve parser reactor logging

Add a few logging calls and implement toString() methods
so that the reactor progress can be observed.

Change-Id: Id475ba3aaba75040fe523b1d43c23e893ad25464
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6972: enforce statement state when copying 17/47417/6
Robert Varga [Mon, 24 Oct 2016 10:40:32 +0000 (12:40 +0200)]
BUG-6972: enforce statement state when copying

It does not make sense to copy statements which have
not been resolved to effective ones. Add a state check
to enforce that.

Also improve documentation.

Change-Id: I5fef0ce57061135244399a969fc932ac014baadc
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6522: grow StatementContext collections lazily 25/47325/14
Robert Varga [Fri, 21 Oct 2016 09:56:10 +0000 (11:56 +0200)]
BUG-6522: grow StatementContext collections lazily

A lot of statements do not have any substatements at all,
so grow collections as needed. For listeners also remove
sub-collections when then are no longer needed.

Change-Id: Ia429bd3761675fb00f742472042b31aa15862e7b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6972: eliminate AugmentUtils 37/47437/3
Robert Varga [Mon, 24 Oct 2016 15:00:31 +0000 (17:00 +0200)]
BUG-6972: eliminate AugmentUtils

The only callsite is AugmentStatementImpl, so move the code there
so it can be optimized, resolving a long-standing FIXME.

Change-Id: I1052e9c0956a13444252992fa0693d493a07a709
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6972: refactor copy checking 55/47355/13
Robert Varga [Fri, 21 Oct 2016 15:30:05 +0000 (17:30 +0200)]
BUG-6972: refactor copy checking

Original checking code was hard to read, this refactors
it to be more readable and understandable. It also
splits the two sets of copy operation invokers so they
do not share the same set of rules, as they need to be
different.

Change-Id: I9b4f831484c18228b3308709a8a8752bcc8e1b65
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 6669: Mandatory nodes cannot be added to node from another module via augment 82/45382/15
Peter Kajsa [Thu, 8 Sep 2016 14:25:48 +0000 (16:25 +0200)]
Bug 6669: Mandatory nodes cannot be added to node from another module via augment

Yang parser allowed to add mandatory nodes to target node from another module
via augmentations in some cases. This patch fixes this according to the rules defined
in RFC6020 (https://tools.ietf.org/html/rfc6020#section-3.1,
https://tools.ietf.org/html/rfc6020#section-7.15).

Change-Id: I699fc3c1014583b85ea47504f9a102d06e0b9011
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
7 years agoBUG-6972: Consolidate copy operations 54/47354/11
Robert Varga [Fri, 21 Oct 2016 15:10:54 +0000 (17:10 +0200)]
BUG-6972: Consolidate copy operations

This patch moves common code into a 'copy statement' utility
method, making sure we have do not leak it.

Change-Id: Iba205a6019977c3e6c30762dfb1407b13ec7cf37
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoHide BuildGlobalContext methods 90/47390/4
Robert Varga [Sun, 23 Oct 2016 14:35:30 +0000 (16:35 +0200)]
Hide BuildGlobalContext methods

Non-public class, there is no point in having its methods
declared as public.

Change-Id: Iba52f5c7fb9da4fa5b79ca37308f5af126aaf7d0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6972: Remove GroupingUtils.needToCreateNewQName() 53/47353/9
Robert Varga [Fri, 21 Oct 2016 14:45:06 +0000 (16:45 +0200)]
BUG-6972: Remove GroupingUtils.needToCreateNewQName()

This is hard-wired to true and has a single caller,
remove the method and simplify caller.

Change-Id: I955c37b7a9e6b6a4418e1be23b89659a637a1ea0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6522: create a specialized CopyHistory object 48/47348/9
Robert Varga [Fri, 21 Oct 2016 13:45:43 +0000 (15:45 +0200)]
BUG-6522: create a specialized CopyHistory object

Copy histories have a limited number of operations, hence
mutating implementation can express the set of required operations
more efficiently. Also adds some tests to make sure the class
works correctly.

Change-Id: I0b2fd9fffa8a4bc754a9eff3808648f8f5726243
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 6329: Parser fails when target node of uses-augment is an unknown node 18/46118/7
Peter Kajsa [Thu, 22 Sep 2016 11:57:39 +0000 (13:57 +0200)]
Bug 6329: Parser fails when target node of uses-augment is an unknown node

Yang parser fails when target node of uses-augment is an unknown node. It is not
quite clear whether such yang model is valid according to RFC6020 or not, but
yang parser failure causes lots of trouble, because such augment is used widely
in some yang models. So this patch prevents failure of yang parser and rather
introduces a warning and augmentation is not performed, when target node is
an unknown node.

Change-Id: I7f1c5d7b3ef0898ca098466702d7cb1ad7a0f30f
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
7 years agoBug 6958 - add class NotificationAsContainer for transforming xml format notification... 52/47052/10
Geng Xingyuan [Tue, 18 Oct 2016 07:51:56 +0000 (15:51 +0800)]
Bug 6958 - add class NotificationAsContainer for transforming xml format notification to java Notification interface.

move utility class ConstraintDefinitions and EmptyConstraintDefinition to yang-data-util.
new utility class ContainerSchemaNodes for transforming yang rpc or notification to xml

Change-Id: Ib8f3ca23e8a3e67446ed5f4aa9e4c7b16ffb2d85
Signed-off-by: Geng Xingyuan <geng.xingyuan@zte.com.cn>
7 years agoBUG-6522: share instances of Config(Effective)Statement 18/47318/5
Robert Varga [Fri, 21 Oct 2016 09:00:15 +0000 (11:00 +0200)]
BUG-6522: share instances of Config(Effective)Statement

Config statement has low cardinality, use specialized classes
for its representation.

Change-Id: I7b5dc7e7069e5e7cfa4808d44a95f147f6b7073d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6522: allocate copyHistory lazily 24/47324/2
Robert Varga [Fri, 21 Oct 2016 09:39:14 +0000 (11:39 +0200)]
BUG-6522: allocate copyHistory lazily

Most of the statements start off with being just originals,
so we can use a shared constant for their copy history
and replace it when it is modified.

Change-Id: Ia4fcd63d2bfb42d8ba5dc29daf74aa330e5b3689
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 6972: Preliminary unit test 12/47312/3
Igor Foltin [Fri, 21 Oct 2016 07:19:26 +0000 (09:19 +0200)]
Bug 6972: Preliminary unit test

For now, this patch contains just a unit test which will
test the actual fix once it is implemented.
Therefore, the test is currently silenced with @Ignore.

Change-Id: I7b7ce9e2384f942cd13d46c59f868e125ae327c7
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBUG-6522: Adjust collection sizes 16/47316/3
Robert Varga [Fri, 21 Oct 2016 08:38:21 +0000 (10:38 +0200)]
BUG-6522: Adjust collection sizes

StatementContexts are typically leaves or have a low number
of children, leading to wasted space during parsing.

Force collections to be allocated with minimum size and have
them grow as needed, so we limit the run-time overhead.

Change-Id: I30b87e7164f081251bdd44092858be1254d42cba
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6965: introduce BuiltinDeclaredStatements 17/47217/4
Robert Varga [Thu, 20 Oct 2016 16:31:11 +0000 (18:31 +0200)]
BUG-6965: introduce BuiltinDeclaredStatements

This patch adds squashing of YANG builtin types into
singletons when such types are not otherwise modified.

Change-Id: I3a146b4c7d6d01daf4892b2d41f813fc9bfcc393
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6964: define a namespace to hold model-defined statements 03/47203/6
Robert Varga [Thu, 20 Oct 2016 12:22:50 +0000 (14:22 +0200)]
BUG-6964: define a namespace to hold model-defined statements

This patch adds a new namespace, StatementDefinitionNamespace,
which holds StatementDefinitions for all extensions defined in
the models being processed.

This namespace is then used to acquire a shared definition instead
of instantiating a definition everytime it is referenced.

Change-Id: I600ad8c6405e688f4fe9da12b58b8e50d3bb1a85
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoImprove ContextBuilder error reporting 13/47213/4
Robert Varga [Thu, 20 Oct 2016 15:14:21 +0000 (17:14 +0200)]
Improve ContextBuilder error reporting

Instead of throwing an IllegalArgumentException throw
a proper SourceException, which will explain what statement
does not take an argument, pointing to the offending source.

Change-Id: Iee9a984c557f218195f0654bbb54d9e27a9cb9f6
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoPrevent boxing 15/47315/2
Robert Varga [Fri, 21 Oct 2016 08:35:36 +0000 (10:35 +0200)]
Prevent boxing

Objects.equals() will force a boxing operation
followed by a null check. Instead of that use
Boolean.TRUE.equals().

Change-Id: Ied4c50fb700650965f695a6ec121fb2b64510b9a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-3876: Add ExprListener and friends 99/47199/2
Robert Varga [Thu, 20 Oct 2016 11:47:31 +0000 (13:47 +0200)]
BUG-3876: Add ExprListener and friends

This adds interfaces for walking the expression tree.

Change-Id: I1b3f9930c7a1ef70b6f2d87762683a86493bd698
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix a few checkstyle warnings 14/47214/2
Robert Varga [Thu, 20 Oct 2016 15:28:20 +0000 (17:28 +0200)]
Fix a few checkstyle warnings

Whitespace around =
Overload method distance

Change-Id: I96160154de4a2ea201305aec2a7d800b95a143b3
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 6491: Some imports are not exposed in Module.getImports 29/47129/5
Filip Gregor [Wed, 19 Oct 2016 13:57:33 +0000 (15:57 +0200)]
Bug 6491: Some imports are not exposed in Module.getImports

in case of no revision in module and imported module, method
getImports returns empty Set.
added tests, fixed Set with imports in AbstractEffectiveModule

Change-Id: Ie23196d9cbcca98266580d11a85d66c06ac8561c
Signed-off-by: Filip Gregor <fgregor@cisco.com>
7 years agoBug 6961: SchemaContext.getAllModuleIdentifiers() doesnt work for submodules 21/47121/4
Filip Gregor [Wed, 19 Oct 2016 11:41:28 +0000 (13:41 +0200)]
Bug 6961: SchemaContext.getAllModuleIdentifiers() doesnt work for submodules

added submodules to return value from method getAllModuleIdentifiers

Change-Id: I9f328d0050457b7094cbb420f0e0205b8034cf6f
Signed-off-by: Filip Gregor <fgregor@cisco.com>
7 years agoReuse cardinality constants 45/47045/6
Robert Varga [Tue, 18 Oct 2016 00:20:16 +0000 (02:20 +0200)]
Reuse cardinality constants

0..1, 0..MAX and 1..1 are common cardinalities. Instead of leaking the MAX constant
create additional builder methods which reuse Cardinality objects.

Change-Id: Ie11e1f4414c484ecd43f0b472f9df8f0d0c18d0e
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix GroupingEffectiveStatementImpl's unknown nodes 74/47074/2
Robert Varga [Tue, 18 Oct 2016 14:30:07 +0000 (16:30 +0200)]
Fix GroupingEffectiveStatementImpl's unknown nodes

Heap analysis has pointed out a linked list, which is both
a correctness problem (it should be immutable) and efficiency
issue, as most of the time this list should be empty.

Use ImmutableList.Builder to build an immutable list of
unknown statements.

Change-Id: I94a42cb75d8fa433bcae304728268b0873d14683
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix inefficient ConstraintEffectiveStatements 73/47073/2
Robert Varga [Tue, 18 Oct 2016 14:28:35 +0000 (16:28 +0200)]
Fix inefficient ConstraintEffectiveStatements

Leaking a mutable ArrayList is incorrect, as the result
should be immutable. Furthermore not providing a hint
results in wasted space. Fix this by copying the temporary
ArrayList into an ImmutableList.

Change-Id: Ic6d1f1a72e6c045479a8b2e95b6b36f0b8d3aaaf
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-4456: add RecursiveExtensionResolver 42/47042/8
Robert Varga [Mon, 17 Oct 2016 21:58:54 +0000 (23:58 +0200)]
BUG-4456: add RecursiveExtensionResolver

This patch adds a hack which allows us to instantiate
recursive extensions. The solution is rather ugly, but
should be workable.

Change-Id: Ib5083804e5b49bd51c3b75c9905be39924e79ae5
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6757: revert fix for BUG-4456 38/47038/3
Robert Varga [Mon, 17 Oct 2016 20:19:54 +0000 (22:19 +0200)]
BUG-6757: revert fix for BUG-4456

The fix has introduced a massive memory leak, which causes
all of temporary build objects to be retained in the final
SchemaContext.

Instead of the leak, add an explicit guard to detect
extensions (transitively) referencing themselves.

Change-Id: If90a4f9420866a6392ce97c71837915fa41ae0c8
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix failing unit test in QueuedNotificationManagerTest 59/47059/1
Igor Foltin [Tue, 18 Oct 2016 10:02:48 +0000 (12:02 +0200)]
Fix failing unit test in QueuedNotificationManagerTest

Change-Id: I6a8a467cb2b3965753dccbe9b8bdd8e81a9bce80
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBUG-5410: introduce RegularExpression.toPatternString() 44/45144/5
Robert Varga [Mon, 5 Sep 2016 07:48:10 +0000 (09:48 +0200)]
BUG-5410: introduce RegularExpression.toPatternString()

This patch adds a method useful for converting a RegularExpression
into a Pattern-compatible string.

Change-Id: I6ab002dc6e9324967d41072ea46af4d65363bff0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoSupport testing null against null in equalsHelper() 99/46599/4
Stephen Kitt [Thu, 6 Oct 2016 08:13:58 +0000 (10:13 +0200)]
Support testing null against null in equalsHelper()

In its intended context, equalsHelper() should never be called with
two null parameters, but it's easy to support the general case — and
because this isn't SQL, null equals itself.

Change-Id: I826435e81a4dd59aaac72ad9ab07a80069f7a17f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoBUG-5410: optimize CaseInsensitiveMap 46/45146/3
Robert Varga [Mon, 5 Sep 2016 09:43:47 +0000 (11:43 +0200)]
BUG-5410: optimize CaseInsensitiveMap

This propagates would-be constants to real constatants,
allowing them to be better optimized.

Change-Id: I500e8060db0f3e22ca19be4188169f74e9a03271
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-5410: import message catalogue 43/45143/3
Robert Varga [Mon, 5 Sep 2016 07:15:43 +0000 (09:15 +0200)]
BUG-5410: import message catalogue

xsd-regex being an Apache source, it uses ResourceBundle
to load translations. Add them to ensure the project works.

Change-Id: If2615cec2edb99eca86e2a06dfc6b3c27b7ca7c5
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoequalsHelper (MoreObjects2) 13/42513/12
Michael Vorburger [Mon, 25 Jul 2016 23:26:14 +0000 (01:26 +0200)]
equalsHelper (MoreObjects2)

Moving this class "downwards" from mdsalutil, because this really is a
generic utility helper class, which probably best fits into
yangtools.utils.

Change-Id: I0d8c6dd44790a85f7efccd6f83d42e6bd7e084bb
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoIncrease unit test coverage for Yangtools 34/46334/2
Igor Foltin [Sun, 2 Oct 2016 10:19:10 +0000 (12:19 +0200)]
Increase unit test coverage for Yangtools

Added test for YangTextSchemaContextResolver.
Extended test for declared statements.

Change-Id: Ibdf7e416287240cae8f673c3ecf817faaf275d5f
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 6771: Problem with typedefs nested in augment 23/46223/3
Peter Kajsa [Tue, 27 Sep 2016 12:05:22 +0000 (14:05 +0200)]
Bug 6771: Problem with typedefs nested in augment

When a typedef is nested in a container that is in an augment,
the YANG parser produces an error. This is due to fact, that typedef
statements nested in augments are ignored in statement definition phase,
because AugmentStatement is supported only in full definition phase. The
same issue occurs also for Choice and Case statements. This patch
provides fix of these bugs.

Change-Id: I345fd50e7d9810bbedcc873241338fbdb3186b74
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
7 years agoIncrease unit test coverage for Yangtools 30/46130/2
Igor Foltin [Fri, 23 Sep 2016 13:18:12 +0000 (15:18 +0200)]
Increase unit test coverage for Yangtools

Added several unit tests.

Change-Id: I57b4b6c84fd489f2546189bb66bc03490ccf194f
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoNaming convetion fix of some unit tests in yang-parser-impl 45/46245/2
Peter Kajsa [Wed, 28 Sep 2016 09:43:30 +0000 (11:43 +0200)]
Naming convetion fix of some unit tests in yang-parser-impl

Change-Id: I2a609752a3f56a2129d4c54355ea347190a40fe1
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
7 years agoUse YangInstanceIdentifier.EMPTY 32/46132/2
Robert Varga [Fri, 23 Sep 2016 13:44:25 +0000 (15:44 +0200)]
Use YangInstanceIdentifier.EMPTY

Eliminate an internal constant by referring to the well-known
public constant.

Change-Id: I2363714e1f694a352e0163a8c8054c27f22801f7
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoAllow QueuedNotificationManager to batch notifications 94/46094/7
Robert Varga [Wed, 21 Sep 2016 15:29:57 +0000 (17:29 +0200)]
Allow QueuedNotificationManager to batch notifications

This patch reworks the queueing logic so that notifications
get completely read from the queue and then propagated to the
listener invoker in one go.

Change-Id: I1a4caaa75f7a206abf4ff5b6829918bd25d79551
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoAdd batching to QueuedNotificationManager 93/46093/2
Robert Varga [Tue, 20 Sep 2016 22:57:00 +0000 (00:57 +0200)]
Add batching to QueuedNotificationManager

Introduce BatchedInvoker, which allows multiple events to be
delivered in one go.

Change-Id: I3d4d054543fa29842d67f6f21f28ff0a47ed135d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 6551: Support for third-party Yang extensions implementation 26/45226/7
Peter Kajsa [Tue, 6 Sep 2016 12:35:02 +0000 (14:35 +0200)]
Bug 6551: Support for third-party Yang extensions implementation

Minor changes in yang statement parser in order to allow implementation
of custom inference pipeline.
- implementation of CustomStatementParserBuilder, which provides
construction of custom statement parser in user-friendly way.
- example and unit test of third-party extension plugin.

Change-Id: I0cdf0e28bd69af4cb41328be6e6a647df58f4fd9
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
7 years agoBUG-5410: use Deque instead of a Stack 40/45140/3
Robert Varga [Mon, 5 Sep 2016 06:54:47 +0000 (08:54 +0200)]
BUG-5410: use Deque instead of a Stack

java.util.Stack is superseded by Deque and its implementations,
which are not synchronized. Use an ArrayDeque instead of a Stack.

Change-Id: I4e7fca6bb77c7122c56d3a85c5de3d264699765a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoCleanup QueuedNotificationManager 38/45938/2
Robert Varga [Tue, 20 Sep 2016 21:59:32 +0000 (23:59 +0200)]
Cleanup QueuedNotificationManager

Audit code for coding style and unnecessary checks.

Change-Id: Ifce7d4fa4febb7f63ce9014e350e69143508e5c7
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoUse LongAdder instead of an atomic long 98/45898/1
Robert Varga [Tue, 20 Sep 2016 14:40:37 +0000 (16:40 +0200)]
Use LongAdder instead of an atomic long

LongAdder has better performance under contention,
use it for tracking counter.

Change-Id: If32e17a8e16b2a1418c744a54aaa84e8479f3852
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoAdd YangInstanceIdentifier fast paths 97/45897/1
Robert Varga [Tue, 20 Sep 2016 14:24:18 +0000 (16:24 +0200)]
Add YangInstanceIdentifier fast paths

Each YangInstanceIdentifier contains() itself and its
.toRelative() is always empty.

Change-Id: I15ef921b661ccd32b9e6308789624798af4d98cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix ConstraintDefinition inconsistency 06/45806/5
Robert Varga [Mon, 19 Sep 2016 12:49:42 +0000 (14:49 +0200)]
Fix ConstraintDefinition inconsistency

The API contract around min/max elements is unclear, but the intent
is to provide a simple 'no effective constraint' result. This is
represented by a null return, which is in fact what the users expect.

Clarify the API contract and fix the two implementations to follow
it instead of using 0/MAX_INT for constraints.

Change-Id: I84b2e2714ddd017f319be4fc6dd0f7bec02bbf0d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoIncrease unit test coverage for Yangtools 45/45745/2
Igor Foltin [Fri, 16 Sep 2016 17:30:10 +0000 (19:30 +0200)]
Increase unit test coverage for Yangtools

Added test for NormalizedNodes.
Added test for DataTreeCandidates
Added test for DataTreeConfiguration.
Added test for NormalizedNodeDataTreeCandidateNode.

Change-Id: I71773e12f5a4d12f38c034740e3622ba94089bbc
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBUG-5410: fixup javadocs 39/45139/2
Robert Varga [Mon, 5 Sep 2016 06:52:34 +0000 (08:52 +0200)]
BUG-5410: fixup javadocs

With the package being moved, full path of exceptions has
changed. Use imported name instead.

Change-Id: I09fb4f0a9f5a31426b65b489da999b5f3d7c4cde
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-5410: add minimal IntStack implementation 81/39181/3
Robert Varga [Fri, 20 May 2016 13:32:07 +0000 (15:32 +0200)]
BUG-5410: add minimal IntStack implementation

Using Stack<Integer> forces integer boxing, which costing us performance.
This patch adds a specialized primitive-based stack, which provides the
minimal needed implementation.

Change-Id: Iee0e977ab87ce32871ddb468dbda47c4afa4e086
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 3899: Milestone: Increase test coverage for Yangtools 59/45459/1
Igor Foltin [Sat, 10 Sep 2016 16:03:16 +0000 (18:03 +0200)]
Bug 3899: Milestone: Increase test coverage for Yangtools

Added test for DataTreeCandidateNodes.
Added test for EnumPairImpl.
Added test for ImmutableNormalizedNodeStreamWriter.

Change-Id: I784be5c9a657fefe53a1f37595b582f09d51f8a4
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBUG-5561: use canonical Bits order 58/45158/4
Robert Varga [Mon, 5 Sep 2016 13:18:54 +0000 (15:18 +0200)]
BUG-5561: use canonical Bits order

This patch makes BitsTypeBuilder order the bit definitions
according to their position. It also adjusts BitsStringCodec
to normalize user input strings to the canonical ordering.

Change-Id: Ia4123a6275130619f9ef91d24b7340520707a67c
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoYangtools documentation 97/45197/3
Igor Foltin [Tue, 6 Sep 2016 07:12:15 +0000 (09:12 +0200)]
Yangtools documentation

Added more documentation to the semantic versioning section

Change-Id: I71554017ee11732ef6f6176ca70711c96ee22480
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoUse lambdas instead of anonymous classes 68/45068/6
Robert Varga [Fri, 2 Sep 2016 13:14:34 +0000 (15:14 +0200)]
Use lambdas instead of anonymous classes

This makes the code more concise.

Change-Id: I0ce9711d0cafcf4660b78d937e5e0c9fa072da5a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix a few warnings 07/45207/1
Robert Varga [Tue, 6 Sep 2016 08:18:20 +0000 (10:18 +0200)]
Fix a few warnings

Wrong javadoc and unused import.

Change-Id: I9c8a022d1289215cd50f0225bfa46b082984e668
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix a bunch of warnings 48/45148/1
Robert Varga [Mon, 5 Sep 2016 10:11:34 +0000 (12:11 +0200)]
Fix a bunch of warnings

- javadoc order
- unneeded casts
- static methods

Change-Id: I98344b7052eee1a58c709665e92d0cb1a0d72b46
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoEliminate unneeded import 63/44863/2
Robert Varga [Tue, 30 Aug 2016 14:31:24 +0000 (16:31 +0200)]
Eliminate unneeded import

YangStatementParser is not used directly, only its inner class
is needed. Since it is already imported, shorten references
and clean up code.

Change-Id: Ia2298bdf20860bc936ba29234f6568adbe7462c0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6497: Do not lose augmentation statement order 75/44975/2
Robert Varga [Tue, 30 Aug 2016 16:41:48 +0000 (18:41 +0200)]
BUG-6497: Do not lose augmentation statement order

This is a follow-up patch to keep augmentation order
in uses statement.

Change-Id: Iaef4aa949d225d914af3a04c111d0ec41aab6451
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoYangtools documentation 37/44937/2
Igor Foltin [Wed, 31 Aug 2016 14:53:01 +0000 (16:53 +0200)]
Yangtools documentation

Added documentation for new features introduced in boron:
 - if-feature statement resolution
 - semantic version processing

Change-Id: Ie31df99d428ab3eecdd40972a5977cd654c05a6b
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBUG-6497: Do not lose augmentation statement order 75/44875/3
Robert Varga [Tue, 30 Aug 2016 16:41:48 +0000 (18:41 +0200)]
BUG-6497: Do not lose augmentation statement order

Using an interim HashSet can cause unpredictable order
of augmentations, which means the binding spec will not
assign consistent mapping at runtime.

Fix this by using a LinkedHashSet, which retains insertion
order.

Change-Id: I503102d8b61453cc9c8d35b07158cd97138cda42
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6316: Fix Bit and EnumPair's position/value types 55/42855/12
Igor Foltin [Tue, 16 Aug 2016 13:06:58 +0000 (15:06 +0200)]
BUG-6316: Fix Bit and EnumPair's position/value types

yang.model.api.type defines the effective model of the world,
where these attributes cannot ever be null, which is in contrast
to yang.model.api.stmt, which is the declared model -- where they
can in fact be null.

Fix this discrepancy by forcing the methods to return simple types

Change-Id: I27b9d6d283cd14b2044890d9ccd19bf92647f27e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 6420: Fixed SemVer's valueOf method 59/43959/2
Igor Foltin [Mon, 15 Aug 2016 11:16:54 +0000 (13:16 +0200)]
Bug 6420: Fixed SemVer's valueOf method

SemVer's valueOf method now works correctly when called
with a string that contains only major and minor version.

Change-Id: Ia9656fe121d1d73bbe2dc1de87cb7bd7b445961d
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 6410: Fixed initialization of typedefs in rpc 36/44036/3
Igor Foltin [Tue, 16 Aug 2016 08:10:32 +0000 (10:10 +0200)]
Bug 6410: Fixed initialization of typedefs in rpc

In the constructor of RpcEffectiveStatementImpl we initialize substatements
of an rpc statment. However, in the for loop we are incorrectly trying to
find type substatements instead of typedef substatements.

Typedef substatements in RpcEffectiveStatementImpl are now initialized correctly.

Change-Id: Ic9a02727ffb4b6e6c798360e2266dc99d77c79e7
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 6419: Fixed SchemaContextEmitter's emitContainer method 75/43975/3
Igor Foltin [Mon, 15 Aug 2016 13:14:56 +0000 (15:14 +0200)]
Bug 6419: Fixed SchemaContextEmitter's emitContainer method

Method emitContainer now emits must statements only once
through the method emitConstraints.

Change-Id: Ib818d7dc25b07df3f35559166a0ef933d19808d0
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 3899: Milestone: Increase test coverage for Yangtools 57/43857/2
Igor Foltin [Fri, 12 Aug 2016 13:43:06 +0000 (15:43 +0200)]
Bug 3899: Milestone: Increase test coverage for Yangtools

Added tests to DataNodeIteratorTest and SchemaContextProxyTest.

Change-Id: If446a0cc0ff415c61b53cf53f96bc49dfaccef08
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 6416: Fixed SchemaContextEmitter's emitIdentityrefSpecification method 71/43971/2
Igor Foltin [Mon, 15 Aug 2016 12:41:52 +0000 (14:41 +0200)]
Bug 6416: Fixed SchemaContextEmitter's emitIdentityrefSpecification method

Method emitIdentityrefSpecification now passes proper argument to emitBase method.

Change-Id: I16eda69b03d7da1dbefd222c11514a66568d170b
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoBug 6414: Fixed DataNodeIterator's traverseModule method 70/43970/3
Igor Foltin [Mon, 15 Aug 2016 12:21:44 +0000 (14:21 +0200)]
Bug 6414: Fixed DataNodeIterator's traverseModule method

Method traverseModule now gets rpc output properly.

Change-Id: Ifdf6d2685ff63bc4548ac2e6b062412e1812ae40
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoRevert "Bug 5968: Mandatory leaf enforcement does not work in some cases" 68/43968/2
Robert Varga [Mon, 15 Aug 2016 12:12:18 +0000 (12:12 +0000)]
Revert "Bug 5968: Mandatory leaf enforcement does not work in some cases"

This reverts commit 1b987ae3e2484bbef1c9bdd7553bf0733ca06372, as it breaks lispflowmapping.

Change-Id: Ic1806c3f42dd73ecfe6357d9b7beea48c305520c
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: remove String-based getDataChildByName() 98/42898/7
Robert Varga [Mon, 1 Aug 2016 10:09:24 +0000 (12:09 +0200)]
BUG-865: remove String-based getDataChildByName()

This method has been long-deprecated and should be used
only in tests. Remove it.

Change-Id: I4095154ebe83cb8df32b320db91784d509d86c11
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 5968: Mandatory leaf enforcement does not work in some cases 09/42709/4
Peter Kajsa [Thu, 28 Jul 2016 13:05:16 +0000 (15:05 +0200)]
Bug 5968: Mandatory leaf enforcement does not work in some cases

When MapEntry nodes are directly written into datatree, mandatory leaf
enforcement works correctly. However, when a List, Container or any other
parent node containing MapEntry nodes as its children is written into datatree,
datatree does not check presence of mandatory nodes of in this way written
map entry nodes.

Change-Id: I366084f87011cc7519d4c2ef46dd61a2b2df7ceb
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
7 years agoIntro. new yangtools.testutils artifacts (incl. Mikito) 29/42529/8
Michael Vorburger [Tue, 26 Jul 2016 03:46:08 +0000 (05:46 +0200)]
Intro. new yangtools.testutils artifacts (incl. Mikito)

Seeding new project with proposed Mikito (new), and a
MockitoUnstubbedMethodExceptionAnswer (alternative to
yangtools.mockito-configuration; see the package-info.java in
mockito-configuration about why this is not being proposed in that
project).

Change-Id: I78237936924e0befc0ff17e7604e0fb33262d7cd
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 3899: Milestone: Increase test coverage for Yangtools 09/43509/3
Igor Foltin [Tue, 9 Aug 2016 13:20:11 +0000 (15:20 +0200)]
Bug 3899: Milestone: Increase test coverage for Yangtools

Added test for SchemaContextEmitter

Change-Id: If60531f0a84579519487075a340f73e68c2526eb
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoEliminate QNAME_FUNCTION 36/43336/2
Robert Varga [Mon, 8 Aug 2016 16:31:24 +0000 (18:31 +0200)]
Eliminate QNAME_FUNCTION

Use a method reference instead of a constant function.

Change-Id: Iaecd7a79cf86265cbb00fb60f612d2fe12577d63
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoUse lambdas instead of StmtContextUtils.build{Declared,Effecive} 62/42862/7
Robert Varga [Sun, 31 Jul 2016 19:18:06 +0000 (21:18 +0200)]
Use lambdas instead of StmtContextUtils.build{Declared,Effecive}

Using lambdas at actual call sites reduces verbosity and eliminates
the need for unchecked casts and temporary variables. It also makes
call sites for the two target methods a lot more visible.

Change-Id: I4016c9ba447e22a61aeff5ca98d3adb1b80ef81b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoImprove yang-maven-plugin error reporting for errors in dependencies 97/43497/3
Michael Vorburger [Tue, 9 Aug 2016 10:32:58 +0000 (12:32 +0200)]
Improve yang-maven-plugin error reporting for errors in dependencies

Instead of e.g. this: [ERROR] yang-to-sources: Unable to parse yang
files from
/home/vorburger/dev/ODL/git/netvirt/vpnservice/aclservice/impl/src/main/yang
java.util.zip.ZipException: invalid LOC header (bad signature) at
java.util.zip.ZipFile.read(Native Method)

it will now report the much more useful variation like this:
java.io.IOException: Exception when reading from:
/home/vorburger/.m2/repository/org/opendaylight/netvirt/neutronvpn-api/0.3.0-SNAPSHOT/neutronvpn-api-0.3.0-SNAPSHOT.jar::META-INF/yang/neutronvpn.yang
at (...)
Caused by: java.util.zip.ZipException: invalid LOC header (bad
signature)

similar to earlier https://git.opendaylight.org/gerrit/#/c/42193/

Change-Id: Ic5bcdc8597825cdc0506516618ec13ede6433bc7
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBump ietf versions to ...10-SNAPSHOT 15/43515/1
Thanh Ha [Tue, 9 Aug 2016 13:59:36 +0000 (09:59 -0400)]
Bump ietf versions to ...10-SNAPSHOT

Bump versions according to:
https://lists.opendaylight.org/pipermail/release/2016-August/007731.html

Change-Id: I30b795af5841d2f9043ffef6395423bf41ab6e09
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoBump versions by 0.1.0 for next dev cycle 55/43455/1
Thanh Ha [Mon, 8 Aug 2016 21:50:23 +0000 (17:50 -0400)]
Bump versions by 0.1.0 for next dev cycle

Change-Id: If7bd200bcf1b559e3fdb734af65e3547ee768d51
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoFix list modification with DataTree rooted at MapEntryNode 09/43309/2
Tomas Cere [Mon, 8 Aug 2016 12:26:57 +0000 (14:26 +0200)]
Fix list modification with DataTree rooted at MapEntryNode

Follow up to d8f0f2b146500275441ab8ba0cd2e1907f4b4ce4

We also need to handle the building of the list when rooted
at a MapEntry and return the correct node.

Change-Id: I60390e3fee4e34a44ee9f8836c8b9c147047691b
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoBug 6244: Add context to exceptions thrown by yang statement parser 13/43113/2
Igor Foltin [Thu, 4 Aug 2016 12:30:34 +0000 (14:30 +0200)]
Bug 6244: Add context to exceptions thrown by yang statement parser

Yang statement parser exceptions now contain information
about the failed module and its revision. This information is
represented by SourceIdentifier.

Change-Id: I4a48b5a1e38e0b91a76ac660b131511aefce14a5
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoFix list modification with DataTree rooted at MapEntryNode 25/43225/3
Tomas Cere [Fri, 5 Aug 2016 11:02:58 +0000 (13:02 +0200)]
Fix list modification with DataTree rooted at MapEntryNode

If we had a data tree that was rooted at a MapEntryNode the
node modification was incorrectly enforcing a MapEntryNode when
trying to write into the dataTree.

Change-Id: I9dc02a1917f38e8a0d62279843974b9869c48693
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoBug 3899: Milestone: Increase test coverage for Yangtools 20/43120/2
Igor Foltin [Thu, 4 Aug 2016 14:03:37 +0000 (16:03 +0200)]
Bug 3899: Milestone: Increase test coverage for Yangtools

Added several unit tests.

Change-Id: I67d1b4fa4f879d4af186e6c42c724d66de9ca5d2
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
7 years agoDo not use revision in AbstractEffectiveDocumentedNode 61/42861/4
Robert Varga [Sun, 31 Jul 2016 18:44:00 +0000 (20:44 +0200)]
Do not use revision in AbstractEffectiveDocumentedNode

Extracting reference from RevisionStatement inside any
DocumentedNode is invalid. RevisionStatements hold their
own reference and they are valid only for modules and
submodules -- which have a reference of their own.

Change-Id: I4522ebbc0449462f80609c1eb06f6a486f4af7af
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: hide SchemaPath constructor 97/42897/2
Robert Varga [Mon, 1 Aug 2016 09:51:24 +0000 (11:51 +0200)]
BUG-865: hide SchemaPath constructor

SchemaPath should not be subclassed outside of this package,
hide its constructor.

Change-Id: I7d5a73dcc537572220a831a0804deccf0d9f6e9d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix wrong javadoc 96/42896/2
Robert Varga [Mon, 1 Aug 2016 09:51:02 +0000 (11:51 +0200)]
Fix wrong javadoc

This is a copy&paste error, correct it.

Change-Id: Ia48b02c6bf28c5e8ca9338ebbfef50e3c6a7f2bc
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: Remove deprecated XmlStreamUtils constructor 95/42895/2
Robert Varga [Mon, 1 Aug 2016 09:45:04 +0000 (11:45 +0200)]
BUG-865: Remove deprecated XmlStreamUtils constructor

This constructor is no longer used and the class should not be subclassed.
Remove it.

Change-Id: If7b8d470ea66b2a99ec2fe9c4b978571c2413ff1
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: remove CloneableChildrenMap 93/42893/1
Robert Varga [Mon, 1 Aug 2016 09:39:01 +0000 (11:39 +0200)]
BUG-865: remove CloneableChildrenMap

This class has been deprecated and is not used anywhere. Remove
it.

Change-Id: I7d554de0b50e273a4468f247fdc73a10fdcb6e49
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: remove JSONCodec.needQuotes() 50/42850/2
Robert Varga [Sun, 31 Jul 2016 13:48:23 +0000 (15:48 +0200)]
BUG-865: remove JSONCodec.needQuotes()

This method is not anywhere and is part of internal contract,
remove it.

Change-Id: I9196b1257422598c97c12cabac97f87773d0993f
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMake Bit/EnumEffectiveStatementImpl inherit AbstractEffectiveDocumentedNode 60/42860/2
Robert Varga [Sun, 31 Jul 2016 18:29:58 +0000 (20:29 +0200)]
Make Bit/EnumEffectiveStatementImpl inherit AbstractEffectiveDocumentedNode

This removes a bit of code duplication and also fixed EnumEffectiveStatement
not reporting UnknownSchemaNodes.

Change-Id: I7fd1c99d364c9f3d11dd49be77e3a6e650be4c16
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: add proper nullness annotations 54/42854/2
Robert Varga [Sun, 31 Jul 2016 14:45:47 +0000 (16:45 +0200)]
BUG-865: add proper nullness annotations

This fixes the mistake of making DocumentedNode.getStatus()
nullable and adds explicit annotations to DocumentedNode,
SchemaNode and UsesNode.

Change-Id: Ibc773feeca2a3f61d8a74c5b6cbc3028a2f4d260
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: remove MustDefinitionImpl 53/42853/3
Robert Varga [Sun, 31 Jul 2016 14:25:01 +0000 (16:25 +0200)]
BUG-865: remove MustDefinitionImpl

This implementation is not used anywhere, remove it.

Change-Id: I10de6d971d6e2f7f66fbc073ba9272648ba2ddd8
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: Move ModuleImportImpl and hide it 52/42852/3
Robert Varga [Sun, 31 Jul 2016 14:20:43 +0000 (16:20 +0200)]
BUG-865: Move ModuleImportImpl and hide it

This implementation is used only in the parser,
move it to parser and hide it.

Change-Id: I9a469c01de5a5c077e6fd5aaf52ac6625fcce496
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: remove BitImpl 80/42780/6
Robert Varga [Fri, 29 Jul 2016 12:30:40 +0000 (14:30 +0200)]
BUG-865: remove BitImpl

Introduce a BitBuilder and remove public BitImpl class.

Change-Id: Icf6297192cba21773a89b87bae817ebb0eebad9e
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoPropagate @Deprecated annotation 79/42779/3
Robert Varga [Fri, 29 Jul 2016 12:11:08 +0000 (14:11 +0200)]
Propagate @Deprecated annotation

getDataChildByName(String) is deprecated, do not shadow
the annotation.

Change-Id: Ib1dbf3e7ea81bde65f79612854588315027398d8
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-865: remove deprecated EnumPairImpl 70/42670/6
Robert Varga [Thu, 28 Jul 2016 02:35:03 +0000 (04:35 +0200)]
BUG-865: remove deprecated EnumPairImpl

With all users migrated, this class can safely be removed.

Change-Id: I939ed0b1d127dabadd45134a83d50a7d3073ac74
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 5518: Beryllium yangtools gives error parsing files with Tail-F deref statement 47/42047/2
Peter Kajsa [Tue, 19 Jul 2016 13:17:36 +0000 (15:17 +0200)]
Bug 5518: Beryllium yangtools gives error parsing files with Tail-F deref statement

Added unit test which creates SchemaContext from yang model which contains call
of DEREF function in xpath expression of MUST statement. Both SchemaContext and
RevisionAwareXpath are created successfully.

Change-Id: I528da17dcd758d8c40904a6692603a833651d5e1
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>