2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sample.l2switch.md.topology;
10 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
11 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link;
13 import java.util.List;
16 * Service that allows to build a network graph using Topology links
17 * {@link org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link}
18 * and exposes operation that can be performed on such graph.
20 public interface NetworkGraphService {
23 * Adds links to existing graph or creates new graph with given links if graph was not initialized.
26 public void addLinks(List<Link> links);
29 * removes links from existing graph.
32 public void removeLinks(List<Link> links);
35 * returns a path between 2 nodes. Implementation should ideally return shortest path.
37 * @param destinationNodeId
40 public List<Link> getPath(NodeId sourceNodeId, NodeId destinationNodeId);
43 * Clears the prebuilt graph, in case same service instance is required to process a new graph.