mdsal.git
7 years agoBUG-7927: stop scanning bundles on framework stop 43/56243/1 stable/beryllium
Robert Varga [Thu, 27 Apr 2017 17:33:36 +0000 (19:33 +0200)]
BUG-7927: stop scanning bundles on framework stop

Monitor framework bundle for STOPPING event and when it triggers
flag us as stopping: all bundles are about to shut down, so there
is no point in trying to update the schema context anymore.

Change-Id: I1a55169fce1705c19a139063cf632674fc256701
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2d05325b648b880088cea24ee1afd9edfc5a8979)

7 years agoLazily create schema context in GlobalBundleScanning* 09/56209/2
Robert Varga [Thu, 27 Apr 2017 16:38:37 +0000 (18:38 +0200)]
Lazily create schema context in GlobalBundleScanning*

On OsgiBundleScanningSchemaService startup, it calls
tryToUpdateSchemaContext when bundleTracker.open() completes.
This parses and creates a schema context and notifies listeners
of the updated schema context. However we don't have to call
tryToUpdateSchemaContext in start() unless there actually are
listeners registered as the purpose of tryToUpdateSchemaContext
is to update listeners. So made this change. It's not likely there
would be any listeners at that point anway.

I also changed the synchronization so as not to synchronize on 'this'
or the class instance as both are unsafe (users could sync on the
instance causing unwanted contention, either innocently or maliciously).

Change-Id: I435358b0851671b7fbfdc9784577c91ff20556df
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 62ca5284757904ee8a2ac0f79f07b0f4c41dc830)

7 years agoTurn off visibility of OsgiBundleScanningSchemaService#start() 12/56212/1
Robert Varga [Thu, 27 Apr 2017 16:41:10 +0000 (18:41 +0200)]
Turn off visibility of OsgiBundleScanningSchemaService#start()

Since the start() method is only used in the createInstance(), it
should be private and not exposed.

Change-Id: I0264d0a66bbfb2536bc4d6c57f27f15584ddfabb
Signed-off-by: Alexis de Talhouƫt <adetalhouet@inocybe.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoSpeed up OsgiBundleScanningSchemaService close 96/56196/1
Robert Varga [Thu, 27 Apr 2017 16:20:53 +0000 (18:20 +0200)]
Speed up OsgiBundleScanningSchemaService close

On close, the OsgiBundleScanningSchemaService closes the
BundleTracker which untracks all the bundles and notifies the listener
of removed bundles. This results in a call to tryToUpdateSchemaContext
which causes the remaining yang files to be re-parsed to build a new
SchemaContext. To prevent this extra processing on shutdown, I added
a "stopping" flag to elide tryToUpdateSchemaContext the same we do
with the "starting" flag.

Change-Id: I9f7c05277df9bf1ffaec1c699453020312aab203
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b0a11d8bb72e2b74f64ca1dbd6d981cf3a70c8ea)

7 years agoBindingGenerator v1 "copy-paste" bug in RPCs 19/53219/1
Martin Ciglan [Mon, 13 Mar 2017 12:17:22 +0000 (13:17 +0100)]
BindingGenerator v1 "copy-paste" bug in RPCs

This patch fixes kind of "copy-paste" bug revealed during
dealing with Actions in Binding Spec v2. This needs
to be cherry-picked to Boron too.

Change-Id: I22d56fd7ca899e4634ad0c2aaaec63d5b7c11403
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
(cherry picked from commit 97dcb94d6f9bb515c4ca22e6ab1ac05633fe6402)

7 years agoBumping versions by 0.0.1 for next dev cycle 71/47271/1
Anil Belur [Fri, 21 Oct 2016 04:03:27 +0000 (14:03 +1000)]
Bumping versions by 0.0.1 for next dev cycle

Change-Id: Ie40148cf666ced4bcfa1f10f05364105a8d482be
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoBug 2332: BindingMapping to camel split also on forward slash 81/44481/2
Vratko Polak [Mon, 4 Jul 2016 13:33:22 +0000 (15:33 +0200)]
Bug 2332: BindingMapping to camel split also on forward slash

This is only a partial workaround, full fix for Bug 2332 needs binding v2.

Forward slash is a first character (not allowed in general yang identifiers)
that was encountered in enums from real world Yang models.

Possibly, other separators could get the same treatment,
acting the same way as dash and dot already do.

Change-Id: Ic62198a843747092113c1c7dffaff13d09e7f943
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBug 6184: Workaround for namespaces with URL with trailing slash 92/44492/2
Vratko Polak [Mon, 11 Jul 2016 16:47:46 +0000 (18:47 +0200)]
Bug 6184: Workaround for namespaces with URL with trailing slash

Change-Id: I76712209a8d42825d9e8f6d8042877cec486c53f
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBug 6126: Use importedName for java.lang types in ClassTemplate 68/44468/1
Vratko Polak [Mon, 1 Aug 2016 14:31:34 +0000 (16:31 +0200)]
Bug 6126: Use importedName for java.lang types in ClassTemplate

There may be a type definition in Yang, which generates class name
which are the same as a class name in java.lang.

This patch fixes the conflict at defaultInstance(),
there may be other places which need fixing.

Change-Id: I3a73b5bb284db031dbfd45468cbbb8dd2a354737
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Signed-off-by: Filip Gregor <fgregor@cisco.com>
7 years agoBumping versions by 0.0.1 for next dev cycle 54/43154/1
Thanh Ha [Thu, 4 Aug 2016 21:58:02 +0000 (17:58 -0400)]
Bumping versions by 0.0.1 for next dev cycle

Change-Id: Ia90bd5e53a45632ddef16b31f052b953689de01b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoBug 6112 - UnionTypeCodec fails to non-identityref value 86/41886/1
Isaku Yamahata [Wed, 13 Jul 2016 00:04:41 +0000 (17:04 -0700)]
Bug 6112 - UnionTypeCodec fails to non-identityref value

When Non-identityref value is deserialized, ClassCastException exception occurs.
catch the exception and move to the next codec.

> java.lang.ClassCastException: java.lang.Short cannot be cast to org.opendaylight.yangtools.yang.common.QName
>         at org.opendaylight.yangtools.binding.data.codec.impl.IdentityCodec.deserialize(IdentityCodec.java:17)
>         at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:103)
>         at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)
>         at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)
>         at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)
>         at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)
>         at com.sun.proxy.$Proxy3.getValue(Unknown Source)
>         at org.opendaylight.yangtools.binding.data.codec.test.UnionTypeWithIdentityrefTest.bug6112Test(UnionTypeWithIdentityrefTest.java:78)

Change-Id: If6d9bffbc8cecaca2894f889940c814919da6a4b
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
(cherry picked from commit 71a93cffcd04df6a5521b323c9afdadafc90bc47)

7 years agoOptimize UnionTypeCodec 23/40723/1
Robert Varga [Wed, 8 Jun 2016 11:59:17 +0000 (13:59 +0200)]
Optimize UnionTypeCodec

For some reason this codec was not using MethodHandle#invokeExact()
for instantiation. Fix this and remove static fields holding public
lookups.

Change-Id: I8b170ec850aa8182cbe8bf81a0fbbef796aad741
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 7f3fa0ab3883fd8d8d3913df68435e6b1d49c486)

7 years agoEnforce non-null class 04/40704/2
Robert Varga [Wed, 8 Jun 2016 17:05:56 +0000 (19:05 +0200)]
Enforce non-null class

Also hide the field and expose a getter.

Change-Id: Ic998b2726be93bf173525bdb6a394e438e3e330c
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 183d2e748a46108562797fb04b18e28609322fd3)

7 years agoOptimize BitsCodec 05/40705/1
Robert Varga [Wed, 8 Jun 2016 12:21:42 +0000 (14:21 +0200)]
Optimize BitsCodec

The codec was not using methodhandles and performed reflective
invocation. Fix that, amortizing invocation cost.

Change-Id: Ibe7b41b81ab248bfe0221083feb4c0bcd24cee4d
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 6cad9fc47403cc71b9189932208df41cd99352d3)

7 years agoBug 6006 - UnionTypeCodec fails to handle indentityref 28/40028/3
Isaku Yamahata [Thu, 2 Jun 2016 00:40:34 +0000 (17:40 -0700)]
Bug 6006 - UnionTypeCodec fails to handle indentityref

UnionTypeCodec doesn't know that identityref requires special handling
because the actual derived identityref classes are determined at runtime.

Change-Id: I817190a380f0325b0bb8ee6f13a7d94cffc29113
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
(cherry picked from commit 416f190cf43150c69a01c2da3891e5b495d05b96)

7 years agoLazyDataObject bindingEquals fix 05/40505/1
Filip Gregor [Thu, 16 Jun 2016 12:02:19 +0000 (14:02 +0200)]
LazyDataObject bindingEquals fix

added check for byte arrays

Change-Id: I238d92bc7a23ac0157ff66046e5d137d6e10582e
Signed-off-by: Filip Gregor <fgregor@cisco.com>
(cherry picked from commit 9cd51ae3c03f552e711a850fc7f22bd39623e24b)

7 years agoBUG-5970: do not add value to union hashCode/equals/toString 57/39657/1
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>
(cherry picked from commit 20123a0c9e449857b68c1af0306b163495b354cc)

7 years agoBug 5883 - no constructor for indentityref in union 59/39559/2
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.

- stable/beryllium refactoring made

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>
(cherry picked from commit 4692da9978ca3ec59c0acf49c10b55111ecff790)

7 years agoBug 5882: Wrong placement of deprecated annotation 08/39508/2
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 5845: can not transform ba to bi, when keys contain boolean type 07/39307/1
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>
(cherry picked from commit 57773e0b8ab436cf29f9116b01cf9da39bc41663)

7 years agoBug 5461: Augmenting a choice without a case from another module causes NPE 09/38309/3
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>
(cherry picked from commit 69779f07e0841a3e89204dad5d5a6bb966c4727c)

7 years agoBug 5788: enum used as a key does not work 65/38865/1
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>
7 years agoBug 5446: toString() throws exception for 'type binary' binding 58/38358/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>
(cherry picked from commit 65980eb3cb88b2228aaea8ef3aca2c62d042e348)

7 years agoBug 4760: YANG leaf named 'class' breaks write with netconf connector 34/36134/2
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>
(cherry picked from commit da764a10f75b94c88c0641fbbcf1e1853f3b8dcf)

7 years agoBUG-1862: Incorrect type transformation in TypeProviderImpl 58/38258/2
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>
(cherry picked from commit 1044a08a4ec523640c1cb687c26bacef0033a144)

7 years agoBumping versions by 0.0.1 for next dev cycle 85/38685/1
Thanh Ha [Wed, 11 May 2016 21:23:18 +0000 (17:23 -0400)]
Bumping versions by 0.0.1 for next dev cycle

Change-Id: I078a20bd5c3953107119690c9d2b8220286a0a64
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoRelease Beryllium-SR2 84/38684/1 release/beryllium-sr2
Thanh Ha [Wed, 11 May 2016 21:23:17 +0000 (17:23 -0400)]
Release Beryllium-SR2

Change-Id: Ibdfff58a9e187cce77af953ec922c157be1ede6f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoCheck augments for equality in LazyDataObject 19/37719/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>
8 years agoBug 5524: NPE in BA->BI serialization 38/37538/1
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>
(cherry picked from commit 03c0646c8686c098215e2dc2265512807afe6fa1)

8 years agoDo not depend on java-api-generator 07/37107/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>
(cherry picked from commit ff2b6259f1c980966d87f6f4403dab9800cc245a)

8 years agoDo not use compile dependency for embedded code 95/37095/1
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>
(cherry picked from commit a034bf9bbc7abef6a749b9ed658d74a90cea1a0e)

8 years agoAdd ipPrefixFor() methods to IetfInetUtil 34/36734/1
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>
(cherry picked from commit d6adfb8bfca43cffa7df55bb6e41b402db0374ae)

8 years agoBumping versions by 0.0.1 for next dev cycle 82/36582/1
Thanh Ha [Wed, 23 Mar 2016 04:27:03 +0000 (00:27 -0400)]
Bumping versions by 0.0.1 for next dev cycle

Change-Id: I5a291bb51dddb63a14a3b7829f3525dfa0b33403
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoRelease Beryllium-SR1 81/36581/1 release/beryllium-sr1
Thanh Ha [Wed, 23 Mar 2016 04:27:02 +0000 (00:27 -0400)]
Release Beryllium-SR1

Change-Id: Idd388071a09a5315b93a15280cc198ae5554ba09
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBUG-5508: Fix same-package check 79/36179/1
Robert Varga [Mon, 22 Feb 2016 18:08:34 +0000 (19:08 +0100)]
BUG-5508: 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>
(cherry picked from commit 28e88bafc9f0bb3c9ee07647f74a473de5fdc126)

8 years agoBug 4798: Can not define a list as a subordinate 70/35970/1
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>
(cherry picked from commit 7b222d07038d700dc3f93ee4a388022e7df25ff8)

8 years agoBUG-2825: switch to custom IPv6 parsing 73/35773/1
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 agoAdd IpAddress->InetAddress conversion utilities 54/35654/5
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>
(cherry picked from commit 0f8f0d7b84b6cd8287a84be9d566d05433a758eb)

8 years agoUse a constant append string 53/35653/5
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>
(cherry picked from commit c60b842837881959ebb8f85462b97fa6446cbbef)

8 years agoBUG-2825: introduce Ipv4 prefix parser for short bytes 52/35652/5
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>
(cherry picked from commit 63d60122d4b07b243b1654f04dcd490f716012a0)

8 years agoBUG-2825: refactor to allow for embedding 51/35651/5
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>
(cherry picked from commit 008fe5f4ec99745f5e52b9c196618e5d7941cdeb)

8 years agoBUG-2825: more IPv6 tests 50/35650/5
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>
(cherry picked from commit 3afc8f31a37138cc4c0a6864f14233435e95df53)

8 years agoBUG-2825: use array operations to move/zero arrays 49/35649/5
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>
(cherry picked from commit 8aa122cc53aa1686fba1abd5fdae92fa74d07bd5)

8 years agoBUG-2825: rename have_xdigit 48/35648/5
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>
(cherry picked from commit a2b089098feff819855c90e5843b0540188a470e)

8 years agoBUG-2825: Cleanup comments 47/35647/5
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>
(cherry picked from commit 9e106ed0e234f4ee9af7aa6616ec7de323445986)

8 years agoBUG-2825: remove unused calculation 46/35646/5
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>
(cherry picked from commit 9a67b0da3bef59901445cdb2bf2f94f4080bed15)

8 years agoBUG-2825: reuse IPv4 address formatting 45/35645/5
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>
(cherry picked from commit 991cf98a8ad1b1c73b5c164792e9e1d091f7fec4)

8 years agoBUG-2825: do not check tautology 44/35644/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>
(cherry picked from commit 30f8b36bd2b1ebd9697af125aacc8ddedb86d3b1)

8 years agoBUG-2825: do not instantiate a temporary string 43/35643/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>
(cherry picked from commit 351173881c30eda563df2f7d7a624a25dfa4e28d)

8 years agoBUG-2825: do not instatiate temporary array 42/35642/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>
(cherry picked from commit c04fa5603462c8376746fdf98f13283c713cc90b)

8 years agoBUG-2825: move code around and improve hex lookup 41/35641/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>
(cherry picked from commit 3dc6189fdba48874d0d34e325369ee6f6d4a9699)

8 years agoBUG-2825: expand IPv6 test suite 40/35640/5
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>
(cherry picked from commit 3974695d25dc3ee60cb0c11583cb7585c35758a6)

8 years agoBUG-2825: rename method name 39/35639/5
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>
(cherry picked from commit f2bbbd26953e2dd26f699749434a3400a99aedee)

8 years agoBUG-2825: simplify test clarity 38/35638/5
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>
(cherry picked from commit e59d0d1cf7d36ed6fa8cb98953f314fe20bbd68b)

8 years agoBUG-2825: import IPv6 test 37/35637/5
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>
(cherry picked from commit bbf8a37147f6303bb4626ca209624dc96042b91e)

8 years agoBUG-2825: import IPv6 parsing code 36/35636/5
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>
(cherry picked from commit 82c904d0fc04744e288c0af6bf3f41c22c5d807a)

8 years agoAdd prefix-to-bytes conversion 35/35635/4
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>
(cherry picked from commit 5fbe5b8bbc97de4b2c6f4f019e0e7a7bfe2a203e)

8 years agoAdd IpAddress-to-bytes conversion 34/35634/4
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>
(cherry picked from commit af9a8f0c9f48cd7cf82d2db6149401b0a70fcdce)

8 years agoAdd MacAddress-to-bytes conversion 33/35633/4
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>
(cherry picked from commit be97010a32253ce4fb5c1be4c5c7eb003c2e9f8e)

8 years agoUnify prefix splitting 32/35632/3
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>
(cherry picked from commit cbd110c50d2b0670272aa2ecb954daaeb9258ae7)

8 years agoMore IetfInetUtil methods 31/35631/3
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>
(cherry picked from commit 465dde89392d109af701c8f617a840bfbfd95834)

8 years agoUse zero-compressed IPv6 addresses 30/35630/3
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>
(cherry picked from commit bbb0bb165a0abef95e7bf8ce6b29218910b1fdc8)

8 years agoBUG-2825: add utility methods for instantiating DTOs 29/35629/3
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>
(cherry picked from commit 4ba08793b4fe9fbc958270de742241e5f093d1b4)

8 years agoAdd field type check 63/35463/1
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>
(cherry picked from commit 9fe10ff710628800f6396f43eadefcaf723eb5be)

8 years agoUse MethodHandle to acquire augmentations 61/35461/1
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>
(cherry picked from commit 48ad5dfa5d4b11814d16c201ace70fff2c16073f)

8 years agoDo not use deprecated APIs 71/35071/1
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>
(cherry picked from commit 79f105509b5071563fe7c2a63414468ee582f0fa)

8 years agoCorrect generator path 48/35048/1
Robert Varga [Fri, 19 Feb 2016 09:40:36 +0000 (10:40 +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 agoBumping versions by 0.0.1 for next dev cycle 34/34934/1
Thanh Ha [Thu, 18 Feb 2016 21:02:18 +0000 (16:02 -0500)]
Bumping versions by 0.0.1 for next dev cycle

Change-Id: I9a5ba37037c964a4a148715175de3164f794f232
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoRelease Beryllium 33/34933/1 release/beryllium
Thanh Ha [Thu, 18 Feb 2016 21:02:13 +0000 (16:02 -0500)]
Release Beryllium

Change-Id: I4b0b23b024dd0419a29e83e9bca3dc67e5a26ea1
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoEnable site generation for mdsal 58/34358/4
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-* 54/34354/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-* 53/34353/2
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 60/34060/1
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>
(cherry picked from commit e48bd1d8063e49ea4d5604ce5dbeff9ac1de4e63)

8 years agoUse revision range for importing lmax 88/33888/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 57/33757/2
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 23/33623/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>
(cherry picked from commit a36bdb3d94292c854da199ecd2cc9453ad69184e)

8 years agoBug 4647: Binding Codec does not provide leaf default value for identityref 67/32867/1
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>
(cherry picked from commit c4b07e397f8a344a3fa638d83c60f1a5bf070794)

8 years agoBug 2784: status deprecated is not interpreted as annotation 76/32776/1
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 agoUpdate .gitreview for stable/beryllium 44/32644/1
Thanh Ha [Thu, 14 Jan 2016 21:42:57 +0000 (16:42 -0500)]
Update .gitreview for stable/beryllium

Change-Id: I07be19723e17f9ace81eeaef11e0785ea13d2080
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>
8 years agoFix mdsal-model-artifacts 68/31068/1
Robert Varga [Wed, 9 Dec 2015 12:51:24 +0000 (13:51 +0100)]
Fix mdsal-model-artifacts

Corresponding features is not mentioned, breaking the usual import
contract.

Change-Id: I8922aa87414325c0e0b1623c98849cf6e0cd35fb
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAdd isCandidateRegistered EOS method 05/30205/7
Tom Pantelis [Wed, 25 Nov 2015 02:13:32 +0000 (21:13 -0500)]
Add isCandidateRegistered EOS method

A new method, isCandidateRegistered, was recently added to the
EntityOwnershipService interface in the currently used API so added it
to the new interface.

Change-Id: I7aa44d53e0cd23ab4103406b2d0f7a43909993f9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAdd entity ownership binding -> DOM adapter 09/27709/8
Tom Pantelis [Mon, 28 Sep 2015 17:19:28 +0000 (13:19 -0400)]
Add entity ownership binding -> DOM adapter

Change-Id: I1e685d16cd66abe67006f98f317c4d5489f239d8
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAdd general-entity yang to common 84/27684/9
Tom Pantelis [Mon, 28 Sep 2015 11:29:51 +0000 (07:29 -0400)]
Add general-entity yang to common

Change-Id: Iebf021d92a475174ceadb76895b5553b37df06ed
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoFixed regression of Bug 4699 82/30482/2
Tony Tkacik [Wed, 2 Dec 2015 12:41:09 +0000 (13:41 +0100)]
Fixed regression of Bug 4699

Added special case to leaf method resolution
to use derived type instead of restricted type
to lookup for Java Method.

Change-Id: Ibba83be142f97485cc0f5139da68788a018c4b48
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoSwitch from QName#cachedReference() to QName#intern() 40/30440/1
Robert Varga [Tue, 1 Dec 2015 14:43:48 +0000 (15:43 +0100)]
Switch from QName#cachedReference() to QName#intern()

cachedReference() has been deprecated, use intern() instead.

Change-Id: Ie38f30f528fbfc4119bc10637902f43db4c09da8
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBug 4638: Fixed incorrect type derivation in case of keys. 32/30432/1
Tony Tkacik [Tue, 1 Dec 2015 12:40:47 +0000 (13:40 +0100)]
Bug 4638: Fixed incorrect type derivation in case of keys.

Change-Id: I6f03672f2a00569573ba15c551ea4bd946b531a2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBUG-4638: fix up union type definition compatibility 32/30032/15
Robert Varga [Sat, 21 Nov 2015 00:36:52 +0000 (01:36 +0100)]
BUG-4638: fix up union type definition compatibility

Deal with UnionTypes, which need to be instantiated with base YANG
namespace. Also rework reference types to resolve only at base type, to
get accurate namespace resolution.

Change-Id: Iffd590668262f7e233d93302403d179e532fe4a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4638: fix resultion of leaf-list typedefs 50/30050/6
Robert Varga [Sun, 22 Nov 2015 21:43:55 +0000 (22:43 +0100)]
BUG-4638: fix resultion of leaf-list typedefs

Old parser's use of ExtendedType masked this fall-through, which should
execute only for the base type.

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