Jian Li | 70c32de | 2021-02-26 18:15:20 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021-present Open Networking Foundation |
| 3 | * |
| 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 | */ |
| 16 | package org.onosproject.kubevirtnetworking.api; |
| 17 | |
Jian Li | 7eb2078 | 2021-02-27 01:10:50 +0900 | [diff] [blame] | 18 | import org.onlab.packet.MacAddress; |
| 19 | |
Jian Li | 70c32de | 2021-02-26 18:15:20 +0900 | [diff] [blame] | 20 | /** |
| 21 | * Service for administering the inventory of kubevirt router service. |
| 22 | */ |
| 23 | public interface KubevirtRouterAdminService extends KubevirtRouterService { |
| 24 | |
| 25 | /** |
| 26 | * Creates a kubevirt router with the given information. |
| 27 | * |
| 28 | * @param router a new router |
| 29 | */ |
| 30 | void createRouter(KubevirtRouter router); |
| 31 | |
| 32 | /** |
| 33 | * Updates the kubevirt router with the given information. |
| 34 | * |
| 35 | * @param router the updated router |
| 36 | */ |
| 37 | void updateRouter(KubevirtRouter router); |
| 38 | |
| 39 | /** |
| 40 | * Removes the router. |
| 41 | * |
| 42 | * @param name router name |
| 43 | */ |
| 44 | void removeRouter(String name); |
| 45 | |
| 46 | /** |
Jian Li | 7eb2078 | 2021-02-27 01:10:50 +0900 | [diff] [blame] | 47 | * Updates the MAC address of the peer router. |
| 48 | * |
| 49 | * @param name router name |
| 50 | * @param mac peer router MAC address |
| 51 | */ |
| 52 | void updatePeerRouterMac(String name, MacAddress mac); |
| 53 | |
| 54 | /** |
Jian Li | e48a617 | 2021-02-28 03:50:15 +0900 | [diff] [blame^] | 55 | * Creates a kubevirt floating IP with the given information. |
| 56 | * |
| 57 | * @param floatingIp a new floating IP |
| 58 | */ |
| 59 | void createFloatingIp(KubevirtFloatingIp floatingIp); |
| 60 | |
| 61 | /** |
| 62 | * Updates the kubevirt floating IP with the given information. |
| 63 | * |
| 64 | * @param floatingIp the updated floating IP |
| 65 | */ |
| 66 | void updateFloatingIp(KubevirtFloatingIp floatingIp); |
| 67 | |
| 68 | /** |
| 69 | * Removes the floating IP with the given identifier. |
| 70 | * |
| 71 | * @param id floating IP identifier |
| 72 | */ |
| 73 | void removeFloatingIp(String id); |
| 74 | |
| 75 | /** |
Jian Li | 70c32de | 2021-02-26 18:15:20 +0900 | [diff] [blame] | 76 | * Removes all routers. |
| 77 | */ |
| 78 | void clear(); |
| 79 | } |