/*
* 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.l2switch.loopremover.topology;
import java.util.List;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link;
/**
* Service that allows to build a network graph using Topology links {@link
* org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link}
* and exposes operation that can be performed on such graph.
*/
public interface NetworkGraphService {
/**
* Adds links to existing graph or creates new graph with given links if
* graph was not initialized.
*
* @param links the links to add
*/
void addLinks(List links);
/**
* Removes links from existing graph.
*
* @param links the links to remove
*/
void removeLinks(List links);
/**
* Returns a path between 2 nodes. Implementation should ideally return
* shortest path.
*
* @param sourceNodeId the source node Id
* @param destinationNodeId the destination node Id
*/
// List getPath(NodeId sourceNodeId, NodeId destinationNodeId);
/**
* Forms MST(minimum spanning tree) from network graph and returns links
* that are not in MST.
*/
List getLinksInMst();
/**
* Returns all the links in current network graph.
*/
List getAllLinks();
/**
* Clears the prebuilt graph, in case same service instance is required to
* process a new graph.
*/
void clear();
}