X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcompatibility%2Fsal-compatibility%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcompatibility%2Ftopology%2FTopologyAdapter.java;fp=opendaylight%2Fmd-sal%2Fcompatibility%2Fsal-compatibility%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcompatibility%2Ftopology%2FTopologyAdapter.java;h=0000000000000000000000000000000000000000;hp=4e3cf69817a3f68eeeb5cf9f5bbaac4ef59512bc;hb=8644c0d5f1b10c02f68702f023c07ea939885176;hpb=fdda2ebadfe3729e21448fe8f44a506aa67b5da9 diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.java b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.java deleted file mode 100644 index 4e3cf69817..0000000000 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * 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.sal.compatibility.topology; - -import org.opendaylight.controller.md.sal.binding.util.TypeSafeDataReader; -import org.opendaylight.controller.sal.binding.api.data.DataProviderService; -import org.opendaylight.controller.sal.topology.IPluginInTopologyService; -import org.opendaylight.controller.sal.topology.IPluginOutTopologyService; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; - -import com.google.common.base.Preconditions; - -public class TopologyAdapter implements IPluginInTopologyService { - private final InstanceIdentifier topology = InstanceIdentifier.builder(NetworkTopology.class) - .child(Topology.class, new TopologyKey(new TopologyId("flow:1"))).toInstance(); - - // Injected via Apache DM - private IPluginOutTopologyService topologyPublisher; - - - private DataProviderService dataService; - - public void setDataService(final DataProviderService dataService) { - this.dataService = Preconditions.checkNotNull(dataService); - } - - @Override - public void sollicitRefresh() { - final TypeSafeDataReader reader = TypeSafeDataReader.forReader(dataService); - final Topology t = reader.readOperationalData(topology); - topologyPublisher.edgeUpdate(TopologyMapping.toADEdgeUpdates(t, reader)); - } - - public IPluginOutTopologyService getTopologyPublisher() { - return topologyPublisher; - } - - public void setTopologyPublisher(final IPluginOutTopologyService topologyPublisher) { - this.topologyPublisher = topologyPublisher; - } -}