blob: 1478231fdf11dea79922f651708b69c51e64b131 [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
Sho SHIMIZUc25a0082015-10-27 17:06:29 -070018import com.google.common.annotations.Beta;
Brian O'Connorabafb502014-12-02 22:26:20 -080019import org.onosproject.net.Link;
20import org.onosproject.net.intent.Constraint;
21import org.onosproject.net.intent.IntentId;
Brian O'Connor6de2e202015-05-21 14:30:41 -070022import org.onosproject.net.resource.ResourceRequest;
Toshio Koide485b4782014-10-20 19:34:21 -070023
Sho SHIMIZU6603a852015-10-27 16:04:57 -070024import java.util.Collection;
25import java.util.Set;
26
Toshio Koide485b4782014-10-20 19:34:21 -070027/**
28 * Representation of a request for link resource.
29 */
Toshio Koide65e890f2014-10-23 12:02:25 -070030public interface LinkResourceRequest extends ResourceRequest {
Toshio Koide485b4782014-10-20 19:34:21 -070031
32 /**
33 * Returns the {@link IntentId} associated with the request.
34 *
35 * @return the {@link IntentId} associated with the request
36 */
Ayaka Koshibee114f042015-05-01 11:43:00 -070037 IntentId intentId();
Toshio Koide485b4782014-10-20 19:34:21 -070038
39 /**
40 * Returns the set of target links.
41 *
42 * @return the set of target links
43 */
Toshio Koide65e890f2014-10-23 12:02:25 -070044 Collection<Link> links();
Toshio Koide485b4782014-10-20 19:34:21 -070045
46 /**
47 * Returns the set of resource requests.
48 *
49 * @return the set of resource requests
50 */
Toshio Koide65e890f2014-10-23 12:02:25 -070051 Set<ResourceRequest> resources();
Toshio Koide569ca702014-10-23 11:37:44 -070052
53 /**
54 * Builder of link resource request.
55 */
Toshio Koide65e890f2014-10-23 12:02:25 -070056 interface Builder {
Sho SHIMIZU6603a852015-10-27 16:04:57 -070057 /**
Toshio Koide569ca702014-10-23 11:37:44 -070058 * Adds lambda request.
59 *
60 * @return self
Sho SHIMIZUc25a0082015-10-27 17:06:29 -070061 * @deprecated in Emu Release
Toshio Koide569ca702014-10-23 11:37:44 -070062 */
Sho SHIMIZUc25a0082015-10-27 17:06:29 -070063 @Deprecated
Sho SHIMIZU3310a342015-05-13 12:14:05 -070064 Builder addLambdaRequest();
Toshio Koide569ca702014-10-23 11:37:44 -070065
66 /**
Sho SHIMIZUc25a0082015-10-27 17:06:29 -070067 * Adds lambda request.
68 *
69 * @param lambda lambda to be requested
70 * @return self
71 */
72 @Beta
73 Builder addLambdaRequest(LambdaResource lambda);
74
75 /**
Sho SHIMIZU6603a852015-10-27 16:04:57 -070076 * Adds MPLS request.
77 *
78 * @return self
79 */
80 Builder addMplsRequest();
Michele Santuari4b6019e2014-12-19 11:31:45 +010081
82 /**
Toshio Koide569ca702014-10-23 11:37:44 -070083 * Adds bandwidth request with bandwidth value.
84 *
85 * @param bandwidth bandwidth value to be requested
86 * @return self
87 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070088 Builder addBandwidthRequest(double bandwidth);
Toshio Koide569ca702014-10-23 11:37:44 -070089
90 /**
Thomas Vachuskaedc944c2014-11-04 15:42:25 -080091 * Adds the resources required for a constraint.
92 *
93 * @param constraint the constraint
94 * @return self
95 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070096 Builder addConstraint(Constraint constraint);
Thomas Vachuskaedc944c2014-11-04 15:42:25 -080097
98 /**
Toshio Koide569ca702014-10-23 11:37:44 -070099 * Returns link resource request.
100 *
101 * @return link resource request
102 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -0700103 LinkResourceRequest build();
Toshio Koide569ca702014-10-23 11:37:44 -0700104 }
Toshio Koide485b4782014-10-20 19:34:21 -0700105}