Bump upstreams Adopt: - yangtools-13.0.1 - mdsal-13.0.0 Also adopts AbstractDOMDataBroker from mdsal-dom-spi, so that we have less code duplication and maintenance. UTs mocking NormalizedNode are updated to ContainerNode, as mocking sealed classes does not work with Mockito (out of the box). Change-Id: I6d3d3c8ced297b6850aea951040d16437df9e3f0 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump upstreams Adopt: - odlparent-13.0.1 - yangtools-11.0.0-SNAPSHOT - mdsal-12-0.0-SNAPSHOT Since the format of NormalizedNode tree is updated to not include AugmentationNode (and AugmentationIdentifier), we must force an incompatible update, as we do not have enough information to produce compatible payload. Change-Id: Ibf444540ed052b49651ba66ca7b93c806a6c8a97 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate users of Optional.get() We have an incoming enforcement patch, prepare to adopt it. Change-Id: If73abd4ceaea71a216a4bc3a3968b400b508ec38 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Update sal-distributed-datastore tests a bit Use MockitoJUnitRunner and clean up imports/mocking a bit. Change-Id: I854f95e37e503d28903c8aa83aecafdef4c4c1fa Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump odlparent/yangtools/mdsal Adopt latest versions, namely; - odlparent-9.0.1 - yangtools-7.0.1 - mdsal-8.0.0-SNAPSHOT There are a few adjustments needed, which mostly deal with the interface to NormalizedNode. Change-Id: I918fb885a6df62e16e17119a7e04ba1672ef7c39 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Migrate from YangInstanceIdentifier.EMPTY This migrates to the replacement empty() method. Change-Id: I32ca026a33835edb16f8e1e6142e9192c880076b Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix transaction mocking We should not confuse FluentFutures and CheckedFutures, as the latter is deprecated and with Guava 27 they are not compatible anyway. Change-Id: I7489b4470df6fa435aab190b6e38eaf154522fe7 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Align tested boolean/Boolean expectations This patch removes implicit boxing/unboxing by aligning boolean/Boolean expectations. Future<Boolean>.get() will return a Boolean, hence use assertEquals() for these (and Optional<Boolean>). Doing that instead of assertTrue()/assertFalse() eliminates a single Eclipse info-level message about Boolean being unboxes. This also has better behavior: if the tested method returns null, we'll get an assertion failure instead of a NPE. For isPersent() and other methods which return a boolean, use assertTrue() or assertFalse(). Doing that instead of assertEquals() eliminates two Eclipse info-level messages about boxing the two arguments to Boolean, for some reason there is no assertEquals(boolean, boolean). Change-Id: If86ef9fb1ecf4cdceb45bc079bba1a86cff311ac Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Remove unused exceptions This drops exception declarations which are never used. Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Adjust to mdsal DOM read/exists FluentFuture change This patch needs to be coordinated with https://git.opendaylight.org/gerrit/#/c/74127/. Change-Id: Iceeff9f9f75ca40ebc31bd839b5e6a5c8639aa4c Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Convert CDS implementation to use msdal APIs The LegacyDOMDataBrokerAdapter is the proxy for the controller API. Change-Id: I697e2979bef4dcffe544717af1380aa7d7b89d50 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Add ClientBackedTransaction allocation recording This patch adds a very simple recording of where a transaction was allocated, aiding identification of callers who fail to close transactions. Change-Id: I9a8743c7a38e83c855102a3a25adecfea8599dfe Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 52c35c0e63343d0009a689c970cafed5d005e337)
Fix warnings in tests This fixes up initialization failures and use of raw classes where possible. Change-Id: Icfa9bd0a08a6dd838d794c509612f711099ea0fe Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Unit test for ClientBackedTransaction derived classes Change-Id: I2967a0e224fc783ffac73a994def666e86a423a6 Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>