blob: 327d9e487e0976d4ee2c4134867491144f3ce5bf [file] [log] [blame]
sangho0c2a3da2016-02-16 13:39:07 +09001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
sangho0c2a3da2016-02-16 13:39:07 +09003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.openstacknetworking;
17
sangho93447f12016-02-24 00:33:22 +090018import org.onosproject.openstackinterface.OpenstackFloatingIP;
19import org.onosproject.openstackinterface.OpenstackRouter;
20import org.onosproject.openstackinterface.OpenstackRouterInterface;
21
sangho0c2a3da2016-02-16 13:39:07 +090022/**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090023 * Supports L3 management REST API for openstack.
sangho0c2a3da2016-02-16 13:39:07 +090024 */
25public interface OpenstackRoutingService {
26
27 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090028 * Stores the floating IP information created by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090029 *
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090030 * @param openstackFloatingIp Floating IP information
sangho0c2a3da2016-02-16 13:39:07 +090031 */
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090032 void createFloatingIP(OpenstackFloatingIP openstackFloatingIp);
sangho0c2a3da2016-02-16 13:39:07 +090033
34 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090035 * Updates flow rules corresponding to the floating IP information updated by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090036 *
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090037 * @param openstackFloatingIp Floating IP information
sangho0c2a3da2016-02-16 13:39:07 +090038 */
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090039 void updateFloatingIP(OpenstackFloatingIP openstackFloatingIp);
sangho0c2a3da2016-02-16 13:39:07 +090040
41 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090042 * Removes flow rules corresponding to floating IP information removed by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090043 *
44 * @param id Deleted Floating IP`s ID
45 */
46 void deleteFloatingIP(String id);
47
48 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090049 * Stores the router information created by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090050 *
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090051 * @param openstackRouter Router information
sangho0c2a3da2016-02-16 13:39:07 +090052 */
53 void createRouter(OpenstackRouter openstackRouter);
54
55 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090056 * Updates flow rules corresponding to the router information updated by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090057 *
58 * @param openstackRouter Router information
59 */
60 void updateRouter(OpenstackRouter openstackRouter);
61
62 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090063 * Removes flow rules corresponding to the router information removed by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090064 *
65 * @param id Deleted router`s ID
66 */
67 void deleteRouter(String id);
68
69 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090070 * Updates flow rules corresponding to the router information updated by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090071 *
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090072 * @param openstackRouterInterface Router interface information
sangho0c2a3da2016-02-16 13:39:07 +090073 */
74 void updateRouterInterface(OpenstackRouterInterface openstackRouterInterface);
75
76 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090077 * Removes flow rules corresponding to the router information removed by openstack.
sangho0c2a3da2016-02-16 13:39:07 +090078 *
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090079 * @param openstackRouterInterface Router interface information
sangho0c2a3da2016-02-16 13:39:07 +090080 */
81 void removeRouterInterface(OpenstackRouterInterface openstackRouterInterface);
82
Kyuhwi Choiee9e3712016-02-22 22:49:36 +090083 /**
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090084 * Returns network id for routerInterface.
85 *
86 * @param portId routerInterface`s port id
Hyunsun Moonda27e432016-07-13 13:09:45 -070087 * @return network id
Kyuhwi Choi5e65e2c2016-04-01 11:48:15 +090088 */
89 String networkIdForRouterInterface(String portId);
sangho0c2a3da2016-02-16 13:39:07 +090090}