Merge "Fixed potential class pool override in integration tests."
[controller.git] / opendaylight / md-sal / samples / l2switch / implementation / src / main / java / org / opendaylight / controller / sample / l2switch / md / topology / NetworkGraphService.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.sample.l2switch.md.topology;
9
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;
12
13 import java.util.List;
14
15 /**
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.
19  */
20 public interface NetworkGraphService {
21
22   /**
23    * Adds links to existing graph or creates new graph with given links if graph was not initialized.
24    * @param links
25    */
26   public void addLinks(List<Link> links);
27
28   /**
29    * removes links from existing graph.
30    * @param links
31    */
32   public void removeLinks(List<Link> links);
33
34   /**
35    * returns a path between 2 nodes. Implementation should ideally return shortest path.
36    * @param sourceNodeId
37    * @param destinationNodeId
38    * @return
39    */
40   public List<Link> getPath(NodeId sourceNodeId, NodeId destinationNodeId);
41
42   /**
43    * Clears the prebuilt graph, in case same service instance is required to process a new graph.
44    */
45   public void clear();
46 }