blob: 5c244b1fde9cf989b1c5963e1c756e9c224d8be1 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 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 */
tomb41d1ac2014-09-24 01:51:24 -070016package org.onlab.onos.cluster;
17
Pavlin Radoslavov444b5192014-10-28 10:45:19 -070018import org.onlab.packet.IpAddress;
tomee49c372014-09-26 15:14:50 -070019
tomb41d1ac2014-09-24 01:51:24 -070020/**
21 * Service for administering the cluster node membership.
22 */
23public interface ClusterAdminService {
24
25 /**
tomee49c372014-09-26 15:14:50 -070026 * Adds a new controller node to the cluster.
27 *
28 * @param nodeId controller node identifier
29 * @param ip node IP listen address
30 * @param tcpPort tcp listen port
31 * @return newly added node
32 */
Pavlin Radoslavov444b5192014-10-28 10:45:19 -070033 ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort);
tomee49c372014-09-26 15:14:50 -070034
35 /**
tomb41d1ac2014-09-24 01:51:24 -070036 * Removes the specified node from the cluster node list.
37 *
38 * @param nodeId controller node identifier
39 */
40 void removeNode(NodeId nodeId);
41
42}