blob: 06d0780e87a996fa5875f37c8963e0634d550803 [file] [log] [blame]
Hyunsun Moon5401aaa2016-06-12 17:40:34 -07001/*
Brian O'Connor80dff972017-08-03 22:46:30 -07002 * Copyright 2016-present Open Networking Foundation
Hyunsun Moon5401aaa2016-06-12 17:40:34 -07003 *
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 Moon187bf532017-01-19 10:57:40 +090016package org.opencord.cordvtn.api.core;
Hyunsun Moon5401aaa2016-06-12 17:40:34 -070017
18import org.onosproject.net.ConnectPoint;
19import org.onosproject.net.HostId;
20import org.onosproject.net.host.HostDescription;
21
22/**
23 * Provides service instance addition or removal.
24 */
25public interface InstanceService {
26
Hyunsun Moon187bf532017-01-19 10:57:40 +090027 // TODO add get instance
28
Hyunsun Moon5401aaa2016-06-12 17:40:34 -070029 /**
Hyunsun Mooneaf75e62016-09-27 16:40:23 -070030 * Adds a service instance on a given connect point. Or updates if the
31 * instance already exists.
Hyunsun Moon5401aaa2016-06-12 17:40:34 -070032 *
33 * @param connectPoint connect point of the instance
34 */
35 void addInstance(ConnectPoint connectPoint);
36
37 /**
Hyunsun Moond02a5a72017-02-05 22:00:05 +090038 * 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 Moon5401aaa2016-06-12 17:40:34 -070046 * Removes a service instance from a given connect point.
47 *
48 * @param connectPoint connect point
49 */
50 void removeInstance(ConnectPoint connectPoint);
51
52 /**
Hyunsun Moond02a5a72017-02-05 22:00:05 +090053 * Removes host with host ID.
Hyunsun Moon5401aaa2016-06-12 17:40:34 -070054 *
55 * @param hostId host id
56 */
Hyunsun Moond02a5a72017-02-05 22:00:05 +090057 void removeInstance(HostId hostId);
Hyunsun Moon5401aaa2016-06-12 17:40:34 -070058}