X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsamples%2Fclustering-test-app%2Fkaraf-cli%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fclustering%2Fit%2Fkaraf%2Fcli%2Fcar%2FUnregisterOwnershipCommand.java;h=2b9730cb14a2496a49bef9d320bb010d1c3b33fa;hb=HEAD;hp=e699139738336bad4da05c8c2c371b5c558655fa;hpb=771f58ab713985d0c797c80079c603256876d8d4;p=controller.git diff --git a/opendaylight/md-sal/samples/clustering-test-app/karaf-cli/src/main/java/org/opendaylight/clustering/it/karaf/cli/car/UnregisterOwnershipCommand.java b/opendaylight/md-sal/samples/clustering-test-app/karaf-cli/src/main/java/org/opendaylight/clustering/it/karaf/cli/car/UnregisterOwnershipCommand.java index e699139738..2b9730cb14 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/karaf-cli/src/main/java/org/opendaylight/clustering/it/karaf/cli/car/UnregisterOwnershipCommand.java +++ b/opendaylight/md-sal/samples/clustering-test-app/karaf-cli/src/main/java/org/opendaylight/clustering/it/karaf/cli/car/UnregisterOwnershipCommand.java @@ -13,23 +13,22 @@ import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.lifecycle.Reference; import org.apache.karaf.shell.api.action.lifecycle.Service; import org.opendaylight.clustering.it.karaf.cli.AbstractRpcAction; -import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.sal.clustering.it.car.rev140818.CarService; +import org.opendaylight.mdsal.binding.api.RpcService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.sal.clustering.it.car.rev140818.UnregisterOwnership; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.sal.clustering.it.car.rev140818.UnregisterOwnershipInputBuilder; import org.opendaylight.yangtools.yang.common.RpcResult; - @Service @Command(scope = "test-app", name = "unregister-ownership", description = "Run an unregister-ownership test") public class UnregisterOwnershipCommand extends AbstractRpcAction { @Reference - private RpcConsumerRegistry rpcService; + private RpcService rpcService; @Argument(index = 0, name = "car-id", required = true) - String carId; + private String carId; @Override protected ListenableFuture> invokeRpc() { - return rpcService.getRpcService(CarService.class) - .unregisterOwnership(new UnregisterOwnershipInputBuilder().setCarId(carId).build()); + return rpcService.getRpc(UnregisterOwnership.class) + .invoke(new UnregisterOwnershipInputBuilder().setCarId(carId).build()); } }