blob: d65f60e1a777b0be2a1cf3e495f1eed9c915c876 [file] [log] [blame]
Hyunsun Moon7ad92202016-04-20 10:36:02 -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 service and service dependency.
22 */
23public interface VtnServiceApi {
24
Hyunsun Moon91ba41a2016-06-10 16:52:39 -070025 // TODO move network type to VtnNetwork later
26 enum NetworkType {
27 PRIVATE,
28 PUBLIC,
Hyunsun Moonf1c03462016-06-21 18:06:01 -070029 MANAGEMENT_HOSTS,
30 MANAGEMENT_LOCAL
Hyunsun Moon91ba41a2016-06-10 16:52:39 -070031 }
32
33 enum ServiceType {
34 VSG,
Hyunsun Moonf1c03462016-06-21 18:06:01 -070035 ACCESS_AGENT,
Hyunsun Moon91ba41a2016-06-10 16:52:39 -070036 MANAGEMENT,
37 DEFAULT
38 }
39
Hyunsun Moon7ad92202016-04-20 10:36:02 -070040 /**
41 * Returns all services list.
42 *
43 * @return service list
44 */
Hyunsun Moon4c396632016-05-13 04:17:53 -070045 Set<VtnServiceId> services();
46
47 /**
48 * Returns VTN service.
49 *
50 * @param serviceId service id
51 * @return vtn service
52 */
53 VtnService service(VtnServiceId serviceId);
Hyunsun Moon7ad92202016-04-20 10:36:02 -070054
55 /**
56 * Returns dependent tenant services of a given provider service.
57 *
Hyunsun Moon4c396632016-05-13 04:17:53 -070058 * @param pServiceId vtn service id
59 * @return set of service ids
Hyunsun Moon7ad92202016-04-20 10:36:02 -070060 */
Hyunsun Moon4c396632016-05-13 04:17:53 -070061 Set<VtnServiceId> tenantServices(VtnServiceId pServiceId);
Hyunsun Moon7ad92202016-04-20 10:36:02 -070062
63 /**
64 * Returns dependent provider services of a given tenant service.
65 *
Hyunsun Moon4c396632016-05-13 04:17:53 -070066 * @param tServiceId vtn service id
67 * @return set of service ids
Hyunsun Moon7ad92202016-04-20 10:36:02 -070068 */
Hyunsun Moon4c396632016-05-13 04:17:53 -070069 Set<VtnServiceId> providerServices(VtnServiceId tServiceId);
Hyunsun Moone0f3e282016-05-13 18:58:35 -070070
71 /**
72 * Returns VTN service from OpenStack.
73 *
74 * @param serviceId service id
75 * @param osAccess openstack access
76 * @return vtn service
77 */
78 // TODO remove this when XOS provides service information
79 VtnService service(VtnServiceId serviceId, OpenStackAccess osAccess);
Hyunsun Moon7ad92202016-04-20 10:36:02 -070080}