blob: f20ab59b79986f96e80017563eb925f4660380ce [file] [log] [blame]
Brian O'Connor6de2e202015-05-21 14:30:41 -07001package org.onosproject.incubator.net.resource.label;
jccfff0de92015-03-28 01:40:08 -07002
Brian O'Connor893b9222015-06-25 15:07:04 -04003import com.google.common.annotations.Beta;
jccfff0de92015-03-28 01:40:08 -07004import org.onosproject.net.DeviceId;
5
6/**
7 * Service for managing label resource.
8 */
Brian O'Connor893b9222015-06-25 15:07:04 -04009@Beta
jccfff0de92015-03-28 01:40:08 -070010public interface LabelResourceAdminService {
11 /**
12 * Creates the only label resource of some device id from begin label to end
13 * label.
14 *
15 * @param deviceId device identifier
16 * @param beginLabel represents for the first label id in the range of label
17 * pool
18 * @param endLabel represents for the last label id in the range of label
19 * pool
20 * @return success or fail
21 */
22 boolean createDevicePool(DeviceId deviceId, LabelResourceId beginLabel,
23 LabelResourceId endLabel);
24
25 /**
26 * Creates the only global label resource pool.
27 *
28 * @param beginLabel represents for the first label id in the range of label
29 * pool
30 * @param endLabel represents for the last label id in the range of label
31 * pool
32 * @return success or fail
33 */
34 boolean createGlobalPool(LabelResourceId beginLabel,
35 LabelResourceId endLabel);
36
37 /**
38 * Destroys a label resource pool of a specific device id.
39 *
40 * @param deviceId device identifier
41 * @return success or fail
42 */
43 boolean destroyDevicePool(DeviceId deviceId);
44
45 /**
46 * Destroys the global label resource pool.
47 *
48 * @return success or fail
49 */
50 boolean destroyGlobalPool();
51}