mdsal.git
7 years agoIetf yang for access control list and the dependent yang are added. 23/39423/4
Aswin Suryanarayanan [Wed, 25 May 2016 15:45:55 +0000 (21:15 +0530)]
Ietf yang for access control list and the dependent yang are added.

Change-Id: Ibaf4d71da09da1c854df7a32409f7f47a67e5fe9
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
7 years agoBug 5947: Increasing code coverage - mdsal-dom-broker 93/39593/22
Peter Nosal [Fri, 20 May 2016 10:14:57 +0000 (12:14 +0200)]
Bug 5947: Increasing code coverage - mdsal-dom-broker

Change-Id: I83683f9a7ac835d118e7e4a3e8446f5f593221e4
Signed-off-by: Peter Nosal <peter.nosal@pantheon.tech>
7 years agoCleanup code 18/39718/2
Robert Varga [Wed, 1 Jun 2016 14:47:47 +0000 (16:47 +0200)]
Cleanup code

Unused imports, static methods, missing generics.

Change-Id: I11ec7de37c5f57a5e0c5f28ae7a51b060012df59
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 5947: Increasing code coverage for mdsal project 66/39166/13
Peter Nosal [Fri, 20 May 2016 10:14:57 +0000 (12:14 +0200)]
Bug 5947: Increasing code coverage for mdsal project
- increasing coverage for module mdsal-dom

Change-Id: I768341d7a9eded8fb080de3b0d40e2b9e9f44b35
Signed-off-by: Peter Nosal <peter.nosal@pantheon.tech>
7 years agoBUG 5979 - enforce cursors are closed on transaction submit 51/39751/3
Tomas Cere [Thu, 2 Jun 2016 09:11:45 +0000 (11:11 +0200)]
BUG 5979 - enforce cursors are closed on transaction submit

Properly close foreign transactions on close().
Add checks that prevent creation of new cursor's while there is another one open.

Change-Id: I21ad7ce809b1fbbf21ad1e72337267155330e9ad
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoBUG-5970: do not add value to union hashCode/equals/toString 54/39554/5
Robert Varga [Sat, 28 May 2016 10:17:22 +0000 (12:17 +0200)]
BUG-5970: do not add value to union hashCode/equals/toString

The value of a union is derived from its members and should not
be part of general Object methods, as the members are already
part of these methods.

Also override definition for getValue() and generate alternate
code to lazily fill _value. The output could use some visual
improvement, but that is something for another day.

It also fixes the copy constructor so it does not clone the
_value field unnecessarily.

Change-Id: Ibbbce99e1e84a0dfa55f70872fedad78e57e8f1e
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoGet rid of old Yang Parser 31/39631/2
Martin Ciglan [Tue, 31 May 2016 07:32:57 +0000 (09:32 +0200)]
Get rid of old Yang Parser

1. Make sure there is no YangParserImpl occurence in MD-SAL
2. Bit of clean-up

Change-Id: Id86e2017d28693887faa90b62b183c9407a2c05c
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
7 years agoFollow usual naming convention when old "retest" related stuff got deleted. 03/39603/3
Martin Ciglan [Mon, 30 May 2016 13:12:31 +0000 (15:12 +0200)]
Follow usual naming convention when old "retest" related stuff got deleted.
- import code style fix

Change-Id: Ieaf1d100e7c209d306eab747a2b445e08309d80c
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
7 years agoBUG 5697 : Consumer support in shards 54/38654/14
Tomas Cere [Fri, 29 Apr 2016 09:24:09 +0000 (11:24 +0200)]
BUG 5697 : Consumer support in shards

Change-Id: Ida05e5553421273c8d3bd5dcd74eaf0b1d3f6fb4
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoAdd src/main/yang as source path in build-helper-maven-plugin 75/39275/3
Michael Vorburger [Mon, 23 May 2016 16:18:29 +0000 (18:18 +0200)]
Add src/main/yang as source path in build-helper-maven-plugin

This is required by yangide so that in-workspace cross-project *.yang
references are correctly resolved; see
https://lists.opendaylight.org/pipermail/yangtools-dev/2016-May/001383.html
thread.

Change-Id: I81d07a94660bffea1953b949f507e62a7eaef4ee
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 5883 - no constructor for indentityref in union 22/38822/8
Isaku Yamahata [Tue, 10 May 2016 19:55:54 +0000 (12:55 -0700)]
Bug 5883 - no constructor for indentityref in union

The generated java code for union with identityref doens't include a
constructor for identityref.

module union-with-identityref {
    yang-version 1;
    namespace "urn:opendaylight:yang:union:test";
    prefix "uniontest";

    description "test union with identityref";

    revision "2016-05-09";

    identity ident-base;
    identity ident-one {
        base ident-base;
    }
    identity ident-two {
        base ident-base;
    }

    typedef union-type {
        type union {
            type uint8;
            type identityref {
                base ident-base;
            }
        }
    }
}

generated java code:
public class UnionType
 implements Serializable {
    private static final long serialVersionUID = 4724108168179933454L;
    private final java.lang.Short _uint8;
    private final char[] _value;

    public UnionType(java.lang.Short _uint8) {
        super();
        this._uint8 = _uint8;
        this._value = _uint8.toString().toCharArray();
    }

Change-Id: Idf8f7df54afd0934e47b19c131ea41d046a7b5df
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
7 years agoBug 5882: Wrong placement of deprecated annotation 59/38859/19
Filip Gregor [Fri, 13 May 2016 09:42:05 +0000 (11:42 +0200)]
Bug 5882: Wrong placement of deprecated annotation

Removed @Deprecated from generated Yang in javadoc
added deprecated annotation for generated getters
and typedefs

Change-Id: I251faabd0cdc051a646ead6f4bf65a17509b90c5
Signed-off-by: Filip Gregor <fgregor@cisco.com>
7 years agoBug 1411-1: Basic infrastructure & dependencies 67/38567/13
Martin Ciglan [Mon, 9 May 2016 11:21:29 +0000 (13:21 +0200)]
Bug 1411-1: Basic infrastructure & dependencies

1. new basic infrastructure for code generation in binding2:
    - mdsal-binding2-maven-api-gen-plugin
    - mdsal-model-binding2-parent
    - mdsal-binding2-generator-impl
    - mdsal-binding2-generator-api
    - mdsal-binding2-java-api-generator
    - mdsal-binding2-generator-util
2. relations & dependencies in pom.xml files
3. twirl/scala dependencies/plugins in place

Change-Id: If75b76526c3f3964d7fd3c4256e6bcf499201b4d
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
7 years agoMove binding v2 test models to correct directory 39/39239/2
Vratko Polak [Mon, 23 May 2016 08:15:06 +0000 (10:15 +0200)]
Move binding v2 test models to correct directory

Change-Id: I000feff42da19666a08a88f6316c2335572a8eb0
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBug 5845: can not transform ba to bi, when keys contain boolean type 57/38857/10
Filip Gregor [Fri, 13 May 2016 08:54:38 +0000 (10:54 +0200)]
Bug 5845: can not transform ba to bi, when keys contain boolean type

Reworked check for getter methods, added test method
for getting boolean key starts with is due to the fact
that it is a boolean.

As it turns out, LeafNodeCodecContext already gives us
a ready-made name via getGetter().getName(), so let's
use that.

Also take a moment to do some minor cleaups while we're
at it.

Change-Id: I36adc6ff37159dba257a6fa437ab55eb49ed1151
Signed-off-by: Filip Gregor <fgregor@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG 4202: Writes not correctly writing to current shard 47/39247/2
Tomas Cere [Mon, 23 May 2016 12:38:42 +0000 (14:38 +0200)]
BUG 4202: Writes not correctly writing to current shard

If we had a potential child writes were only writing the children
without actually writing the data that needed to go to the current
cursor location.

Change-Id: I38e7b8374e963fc6b2e3b98c360a6413dd54e886
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoAdded initial analysis of YANG 1.1 in context of MD-SAL. 80/37080/3
Tony Tkacik [Mon, 4 Apr 2016 14:43:08 +0000 (16:43 +0200)]
Added initial analysis of YANG 1.1 in context of MD-SAL.

Change-Id: I21d84c4e58393e05fa677e6560a0042ace4e5aa1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBinding v2: Testing module with two consecutive dots 22/37922/3
Vratko Polak [Wed, 20 Apr 2016 14:36:04 +0000 (16:36 +0200)]
Binding v2: Testing module with two consecutive dots

Currently in v1 this fails to generate sources.

Change-Id: Id415d3c512cf0db56ba817998cc4f5631b78c037
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoBinding v2: Add modules for testing package name collisions 74/37874/3
Vratko Polak [Wed, 20 Apr 2016 13:35:14 +0000 (15:35 +0200)]
Binding v2: Add modules for testing package name collisions

In v1, the source generation passes,
but the dot model overwrites sources of the other models.

Change-Id: I8b2996f948996f7608d66f1f89a7db4cabb72e90
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoAdd binding v2 model for data structures at module top level 03/37003/5
Vratko Polak [Fri, 1 Apr 2016 14:53:24 +0000 (16:53 +0200)]
Add binding v2 model for data structures at module top level

Just a Yang file, no actual unit test.

Change-Id: Iebd5e7214989b6527d6d8c764db9ba9edcb87b97
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoAdd binding v2 model for underscores as identifiers 02/37002/3
Vratko Polak [Fri, 1 Apr 2016 10:49:19 +0000 (12:49 +0200)]
Add binding v2 model for underscores as identifiers

This includes a submodule to test underscore as a prefix.

Just a Yang file, no actual unit test.

Change-Id: I16e4e193158565302e7dac0155d881b1c71e31b5
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoAdd binding v2 model for testing characters in identifier names 98/36998/4
Vratko Polak [Fri, 1 Apr 2016 10:15:22 +0000 (12:15 +0200)]
Add binding v2 model for testing characters in identifier names

Just a Yang file, no actual unit test.

Change-Id: I548179ae3d60dd3a73a19847a9e889f554c7c942
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoAdd binding v2 model for testing identifier namespaces 97/36997/3
Vratko Polak [Fri, 1 Apr 2016 10:05:04 +0000 (12:05 +0200)]
Add binding v2 model for testing identifier namespaces

Just a Yang file, no actual unit test.

Change-Id: I94ec9dca335a81b55b2aa23764bec6ea100ac7a4
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
8 years agoadd .checkstyle to .gitignore 70/39070/2
Isaku Yamahata [Wed, 18 May 2016 21:17:21 +0000 (14:17 -0700)]
add .checkstyle to .gitignore

Change-Id: Id99b8e2d23afc860c6c544fb2f863e8043483137
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoBug 1411: Design Binding specification v2 35/37735/12
Martin Ciglan [Mon, 18 Apr 2016 14:53:33 +0000 (16:53 +0200)]
Bug 1411: Design Binding specification v2

This patch represents initial prototyping of binding specification v2 where:
- Java code was generated from YANG module with binding spec v1
- manually refactored according to new v2 rules for packages
- added readme.adoc

notes:
- generated structures
- yang-binding refactored
- grouping & data package suffix added
- trailling whitespaces fixed

Change-Id: I1ae6051867f793e0502b72e3d030122001d6a158
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
8 years agoRemoved usage of deprecated YangParserImpl from tests in mdsal project 72/38972/2
Peter Nosal [Tue, 17 May 2016 13:09:07 +0000 (15:09 +0200)]
Removed usage of deprecated YangParserImpl from tests in mdsal project

Change-Id: I0e5d5e565c97d1ecdc1f764609382be3dda2ef59
Signed-off-by: Peter Nosal <peter.nosal@pantheon.tech>
8 years agoRemove @Deprecated ClassLoaderUtils as it's now in yangtools.util 56/38656/2
Michael Vorburger [Wed, 11 May 2016 10:46:05 +0000 (12:46 +0200)]
Remove @Deprecated ClassLoaderUtils as it's now in yangtools.util

Not sure what ODL policy is re. clean up of deprecated classes, so I'm
proposing to killing one, and see what happens... ;-)
https://twitter.com/drdeprecator

More seriously, it's probably safer if critical code such as ClassLoader
related stuff is maintained in a single place, not in two copy/pasted
classes. (If we have to keep this, perhaps it could delegate to the new
one instead of copy/paste?)

Change-Id: Icac8d4f81ba102bba37e11b611874db3dea49793
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
8 years agoBug 5788: enum used as a key does not work 06/38106/4
Filip Gregor [Tue, 26 Apr 2016 08:54:54 +0000 (10:54 +0200)]
Bug 5788: enum used as a key does not work

fixed Qname check for enum as key from grouping in
bindingGeneratorImpl

Change-Id: Id6521d28a4b9aebcd1dfca2d33e8dfed68e9a269
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoBug 1411: Binding specification v2 77/38277/7
Martin Ciglan [Mon, 2 May 2016 15:01:27 +0000 (17:01 +0200)]
Bug 1411: Binding specification v2

  - added examples

Change-Id: I3ab803f2cf7a53e20edcda601ed6bcc9c0a69ed2
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoBug 5446: toString() throws exception for 'type binary' binding 72/38272/3
Peter Kajsa [Mon, 2 May 2016 12:07:26 +0000 (14:07 +0200)]
Bug 5446: toString() throws exception for 'type binary' binding

Binding UnionTypeCodec invokes toString method on byte[] array
by its deserialization which leads to undesirable results.
The same problem occurs also in generated java class of Union type.

Change-Id: I61b7500541a1dd86ba7c39377113a12eb270a274
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoBug 5461: Augmenting a choice without a case from another module causes NPE 49/36249/8
Filip Gregor [Fri, 11 Mar 2016 12:41:57 +0000 (13:41 +0100)]
Bug 5461: Augmenting a choice without a case from another module causes NPE

fixed case creation, added tests

Change-Id: Ida25d45893058f320c0373355d41cc8c4b981f84
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoBUG-5414 introduce EOS inJeopardy flag 56/37956/2
Vaclav Demcak [Mon, 18 Apr 2016 16:05:46 +0000 (18:05 +0200)]
BUG-5414 introduce EOS inJeopardy flag

The inJeopardy flag is used to indicate that the leader has lost quorum,
e.g. if cannot reach majority of followers or the follower has lost connection
to the leader (and has initiated new elections).

While EOS is in jeopardy, any reported entity state may not reflect cluster-wide
consensus, but rather represents the latest intended state as seen by this node.

Depend on:
https://git.opendaylight.org/gerrit/#/c/36752/7

Change-Id: I8f17fb97dd6ec54222b783bb7b4b827ce9b4a0ad
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
8 years agoBinding2: Added concepts. 91/38191/5
Martin Ciglan [Mon, 2 May 2016 11:07:54 +0000 (13:07 +0200)]
Binding2: Added concepts.
 - minor fixes

Change-Id: Ic098b74d1ad53956528dccd4e5144c172d48fc22
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
8 years agoBump xtend/xtext to 2.9.2 19/37119/10
Robert Varga [Mon, 4 Apr 2016 21:09:34 +0000 (23:09 +0200)]
Bump xtend/xtext to 2.9.2

The xtend folk made the leap to guava 14-18 in their latest
release, update to it.

Change-Id: I6c75038d0392bca179e3e28ac6a1709d7000ea76
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-1862: Incorrect type transformation in TypeProviderImpl 65/27165/15
Robert Varga [Thu, 17 Sep 2015 23:56:29 +0000 (01:56 +0200)]
BUG-1862: Incorrect type transformation in TypeProviderImpl

added new interface and implementation, introduced new type

Change-Id: I70c625c0a182fb01147fdb14f48ea4c0b904b3a7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoCreated repository README 98/38198/2
Tony Tkacik [Thu, 28 Apr 2016 15:09:56 +0000 (17:09 +0200)]
Created repository README

Overview is based on overview section from documentation.
Added small contributing section which needs to be expanded
to describe contribution to Opendaylight or link to existing section.

Change-Id: I43b5fd9a950b4bf95d2d25f99440aa0d44723bc5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4202: submit shard transactions 32/37332/10
Tomas Cere [Fri, 18 Mar 2016 09:38:59 +0000 (10:38 +0100)]
Bug 4202: submit shard transactions

Change-Id: I27dd78a1c70edf99de646ccd1f3bf69775e829bc
Signed-off-by: Tomas Cere <tcere@cisco.com>
8 years agoSite: Added skeletons for documentation. 97/38197/2
Tony Tkacik [Thu, 28 Apr 2016 15:02:45 +0000 (17:02 +0200)]
Site: Added skeletons for documentation.

Change-Id: I5b74acecf67a939b91c0c27cdec417b9902e373f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBinding2: Added WIP text of Specification. 13/38013/2
Tony Tkacik [Fri, 22 Apr 2016 12:02:54 +0000 (14:02 +0200)]
Binding2: Added WIP text of Specification.

Bug 157:
  Described namespace problem and solution by
  having separate packages for identities,types, keys
  groupings and data

Bug 4625:
  Described groupings and instantiation of data

Change-Id: I61f84ae7ca7b2ee62e4e49a7ce155e4c20813a97
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoAdded initial maven structure for Binding 2 88/37788/2
Tony Tkacik [Fri, 15 Apr 2016 10:15:19 +0000 (12:15 +0200)]
Added initial maven structure for Binding 2

Change-Id: Idd72303babb3ddad5c64b18c574556dec7e73859
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoRemove duplicates. 68/36168/2
Ed Warnicke [Sun, 13 Mar 2016 21:00:06 +0000 (14:00 -0700)]
Remove duplicates.

dom/mdsal-artifacts
and
dom/sal-test-model

are not built in mdsal, but are duplicates of the existing
ones in controller.  Removing these here to clean up.

Change-Id: I51845c2cb61bf0b829a5c70dd7c9bd203a0284fe
Signed-off-by: Ed Warnicke <eaw@cisco.com>
8 years agoCheck augments for equality in LazyDataObject 10/38010/2
Maros Marsalek [Mon, 18 Apr 2016 07:58:58 +0000 (09:58 +0200)]
Check augments for equality in LazyDataObject

LazyDataObject did not check augments when performing equals()
returing true for un-equal augmentable dataObjects

Hashcode already includes augments in the calculation

Change-Id: Ic57c3c6f70eaea26de938ecb4e3ca67026e1965d
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
(cherry picked from commit bbb707d67bf55f055c2c8790392f2fab03233a1d)

8 years agoBug 1411: Initial drop of analysis of Binding v2 76/37176/8
Martin Ciglan [Wed, 20 Apr 2016 07:22:41 +0000 (09:22 +0200)]
Bug 1411: Initial drop of analysis of Binding v2

Described initial known issues of v1
  - cathegorized them based on issue type
  - linked them to bugzilla

Added appendixes which contains list of
changes in YANG 1.1 and list of valid changes
when updating (revisioning) existing YANG module.

Added appendix - refactoring YANG model example
Added appendix - augmenting YANG model example
Added appendix - various YANG model snippets & mappings

Change-Id: Iee7cc48b7e07187dfeb2c4943306c3120945f008
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
8 years agoMoved Concentual Data Tree to Maven Site. 88/37188/5
Tony Tkacik [Fri, 8 Apr 2016 07:49:33 +0000 (09:49 +0200)]
Moved Concentual Data Tree to Maven Site.

Change-Id: Iccd28081f0de5e7c5e08db6bdd41eff8b9d1a169
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 5524: NPE in BA->BI serialization 12/37312/3
Filip Gregor [Fri, 8 Apr 2016 07:39:44 +0000 (09:39 +0200)]
Bug 5524: NPE in BA->BI serialization

added check to RuntimeContext, tests

Change-Id: I5574469506cd6a7df5a54b47e3cdca34a68c7834
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoAdd more clarifications 82/37182/3
Robert Varga [Wed, 6 Apr 2016 11:22:29 +0000 (13:22 +0200)]
Add more clarifications

Change-Id: Ic2eb154fc0b9158683633578aa1cfdfbf32bddcb
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoCut down xtend dependencies 02/37102/7
Robert Varga [Mon, 4 Apr 2016 19:17:45 +0000 (21:17 +0200)]
Cut down xtend dependencies

This cuts down the dependencies required to the single jar
our use of xtend requires. Even that is gutted to only take
minimum contents, as needed by the generated code.

Change-Id: Ia47f7f6c658a48018fb0e8deffbd1a6076288da0
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMinimize xtend code in mdsal-binding-generator-impl 86/37086/4
Robert Varga [Mon, 4 Apr 2016 16:11:10 +0000 (18:11 +0200)]
Minimize xtend code in mdsal-binding-generator-impl

This introduces YangTextTemplate as a Java class and moves the trivial
bits of java code from xtend to Java.

As a side-effect it also fixes space trimming code, which has never worked
due to xtend bug, which lead to characters being compared via Char.equals(String).

Change-Id: Ia86db1136fca056cf5c0e21b55e1cc904870664a
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoEditorial changes - please review 18/37118/3
Jan Medved [Tue, 5 Apr 2016 05:10:19 +0000 (22:10 -0700)]
Editorial changes - please review
Removed white spaces at line ends
More white spaces at line ends removed

Change-Id: I07b5b18df7b5a4b44edb36193c880c848954de50
Signed-off-by: Jan Medved <jmedved@cisco.com>
8 years agoDo not use compile dependency for embedded code 73/37073/4
Robert Varga [Mon, 4 Apr 2016 13:26:22 +0000 (15:26 +0200)]
Do not use compile dependency for embedded code

We are embedding xtend and its dependencies into our jar and using
compile dependency means karaf plugin will download the jars as it
will see it as a runtime dependency.

Degrade the dependency to scope=provided, as we will provide the
dependencies by our own jar. This breaks maven-xtend-plugin, which
needs guava<15 and relies on it being pulled in transitively. Fix that
by adding an explitic dependency in plugin declaration.

Change-Id: Idb358bca4ce8eab7179d6867e603dd6b2306e732
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoDo not depend on java-api-generator 72/37072/2
Robert Varga [Mon, 4 Apr 2016 13:23:53 +0000 (15:23 +0200)]
Do not depend on java-api-generator

The api generator is not part of features, do not specify it as a dependency.
Same is true for the maven plugin.

Change-Id: I6ca54e65e6b98662b087c95d887acf448b952731
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoIntroduced design document for Data Tree 09/37009/1
Tony Tkacik [Fri, 1 Apr 2016 14:02:36 +0000 (16:02 +0200)]
Introduced design document for Data Tree

- Converted https://wiki.opendaylight.org/view/MD-SAL:Boron:Conceptual_Data_Tree
  into asciidoc
- added terminology section
- included and extended sections for
    Data Tree Listener
    Data Tree Producer
    Data Tree Shard
  based on content presented on ODL Summit 2015

Change-Id: I9b7387c408b465398e36e5473ee8fd3d9e93b214
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoAdd ipPrefixFor() methods to IetfInetUtil 44/36444/3
Lorand Jakab [Thu, 24 Mar 2016 11:17:14 +0000 (13:17 +0200)]
Add ipPrefixFor() methods to IetfInetUtil

Change-Id: I64458af9ba68041baba2e65cc53a21595b561a53
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
8 years agoBug 4760: YANG leaf named 'class' breaks write with netconf connector 68/35968/6
Filip Gregor [Mon, 25 Jan 2016 15:15:39 +0000 (16:15 +0100)]
Bug 4760: YANG leaf named 'class' breaks write with netconf connector

added new method for changing "Class" to "XmlClass" to bindingmapping
added tests

Change-Id: I27503d5756259b61500e2eaf90cdfceba0ebbe80
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoBug 4798: Can not define a list as a subordinate 92/35392/4
Filip Gregor [Fri, 5 Feb 2016 14:12:07 +0000 (15:12 +0100)]
Bug 4798: Can not define a list as a subordinate

added check for NodeIdentifierWithPredicates

Change-Id: If21b06a035232f04deda8369fb09b48d0fe45def
Signed-off-by: Filip Gregor <fgregor@cisco.com>
8 years agoBUG-2825: switch to custom IPv6 parsing 02/35402/6
Robert Varga [Thu, 25 Feb 2016 14:32:37 +0000 (15:32 +0100)]
BUG-2825: switch to custom IPv6 parsing

Do not use Guava for parsing IPv6 addresses, but use our BSD-based,
customized version.

Change-Id: I5574afd7d6020e25c83fd55d650949eaf2a980e3
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoRemove dependencies on Module.getModuleSourcePath() 09/35509/2
Robert Varga [Sat, 27 Feb 2016 13:00:41 +0000 (14:00 +0100)]
Remove dependencies on Module.getModuleSourcePath()

The source path is not something that can be expressed, as we may not
even have the YANG sources for a particular model. Do not use it.

Change-Id: I6c193edb7bae4d7dfd83e576c9618196aa06b4cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAdd AutoCloseable to BindingDOMEntityOwnershipServiceAdapter 85/35485/2
Tom Pantelis [Fri, 26 Feb 2016 14:53:25 +0000 (09:53 -0500)]
Add AutoCloseable to BindingDOMEntityOwnershipServiceAdapter

BindingDOMEntityOwnershipServiceAdapter now implements AutoCloseable to
make it convenient for return from *Module.createInstance.

Change-Id: Ic8efffa62abb058e483ba1781c4339c7627e8f15
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAdd IpAddress->InetAddress conversion utilities 93/35493/1
Robert Varga [Fri, 26 Feb 2016 21:34:09 +0000 (22:34 +0100)]
Add IpAddress->InetAddress conversion utilities

These seem to be handy, so provide them out-of-box.

Change-Id: I4f203c713e2b802f16529e51916a9d4340bf809f
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoDo not hold cache values in soft references 68/35468/2
Robert Varga [Fri, 26 Feb 2016 12:46:51 +0000 (13:46 +0100)]
Do not hold cache values in soft references

This increases memory overhead of the cache for not good reason, fix
that.

Change-Id: Ib55a7eb2e0a2066a70fe9a7eefa90771e028e8da
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoUse a constant append string 56/35456/2
Robert Varga [Fri, 26 Feb 2016 10:26:11 +0000 (11:26 +0100)]
Use a constant append string

Instead of appending a '.' and a constant integer, append ".0".

Change-Id: I51135b6e1ee8e2c43120bf4ff6957a95e2179ee2
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAdd field type check 55/35455/2
Robert Varga [Fri, 26 Feb 2016 10:22:22 +0000 (11:22 +0100)]
Add field type check

Eagerly check if the field being accessed is in fact a Map, so we
prevent ClassCast exceptions.

Change-Id: I59322cbde9dfc6df8ab122b71e77644f64d5e302
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoUse MethodHandle to acquire augmentations 46/35446/5
Robert Varga [Fri, 26 Feb 2016 08:11:50 +0000 (09:11 +0100)]
Use MethodHandle to acquire augmentations

Binding a method handle results in faster execution speed than using a
reflective field getter.

Change-Id: Id82242dad28b788bb8c2063854b32a13db19bae1
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-2825: introduce Ipv4 prefix parser for short bytes 22/35422/2
Robert Varga [Thu, 25 Feb 2016 20:42:44 +0000 (21:42 +0100)]
BUG-2825: introduce Ipv4 prefix parser for short bytes

BGP uses a short encoding schema, where they have only partial byte
array. Add support for parsing such short byte arrays, padding the tail
with zeros.

Change-Id: Ib4ce202256d26b1cbee23e05320d8cef6f729257
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: refactor to allow for embedding 01/35401/2
Robert Varga [Thu, 25 Feb 2016 14:24:38 +0000 (15:24 +0100)]
BUG-2825: refactor to allow for embedding

IetfInetUtils acts as the frontend for both addresses and prefixes,
hence the conversion needs to fill a byte array and get the limits from
its caller.

Change-Id: Ie15723db8c8a6cd37131d9a082aa86c9d6b8e171
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: more IPv6 tests 00/35400/2
Robert Varga [Thu, 25 Feb 2016 11:48:00 +0000 (12:48 +0100)]
BUG-2825: more IPv6 tests

Change-Id: Ia2172d7d03c3861d2d9b900758daa1b196ac35b3
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: use array operations to move/zero arrays 90/35390/6
Robert Varga [Thu, 25 Feb 2016 11:27:50 +0000 (12:27 +0100)]
BUG-2825: use array operations to move/zero arrays

Instead of an open-coded loop, perform element movement and zeroing out
in two steps using System.arrayCopy() and Arrays.fill().

Change-Id: Ide8509ecba7ef0a41df4832ed4832e691cefda6c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: rename have_xdigit 89/35389/4
Robert Varga [Thu, 25 Feb 2016 11:07:45 +0000 (12:07 +0100)]
BUG-2825: rename have_xdigit

Do not use an underscore and make sure the name relates to the fact that
the contents of 'val' are valid and need to be propagated to the byte
array.

Change-Id: I4596a679b9c8e871ba57aaae1a59d8df01383803
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: Cleanup comments 88/35388/4
Robert Varga [Thu, 25 Feb 2016 10:59:25 +0000 (11:59 +0100)]
BUG-2825: Cleanup comments

Convert single-line comments to // notation

Change-Id: I55bc36aa405a96ac42e16490004fcf4c5b60ad65
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: remove unused calculation 87/35387/4
Robert Varga [Thu, 25 Feb 2016 10:43:18 +0000 (11:43 +0100)]
BUG-2825: remove unused calculation

Funky way of writing a constant, let's fold it. Make it clearer what we
are doing and also helps the compiler.

Change-Id: I64e6667347568e0e472b053508c545e5b79fff3a
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: reuse IPv4 address formatting 86/35386/4
Robert Varga [Thu, 25 Feb 2016 10:55:54 +0000 (11:55 +0100)]
BUG-2825: reuse IPv4 address formatting

Do not instantiate an Inet4Address, but dump the bytes using our
home-grown utility.

Change-Id: I1d32593ca7871ac4ce9eba880a3221def9a9619f
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: do not check tautology 73/35373/5
Robert Varga [Thu, 25 Feb 2016 02:06:38 +0000 (03:06 +0100)]
BUG-2825: do not check tautology

We do not need to check j for size if we previously set it. Move
the verification check into its own branch.

Change-Id: I18766f1ec9733fc5065c384256d9f2a5af69a497
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: do not instantiate a temporary string 72/35372/5
Robert Varga [Thu, 25 Feb 2016 02:01:36 +0000 (03:01 +0100)]
BUG-2825: do not instantiate a temporary string

In case of a classifier being present, it is sufficient to adjust the
logical string length we are going to touch.

Change-Id: I33a4bf70042bab1bf720975eeb6482709111969c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: do not instatiate temporary array 71/35371/5
Robert Varga [Thu, 25 Feb 2016 01:57:03 +0000 (02:57 +0100)]
BUG-2825: do not instatiate temporary array

Change-Id: I1450116d13f9381d04c01f6a4b4f46a1b840cd9e
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: move code around and improve hex lookup 70/35370/5
Robert Varga [Thu, 25 Feb 2016 01:44:43 +0000 (02:44 +0100)]
BUG-2825: move code around and improve hex lookup

This patch moves the individual blocks around so we end up with faster
hex lookup.

Change-Id: Ib2e2043f9d4dd28c77fe36012eb21506cad14687
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: expand IPv6 test suite 84/35384/2
Robert Varga [Thu, 25 Feb 2016 11:48:00 +0000 (12:48 +0100)]
BUG-2825: expand IPv6 test suite

This adds some framework for ease of writing test cases and adds some
more.

Change-Id: I85ddc21e90b35629332a51fba8e9751d6f6457c9
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: rename method name 85/35385/2
Robert Varga [Thu, 25 Feb 2016 11:54:14 +0000 (12:54 +0100)]
BUG-2825: rename method name

Shorten the method name for clarity.

Change-Id: I2e9c6e9cd1232dc4d4dbd1f5722b84e55fc9eec7
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: simplify test clarity 83/35383/1
Robert Varga [Thu, 25 Feb 2016 11:39:44 +0000 (12:39 +0100)]
BUG-2825: simplify test clarity

Change-Id: Id672b1b13abd9a5d59608e14884d85a06e51d72a
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: import IPv6 test 82/35382/1
Robert Varga [Thu, 25 Feb 2016 11:36:08 +0000 (12:36 +0100)]
BUG-2825: import IPv6 test

Imports the basic test from Ipv6UtilsTest.

Change-Id: I8f221b8172040fa053680ff8561552b88b16210c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-2825: import IPv6 parsing code 65/35365/1
Robert Varga [Thu, 25 Feb 2016 01:18:19 +0000 (02:18 +0100)]
BUG-2825: import IPv6 parsing code

This is a movement of code from
I7b436c3cf06a24d6ebb745c9a0d8c04ab1d43ee8.

Change-Id: I566575b9cd226f1f2c8ed026d602b4cfa96576c2
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoAdd prefix-to-bytes conversion 90/35290/1
Robert Varga [Tue, 23 Feb 2016 20:22:53 +0000 (21:22 +0100)]
Add prefix-to-bytes conversion

Direct conversion to a single array, contains the address plus the
prefix at the last byte (unsigned).

Change-Id: I365ea3f04aa5f22edda7af4970c8fee1c51d809e
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAdd IpAddress-to-bytes conversion 47/35247/1
Robert Varga [Mon, 22 Feb 2016 16:38:41 +0000 (17:38 +0100)]
Add IpAddress-to-bytes conversion

This adds utilities aware of the validated format, making them correct
with respect to zone identifiers. The IPv4 conversion is also faster due
to the fact it can rely on well-formedness of the argument.

Change-Id: I28014d15107562e7dc6193eb6f8198586e839d5b
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFix same-package check 19/35219/3
Robert Varga [Mon, 22 Feb 2016 18:08:34 +0000 (19:08 +0100)]
Fix same-package check

The check using getClass() is completely broken. Use getClassName() and
perform a string match.

Change-Id: I95187117119e949d2492725022825726bd4639a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAdd MacAddress-to-bytes conversion 16/35216/5
Robert Varga [Mon, 22 Feb 2016 16:38:41 +0000 (17:38 +0100)]
Add MacAddress-to-bytes conversion

This is useful and can rely on well-formedness of the mac address.

Change-Id: Ia41ecc74ed8ef3c3560cc920305cc4a9bff028dc
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoUnify prefix splitting 95/35195/1
Robert Varga [Mon, 22 Feb 2016 14:00:52 +0000 (15:00 +0100)]
Unify prefix splitting

Instead of duplicating code, create a static utility method to perform
the string split.

Change-Id: I3c25b1cff00fa61e037dc94fb9951fd998567455
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoMore IetfInetUtil methods 89/35189/1
Robert Varga [Mon, 22 Feb 2016 13:37:40 +0000 (14:37 +0100)]
More IetfInetUtil methods

Fix IPv6 address formatting and introduce more conversion methods.

Change-Id: Ib032166819bed9c31932ad6b7c33db6263b12f6c
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoUse zero-compressed IPv6 addresses 41/35141/1
Robert Varga [Sat, 20 Feb 2016 22:58:24 +0000 (23:58 +0100)]
Use zero-compressed IPv6 addresses

Guava provides a utility method which converts Inet6Address to
zero-compressed string.

Change-Id: I182800b9a555cc620d397ef6f1d8eec9315c6dea
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoFix wrong groupId 04/35104/1
Robert Varga [Fri, 19 Feb 2016 14:59:19 +0000 (15:59 +0100)]
Fix wrong groupId

Change-Id: I1d38ba9a8f0fe65d8ec4ead15022f5951e2915a9
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoInherit from odlparent-lite 70/35070/2
Robert Varga [Fri, 19 Feb 2016 12:24:25 +0000 (13:24 +0100)]
Inherit from odlparent-lite

No need to perform the entire odlparent thing in aggregator, inherit
from -lite.

Change-Id: I7dd6dccf97ee3f1fc50730ae078be0416f08041d
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoDo not use deprecated APIs 54/35054/2
Tony Tkacik [Fri, 19 Feb 2016 10:12:39 +0000 (11:12 +0100)]
Do not use deprecated APIs

Changed imports from deprecated yangtools.binding.codec
to mdsal.binding.dom.codec which are replacement.

Change-Id: Ia29840f02252d599e38fe82b42d0754fe8fbb5bd
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBUG-2825: add utility methods for instantiating DTOs 69/34869/10
Robert Varga [Thu, 18 Feb 2016 00:49:05 +0000 (01:49 +0100)]
BUG-2825: add utility methods for instantiating DTOs

Change-Id: I9a98c55b850bf13695c8f581f8acee81705d570b
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoCorrect generator path 47/35047/2
Robert Varga [Fri, 19 Feb 2016 09:38:42 +0000 (10:38 +0100)]
Correct generator path

It should point to generated-sources, not to generated-classes.
Otherwise it is not correctly ignored by checkstyle.

Change-Id: Ic369d99ee063289fb529d4d63638d8206683bbf9
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFix checkstyle warnings 46/35046/3
Robert Varga [Fri, 19 Feb 2016 08:39:09 +0000 (09:39 +0100)]
Fix checkstyle warnings

Wrong order of imports and braindead if(){.

Change-Id: Iedf8e712c350f373410a8c558b30792c9deda763
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRemove use of QName.cachedReference() 91/34891/1
Robert Varga [Thu, 18 Feb 2016 09:48:48 +0000 (10:48 +0100)]
Remove use of QName.cachedReference()

This method in obsolete, use intern() instead.

Change-Id: Ib81bb55117138a697722dbf4ab2348a8a2643922
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoTurn a method static 90/34890/1
Robert Varga [Thu, 18 Feb 2016 09:47:34 +0000 (10:47 +0100)]
Turn a method static

Change-Id: Id82bb4cb0b8e070811aae5cd29fbb984f79325b3
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRemove unused imports 40/34640/2
Robert Varga [Sun, 14 Feb 2016 23:03:36 +0000 (00:03 +0100)]
Remove unused imports

Change-Id: Id3081743b7c9bead6ac2d6ec73943fb092a95a4c
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4202: ForeignShardModificationContext should check readiness 44/34644/3
Robert Varga [Sun, 14 Feb 2016 23:22:53 +0000 (00:22 +0100)]
BUG-4202: ForeignShardModificationContext should check readiness

This adds the defenses needed to make sure this context does not get
abused.

Change-Id: I8ab60018d567715ab96c0e0ff4cfcf8f0c412793
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFix versions import 45/34145/2
Robert Varga [Tue, 2 Feb 2016 15:00:57 +0000 (16:00 +0100)]
Fix versions import

Change-Id: I3e672756f0ee59eb7a61fcacfc048762907723f2
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4202: Initial prototype of subshard aware Shard implementation 43/32143/10
Tony Tkacik [Tue, 5 Jan 2016 15:29:58 +0000 (16:29 +0100)]
BUG-4202: Initial prototype of subshard aware Shard implementation

Drop-in new functionality without actually wiring it to the outside
world.

Change-Id: I86abc031896b72b7f3e373156cf5b0f334a1471a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoEnable site generation for mdsal 30/34630/2
Thanh Ha [Sat, 6 Feb 2016 04:52:59 +0000 (23:52 -0500)]
Enable site generation for mdsal

Change-Id: I9c01bd8ac2a4d3c011e271535e435ab2412b5445
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>