blob: add968f227f016de858749fe8bb243b15089a658 [file] [log] [blame]
Hyunsun Moon5401aaa2016-06-12 17:40:34 -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.opencord.cordvtn.api;
17
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
27 /**
Hyunsun Mooneaf75e62016-09-27 16:40:23 -070028 * Adds a service instance on a given connect point. Or updates if the
29 * instance already exists.
Hyunsun Moon5401aaa2016-06-12 17:40:34 -070030 *
31 * @param connectPoint connect point of the instance
32 */
33 void addInstance(ConnectPoint connectPoint);
34
35 /**
36 * Removes a service instance from a given connect point.
37 *
38 * @param connectPoint connect point
39 */
40 void removeInstance(ConnectPoint connectPoint);
41
42 /**
43 * Adds a nested instance with given host ID and host description.
44 * Nested instance can be a container inside a virtual machine, for example.
45 * DHCP is not supported for the nested instance.
46 *
47 * @param hostId host id
48 * @param description host description
49 */
50 void addNestedInstance(HostId hostId, HostDescription description);
51
52 /**
53 * Removes nested instance with a given host ID.
54 *
55 * @param hostId host id
56 */
57 void removeNestedInstance(HostId hostId);
58}