X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcompatibility%2Fsal-compatibility%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcompatibility%2Ftopology%2FTopologyAdapter.xtend;h=4ce57afe9ee1514ca55a6afaa1ce783058ad4090;hb=040d3eee776e73591337781c122f11b81aa02d40;hp=6c5c5db4190459d33047156954334380b3aa440a;hpb=f0fb3be54c79ce64725b467acdbf99a45b3a2504;p=controller.git diff --git a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.xtend b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.xtend index 6c5c5db419..4ce57afe9e 100644 --- a/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.xtend +++ b/opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/topology/TopologyAdapter.xtend @@ -1,18 +1,23 @@ +/* + * 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.rev130712.NetworkTopology -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev130712.TopologyId -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev130712.network.topology.Topology -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev130712.network.topology.TopologyKey +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 static extension org.opendaylight.controller.sal.compatibility.topology.TopologyMapping.* -import java.util.List -import org.opendaylight.controller.sal.topology.TopoEdgeUpdate -import java.util.Collections class TopologyAdapter implements IPluginInTopologyService { @@ -24,8 +29,9 @@ class TopologyAdapter implements IPluginInTopologyService { override sollicitRefresh() { val path = InstanceIdentifier.builder(NetworkTopology).child(Topology,new TopologyKey(new TopologyId("flow:1"))).toInstance; - val topology = (dataService.readOperationalData(path) as Topology); - topologyPublisher.edgeUpdate(topology.toADEdgeUpdates) + val reader = TypeSafeDataReader.forReader(dataService) + val topology = reader.readOperationalData(path) + topologyPublisher.edgeUpdate(topology.toADEdgeUpdates(reader)) } -} \ No newline at end of file +}