mdsal.git
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>
8 years agoFix javadoc formatting issues in mdsal-binding-* 29/34629/2
Thanh Ha [Sat, 6 Feb 2016 20:01:03 +0000 (15:01 -0500)]
Fix javadoc formatting issues in mdsal-binding-*

- Fix javadoc '<' and '>' to &lt; and &gt; escape characters
- Fix @link syntax issues
- Fix missing @throws definitions

Change-Id: I7f52dbdf7ae9e25e3ac37753bce78e8732730aaa
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix javadoc formatting issues mdsal-binding-generator-* 28/34628/1
Thanh Ha [Sat, 6 Feb 2016 05:08:28 +0000 (00:08 -0500)]
Fix javadoc formatting issues mdsal-binding-generator-*

- Fix javadoc '<' and '>' to &lt; and &gt; escape characters
- Fix @link syntax issues
- Fix missing @throws definitions

Change-Id: Ia0a3859f50fabae747fb090098ade5836d594eda
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 1672: Generated javadoc contains symbols of javadoc comment tags 07/33207/4
Igor Foltin [Thu, 21 Jan 2016 13:26:16 +0000 (14:26 +0100)]
Bug 1672: Generated javadoc contains symbols of javadoc comment tags

Angle brackets in javadoc comments generated from
yang statement descriptions are now properly encoded.

Change-Id: I9138c32cc912d2c4695da8e1d2e2e988f16194e1
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
8 years agoUse revision range for importing lmax 83/33883/1
Robert Varga [Tue, 2 Feb 2016 11:05:46 +0000 (12:05 +0100)]
Use revision range for importing lmax

Do not use the property, but rather a revision range.

Change-Id: Id0994e99fb7aad734f19c1571bb35ee2d531db9d
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG 4869: Remove lmax version declaration 20/33820/1
Tony Tkacik [Fri, 29 Jan 2016 09:57:20 +0000 (10:57 +0100)]
BUG 4869: Remove lmax version declaration

 - use odl-lmax feature

Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Change-Id: I8ce55c70c218441f0186f6089d2d4de51f5919e8

8 years agoBUG-5019: adjust to changed NormalizedNodeStreamWriter API 31/33231/2
Robert Varga [Thu, 21 Jan 2016 17:34:03 +0000 (18:34 +0100)]
BUG-5019: adjust to changed NormalizedNodeStreamWriter API

This patch adds the required information for leafSetEntry() method.

Change-Id: I057d4d6f9ee6aaac1e6a1b0e5da27b8e92ced717
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRevert "Bump yangtools to 1.0.0-SNAPSHOT" 13/33313/1
Thanh Ha [Thu, 21 Jan 2016 23:24:13 +0000 (18:24 -0500)]
Revert "Bump yangtools to 1.0.0-SNAPSHOT"

This reverts commit 4013b20c7440d69d8b926901827d632ec8d44574.

Not sure {{VERSION}} needed to be changed after all.

Change-Id: Iedad9279d3c3fe750d6882628212f22cdaf83872
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBump yangtools to 1.0.0-SNAPSHOT 09/33309/1
Thanh Ha [Thu, 21 Jan 2016 23:14:08 +0000 (18:14 -0500)]
Bump yangtools to 1.0.0-SNAPSHOT

Change-Id: I2a088e738056669a13cab2edf6def0e8dd73ab4d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBump yangtools to 1.0.0-SNAPSHOT 77/33277/2
Thanh Ha [Thu, 21 Jan 2016 21:03:37 +0000 (16:03 -0500)]
Bump yangtools to 1.0.0-SNAPSHOT

Change-Id: If0996a4bd580f7288ac53e4654b7d195ba89839f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoEmit schema nodes in BindingToNormalizedStreamWriter 67/32967/2
Robert Varga [Mon, 18 Jan 2016 21:50:52 +0000 (22:50 +0100)]
Emit schema nodes in BindingToNormalizedStreamWriter

ImmutableNormalizedNodeStreamWriter has memory optimizations based on
knowledge gleaned from a node's schema. More specifically it can reuse
instances of leaf and leafset entries if their value is known to have
low cardinality.

Change-Id: Ie3ef3489e12501b43341da0fc97994984fe5c625
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBug 4647: Binding Codec does not provide leaf default value for identityref 11/32411/2
Igor Foltin [Tue, 12 Jan 2016 12:12:29 +0000 (13:12 +0100)]
Bug 4647: Binding Codec does not provide leaf default value for identityref

Fixed handling of leaf default value for identityref type
even when there is a prefix in the default value.

Also removed obsolete code.

Change-Id: I5a4e1bf67705538f95f001a6eee42926d20c64b4
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
8 years agoBug 2784: status deprecated is not interpreted as annotation 90/32290/7
Martin Ciglan [Fri, 8 Jan 2016 16:03:44 +0000 (17:03 +0100)]
Bug 2784: status deprecated is not interpreted as annotation

Issues mentioned below have been fixed in this patch:
1. status deprecated is ignored for YANG elements in Javadocs
2. Annotation @deprecated is not provided in Javadocs
3. Annotation @Deprecated for compiler/developer purpose is not provided in generated Java structures

Change-Id: I5f3984d6810cd88a383a33f32b3b5d6a5072fd57
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
8 years agoBumping versions by 0.1.0 for next dev cycle 89/32689/1
Thanh Ha [Fri, 15 Jan 2016 00:57:35 +0000 (19:57 -0500)]
Bumping versions by 0.1.0 for next dev cycle

Change-Id: I2518103345525fa92072116fbb0123436b19384b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoExplicitly set .gitreview defaultbranch to master 45/32645/1
Thanh Ha [Thu, 14 Jan 2016 21:43:52 +0000 (16:43 -0500)]
Explicitly set .gitreview defaultbranch to master

Change-Id: I10fada27548dcefe5f24f9bc4f28c11076894261
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 1435: Fixed incorrect links in javadoc. 74/32574/2
Tony Tkacik [Thu, 14 Jan 2016 12:35:30 +0000 (13:35 +0100)]
Bug 1435: Fixed incorrect links in javadoc.

Change-Id: I9fe40c4253c2375b18af5e6c42b4decf9e1fe519
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 1435: Added Binding Commit Cohort APIs and adapters. 73/32573/3
Tony Tkacik [Thu, 14 Jan 2016 12:35:03 +0000 (13:35 +0100)]
Bug 1435: Added Binding Commit Cohort APIs and adapters.

Change-Id: I7ec8b54542af307a2ec2390d3e397f771c2bc1cc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBUG-2062: handle ordered leaf-lists 61/32261/2
Robert Varga [Fri, 8 Jan 2016 08:11:07 +0000 (09:11 +0100)]
BUG-2062: handle ordered leaf-lists

This is forward-port on the Lithium fix, migrated to the mdsal project.

Change-Id: I46d94c281b904125fecb9636e513daa0c65c93cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRevert "Bug 4647: Binding Codec does not provide leaf default value for identityref" 89/32089/2
Robert Varga [Mon, 4 Jan 2016 16:06:20 +0000 (16:06 +0000)]
Revert "Bug 4647: Binding Codec does not provide leaf default value for identityref"

This reverts commit 397c6e7e20a48c80fa19c3f10ed838f0cd81a758.

With this change SFC fails, as the default value has to be resolved as a prefix.

Change-Id: I19a5bd258579eee400d9d8700563d69b7898d689
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBug 4621: Insufficient diagnostic information 89/31089/4
Filip.Gregor [Wed, 9 Dec 2015 16:38:19 +0000 (17:38 +0100)]
Bug 4621:  Insufficient diagnostic information

minor fix

Change-Id: I7c2abae410e3a05f0b687f6ebff13dfe4494f72e
Signed-off-by: Filip.Gregor <fgregor@cisco.com>
8 years agoBug 4647: Binding Codec does not provide leaf default value for identityref 58/31758/1
Igor Foltin [Tue, 22 Dec 2015 07:25:29 +0000 (08:25 +0100)]
Bug 4647: Binding Codec does not provide leaf default value for identityref

Fixed handling of leaf default value for identityref type.

Also removed obsolete code.

Change-Id: Id442f25512f445e0fff5c9e9aef314813e2c35d4
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
8 years agoBUG-4764: resolve serializer body before javassist callout 39/31439/2
Robert Varga [Wed, 16 Dec 2015 15:08:50 +0000 (16:08 +0100)]
BUG-4764: resolve serializer body before javassist callout

This moves the body generation phase out of the javassist lock, so that
it can perform cache lookups without the risk of hitting an AB-BA
deadlock.

Change-Id: I40d0237fef100f90bed9e91e3825a4121e4c503d
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBug 4202: Introduced DOMDataTreePrefixTable 11/31411/3
Tony Tkacik [Wed, 16 Dec 2015 09:34:33 +0000 (10:34 +0100)]
Bug 4202: Introduced DOMDataTreePrefixTable

ShardingTable is handy utility to use DOMDataTreeIdentifiers
as prefixes in prefix table to lookup closest applicable value.

Renamed class to DOMDataTreePrefixTable, documented it
and made it public.

Change-Id: I7a487c2fdfda66d200fa565a12cc07dd0536d462
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBUG-4743: fix setters for generated classes 32/31032/4
Robert Varga [Wed, 9 Dec 2015 00:55:40 +0000 (01:55 +0100)]
BUG-4743: fix setters for generated classes

Generated classes enforce restrictions in their constructors. Builders
should not generate checkers which duplicates these while setting the
value.

Change-Id: I7467a91e5c229bccbac00950294576fc60ce2622
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoCleanup builder enforcement 27/31027/4
Robert Varga [Tue, 8 Dec 2015 22:56:54 +0000 (23:56 +0100)]
Cleanup builder enforcement

A more natural place for generating these is with the setters which call
them. Move generation to generateSetters().

Also make setters' arguments final.

Also colocate length enforcement with range enforcement and eliminate a
superfluous empty if() block.

Change-Id: I0e844879f47527d692e148485157ef61db215862
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-4743: compare constraints before emitting them 23/31023/9
Robert Varga [Tue, 8 Dec 2015 22:15:40 +0000 (23:15 +0100)]
BUG-4743: compare constraints before emitting them

When checking constraints of a particular type, check to see if the
constraints are not inherited from the base type. If they are, do not
emit them again.

Change-Id: I611ab7e2696a3c1be09d4f088bb8ab9f79f6fa80
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoSet general-entity version in model/artifacts 42/31142/2
Vratko Polak [Thu, 10 Dec 2015 14:13:29 +0000 (15:13 +0100)]
Set general-entity version in model/artifacts

Change-Id: Ida754ae6e19f62f93b396ba5961040fee65dadd0
Signed-off-by: Vratko Polak <vrpolak@cisco.com>