Brian O'Connor | 6de2e20 | 2015-05-21 14:30:41 -0700 | [diff] [blame^] | 1 | package org.onosproject.incubator.net.resource.label; |
jcc | fff0de9 | 2015-03-28 01:40:08 -0700 | [diff] [blame] | 2 | |
| 3 | import org.onosproject.net.DeviceId; |
| 4 | |
| 5 | /** |
| 6 | * Service for managing label resource. |
| 7 | */ |
| 8 | public interface LabelResourceAdminService { |
| 9 | /** |
| 10 | * Creates the only label resource of some device id from begin label to end |
| 11 | * label. |
| 12 | * |
| 13 | * @param deviceId device identifier |
| 14 | * @param beginLabel represents for the first label id in the range of label |
| 15 | * pool |
| 16 | * @param endLabel represents for the last label id in the range of label |
| 17 | * pool |
| 18 | * @return success or fail |
| 19 | */ |
| 20 | boolean createDevicePool(DeviceId deviceId, LabelResourceId beginLabel, |
| 21 | LabelResourceId endLabel); |
| 22 | |
| 23 | /** |
| 24 | * Creates the only global label resource pool. |
| 25 | * |
| 26 | * @param beginLabel represents for the first label id in the range of label |
| 27 | * pool |
| 28 | * @param endLabel represents for the last label id in the range of label |
| 29 | * pool |
| 30 | * @return success or fail |
| 31 | */ |
| 32 | boolean createGlobalPool(LabelResourceId beginLabel, |
| 33 | LabelResourceId endLabel); |
| 34 | |
| 35 | /** |
| 36 | * Destroys a label resource pool of a specific device id. |
| 37 | * |
| 38 | * @param deviceId device identifier |
| 39 | * @return success or fail |
| 40 | */ |
| 41 | boolean destroyDevicePool(DeviceId deviceId); |
| 42 | |
| 43 | /** |
| 44 | * Destroys the global label resource pool. |
| 45 | * |
| 46 | * @return success or fail |
| 47 | */ |
| 48 | boolean destroyGlobalPool(); |
| 49 | } |