blob: 00c8e8a104f005072c4704e303e264cf4936648f [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Ray Milkey34c95902015-04-15 09:47:53 -07002 * Copyright 2014-2015 Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -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.net.resource.link;
Toshio Koide485b4782014-10-20 19:34:21 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.net.Link;
19import org.onosproject.net.intent.Constraint;
20import org.onosproject.net.intent.IntentId;
Brian O'Connor6de2e202015-05-21 14:30:41 -070021import org.onosproject.net.resource.ResourceRequest;
Toshio Koide485b4782014-10-20 19:34:21 -070022
Sho SHIMIZU6603a852015-10-27 16:04:57 -070023import java.util.Collection;
24import java.util.Set;
25
Toshio Koide485b4782014-10-20 19:34:21 -070026/**
27 * Representation of a request for link resource.
28 */
Toshio Koide65e890f2014-10-23 12:02:25 -070029public interface LinkResourceRequest extends ResourceRequest {
Toshio Koide485b4782014-10-20 19:34:21 -070030
31 /**
32 * Returns the {@link IntentId} associated with the request.
33 *
34 * @return the {@link IntentId} associated with the request
35 */
Ayaka Koshibee114f042015-05-01 11:43:00 -070036 IntentId intentId();
Toshio Koide485b4782014-10-20 19:34:21 -070037
38 /**
39 * Returns the set of target links.
40 *
41 * @return the set of target links
42 */
Toshio Koide65e890f2014-10-23 12:02:25 -070043 Collection<Link> links();
Toshio Koide485b4782014-10-20 19:34:21 -070044
45 /**
46 * Returns the set of resource requests.
47 *
48 * @return the set of resource requests
49 */
Toshio Koide65e890f2014-10-23 12:02:25 -070050 Set<ResourceRequest> resources();
Toshio Koide569ca702014-10-23 11:37:44 -070051
52 /**
53 * Builder of link resource request.
54 */
Toshio Koide65e890f2014-10-23 12:02:25 -070055 interface Builder {
Sho SHIMIZU6603a852015-10-27 16:04:57 -070056 /**
Toshio Koide569ca702014-10-23 11:37:44 -070057 * Adds lambda request.
58 *
59 * @return self
60 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070061 Builder addLambdaRequest();
Toshio Koide569ca702014-10-23 11:37:44 -070062
63 /**
Sho SHIMIZU6603a852015-10-27 16:04:57 -070064 * Adds MPLS request.
65 *
66 * @return self
67 */
68 Builder addMplsRequest();
Michele Santuari4b6019e2014-12-19 11:31:45 +010069
70 /**
Toshio Koide569ca702014-10-23 11:37:44 -070071 * Adds bandwidth request with bandwidth value.
72 *
73 * @param bandwidth bandwidth value to be requested
74 * @return self
75 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070076 Builder addBandwidthRequest(double bandwidth);
Toshio Koide569ca702014-10-23 11:37:44 -070077
78 /**
Thomas Vachuskaedc944c2014-11-04 15:42:25 -080079 * Adds the resources required for a constraint.
80 *
81 * @param constraint the constraint
82 * @return self
83 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070084 Builder addConstraint(Constraint constraint);
Thomas Vachuskaedc944c2014-11-04 15:42:25 -080085
86 /**
Toshio Koide569ca702014-10-23 11:37:44 -070087 * Returns link resource request.
88 *
89 * @return link resource request
90 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070091 LinkResourceRequest build();
Toshio Koide569ca702014-10-23 11:37:44 -070092 }
Toshio Koide485b4782014-10-20 19:34:21 -070093}