blob: b743f21c866ef3aec7f20a0b8552cf232d981c1b [file] [log] [blame]
Hyunsun Moon2c3f0ee2017-04-06 16:47:21 +09001/*
Brian O'Connor80dff972017-08-03 22:46:30 -07002 * Copyright 2017-present Open Networking Foundation
Hyunsun Moon2c3f0ee2017-04-06 16:47:21 +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.opencord.cordvtn.api.node;
17
18import org.onosproject.event.ListenerService;
19import org.onosproject.net.DeviceId;
20
21import java.util.Set;
22
23/**
24 * Service for interfacing with the inventory of {@link CordVtnNode}.
25 */
26public interface CordVtnNodeService extends ListenerService<CordVtnNodeEvent, CordVtnNodeListener> {
27
28 /**
29 * Returns all nodes.
30 *
31 * @return set of nodes; empty set if no node presents
32 */
33 Set<CordVtnNode> nodes();
34
35 /**
36 * Returns nodes in complete state.
37 *
38 * @return set of nodes; empty set if no complete node presents
39 */
40 Set<CordVtnNode> completeNodes();
41
42 /**
43 * Returns the node with the given hostname.
44 *
45 * @param hostname hostname of the node
46 * @return cordvtn node; null if no node present with the hostname
47 */
48 CordVtnNode node(String hostname);
49
50 /**
51 * Returns the node with the given integration bridge device identifier.
52 *
53 * @param deviceId integration bridge device id
54 * @return cordvtn node; null if no node present with the device id
55 */
56 CordVtnNode node(DeviceId deviceId);
57}