Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 80dff97 | 2017-08-03 22:46:30 -0700 | [diff] [blame^] | 2 | * Copyright 2016-present Open Networking Foundation |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 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 | */ |
Hyunsun Moon | 187bf53 | 2017-01-19 10:57:40 +0900 | [diff] [blame] | 16 | package org.opencord.cordvtn.api.core; |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 17 | |
| 18 | import org.onosproject.net.ConnectPoint; |
| 19 | import org.onosproject.net.HostId; |
| 20 | import org.onosproject.net.host.HostDescription; |
| 21 | |
| 22 | /** |
| 23 | * Provides service instance addition or removal. |
| 24 | */ |
| 25 | public interface InstanceService { |
| 26 | |
Hyunsun Moon | 187bf53 | 2017-01-19 10:57:40 +0900 | [diff] [blame] | 27 | // TODO add get instance |
| 28 | |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 29 | /** |
Hyunsun Moon | eaf75e6 | 2016-09-27 16:40:23 -0700 | [diff] [blame] | 30 | * Adds a service instance on a given connect point. Or updates if the |
| 31 | * instance already exists. |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 32 | * |
| 33 | * @param connectPoint connect point of the instance |
| 34 | */ |
| 35 | void addInstance(ConnectPoint connectPoint); |
| 36 | |
| 37 | /** |
Hyunsun Moon | d02a5a7 | 2017-02-05 22:00:05 +0900 | [diff] [blame] | 38 | * Adds a host with a given host ID and host description. |
| 39 | * |
| 40 | * @param hostId host id |
| 41 | * @param description host description |
| 42 | */ |
| 43 | void addInstance(HostId hostId, HostDescription description); |
| 44 | |
| 45 | /** |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 46 | * Removes a service instance from a given connect point. |
| 47 | * |
| 48 | * @param connectPoint connect point |
| 49 | */ |
| 50 | void removeInstance(ConnectPoint connectPoint); |
| 51 | |
| 52 | /** |
Hyunsun Moon | d02a5a7 | 2017-02-05 22:00:05 +0900 | [diff] [blame] | 53 | * Removes host with host ID. |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 54 | * |
| 55 | * @param hostId host id |
| 56 | */ |
Hyunsun Moon | d02a5a7 | 2017-02-05 22:00:05 +0900 | [diff] [blame] | 57 | void removeInstance(HostId hostId); |
Hyunsun Moon | 5401aaa | 2016-06-12 17:40:34 -0700 | [diff] [blame] | 58 | } |