Committed by
Ray Milkey
[ONOS-3116] Port Pair Group interface for SFC
Change-Id: I40bc7f61f01009101d0cb8eff822998467989c8f
Showing
1 changed file
with
126 additions
and
0 deletions
| 1 | +/* | ||
| 2 | + * Copyright 2015 Open Networking Laboratory | ||
| 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 | + */ | ||
| 16 | +package org.onosproject.vtnrsc; | ||
| 17 | + | ||
| 18 | +import java.util.List; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * Abstraction of an entity providing Port Pair Group information. | ||
| 22 | + * A port pair group consists of one or more port pairs. | ||
| 23 | + */ | ||
| 24 | +public interface PortPairGroup { | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * Returns the ID of this port pair group. | ||
| 28 | + * | ||
| 29 | + * @return the port pair group id | ||
| 30 | + */ | ||
| 31 | + PortPairGroupId portPairGroupId(); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * Returns the tenant id of this port pair group. | ||
| 35 | + * | ||
| 36 | + * @return the tenant id | ||
| 37 | + */ | ||
| 38 | + TenantId tenantId(); | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * Returns the name of this port pair group. | ||
| 42 | + * | ||
| 43 | + * @return name of port pair group | ||
| 44 | + */ | ||
| 45 | + String name(); | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * Returns the description of this port pair group. | ||
| 49 | + * | ||
| 50 | + * @return description of port pair group | ||
| 51 | + */ | ||
| 52 | + String description(); | ||
| 53 | + | ||
| 54 | + /** | ||
| 55 | + * Returns the list of port pairs associated with this port pair group. | ||
| 56 | + * | ||
| 57 | + * @return list of port pairs | ||
| 58 | + */ | ||
| 59 | + List<PortPairId> portPairs(); | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * Returns whether this port pair group is an exact match to the | ||
| 63 | + * port pair group given in the argument. | ||
| 64 | + * <p> | ||
| 65 | + * Exact match means the Port pairs match with the given port pair group. | ||
| 66 | + * It does not consider the port pair group id, name and description. | ||
| 67 | + * </p> | ||
| 68 | + * @param portPairGroup other port pair group to match against | ||
| 69 | + * @return true if the port pairs are an exact match, otherwise false | ||
| 70 | + */ | ||
| 71 | + boolean exactMatch(PortPairGroup portPairGroup); | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * A port pair group builder.. | ||
| 75 | + */ | ||
| 76 | + interface Builder { | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * Assigns the port pair group id to this object. | ||
| 80 | + * | ||
| 81 | + * @param portPairGroupId the port pair group id | ||
| 82 | + * @return this the builder object | ||
| 83 | + */ | ||
| 84 | + Builder setId(PortPairGroupId portPairGroupId); | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * Assigns tenant id to this object. | ||
| 88 | + * | ||
| 89 | + * @param tenantId tenant id of port pair group | ||
| 90 | + * @return this the builder object | ||
| 91 | + */ | ||
| 92 | + Builder setTenantId(TenantId tenantId); | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * Assigns the name to this object. | ||
| 96 | + * | ||
| 97 | + * @param name name of the port pair group | ||
| 98 | + * @return this the builder object | ||
| 99 | + */ | ||
| 100 | + Builder setName(String name); | ||
| 101 | + | ||
| 102 | + /** | ||
| 103 | + * Assigns the description to this object. | ||
| 104 | + * | ||
| 105 | + * @param description description of the port pair group | ||
| 106 | + * @return this the builder object | ||
| 107 | + */ | ||
| 108 | + Builder setDescription(String description); | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * Assigns the port pairs associated with the port pair group | ||
| 112 | + * to this object. | ||
| 113 | + * | ||
| 114 | + * @param portPairs list of port pairs | ||
| 115 | + * @return this the builder object | ||
| 116 | + */ | ||
| 117 | + Builder setPortPairs(List<PortPairId> portPairs); | ||
| 118 | + | ||
| 119 | + /** | ||
| 120 | + * Builds a port pair group object. | ||
| 121 | + * | ||
| 122 | + * @return a port pair group object. | ||
| 123 | + */ | ||
| 124 | + PortPairGroup build(); | ||
| 125 | + } | ||
| 126 | +} |
-
Please register or login to post a comment