blob: 56835f430824eb0d12e05fcc5c518b0c1f1e0096 [file] [log] [blame]
Hyunsun Moon4c396632016-05-13 04:17:53 -07001/*
2 * Copyright 2016-present 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.xosclient.api;
17
18import java.util.Set;
19
20/**
21 * Service for interacting with XOS VTN ports.
22 */
23public interface VtnPortApi {
24
25 /**
26 * Returns all ports.
27 *
28 * @return set of ports
29 */
30 Set<VtnPort> vtnPorts();
31
32 /**
33 * Returns all ports with a given service.
34 *
35 * @param serviceId service id
36 * @return set of ports
37 */
38 Set<VtnPort> vtnPorts(VtnServiceId serviceId);
39
40 /**
41 * Returns port information with port id.
42 *
43 * @param portId port id
44 * @return vtn port; null if it fails to get port information
45 */
46 VtnPort vtnPort(VtnPortId portId);
Hyunsun Moone0f3e282016-05-13 18:58:35 -070047
48 /**
49 * Returns port information from OpenStack with port id.
50 *
51 * @param portId port id
Ray Milkeybb23e0b2016-08-02 17:00:21 -070052 * @param osAccess OpenStack address for OS access
Hyunsun Moone0f3e282016-05-13 18:58:35 -070053 * @return vtn port; null if it fails to get port information
54 */
55 // TODO remove this when XOS provides port information
56 VtnPort vtnPort(VtnPortId portId, OpenStackAccess osAccess);
57
58 /**
59 * Returns port information from OpenStack with port name.
60 *
61 * @param portName port name
Ray Milkeybb23e0b2016-08-02 17:00:21 -070062 * @param osAccess OpenStack address for OS access
Hyunsun Moone0f3e282016-05-13 18:58:35 -070063 * @return vtn port; null if it fails to get port information
64 */
65 // TODO remove this when XOS provides port information
66 VtnPort vtnPort(String portName, OpenStackAccess osAccess);
Hyunsun Moon4c396632016-05-13 04:17:53 -070067}