X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=vpnservice.git;a=blobdiff_plain;f=itm%2Fitm-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fvpnservice%2Fitm%2Fimpl%2FItmProvider.java;h=cba0777e45d16bfa297a0006b453ec1053758af1;hp=441979ea2a2123a12aa813a9a2a47283529b5f13;hb=3e477025479db59022496cabca5e85c79e70fc5a;hpb=6a4dab7d5be4a06ebef6f89b4e05e1604e0eac4c diff --git a/itm/itm-impl/src/main/java/org/opendaylight/vpnservice/itm/impl/ItmProvider.java b/itm/itm-impl/src/main/java/org/opendaylight/vpnservice/itm/impl/ItmProvider.java index 441979ea..cba0777e 100644 --- a/itm/itm-impl/src/main/java/org/opendaylight/vpnservice/itm/impl/ItmProvider.java +++ b/itm/itm-impl/src/main/java/org/opendaylight/vpnservice/itm/impl/ItmProvider.java @@ -15,23 +15,23 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.controller.md.sal.binding.api.NotificationService; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; import org.opendaylight.vpnservice.interfacemgr.interfaces.IInterfaceManager; import org.opendaylight.vpnservice.itm.api.IITMProvider; import org.opendaylight.vpnservice.itm.listeners.TransportZoneListener; import org.opendaylight.vpnservice.itm.rpc.ItmManagerRpcService; import org.opendaylight.vpnservice.mdsalutil.interfaces.IMdsalApiManager; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.itm.op.rev150701.GetTunnelIdInput; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.itm.op.rev150701.GetTunnelIdOutput; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.itm.op.rev150701.ItmStateService; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.itm.op.rev150701.TunnelsState; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.itm.rev150701.transport.zones.transport.zone.*;; +import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rpcs.rev151003.OdlInterfaceRpcService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.itm.rpcs.rev151217.ItmRpcService; + import org.opendaylight.yangtools.yang.common.RpcResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ItmProvider implements BindingAwareProvider, AutoCloseable, IITMProvider,ItmStateService { +public class ItmProvider implements BindingAwareProvider, AutoCloseable, IITMProvider /*,ItmStateService */{ private static final Logger LOG = LoggerFactory.getLogger(ItmProvider.class); private IInterfaceManager interfaceManager; @@ -42,6 +42,15 @@ public class ItmProvider implements BindingAwareProvider, AutoCloseable, IITMPro private ItmManagerRpcService itmRpcService ; private NotificationService notificationService; private TransportZoneListener tzChangeListener; + private RpcProviderRegistry rpcProviderRegistry; + + public void setRpcProviderRegistry(RpcProviderRegistry rpcProviderRegistry) { + this.rpcProviderRegistry = rpcProviderRegistry; + } + + public RpcProviderRegistry getRpcProviderRegistry() { + return this.rpcProviderRegistry; + } @Override public void onSessionInitiated(ProviderContext session) { @@ -52,6 +61,7 @@ public class ItmProvider implements BindingAwareProvider, AutoCloseable, IITMPro itmManager = new ITMManager(dataBroker); tzChangeListener = new TransportZoneListener(dataBroker) ; itmRpcService = new ItmManagerRpcService(dataBroker); + final BindingAwareBroker.RpcRegistration rpcRegistration = getRpcProviderRegistry().addRpcImplementation(ItmRpcService.class, itmRpcService); itmManager.setMdsalManager(mdsalManager); itmManager.setNotificationPublishService(notificationPublishService); @@ -90,11 +100,5 @@ public class ItmProvider implements BindingAwareProvider, AutoCloseable, IITMPro LOG.info("ItmProvider Closed"); } - @Override - public Future> getTunnelId( - GetTunnelIdInput input) { - // TODO Auto-generated method stub - return null; - } }