blob: bc9f4e6810cf91c534ec2b7348d70b214fc5fd87 [file] [log] [blame]
jiangruie3d60b12015-11-25 16:27:04 +08001/*
2 * Copyright 2015 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.onosproject.vtnrsc.service;
17
18import java.util.Iterator;
19
20import org.onlab.packet.MacAddress;
Mahesh Poojary Scc11f722015-11-29 16:09:56 +053021import org.onosproject.event.ListenerService;
jiangruie3d60b12015-11-25 16:27:04 +080022import org.onosproject.net.Device;
23import org.onosproject.net.DeviceId;
24import org.onosproject.net.HostId;
25import org.onosproject.vtnrsc.SegmentationId;
26import org.onosproject.vtnrsc.TenantId;
27import org.onosproject.vtnrsc.VirtualPortId;
Mahesh Poojary Scc11f722015-11-29 16:09:56 +053028import org.onosproject.vtnrsc.event.VtnRscEvent;
jiangruie3d60b12015-11-25 16:27:04 +080029import org.onosproject.vtnrsc.event.VtnRscListener;
30
31/**
32 * Service for interacting with the inventory of Vtn resource.
33 */
Mahesh Poojary Scc11f722015-11-29 16:09:56 +053034public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListener> {
jiangruie3d60b12015-11-25 16:27:04 +080035 /**
36 * Returns the SegmentationId of tenant.
37 *
38 * @param tenantId tenant identifier
39 * @return SegmentationId the SegmentationId of tenant
40 */
41 SegmentationId getL3vni(TenantId tenantId);
42
43 /**
44 * Returns Classifier Ovs list of the specific tenant.
45 *
46 * @param tenantId tenant identifier
47 * @return iterable collection of Device
48 */
49 Iterator<Device> getClassifierOfTenant(TenantId tenantId);
50
51 /**
52 * Returns Service function forwarders Ovs list of the specific tenant.
53 *
54 * @param tenantId tenant identifier
55 * @return iterable collection of Device
56 */
57 Iterator<Device> getSFFOfTenant(TenantId tenantId);
58
59 /**
60 * Returns gateway mac address of the specific host.
61 *
62 * @param hostId host identifier
63 * @return MacAddress of host
64 */
65 MacAddress getGatewayMac(HostId hostId);
66
67 /**
68 * Checks if a specific port is a service function.
69 *
70 * @param portId port identifier
71 * @return true or false
72 */
73 boolean isServiceFunction(VirtualPortId portId);
74
75 /**
76 * Returns device identifier mapping to the specific port.
77 *
78 * @param portId port identifier
79 * @return device identifier
80 */
81 DeviceId getSFToSFFMaping(VirtualPortId portId);
82}