blob: 816ca7bce0c8d1835fd342024c947fd73bc5ded0 [file] [log] [blame]
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -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 */
Srikanth Vavilapalli4db76e32015-04-07 15:12:32 -070016package org.onosproject.segmentrouting.grouphandler;
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -080017
18import java.util.List;
19
20import org.onlab.packet.MacAddress;
21import org.onosproject.net.DeviceId;
22
23/**
24 * Mechanism through which group handler module retrieves
25 * the device specific attributes such as segment ID,
26 * Mac address...etc from group handler applications.
27 */
28public interface DeviceProperties {
29 /**
30 * Returns the segment id of a device to be used in group creation.
31 *
32 * @param deviceId device identifier
33 * @return segment id of a device
34 */
35 int getSegmentId(DeviceId deviceId);
36 /**
37 * Returns the Mac address of a device to be used in group creation.
38 *
39 * @param deviceId device identifier
40 * @return mac address of a device
41 */
42 MacAddress getDeviceMac(DeviceId deviceId);
43 /**
44 * Indicates whether a device is edge device or transit/core device.
45 *
46 * @param deviceId device identifier
47 * @return boolean
48 */
49 boolean isEdgeDevice(DeviceId deviceId);
50 /**
51 * Returns all segment IDs to be considered in building auto
52 *
53 * created groups.
54 * @return list of segment IDs
55 */
56 List<Integer> getAllDeviceSegmentIds();
57}