2 * Copyright 2014-2015 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onosproject.segmentrouting.grouphandler;
18 import java.util.List;
20 import org.onlab.packet.MacAddress;
21 import org.onosproject.net.DeviceId;
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.
28 public interface DeviceProperties {
30 * Returns the segment id of a device to be used in group creation.
32 * @param deviceId device identifier
33 * @return segment id of a device
35 int getSegmentId(DeviceId deviceId);
37 * Returns the Mac address of a device to be used in group creation.
39 * @param deviceId device identifier
40 * @return mac address of a device
42 MacAddress getDeviceMac(DeviceId deviceId);
44 * Indicates whether a device is edge device or transit/core device.
46 * @param deviceId device identifier
49 boolean isEdgeDevice(DeviceId deviceId);
51 * Returns all segment IDs to be considered in building auto
54 * @return list of segment IDs
56 List<Integer> getAllDeviceSegmentIds();