blob: a8e0f77cda4deeee47c87509a72676f52ab00fe7 [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 /**
28 * Adds a service instance on a given connect point.
29 *
30 * @param connectPoint connect point of the instance
31 */
32 void addInstance(ConnectPoint connectPoint);
33
34 /**
35 * Removes a service instance from a given connect point.
36 *
37 * @param connectPoint connect point
38 */
39 void removeInstance(ConnectPoint connectPoint);
40
41 /**
42 * Adds a nested instance with given host ID and host description.
43 * Nested instance can be a container inside a virtual machine, for example.
44 * DHCP is not supported for the nested instance.
45 *
46 * @param hostId host id
47 * @param description host description
48 */
49 void addNestedInstance(HostId hostId, HostDescription description);
50
51 /**
52 * Removes nested instance with a given host ID.
53 *
54 * @param hostId host id
55 */
56 void removeNestedInstance(HostId hostId);
57}