Jian Li | fc55e42 | 2019-01-21 14:39:34 +0900 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2019-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.k8snetworking.api; |
| 17 | |
| 18 | /** |
| 19 | * Service for administering the inventory of kubernetes network, subnet. |
| 20 | */ |
| 21 | public interface K8sNetworkAdminService extends K8sNetworkService { |
| 22 | |
| 23 | /** |
| 24 | * Creates a kubernetes network with the given information. |
| 25 | * |
| 26 | * @param network the new network |
| 27 | */ |
| 28 | void createNetwork(K8sNetwork network); |
| 29 | |
| 30 | /** |
| 31 | * Updates the kubernetes network with the given information. |
| 32 | * |
| 33 | * @param network the updated network |
| 34 | */ |
| 35 | void updateNetwork(K8sNetwork network); |
| 36 | |
| 37 | /** |
| 38 | * Removes the network. |
| 39 | * |
| 40 | * @param networkId network identifier |
| 41 | * @return removed network; null if the network does not exist |
| 42 | */ |
| 43 | K8sNetwork removeNetwork(String networkId); |
| 44 | |
| 45 | /** |
| 46 | * Creates a kubernetes port with the given information. |
| 47 | * |
| 48 | * @param port the new port |
| 49 | */ |
| 50 | void createPort(K8sPort port); |
| 51 | |
| 52 | /** |
| 53 | * Updates the kubernetes port with the given information. |
| 54 | * |
| 55 | * @param port the updated port |
| 56 | */ |
| 57 | void updatePort(K8sPort port); |
| 58 | |
| 59 | /** |
| 60 | * Removes the port. |
| 61 | * |
| 62 | * @param portId port identifier |
| 63 | * @return removed port; null if the port does not exist |
| 64 | */ |
| 65 | K8sPort removePort(String portId); |
| 66 | } |