Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014-2015 Open Networking Laboratory |
| 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.cordvtn; |
| 17 | |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 18 | import org.onlab.packet.IpAddress; |
| 19 | import org.onlab.packet.TpPort; |
| 20 | |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 21 | import java.util.List; |
| 22 | |
| 23 | /** |
| 24 | * Service for provisioning overlay virtual networks on compute nodes. |
| 25 | */ |
| 26 | public interface CordVtnService { |
| 27 | /** |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 28 | * Adds a new node to the service. |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 29 | * |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 30 | * @param hostname hostname of the node |
| 31 | * @param ip ip address to access the ovsdb server running on the node |
| 32 | * @param port port number to access the ovsdb server running on the node |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 33 | */ |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 34 | void addNode(String hostname, IpAddress ip, TpPort port); |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 37 | * Deletes the node from the service. |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 38 | * |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 39 | * @param ip ip address to access the ovsdb server running on the node |
| 40 | * @param port port number to access the ovsdb server running on the node |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 41 | */ |
Hyunsun Moon | d0e932a | 2015-09-15 22:39:16 -0700 | [diff] [blame^] | 42 | void deleteNode(IpAddress ip, TpPort port); |
Hyunsun Moon | ab2cf25 | 2015-09-10 17:54:10 -0700 | [diff] [blame] | 43 | |
| 44 | /** |
| 45 | * Returns the number of the nodes known to the service. |
| 46 | * |
| 47 | * @return number of nodes |
| 48 | */ |
| 49 | int getNodeCount(); |
| 50 | |
| 51 | /** |
| 52 | * Returns all nodes known to the service. |
| 53 | * |
| 54 | * @return list of nodes |
| 55 | */ |
| 56 | List<OvsdbNode> getNodes(); |
| 57 | } |