blob: d26a10aaa54508042f55680d55c9266ada985291 [file] [log] [blame]
Hyunsun Moonab2cf252015-09-10 17:54:10 -07001/*
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 */
16package org.onosproject.cordvtn;
17
Hyunsun Moond0e932a2015-09-15 22:39:16 -070018import org.onlab.packet.IpAddress;
19import org.onlab.packet.TpPort;
20
Hyunsun Moonab2cf252015-09-10 17:54:10 -070021import java.util.List;
22
23/**
24 * Service for provisioning overlay virtual networks on compute nodes.
25 */
26public interface CordVtnService {
27 /**
Hyunsun Moond0e932a2015-09-15 22:39:16 -070028 * Adds a new node to the service.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070029 *
Hyunsun Moond0e932a2015-09-15 22:39:16 -070030 * @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 Moonab2cf252015-09-10 17:54:10 -070033 */
Hyunsun Moond0e932a2015-09-15 22:39:16 -070034 void addNode(String hostname, IpAddress ip, TpPort port);
Hyunsun Moonab2cf252015-09-10 17:54:10 -070035
36 /**
Hyunsun Moond0e932a2015-09-15 22:39:16 -070037 * Deletes the node from the service.
Hyunsun Moonab2cf252015-09-10 17:54:10 -070038 *
Hyunsun Moond0e932a2015-09-15 22:39:16 -070039 * @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 Moonab2cf252015-09-10 17:54:10 -070041 */
Hyunsun Moond0e932a2015-09-15 22:39:16 -070042 void deleteNode(IpAddress ip, TpPort port);
Hyunsun Moonab2cf252015-09-10 17:54:10 -070043
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}