Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Ray Milkey | 34c9590 | 2015-04-15 09:47:53 -0700 | [diff] [blame] | 2 | * Copyright 2014-2015 Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 3 | * |
| 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'Connor | 6de2e20 | 2015-05-21 14:30:41 -0700 | [diff] [blame] | 16 | package org.onosproject.net.resource.link; |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 17 | |
Sho SHIMIZU | 81cdc39 | 2015-10-27 15:18:49 -0700 | [diff] [blame] | 18 | import java.util.Collection; |
| 19 | import java.util.Map; |
| 20 | import java.util.Set; |
| 21 | |
Sho SHIMIZU | c25a008 | 2015-10-27 17:06:29 -0700 | [diff] [blame] | 22 | import com.google.common.annotations.Beta; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 23 | import org.onosproject.net.Link; |
| 24 | import org.onosproject.net.intent.Constraint; |
| 25 | import org.onosproject.net.intent.IntentId; |
Brian O'Connor | 6de2e20 | 2015-05-21 14:30:41 -0700 | [diff] [blame] | 26 | import org.onosproject.net.resource.ResourceRequest; |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Representation of a request for link resource. |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 30 | * |
| 31 | * @deprecated in Emu Release |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 32 | */ |
Sho SHIMIZU | 364cbac | 2015-10-29 15:47:35 -0700 | [diff] [blame] | 33 | @Deprecated |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 34 | public interface LinkResourceRequest extends ResourceRequest { |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
| 37 | * Returns the {@link IntentId} associated with the request. |
| 38 | * |
| 39 | * @return the {@link IntentId} associated with the request |
| 40 | */ |
Ayaka Koshibe | e114f04 | 2015-05-01 11:43:00 -0700 | [diff] [blame] | 41 | IntentId intentId(); |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Returns the set of target links. |
| 45 | * |
| 46 | * @return the set of target links |
| 47 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 48 | Collection<Link> links(); |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Returns the set of resource requests. |
| 52 | * |
| 53 | * @return the set of resource requests |
| 54 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 55 | Set<ResourceRequest> resources(); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 56 | |
| 57 | /** |
Sho SHIMIZU | 81cdc39 | 2015-10-27 15:18:49 -0700 | [diff] [blame] | 58 | * Returns the set of resource request against the specified link. |
| 59 | * |
| 60 | * @param link link whose associated resource request is to be returned |
| 61 | * @return set of resource request against the specified link |
| 62 | */ |
| 63 | @Beta |
| 64 | Set<ResourceRequest> resources(Link link); |
| 65 | |
| 66 | /** |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 67 | * Builder of link resource request. |
| 68 | */ |
Toshio Koide | 65e890f | 2014-10-23 12:02:25 -0700 | [diff] [blame] | 69 | interface Builder { |
Sho SHIMIZU | 6603a85 | 2015-10-27 16:04:57 -0700 | [diff] [blame] | 70 | /** |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 71 | * Adds lambda request. |
| 72 | * |
| 73 | * @return self |
Sho SHIMIZU | c25a008 | 2015-10-27 17:06:29 -0700 | [diff] [blame] | 74 | * @deprecated in Emu Release |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 75 | */ |
Sho SHIMIZU | c25a008 | 2015-10-27 17:06:29 -0700 | [diff] [blame] | 76 | @Deprecated |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 77 | Builder addLambdaRequest(); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 78 | |
| 79 | /** |
Sho SHIMIZU | c25a008 | 2015-10-27 17:06:29 -0700 | [diff] [blame] | 80 | * Adds lambda request. |
| 81 | * |
| 82 | * @param lambda lambda to be requested |
| 83 | * @return self |
| 84 | */ |
| 85 | @Beta |
| 86 | Builder addLambdaRequest(LambdaResource lambda); |
| 87 | |
| 88 | /** |
Sho SHIMIZU | 6603a85 | 2015-10-27 16:04:57 -0700 | [diff] [blame] | 89 | * Adds MPLS request. |
| 90 | * |
| 91 | * @return self |
Sho SHIMIZU | 81cdc39 | 2015-10-27 15:18:49 -0700 | [diff] [blame] | 92 | * @deprecated in Emu Release |
Sho SHIMIZU | 6603a85 | 2015-10-27 16:04:57 -0700 | [diff] [blame] | 93 | */ |
Sho SHIMIZU | 81cdc39 | 2015-10-27 15:18:49 -0700 | [diff] [blame] | 94 | @Deprecated |
Sho SHIMIZU | 6603a85 | 2015-10-27 16:04:57 -0700 | [diff] [blame] | 95 | Builder addMplsRequest(); |
Michele Santuari | 4b6019e | 2014-12-19 11:31:45 +0100 | [diff] [blame] | 96 | |
| 97 | /** |
Sho SHIMIZU | 81cdc39 | 2015-10-27 15:18:49 -0700 | [diff] [blame] | 98 | * Adds MPLS request. |
| 99 | * |
| 100 | * @param label MPLS label to be requested |
| 101 | * @return self |
| 102 | */ |
| 103 | @Beta |
| 104 | Builder addMplsRequest(MplsLabel label); |
| 105 | |
| 106 | /** |
| 107 | * Adds MPLS request against the specified links. |
| 108 | * |
| 109 | * @param labels MPLS labels to be requested against links |
| 110 | * @return self |
| 111 | */ |
| 112 | @Beta |
| 113 | Builder addMplsRequest(Map<Link, MplsLabel> labels); |
| 114 | |
| 115 | /** |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 116 | * Adds bandwidth request with bandwidth value. |
| 117 | * |
| 118 | * @param bandwidth bandwidth value to be requested |
| 119 | * @return self |
| 120 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 121 | Builder addBandwidthRequest(double bandwidth); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 122 | |
| 123 | /** |
Thomas Vachuska | edc944c | 2014-11-04 15:42:25 -0800 | [diff] [blame] | 124 | * Adds the resources required for a constraint. |
| 125 | * |
| 126 | * @param constraint the constraint |
| 127 | * @return self |
| 128 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 129 | Builder addConstraint(Constraint constraint); |
Thomas Vachuska | edc944c | 2014-11-04 15:42:25 -0800 | [diff] [blame] | 130 | |
| 131 | /** |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 132 | * Returns link resource request. |
| 133 | * |
| 134 | * @return link resource request |
| 135 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 136 | LinkResourceRequest build(); |
Toshio Koide | 569ca70 | 2014-10-23 11:37:44 -0700 | [diff] [blame] | 137 | } |
Toshio Koide | 485b478 | 2014-10-20 19:34:21 -0700 | [diff] [blame] | 138 | } |