blob: d0ed9459d2b1e3792dcfad16478e70cc43d1c962 [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'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.resource;
Toshio Koide485b4782014-10-20 19:34:21 -070017
18import java.util.Collection;
19import java.util.Set;
20
Brian O'Connorabafb502014-12-02 22:26:20 -080021import org.onosproject.net.Link;
22import org.onosproject.net.intent.Constraint;
23import org.onosproject.net.intent.IntentId;
Toshio Koide485b4782014-10-20 19:34:21 -070024
25/**
26 * Representation of a request for link resource.
27 */
Toshio Koide65e890f2014-10-23 12:02:25 -070028public interface LinkResourceRequest extends ResourceRequest {
Toshio Koide485b4782014-10-20 19:34:21 -070029
30 /**
31 * Returns the {@link IntentId} associated with the request.
32 *
33 * @return the {@link IntentId} associated with the request
34 */
Ayaka Koshibee114f042015-05-01 11:43:00 -070035 IntentId intentId();
Toshio Koide485b4782014-10-20 19:34:21 -070036
37 /**
38 * Returns the set of target links.
39 *
40 * @return the set of target links
41 */
Toshio Koide65e890f2014-10-23 12:02:25 -070042 Collection<Link> links();
Toshio Koide485b4782014-10-20 19:34:21 -070043
44 /**
45 * Returns the set of resource requests.
46 *
47 * @return the set of resource requests
48 */
Toshio Koide65e890f2014-10-23 12:02:25 -070049 Set<ResourceRequest> resources();
Toshio Koide569ca702014-10-23 11:37:44 -070050
51 /**
52 * Builder of link resource request.
53 */
Toshio Koide65e890f2014-10-23 12:02:25 -070054 interface Builder {
55 /**
Toshio Koide569ca702014-10-23 11:37:44 -070056 * Adds lambda request.
57 *
58 * @return self
59 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070060 Builder addLambdaRequest();
Toshio Koide569ca702014-10-23 11:37:44 -070061
62 /**
Michele Santuari4b6019e2014-12-19 11:31:45 +010063 * Adds MPLS request.
64 *
65 * @return self
66 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070067 Builder addMplsRequest();
Michele Santuari4b6019e2014-12-19 11:31:45 +010068
69 /**
Toshio Koide569ca702014-10-23 11:37:44 -070070 * Adds bandwidth request with bandwidth value.
71 *
72 * @param bandwidth bandwidth value to be requested
73 * @return self
74 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070075 Builder addBandwidthRequest(double bandwidth);
Toshio Koide569ca702014-10-23 11:37:44 -070076
77 /**
Thomas Vachuskaedc944c2014-11-04 15:42:25 -080078 * Adds the resources required for a constraint.
79 *
80 * @param constraint the constraint
81 * @return self
82 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070083 Builder addConstraint(Constraint constraint);
Thomas Vachuskaedc944c2014-11-04 15:42:25 -080084
85 /**
Toshio Koide569ca702014-10-23 11:37:44 -070086 * Returns link resource request.
87 *
88 * @return link resource request
89 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070090 LinkResourceRequest build();
Toshio Koide569ca702014-10-23 11:37:44 -070091 }
Toshio Koide485b4782014-10-20 19:34:21 -070092}