blob: 7089f8ee1f7d8ccd6c2686d4ef11a8be95934658 [file] [log] [blame]
Daniel Parka7d6e9f2016-01-18 17:54:14 +09001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Daniel Parka7d6e9f2016-01-18 17:54:14 +09003 *
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.openstacknode;
17
18import java.util.List;
19
20/**
21 * Handles the bootstrap request for compute/gateway node.
22 */
23public interface OpenstackNodeService {
24
25 public enum OpenstackNodeType {
26 /**
27 * Compute or Gateway Node.
28 */
29 COMPUTENODE,
30 GATEWAYNODE
31 }
32 /**
33 * Adds a new node to the service.
34 *
35 * @param node openstack node
36 */
37 void addNode(OpenstackNode node);
38
39 /**
40 * Deletes a node from the service.
41 *
42 * @param node openstack node
43 */
44 void deleteNode(OpenstackNode node);
45
46 /**
47 * Returns nodes known to the service for designated openstacktype.
48 *
49 * @param openstackNodeType openstack node type
50 * @return list of nodes
51 */
52 List<OpenstackNode> getNodes(OpenstackNodeType openstackNodeType);
53
54 /**
55 * Returns the NodeState for a given node.
56 *
57 * @param node openstack node
58 * @return true if the NodeState for a given node is COMPLETE, false otherwise
59 */
60 boolean isComplete(OpenstackNode node);
61}