f20ab59b79986f96e80017563eb925f4660380ce
[onosfw.git] /
1 package org.onosproject.incubator.net.resource.label;
2
3 import com.google.common.annotations.Beta;
4 import org.onosproject.net.DeviceId;
5
6 /**
7  * Service for managing label resource.
8  */
9 @Beta
10 public 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 }