blob: 08e317535fe8476433ee55e6a62de8a00b6ce391 [file] [log] [blame]
CNlucius74fd4942015-07-20 14:28:04 +08001/*
2 * Copyright 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.ovsdb.controller;
17
18import java.util.Set;
19
20import org.onlab.packet.IpAddress;
21
22/**
23 * Represents to provider facing side of a node.
24 */
25public interface OvsdbClientService {
26 /**
27 * Gets the node identifier.
28 *
29 * @return node identifier
30 */
31 OvsdbNodeId nodeId();
32
33 /**
34 * Creates the configuration for the tunnel.
35 *
36 * @param srcIp source IP address
37 * @param dstIp destination IP address
38 */
39 void createTunnel(IpAddress srcIp, IpAddress dstIp);
40
41 /**
42 * Drops the configuration for the tunnel.
43 *
44 * @param srcIp source IP address
45 * @param dstIp destination IP address
46 */
47 void dropTunnel(IpAddress srcIp, IpAddress dstIp);
48
49 /**
50 * Gets tunnels of the node.
51 *
52 * @return set of tunnels; empty if no tunnel is find
53 */
54 Set<OvsdbTunnel> getTunnels();
55
56 /**
57 * Creates a bridge.
58 *
59 * @param bridgeName bridge name
60 */
61 void createBridge(String bridgeName);
62
63 /**
64 * Drops a bridge.
65 *
66 * @param bridgeName bridge name
67 */
68 void dropBridge(String bridgeName);
69
70 /**
71 * Gets bridges of the node.
72 *
73 * @return set of bridges; empty if no bridge is find
74 */
75 Set<OvsdbBridge> getBridges();
76
77 /**
78 * Creates a port.
79 *
80 * @param bridgeName bridge name
81 * @param portName port name
82 */
83 void createPort(String bridgeName, String portName);
84
85 /**
86 * Drops a port.
87 *
88 * @param bridgeName bridge name
89 * @param portName port name
90 */
91 void dropPort(String bridgeName, String portName);
92
93 /**
94 * Gets ports of the bridge.
95 *
96 * @return set of ports; empty if no ports is find
97 */
98 Set<OvsdbPort> getPorts();
99
100 /**
101 * Checks if the node is still connected.
102 *
103 * @return true if the node is still connected
104 */
105 boolean isConnected();
106
107}