blob: e82cfde7f232c6280ef7e355c885fcc2cfc3553e [file] [log] [blame]
Thomas Vachuska58de4162015-09-10 16:15:33 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Thomas Vachuska58de4162015-09-10 16:15:33 -07003 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
Brian O'Connor6de2e202015-05-21 14:30:41 -070016package org.onosproject.incubator.net.resource.label;
jccfff0de92015-03-28 01:40:08 -070017
Brian O'Connor893b9222015-06-25 15:07:04 -040018import com.google.common.annotations.Beta;
jccfff0de92015-03-28 01:40:08 -070019import org.onosproject.net.DeviceId;
20
21/**
22 * Service for managing label resource.
23 */
Brian O'Connor893b9222015-06-25 15:07:04 -040024@Beta
jccfff0de92015-03-28 01:40:08 -070025public interface LabelResourceAdminService {
26 /**
27 * Creates the only label resource of some device id from begin label to end
28 * label.
29 *
30 * @param deviceId device identifier
31 * @param beginLabel represents for the first label id in the range of label
32 * pool
33 * @param endLabel represents for the last label id in the range of label
34 * pool
35 * @return success or fail
36 */
37 boolean createDevicePool(DeviceId deviceId, LabelResourceId beginLabel,
38 LabelResourceId endLabel);
39
40 /**
41 * Creates the only global label resource pool.
42 *
43 * @param beginLabel represents for the first label id in the range of label
44 * pool
45 * @param endLabel represents for the last label id in the range of label
46 * pool
47 * @return success or fail
48 */
49 boolean createGlobalPool(LabelResourceId beginLabel,
50 LabelResourceId endLabel);
51
52 /**
53 * Destroys a label resource pool of a specific device id.
54 *
55 * @param deviceId device identifier
56 * @return success or fail
57 */
58 boolean destroyDevicePool(DeviceId deviceId);
59
60 /**
61 * Destroys the global label resource pool.
62 *
63 * @return success or fail
64 */
65 boolean destroyGlobalPool();
66}