OpenDaylight Controller functional modules.
[controller.git] / opendaylight / forwarding / staticrouting / src / main / java / org / opendaylight / controller / forwarding / staticrouting / IForwardingStaticRouting.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.forwarding.staticrouting;
11
12 import java.net.InetAddress;
13 import java.util.concurrent.ConcurrentMap;
14 /**
15  * 
16  * This interface provides APIs to configure and manage static routes.
17  *
18  */
19 import org.opendaylight.controller.sal.utils.Status;
20
21 public interface IForwardingStaticRouting {
22
23     /**
24      * Retrieves the StaticRoute that has the longest prefix matching the ipAddress.
25      * @param ipAddress (InetAddress) the IP address
26      * @return StaticRoute
27      */
28     public StaticRoute getBestMatchStaticRoute(InetAddress ipAddress);
29
30     /**
31      * Returns all the StaticRouteConfig
32      * @return all the StaticRouteConfig
33      */
34     public ConcurrentMap<String, StaticRouteConfig> getStaticRouteConfigs();
35
36     /**
37      * Adds a StaticRouteConfig
38      * @param config: the StaticRouteConfig to be added
39      * @return a text string indicating the result of the operation..
40      * If the operation is successful, the return string will be "SUCCESS"
41      */
42     public Status addStaticRoute(StaticRouteConfig config);
43
44     /**
45      * Removes  the named StaticRouteConfig
46      * @param name: the name of the StaticRouteConfig to be removed
47      * @return a text string indicating the result of the operation.
48      * If the operation is successful, the return string will be "SUCCESS"
49      */
50     public Status removeStaticRoute(String name);
51
52     /**
53      * Saves the config
54      * @return a text string indicating the result of the operation.
55      * If the operation is successful, the return string will be "Success"
56      */
57     Status saveConfig();
58 }