Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.xosclient.api; |
| 17 | |
| 18 | import java.util.Set; |
| 19 | |
| 20 | /** |
| 21 | * Service for interacting with XOS VTN service and service dependency. |
| 22 | */ |
| 23 | public interface VtnServiceApi { |
| 24 | |
Hyunsun Moon | 91ba41a | 2016-06-10 16:52:39 -0700 | [diff] [blame^] | 25 | // TODO move network type to VtnNetwork later |
| 26 | enum NetworkType { |
| 27 | PRIVATE, |
| 28 | PUBLIC, |
| 29 | MANAGEMENT |
| 30 | } |
| 31 | |
| 32 | enum ServiceType { |
| 33 | VSG, |
| 34 | OLT_AGENT, |
| 35 | MANAGEMENT, |
| 36 | DEFAULT |
| 37 | } |
| 38 | |
Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 39 | /** |
| 40 | * Returns all services list. |
| 41 | * |
| 42 | * @return service list |
| 43 | */ |
Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 44 | Set<VtnServiceId> services(); |
| 45 | |
| 46 | /** |
| 47 | * Returns VTN service. |
| 48 | * |
| 49 | * @param serviceId service id |
| 50 | * @return vtn service |
| 51 | */ |
| 52 | VtnService service(VtnServiceId serviceId); |
Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 53 | |
| 54 | /** |
| 55 | * Returns dependent tenant services of a given provider service. |
| 56 | * |
Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 57 | * @param pServiceId vtn service id |
| 58 | * @return set of service ids |
Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 59 | */ |
Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 60 | Set<VtnServiceId> tenantServices(VtnServiceId pServiceId); |
Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 61 | |
| 62 | /** |
| 63 | * Returns dependent provider services of a given tenant service. |
| 64 | * |
Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 65 | * @param tServiceId vtn service id |
| 66 | * @return set of service ids |
Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 67 | */ |
Hyunsun Moon | 4c39663 | 2016-05-13 04:17:53 -0700 | [diff] [blame] | 68 | Set<VtnServiceId> providerServices(VtnServiceId tServiceId); |
Hyunsun Moon | e0f3e28 | 2016-05-13 18:58:35 -0700 | [diff] [blame] | 69 | |
| 70 | /** |
| 71 | * Returns VTN service from OpenStack. |
| 72 | * |
| 73 | * @param serviceId service id |
| 74 | * @param osAccess openstack access |
| 75 | * @return vtn service |
| 76 | */ |
| 77 | // TODO remove this when XOS provides service information |
| 78 | VtnService service(VtnServiceId serviceId, OpenStackAccess osAccess); |
Hyunsun Moon | 7ad9220 | 2016-04-20 10:36:02 -0700 | [diff] [blame] | 79 | } |