<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>dom-parent</artifactId>
- <version>9.0.2</version>
+ <version>10.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
+ <artifactId>org.osgi.framework</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component.annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.metatype.annotations</artifactId>
</dependency>
</dependencies>
<link>https://commons.apache.org/proper/commons-lang/javadocs/api-3.9/</link>
<link>https://commons.apache.org/proper/commons-codec/apidocs/</link>
- <link>https://www.javadoc.io/doc/org.opendaylight.odlparent/odlparent-docs/10.0.0/</link>
- <link>https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/8.0.3/</link>
- <link>https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/9.0.2/</link>
+ <link>https://www.javadoc.io/doc/org.opendaylight.odlparent/odlparent-docs/11.0.0-SNAPSHOT/</link>
+ <link>https://www.javadoc.io/doc/org.opendaylight.yangtools/yangtools-docs/9.0.0-SNAPSHOT/</link>
+ <link>https://www.javadoc.io/doc/org.opendaylight.mdsal/mdsal-docs/10.0.0-SNAPSHOT/</link>
</links>
<groups>
<group>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-clustering-test-app-${project.version}">
<feature name="odl-clustering-test-app" version="${project.version}">
- <feature version="[9,10)">odl-mdsal-model-rfc6991</feature>
+ <feature version="[10,11)">odl-mdsal-model-rfc6991</feature>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-controller-blueprint-${project.version}">
<feature name="odl-controller-blueprint" version="${project.version}">
- <feature version="[8,9)">odl-yangtools-codec</feature>
- <feature version="[9,10)">odl-mdsal-binding-api</feature>
- <feature version="[9,10)">odl-mdsal-binding-runtime</feature>
- <feature version="[9,10)">odl-mdsal-dom-api</feature>
+ <feature version="[9,10)">odl-yangtools-codec</feature>
+ <feature version="[10,11)">odl-mdsal-binding-api</feature>
+ <feature version="[10,11)">odl-mdsal-binding-runtime</feature>
+ <feature version="[10,11)">odl-mdsal-dom-api</feature>
<bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${project.version}</bundle>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-mdsal-${project.version}">
<feature name="odl-controller-broker-local" version="${project.version}">
- <feature version="[9,10)">odl-mdsal-dom</feature>
- <feature version="[9,10)">odl-mdsal-eos-binding</feature>
- <feature version="[9,10)">odl-mdsal-eos-dom</feature>
- <feature version="[9,10)">odl-mdsal-singleton-dom</feature>
+ <feature version="[10,11)">odl-mdsal-dom</feature>
+ <feature version="[10,11)">odl-mdsal-eos-binding</feature>
+ <feature version="[10,11)">odl-mdsal-eos-dom</feature>
+ <feature version="[10,11)">odl-mdsal-singleton-dom</feature>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-exp-netty-config">
<feature name="odl-controller-exp-netty-config">
- <feature version="[10,11)">odl-netty-4</feature>
+ <feature version="[11,12)">odl-netty-4</feature>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-controller-mdsal-common-${project.version}">
<feature name="odl-controller-mdsal-common" version="${project.version}">
- <feature version="[9,10)">odl-mdsal-common</feature>
- <feature version="[9,10)">odl-mdsal-binding-runtime</feature>
+ <feature version="[10,11)">odl-mdsal-common</feature>
+ <feature version="[10,11)">odl-mdsal-binding-runtime</feature>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-mdsal-${project.version}">
<feature name="odl-mdsal-broker" version="${project.version}">
- <feature version="[9,10)">odl-mdsal-singleton-dom</feature>
- <feature version="[9,10)">odl-mdsal-eos-binding</feature>
+ <feature version="[10,11)">odl-mdsal-singleton-dom</feature>
+ <feature version="[10,11)">odl-mdsal-eos-binding</feature>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
<feature name="odl-mdsal-clustering-commons" version="${project.version}">
- <feature version="[10,11)">odl-apache-commons-lang3</feature>
- <feature version="[10,11)">odl-dropwizard-metrics</feature>
- <feature version="[10,11)">odl-servlet-api</feature>
- <feature version="[8,9)">odl-yangtools-data</feature>
- <feature version="[8,9)">odl-yangtools-codec</feature>
+ <feature version="[11,12)">odl-apache-commons-lang3</feature>
+ <feature version="[11,12)">odl-dropwizard-metrics</feature>
+ <feature version="[11,12)">odl-servlet-api</feature>
+ <feature version="[9,10)">odl-yangtools-data</feature>
+ <feature version="[9,10)">odl-yangtools-codec</feature>
</feature>
</features>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
<feature name="odl-mdsal-distributed-datastore" version="${project.version}">
- <feature version="[10,11)">odl-apache-commons-text</feature>
- <feature version="[8,9)">odl-yangtools-codec</feature>
- <feature version="[9,10)">odl-mdsal-eos-dom</feature>
- <feature version="[9,10)">odl-mdsal-dom-broker</feature>
- <feature version="[9,10)">odl-mdsal-binding-dom-adapter</feature>
+ <feature version="[11,12)">odl-apache-commons-text</feature>
+ <feature version="[9,10)">odl-yangtools-codec</feature>
+ <feature version="[10,11)">odl-mdsal-eos-dom</feature>
+ <feature version="[10,11)">odl-mdsal-dom-broker</feature>
+ <feature version="[10,11)">odl-mdsal-binding-dom-adapter</feature>
<configfile finalname="configuration/initial/akka.conf">
mvn:org.opendaylight.controller/sal-clustering-config/${project.version}/xml/akkaconf
</configfile>
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-toaster-${project.version}">
<feature name="odl-toaster" version="${project.version}">
- <feature version="[9,10)">odl-mdsal-binding-runtime</feature>
+ <feature version="[10,11)">odl-mdsal-binding-runtime</feature>
</feature>
</features>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf4-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yangtools-artifacts</artifactId>
- <version>8.0.3</version>
+ <version>9.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>9.0.2</version>
+ <version>10.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>9.0.2</version>
+ <version>10.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>9.0.2</version>
+ <version>10.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
return rpcConsumerRegistry.getRpcService(ClusterAdminService.class)
.addShardReplica(new AddShardReplicaInputBuilder()
.setShardName(shardName)
- .setDataStoreType(DataStoreType.forName(dataStoreType).orElse(null))
+ .setDataStoreType(DataStoreType.forName(dataStoreType))
.build());
}
}
return rpcConsumerRegistry.getRpcService(ClusterAdminService.class)
.changeMemberVotingStatesForShard(new ChangeMemberVotingStatesForShardInputBuilder()
.setShardName(shardName)
- .setDataStoreType(DataStoreType.forName(dataStoreType).orElse(null))
+ .setDataStoreType(DataStoreType.forName(dataStoreType))
.setMemberVotingState(List.of(memberVotingState))
.build());
}
return rpcConsumerRegistry.getRpcService(ClusterAdminService.class)
.getShardRole(new GetShardRoleInputBuilder()
.setShardName(shardName)
- .setDataStoreType(DataStoreType.forName(dataStoreType).orElse(null))
+ .setDataStoreType(DataStoreType.forName(dataStoreType))
.build());
}
}
return rpcConsumerRegistry.getRpcService(ClusterAdminService.class)
.locateShard(new LocateShardInputBuilder()
.setShardName(shardName)
- .setDataStoreType(DataStoreType.forName(dataStoreType).orElse(null))
+ .setDataStoreType(DataStoreType.forName(dataStoreType))
.build());
}
}
return rpcConsumerRegistry.getRpcService(ClusterAdminService.class)
.makeLeaderLocal(new MakeLeaderLocalInputBuilder()
.setShardName(shardName)
- .setDataStoreType(DataStoreType.forName(dataStoreType).orElse(null))
+ .setDataStoreType(DataStoreType.forName(dataStoreType))
.build());
}
}
return rpcConsumerRegistry.getRpcService(ClusterAdminService.class)
.removeShardReplica(new RemoveShardReplicaInputBuilder()
.setShardName(shardName)
- .setDataStoreType(DataStoreType.forName(dataStoreType).orElse(null))
+ .setDataStoreType(DataStoreType.forName(dataStoreType))
.setMemberName(memberName)
.build());
}
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
-import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import javax.management.ConstructorParameters;
private static void introspectPrimitiveTypes() {
final Set<Class<?>> primitives = ImmutableSet.<Class<?>>builder().addAll(
Primitives.allWrapperTypes()).add(String.class).build();
- for (final Class<?> primitive: primitives) {
+ for (final Class<?> primitive : primitives) {
try {
processPropertyType(primitive);
} catch (final NoSuchMethodException e) {
if (propertyType.isEnum()) {
try {
final Method enumConstructor = propertyType.getDeclaredMethod("forName", String.class);
- final Object optional = enumConstructor.invoke(null, from.toString().toLowerCase(Locale.ROOT));
- if (optional instanceof Optional) {
- return ((Optional<Object>)optional).orElseThrow();
+ if (enumConstructor.getReturnType().equals(propertyType)) {
+ return enumConstructor.invoke(null, from.toString().toLowerCase(Locale.ROOT));
}
} catch (NoSuchMethodException e) {
LOG.error("Error constructing value ({}) for enum {}", from, propertyType);
@Mock
private NormalizedNode data;
@Mock
- private YangInstanceIdentifier path;
- @Mock
private DOMStoreThreePhaseCommitCohort readyCohort;
@Before
@Test
public void testWrite() {
- object().write(path, data);
- verify(delegate).write(path, data);
+ object().write(YangInstanceIdentifier.empty(), data);
+ verify(delegate).write(YangInstanceIdentifier.empty(), data);
}
@Test
public void testMerge() {
- object().merge(path, data);
- verify(delegate).merge(path, data);
+ object().merge(YangInstanceIdentifier.empty(), data);
+ verify(delegate).merge(YangInstanceIdentifier.empty(), data);
}
@Test
public void testDelete() {
- object().delete(path);
- verify(delegate).delete(path);
+ object().delete(YangInstanceIdentifier.empty());
+ verify(delegate).delete(YangInstanceIdentifier.empty());
}
@Test
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.sample.kitchen.api;
-import java.util.concurrent.Future;
+import com.google.common.util.concurrent.ListenableFuture;
import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToastType;
import org.opendaylight.yangtools.yang.common.RpcResult;
public interface KitchenService {
- Future<RpcResult<Void>> makeBreakfast(EggsType eggs, Class<? extends ToastType> toast, int toastDoneness);
+
+ ListenableFuture<RpcResult<Void>> makeBreakfast(EggsType eggs, ToastType toast, int toastDoneness);
}
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
import org.opendaylight.controller.sample.kitchen.api.EggsType;
import org.opendaylight.controller.sample.kitchen.api.KitchenService;
}
@Override
- public Future<RpcResult<Void>> makeBreakfast(final EggsType eggsType, final Class<? extends ToastType> toastType,
+ public ListenableFuture<RpcResult<Void>> makeBreakfast(final EggsType eggsType, final ToastType toastType,
final int toastDoneness) {
// Call makeToast, The OpendaylightToaster impl already returns a ListenableFuture so the conversion is
// actually a no-op.
return executor.submit(() -> RpcResultBuilder.<Void>success().build());
}
- private ListenableFuture<RpcResult<MakeToastOutput>> makeToast(final Class<? extends ToastType> toastType,
- final int toastDoneness) {
-
+ private ListenableFuture<RpcResult<MakeToastOutput>> makeToast(final ToastType toastType, final int toastDoneness) {
if (toasterOutOfBread) {
LOG.info("We're out of toast but we can make eggs");
return RpcResultBuilder.success(EMPTY_MAKE_OUTPUT)
public Boolean makeScrambledWithWheat() {
try {
// This call has to block since we must return a result to the JMX client.
- RpcResult<Void> result = makeBreakfast(EggsType.SCRAMBLED, WheatBread.class, 2).get();
+ RpcResult<Void> result = makeBreakfast(EggsType.SCRAMBLED, WheatBread.VALUE, 2).get();
if (result.isSuccessful()) {
LOG.info("makeBreakfast succeeded");
} else {
boolean success = true;
// Make toasts using OSGi service
- success &= kitchenService.makeBreakfast(EggsType.SCRAMBLED, HashBrown.class, 4).get().isSuccessful();
- success &= kitchenService.makeBreakfast(EggsType.POACHED, WhiteBread.class, 8).get().isSuccessful();
+ success &= kitchenService.makeBreakfast(EggsType.SCRAMBLED, HashBrown.VALUE, 4).get().isSuccessful();
+ success &= kitchenService.makeBreakfast(EggsType.POACHED, WhiteBread.VALUE, 8).get().isSuccessful();
assertTrue("Not all breakfasts succeeded", success);
@Ignore //ignored because it is not a test right now. Illustrative purposes only.
public void testSomething() throws Exception {
MakeToastInput toastInput = new MakeToastInputBuilder().setToasterDoneness(Uint32.valueOf(1))
- .setToasterToastType(WheatBread.class).build();
+ .setToasterToastType(WheatBread.VALUE).build();
// NOTE: In a real test we would want to override the Thread.sleep() to
// prevent our junit test
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>10.0.0</version>
+ <version>11.0.0-SNAPSHOT</version>
<relativePath/>
</parent>