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 | |
Brian O'Connor | 893b922 | 2015-06-25 15:07:04 -0400 | [diff] [blame] | 3 | import com.google.common.annotations.Beta; |
jcc | fff0de9 | 2015-03-28 01:40:08 -0700 | [diff] [blame] | 4 | import org.onosproject.net.DeviceId; |
| 5 | |
| 6 | /** |
| 7 | * Service for managing label resource. |
| 8 | */ |
Brian O'Connor | 893b922 | 2015-06-25 15:07:04 -0400 | [diff] [blame] | 9 | @Beta |
jcc | fff0de9 | 2015-03-28 01:40:08 -0700 | [diff] [blame] | 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 | } |