alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 1 | /* |
Charles Chan | aedabfd | 2016-02-26 09:31:48 -0800 | [diff] [blame] | 2 | * Copyright 2015-2016 Open Networking Laboratory |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -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 | */ |
| 16 | package org.onosproject.driver.pipeline; |
| 17 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 18 | import com.google.common.cache.Cache; |
| 19 | import com.google.common.cache.CacheBuilder; |
| 20 | import com.google.common.cache.RemovalCause; |
| 21 | import com.google.common.cache.RemovalNotification; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 22 | import com.google.common.collect.Lists; |
| 23 | import org.apache.commons.lang3.tuple.ImmutablePair; |
| 24 | import org.apache.commons.lang3.tuple.Pair; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 25 | import org.onlab.osgi.ServiceDirectory; |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 26 | import org.onlab.packet.EthType; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 27 | import org.onlab.packet.IPv4; |
| 28 | import org.onlab.packet.VlanId; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 29 | import org.onlab.util.KryoNamespace; |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 30 | import org.onosproject.core.ApplicationId; |
| 31 | import org.onosproject.core.CoreService; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 32 | import org.onosproject.net.DeviceId; |
| 33 | import org.onosproject.net.PortNumber; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 34 | import org.onosproject.net.behaviour.NextGroup; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 35 | import org.onosproject.net.behaviour.Pipeliner; |
| 36 | import org.onosproject.net.behaviour.PipelinerContext; |
| 37 | import org.onosproject.net.driver.AbstractHandlerBehaviour; |
| 38 | import org.onosproject.net.flow.DefaultFlowRule; |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 39 | import org.onosproject.net.flow.DefaultTrafficSelector; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 40 | import org.onosproject.net.flow.DefaultTrafficTreatment; |
alshabib | 6cb8636 | 2016-03-03 18:00:58 -0800 | [diff] [blame] | 41 | import org.onosproject.net.flow.FlowEntry; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 42 | import org.onosproject.net.flow.FlowRule; |
| 43 | import org.onosproject.net.flow.FlowRuleOperations; |
| 44 | import org.onosproject.net.flow.FlowRuleOperationsContext; |
| 45 | import org.onosproject.net.flow.FlowRuleService; |
| 46 | import org.onosproject.net.flow.TrafficSelector; |
| 47 | import org.onosproject.net.flow.TrafficTreatment; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 48 | import org.onosproject.net.flow.criteria.Criteria; |
| 49 | import org.onosproject.net.flow.criteria.Criterion; |
| 50 | import org.onosproject.net.flow.criteria.EthTypeCriterion; |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 51 | import org.onosproject.net.flow.criteria.IPCriterion; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 52 | import org.onosproject.net.flow.criteria.IPProtocolCriterion; |
| 53 | import org.onosproject.net.flow.criteria.PortCriterion; |
alshabib | 2f74f2c | 2016-01-14 13:29:35 -0800 | [diff] [blame] | 54 | import org.onosproject.net.flow.criteria.VlanIdCriterion; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 55 | import org.onosproject.net.flow.instructions.Instruction; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 56 | import org.onosproject.net.flow.instructions.Instructions; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 57 | import org.onosproject.net.flow.instructions.L2ModificationInstruction; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 58 | import org.onosproject.net.flowobjective.FilteringObjective; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 59 | import org.onosproject.net.flowobjective.FlowObjectiveStore; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 60 | import org.onosproject.net.flowobjective.ForwardingObjective; |
| 61 | import org.onosproject.net.flowobjective.NextObjective; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 62 | import org.onosproject.net.flowobjective.Objective; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 63 | import org.onosproject.net.flowobjective.ObjectiveError; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 64 | import org.onosproject.net.group.DefaultGroupBucket; |
| 65 | import org.onosproject.net.group.DefaultGroupDescription; |
| 66 | import org.onosproject.net.group.DefaultGroupKey; |
| 67 | import org.onosproject.net.group.Group; |
| 68 | import org.onosproject.net.group.GroupBucket; |
| 69 | import org.onosproject.net.group.GroupBuckets; |
| 70 | import org.onosproject.net.group.GroupDescription; |
| 71 | import org.onosproject.net.group.GroupEvent; |
| 72 | import org.onosproject.net.group.GroupKey; |
| 73 | import org.onosproject.net.group.GroupListener; |
| 74 | import org.onosproject.net.group.GroupService; |
| 75 | import org.onosproject.store.serializers.KryoNamespaces; |
alshabib | 5ccbe3f | 2016-03-02 22:36:02 -0800 | [diff] [blame] | 76 | import org.onosproject.store.service.StorageService; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 77 | import org.slf4j.Logger; |
| 78 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 79 | import java.util.Collection; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 80 | import java.util.Collections; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 81 | import java.util.List; |
| 82 | import java.util.Optional; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 83 | import java.util.concurrent.TimeUnit; |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 84 | import java.util.stream.Collectors; |
| 85 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 86 | import static org.slf4j.LoggerFactory.getLogger; |
| 87 | |
| 88 | /** |
Jonathan Hart | 64da69d | 2015-07-15 15:10:28 -0700 | [diff] [blame] | 89 | * Pipeliner for OLT device. |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 90 | */ |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 91 | |
Jonathan Hart | b92cc51 | 2015-11-16 23:05:21 -0800 | [diff] [blame] | 92 | public class OltPipeline extends AbstractHandlerBehaviour implements Pipeliner { |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 93 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 94 | private static final Integer QQ_TABLE = 1; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 95 | private static final short MCAST_VLAN = 4000; |
alshabib | 5ccbe3f | 2016-03-02 22:36:02 -0800 | [diff] [blame] | 96 | private static final String OLTCOOKIES = "olt-cookies-must-be-unique"; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 97 | private final Logger log = getLogger(getClass()); |
| 98 | |
| 99 | private ServiceDirectory serviceDirectory; |
| 100 | private FlowRuleService flowRuleService; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 101 | private GroupService groupService; |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 102 | private CoreService coreService; |
alshabib | 5ccbe3f | 2016-03-02 22:36:02 -0800 | [diff] [blame] | 103 | private StorageService storageService; |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 104 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 105 | private DeviceId deviceId; |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 106 | private ApplicationId appId; |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 107 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 108 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 109 | protected FlowObjectiveStore flowObjectiveStore; |
| 110 | |
| 111 | private Cache<GroupKey, NextObjective> pendingGroups; |
| 112 | |
| 113 | protected static KryoNamespace appKryo = new KryoNamespace.Builder() |
| 114 | .register(KryoNamespaces.API) |
| 115 | .register(GroupKey.class) |
| 116 | .register(DefaultGroupKey.class) |
| 117 | .register(OLTPipelineGroup.class) |
| 118 | .register(byte[].class) |
| 119 | .build(); |
alshabib | 2cc73cb | 2015-06-30 20:26:56 -0700 | [diff] [blame] | 120 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 121 | @Override |
| 122 | public void init(DeviceId deviceId, PipelinerContext context) { |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 123 | log.debug("Initiate OLT pipeline"); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 124 | this.serviceDirectory = context.directory(); |
| 125 | this.deviceId = deviceId; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 126 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 127 | flowRuleService = serviceDirectory.get(FlowRuleService.class); |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 128 | coreService = serviceDirectory.get(CoreService.class); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 129 | groupService = serviceDirectory.get(GroupService.class); |
| 130 | flowObjectiveStore = context.store(); |
alshabib | 5ccbe3f | 2016-03-02 22:36:02 -0800 | [diff] [blame] | 131 | storageService = serviceDirectory.get(StorageService.class); |
| 132 | |
Jonathan Hart | dfc3b86 | 2015-07-01 14:49:56 -0700 | [diff] [blame] | 133 | appId = coreService.registerApplication( |
| 134 | "org.onosproject.driver.OLTPipeline"); |
| 135 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 136 | |
| 137 | pendingGroups = CacheBuilder.newBuilder() |
| 138 | .expireAfterWrite(20, TimeUnit.SECONDS) |
| 139 | .removalListener((RemovalNotification<GroupKey, NextObjective> notification) -> { |
| 140 | if (notification.getCause() == RemovalCause.EXPIRED) { |
| 141 | fail(notification.getValue(), ObjectiveError.GROUPINSTALLATIONFAILED); |
| 142 | } |
| 143 | }).build(); |
| 144 | |
| 145 | groupService.addListener(new InnerGroupListener()); |
| 146 | |
alshabib | b32cefe | 2015-06-08 18:15:05 -0700 | [diff] [blame] | 147 | } |
| 148 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 149 | @Override |
| 150 | public void filter(FilteringObjective filter) { |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 151 | Instructions.OutputInstruction output; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 152 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 153 | if (filter.meta() != null && !filter.meta().immediate().isEmpty()) { |
| 154 | output = (Instructions.OutputInstruction) filter.meta().immediate().stream() |
| 155 | .filter(t -> t.type().equals(Instruction.Type.OUTPUT)) |
| 156 | .limit(1) |
| 157 | .findFirst().get(); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 158 | |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 159 | if (output == null || !output.port().equals(PortNumber.CONTROLLER)) { |
| 160 | log.error("OLT can only filter packet to controller"); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 161 | fail(filter, ObjectiveError.UNSUPPORTED); |
| 162 | return; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 163 | } |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 164 | } else { |
| 165 | fail(filter, ObjectiveError.BADPARAMS); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 166 | return; |
| 167 | } |
| 168 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 169 | if (filter.key().type() != Criterion.Type.IN_PORT) { |
| 170 | fail(filter, ObjectiveError.BADPARAMS); |
| 171 | return; |
| 172 | } |
| 173 | |
| 174 | EthTypeCriterion ethType = (EthTypeCriterion) |
| 175 | filterForCriterion(filter.conditions(), Criterion.Type.ETH_TYPE); |
| 176 | |
| 177 | if (ethType == null) { |
| 178 | fail(filter, ObjectiveError.BADPARAMS); |
| 179 | return; |
| 180 | } |
| 181 | |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 182 | if (ethType.ethType().equals(EthType.EtherType.EAPOL.ethType())) { |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 183 | provisionEapol(filter, ethType, output); |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 184 | } else if (ethType.ethType().equals(EthType.EtherType.IPV4.ethType())) { |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 185 | IPProtocolCriterion ipProto = (IPProtocolCriterion) |
| 186 | filterForCriterion(filter.conditions(), Criterion.Type.IP_PROTO); |
| 187 | if (ipProto.protocol() == IPv4.PROTOCOL_IGMP) { |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 188 | provisionIgmp(filter, ethType, ipProto, output); |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 189 | } else { |
| 190 | log.error("OLT can only filter igmp"); |
| 191 | fail(filter, ObjectiveError.UNSUPPORTED); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 192 | } |
| 193 | } else { |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 194 | log.error("OLT can only filter eapol and igmp"); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 195 | fail(filter, ObjectiveError.UNSUPPORTED); |
| 196 | } |
| 197 | |
| 198 | } |
| 199 | |
| 200 | |
| 201 | @Override |
| 202 | public void forward(ForwardingObjective fwd) { |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 203 | |
| 204 | if (checkForMulticast(fwd)) { |
| 205 | processMulticastRule(fwd); |
| 206 | return; |
| 207 | } |
| 208 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 209 | TrafficTreatment treatment = fwd.treatment(); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 210 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 211 | List<Instruction> instructions = treatment.allInstructions(); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 212 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 213 | Optional<Instruction> vlanIntruction = instructions.stream() |
| 214 | .filter(i -> i.type() == Instruction.Type.L2MODIFICATION) |
| 215 | .filter(i -> ((L2ModificationInstruction) i).subtype() == |
| 216 | L2ModificationInstruction.L2SubType.VLAN_PUSH || |
| 217 | ((L2ModificationInstruction) i).subtype() == |
| 218 | L2ModificationInstruction.L2SubType.VLAN_POP) |
| 219 | .findAny(); |
| 220 | |
| 221 | if (!vlanIntruction.isPresent()) { |
| 222 | fail(fwd, ObjectiveError.BADPARAMS); |
| 223 | return; |
| 224 | } |
| 225 | |
| 226 | L2ModificationInstruction vlanIns = |
| 227 | (L2ModificationInstruction) vlanIntruction.get(); |
| 228 | |
| 229 | if (vlanIns.subtype() == L2ModificationInstruction.L2SubType.VLAN_PUSH) { |
| 230 | installUpstreamRules(fwd); |
| 231 | } else if (vlanIns.subtype() == L2ModificationInstruction.L2SubType.VLAN_POP) { |
| 232 | installDownstreamRules(fwd); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 233 | } else { |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 234 | log.error("Unknown OLT operation: {}", fwd); |
| 235 | fail(fwd, ObjectiveError.UNSUPPORTED); |
| 236 | return; |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 237 | } |
| 238 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 239 | pass(fwd); |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 240 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 241 | } |
| 242 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 243 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 244 | @Override |
| 245 | public void next(NextObjective nextObjective) { |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 246 | if (nextObjective.type() != NextObjective.Type.BROADCAST) { |
| 247 | log.error("OLT only supports broadcast groups."); |
| 248 | fail(nextObjective, ObjectiveError.BADPARAMS); |
| 249 | } |
| 250 | |
| 251 | if (nextObjective.next().size() != 1) { |
| 252 | log.error("OLT only supports singleton broadcast groups."); |
| 253 | fail(nextObjective, ObjectiveError.BADPARAMS); |
| 254 | } |
| 255 | |
| 256 | TrafficTreatment treatment = nextObjective.next().stream().findFirst().get(); |
| 257 | |
| 258 | |
| 259 | GroupBucket bucket = DefaultGroupBucket.createAllGroupBucket(treatment); |
| 260 | GroupKey key = new DefaultGroupKey(appKryo.serialize(nextObjective.id())); |
| 261 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 262 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 263 | pendingGroups.put(key, nextObjective); |
| 264 | |
| 265 | switch (nextObjective.op()) { |
| 266 | case ADD: |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 267 | GroupDescription groupDesc = |
| 268 | new DefaultGroupDescription(deviceId, |
| 269 | GroupDescription.Type.ALL, |
| 270 | new GroupBuckets(Collections.singletonList(bucket)), |
| 271 | key, |
| 272 | null, |
| 273 | nextObjective.appId()); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 274 | groupService.addGroup(groupDesc); |
| 275 | break; |
| 276 | case REMOVE: |
| 277 | groupService.removeGroup(deviceId, key, nextObjective.appId()); |
| 278 | break; |
| 279 | case ADD_TO_EXISTING: |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 280 | groupService.addBucketsToGroup(deviceId, key, |
| 281 | new GroupBuckets(Collections.singletonList(bucket)), |
| 282 | key, nextObjective.appId()); |
| 283 | break; |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 284 | case REMOVE_FROM_EXISTING: |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 285 | groupService.removeBucketsFromGroup(deviceId, key, |
alshabib | 56efe43 | 2016-02-25 17:57:24 -0500 | [diff] [blame] | 286 | new GroupBuckets(Collections.singletonList(bucket)), |
| 287 | key, nextObjective.appId()); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 288 | break; |
| 289 | default: |
| 290 | log.warn("Unknown next objective operation: {}", nextObjective.op()); |
| 291 | } |
| 292 | |
| 293 | |
| 294 | } |
| 295 | |
| 296 | private void processMulticastRule(ForwardingObjective fwd) { |
| 297 | if (fwd.nextId() == null) { |
| 298 | log.error("Multicast objective does not have a next id"); |
| 299 | fail(fwd, ObjectiveError.BADPARAMS); |
| 300 | } |
| 301 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 302 | GroupKey key = getGroupForNextObjective(fwd.nextId()); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 303 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 304 | if (key == null) { |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 305 | log.error("Group for forwarding objective missing: {}", fwd); |
| 306 | fail(fwd, ObjectiveError.GROUPMISSING); |
| 307 | } |
| 308 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 309 | Group group = groupService.getGroup(deviceId, key); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 310 | TrafficTreatment treatment = |
| 311 | buildTreatment(Instructions.createGroup(group.id())); |
| 312 | |
| 313 | FlowRule rule = DefaultFlowRule.builder() |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 314 | .fromApp(fwd.appId()) |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 315 | .forDevice(deviceId) |
| 316 | .forTable(0) |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 317 | .makePermanent() |
| 318 | .withPriority(fwd.priority()) |
| 319 | .withSelector(fwd.selector()) |
| 320 | .withTreatment(treatment) |
| 321 | .build(); |
| 322 | |
| 323 | FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); |
| 324 | switch (fwd.op()) { |
| 325 | |
| 326 | case ADD: |
| 327 | builder.add(rule); |
| 328 | break; |
| 329 | case REMOVE: |
| 330 | builder.remove(rule); |
| 331 | break; |
| 332 | case ADD_TO_EXISTING: |
| 333 | case REMOVE_FROM_EXISTING: |
| 334 | break; |
| 335 | default: |
| 336 | log.warn("Unknown forwarding operation: {}", fwd.op()); |
| 337 | } |
| 338 | |
| 339 | applyFlowRules(builder, fwd); |
| 340 | |
| 341 | } |
| 342 | |
| 343 | private boolean checkForMulticast(ForwardingObjective fwd) { |
| 344 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 345 | IPCriterion ip = (IPCriterion) filterForCriterion(fwd.selector().criteria(), |
alshabib | 56efe43 | 2016-02-25 17:57:24 -0500 | [diff] [blame] | 346 | Criterion.Type.IPV4_DST); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 347 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 348 | if (ip == null) { |
| 349 | return false; |
| 350 | } |
| 351 | |
Charles Chan | aedabfd | 2016-02-26 09:31:48 -0800 | [diff] [blame] | 352 | return ip.ip().isMulticast(); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 353 | |
| 354 | } |
| 355 | |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 356 | private GroupKey getGroupForNextObjective(Integer nextId) { |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 357 | NextGroup next = flowObjectiveStore.getNextGroup(nextId); |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 358 | return appKryo.deserialize(next.data()); |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 359 | |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 360 | } |
| 361 | |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 362 | private void installDownstreamRules(ForwardingObjective fwd) { |
| 363 | List<Pair<Instruction, Instruction>> vlanOps = |
| 364 | vlanOps(fwd, |
| 365 | L2ModificationInstruction.L2SubType.VLAN_POP); |
| 366 | |
| 367 | if (vlanOps == null) { |
| 368 | return; |
| 369 | } |
| 370 | |
alshabib | b3c1434 | 2016-03-04 17:05:01 -0800 | [diff] [blame] | 371 | Instructions.OutputInstruction output = (Instructions.OutputInstruction) fetchOutput(fwd, "downstream"); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 372 | |
| 373 | if (output == null) { |
| 374 | return; |
| 375 | } |
| 376 | |
| 377 | Pair<Instruction, Instruction> popAndRewrite = vlanOps.remove(0); |
| 378 | |
alshabib | fa0dc66 | 2016-01-13 11:23:53 -0800 | [diff] [blame] | 379 | TrafficSelector selector = fwd.selector(); |
| 380 | |
| 381 | Criterion outerVlan = selector.getCriterion(Criterion.Type.VLAN_VID); |
| 382 | Criterion innerVlan = selector.getCriterion(Criterion.Type.INNER_VLAN_VID); |
| 383 | Criterion inport = selector.getCriterion(Criterion.Type.IN_PORT); |
alshabib | b3c1434 | 2016-03-04 17:05:01 -0800 | [diff] [blame] | 384 | Criterion bullshit = Criteria.matchMetadata(output.port().toLong()); |
alshabib | fa0dc66 | 2016-01-13 11:23:53 -0800 | [diff] [blame] | 385 | |
| 386 | if (outerVlan == null || innerVlan == null || inport == null) { |
| 387 | log.error("Forwarding objective is underspecified: {}", fwd); |
| 388 | fail(fwd, ObjectiveError.BADPARAMS); |
| 389 | return; |
| 390 | } |
| 391 | |
alshabib | 2f74f2c | 2016-01-14 13:29:35 -0800 | [diff] [blame] | 392 | Criterion innerVid = Criteria.matchVlanId(((VlanIdCriterion) innerVlan).vlanId()); |
| 393 | |
alshabib | fa0dc66 | 2016-01-13 11:23:53 -0800 | [diff] [blame] | 394 | FlowRule.Builder outer = DefaultFlowRule.builder() |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 395 | .fromApp(fwd.appId()) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 396 | .forDevice(deviceId) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 397 | .makePermanent() |
| 398 | .withPriority(fwd.priority()) |
alshabib | b3c1434 | 2016-03-04 17:05:01 -0800 | [diff] [blame] | 399 | .withSelector(buildSelector(inport, outerVlan, bullshit)) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 400 | .withTreatment(buildTreatment(popAndRewrite.getLeft(), |
| 401 | Instructions.transition(QQ_TABLE))); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 402 | |
alshabib | fa0dc66 | 2016-01-13 11:23:53 -0800 | [diff] [blame] | 403 | FlowRule.Builder inner = DefaultFlowRule.builder() |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 404 | .fromApp(fwd.appId()) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 405 | .forDevice(deviceId) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 406 | .forTable(QQ_TABLE) |
| 407 | .makePermanent() |
| 408 | .withPriority(fwd.priority()) |
alshabib | 2f74f2c | 2016-01-14 13:29:35 -0800 | [diff] [blame] | 409 | .withSelector(buildSelector(inport, innerVid)) |
alshabib | e507584 | 2016-02-04 13:28:33 -0800 | [diff] [blame] | 410 | .withTreatment(buildTreatment(popAndRewrite.getLeft(), |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 411 | output)); |
| 412 | |
| 413 | applyRules(fwd, inner, outer); |
| 414 | |
| 415 | } |
| 416 | |
| 417 | private void installUpstreamRules(ForwardingObjective fwd) { |
| 418 | List<Pair<Instruction, Instruction>> vlanOps = |
| 419 | vlanOps(fwd, |
| 420 | L2ModificationInstruction.L2SubType.VLAN_PUSH); |
| 421 | |
| 422 | if (vlanOps == null) { |
| 423 | return; |
| 424 | } |
| 425 | |
| 426 | Instruction output = fetchOutput(fwd, "upstream"); |
| 427 | |
| 428 | if (output == null) { |
| 429 | return; |
| 430 | } |
| 431 | |
| 432 | Pair<Instruction, Instruction> innerPair = vlanOps.remove(0); |
| 433 | |
| 434 | Pair<Instruction, Instruction> outerPair = vlanOps.remove(0); |
| 435 | |
| 436 | FlowRule.Builder inner = DefaultFlowRule.builder() |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 437 | .fromApp(fwd.appId()) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 438 | .forDevice(deviceId) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 439 | .makePermanent() |
| 440 | .withPriority(fwd.priority()) |
| 441 | .withSelector(fwd.selector()) |
| 442 | .withTreatment(buildTreatment(innerPair.getRight(), |
| 443 | Instructions.transition(QQ_TABLE))); |
| 444 | |
| 445 | PortCriterion inPort = (PortCriterion) |
| 446 | fwd.selector().getCriterion(Criterion.Type.IN_PORT); |
| 447 | |
| 448 | VlanId cVlanId = ((L2ModificationInstruction.ModVlanIdInstruction) |
| 449 | innerPair.getRight()).vlanId(); |
| 450 | |
| 451 | FlowRule.Builder outer = DefaultFlowRule.builder() |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 452 | .fromApp(fwd.appId()) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 453 | .forDevice(deviceId) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 454 | .forTable(QQ_TABLE) |
| 455 | .makePermanent() |
| 456 | .withPriority(fwd.priority()) |
| 457 | .withSelector(buildSelector(inPort, |
| 458 | Criteria.matchVlanId(cVlanId))) |
| 459 | .withTreatment(buildTreatment(outerPair.getLeft(), |
| 460 | outerPair.getRight(), |
| 461 | output)); |
| 462 | |
| 463 | applyRules(fwd, inner, outer); |
| 464 | |
| 465 | } |
| 466 | |
| 467 | private Instruction fetchOutput(ForwardingObjective fwd, String direction) { |
| 468 | Instruction output = fwd.treatment().allInstructions().stream() |
| 469 | .filter(i -> i.type() == Instruction.Type.OUTPUT) |
| 470 | .findFirst().orElse(null); |
| 471 | |
| 472 | if (output == null) { |
| 473 | log.error("OLT {} rule has no output", direction); |
| 474 | fail(fwd, ObjectiveError.BADPARAMS); |
| 475 | return null; |
| 476 | } |
| 477 | return output; |
| 478 | } |
| 479 | |
| 480 | private List<Pair<Instruction, Instruction>> vlanOps(ForwardingObjective fwd, |
| 481 | L2ModificationInstruction.L2SubType type) { |
| 482 | |
| 483 | List<Pair<Instruction, Instruction>> vlanOps = findVlanOps( |
| 484 | fwd.treatment().allInstructions(), type); |
| 485 | |
| 486 | if (vlanOps == null) { |
| 487 | String direction = type == L2ModificationInstruction.L2SubType.VLAN_POP |
| 488 | ? "downstream" : "upstream"; |
| 489 | log.error("Missing vlan operations in {} forwarding: {}", direction, fwd); |
| 490 | fail(fwd, ObjectiveError.BADPARAMS); |
| 491 | return null; |
| 492 | } |
| 493 | return vlanOps; |
| 494 | } |
| 495 | |
| 496 | |
| 497 | private List<Pair<Instruction, Instruction>> findVlanOps(List<Instruction> instructions, |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 498 | L2ModificationInstruction.L2SubType type) { |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 499 | |
| 500 | List<Instruction> vlanPushs = findL2Instructions( |
| 501 | type, |
| 502 | instructions); |
| 503 | List<Instruction> vlanSets = findL2Instructions( |
| 504 | L2ModificationInstruction.L2SubType.VLAN_ID, |
| 505 | instructions); |
| 506 | |
| 507 | if (vlanPushs.size() != vlanSets.size()) { |
| 508 | return null; |
| 509 | } |
| 510 | |
| 511 | List<Pair<Instruction, Instruction>> pairs = Lists.newArrayList(); |
| 512 | |
| 513 | for (int i = 0; i < vlanPushs.size(); i++) { |
| 514 | pairs.add(new ImmutablePair<>(vlanPushs.get(i), vlanSets.get(i))); |
| 515 | } |
| 516 | return pairs; |
| 517 | } |
| 518 | |
| 519 | private List<Instruction> findL2Instructions(L2ModificationInstruction.L2SubType subType, |
| 520 | List<Instruction> actions) { |
| 521 | return actions.stream() |
| 522 | .filter(i -> i.type() == Instruction.Type.L2MODIFICATION) |
| 523 | .filter(i -> ((L2ModificationInstruction) i).subtype() == subType) |
| 524 | .collect(Collectors.toList()); |
| 525 | } |
| 526 | |
| 527 | private void provisionEapol(FilteringObjective filter, |
| 528 | EthTypeCriterion ethType, |
| 529 | Instructions.OutputInstruction output) { |
| 530 | |
| 531 | TrafficSelector selector = buildSelector(filter.key(), ethType); |
| 532 | TrafficTreatment treatment = buildTreatment(output); |
| 533 | buildAndApplyRule(filter, selector, treatment); |
| 534 | |
| 535 | } |
| 536 | |
Jonathan Hart | 51539b8 | 2015-10-29 09:53:04 -0700 | [diff] [blame] | 537 | private void provisionIgmp(FilteringObjective filter, EthTypeCriterion ethType, |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 538 | IPProtocolCriterion ipProto, |
| 539 | Instructions.OutputInstruction output) { |
| 540 | TrafficSelector selector = buildSelector(filter.key(), ethType, ipProto); |
| 541 | TrafficTreatment treatment = buildTreatment(output); |
| 542 | buildAndApplyRule(filter, selector, treatment); |
| 543 | } |
| 544 | |
| 545 | private void buildAndApplyRule(FilteringObjective filter, TrafficSelector selector, |
| 546 | TrafficTreatment treatment) { |
| 547 | FlowRule rule = DefaultFlowRule.builder() |
alshabib | 8336447 | 2016-03-25 09:59:55 -0700 | [diff] [blame] | 548 | .fromApp(filter.appId()) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 549 | .forDevice(deviceId) |
| 550 | .forTable(0) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 551 | .makePermanent() |
| 552 | .withSelector(selector) |
| 553 | .withTreatment(treatment) |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 554 | .withPriority(filter.priority()) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 555 | .build(); |
| 556 | |
| 557 | FlowRuleOperations.Builder opsBuilder = FlowRuleOperations.builder(); |
| 558 | |
| 559 | switch (filter.type()) { |
| 560 | case PERMIT: |
| 561 | opsBuilder.add(rule); |
| 562 | break; |
| 563 | case DENY: |
| 564 | opsBuilder.remove(rule); |
| 565 | break; |
| 566 | default: |
| 567 | log.warn("Unknown filter type : {}", filter.type()); |
| 568 | fail(filter, ObjectiveError.UNSUPPORTED); |
| 569 | } |
| 570 | |
| 571 | applyFlowRules(opsBuilder, filter); |
| 572 | } |
| 573 | |
| 574 | private void applyRules(ForwardingObjective fwd, |
| 575 | FlowRule.Builder inner, FlowRule.Builder outer) { |
| 576 | FlowRuleOperations.Builder builder = FlowRuleOperations.builder(); |
| 577 | switch (fwd.op()) { |
| 578 | case ADD: |
| 579 | builder.add(inner.build()).add(outer.build()); |
| 580 | break; |
| 581 | case REMOVE: |
alshabib | 6cb8636 | 2016-03-03 18:00:58 -0800 | [diff] [blame] | 582 | Iterable<FlowEntry> flows = flowRuleService.getFlowEntries(deviceId); |
| 583 | for (FlowEntry fe : flows) { |
| 584 | if (fe.equals(inner.build()) || fe.equals(outer.build())) { |
| 585 | builder.remove(fe); |
| 586 | } |
| 587 | } |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 588 | break; |
| 589 | case ADD_TO_EXISTING: |
| 590 | break; |
| 591 | case REMOVE_FROM_EXISTING: |
| 592 | break; |
| 593 | default: |
| 594 | log.warn("Unknown forwarding operation: {}", fwd.op()); |
| 595 | } |
| 596 | |
| 597 | applyFlowRules(builder, fwd); |
| 598 | } |
| 599 | |
| 600 | private void applyFlowRules(FlowRuleOperations.Builder builder, |
| 601 | Objective objective) { |
| 602 | flowRuleService.apply(builder.build(new FlowRuleOperationsContext() { |
| 603 | @Override |
| 604 | public void onSuccess(FlowRuleOperations ops) { |
| 605 | pass(objective); |
| 606 | } |
| 607 | |
| 608 | @Override |
| 609 | public void onError(FlowRuleOperations ops) { |
| 610 | fail(objective, ObjectiveError.FLOWINSTALLATIONFAILED); |
| 611 | } |
| 612 | })); |
| 613 | } |
| 614 | |
| 615 | private Criterion filterForCriterion(Collection<Criterion> criteria, Criterion.Type type) { |
| 616 | return criteria.stream() |
alshabib | bb42423 | 2016-01-15 12:20:25 -0800 | [diff] [blame] | 617 | .filter(c -> c.type().equals(type)) |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 618 | .limit(1) |
| 619 | .findFirst().orElse(null); |
| 620 | } |
| 621 | |
| 622 | private TrafficSelector buildSelector(Criterion... criteria) { |
| 623 | |
| 624 | |
| 625 | TrafficSelector.Builder sBuilder = DefaultTrafficSelector.builder(); |
| 626 | |
| 627 | for (Criterion c : criteria) { |
| 628 | sBuilder.add(c); |
| 629 | } |
| 630 | |
| 631 | return sBuilder.build(); |
| 632 | } |
| 633 | |
| 634 | private TrafficTreatment buildTreatment(Instruction... instructions) { |
| 635 | |
| 636 | |
| 637 | TrafficTreatment.Builder tBuilder = DefaultTrafficTreatment.builder(); |
| 638 | |
| 639 | for (Instruction i : instructions) { |
| 640 | tBuilder.add(i); |
| 641 | } |
| 642 | |
| 643 | return tBuilder.build(); |
| 644 | } |
| 645 | |
| 646 | |
| 647 | private void fail(Objective obj, ObjectiveError error) { |
Sho SHIMIZU | ef7e290 | 2016-02-12 18:38:29 -0800 | [diff] [blame] | 648 | obj.context().ifPresent(context -> context.onError(obj, error)); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 649 | } |
| 650 | |
| 651 | private void pass(Objective obj) { |
Sho SHIMIZU | ef7e290 | 2016-02-12 18:38:29 -0800 | [diff] [blame] | 652 | obj.context().ifPresent(context -> context.onSuccess(obj)); |
alshabib | fd430b6 | 2015-12-16 18:56:38 -0800 | [diff] [blame] | 653 | } |
| 654 | |
alshabib | 2cc73cb | 2015-06-30 20:26:56 -0700 | [diff] [blame] | 655 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 656 | private class InnerGroupListener implements GroupListener { |
alshabib | 2cc73cb | 2015-06-30 20:26:56 -0700 | [diff] [blame] | 657 | @Override |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 658 | public void event(GroupEvent event) { |
| 659 | if (event.type() == GroupEvent.Type.GROUP_ADDED) { |
| 660 | GroupKey key = event.subject().appCookie(); |
alshabib | 2cc73cb | 2015-06-30 20:26:56 -0700 | [diff] [blame] | 661 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 662 | NextObjective obj = pendingGroups.getIfPresent(key); |
| 663 | if (obj != null) { |
| 664 | flowObjectiveStore.putNextGroup(obj.id(), new OLTPipelineGroup(key)); |
| 665 | pass(obj); |
| 666 | pendingGroups.invalidate(key); |
| 667 | } |
| 668 | } |
alshabib | 2cc73cb | 2015-06-30 20:26:56 -0700 | [diff] [blame] | 669 | } |
| 670 | } |
| 671 | |
alshabib | d61b77b | 2016-02-01 23:30:53 -0800 | [diff] [blame] | 672 | private static class OLTPipelineGroup implements NextGroup { |
| 673 | |
| 674 | private final GroupKey key; |
| 675 | |
| 676 | public OLTPipelineGroup(GroupKey key) { |
| 677 | this.key = key; |
| 678 | } |
| 679 | |
| 680 | public GroupKey key() { |
| 681 | return key; |
| 682 | } |
| 683 | |
| 684 | @Override |
| 685 | public byte[] data() { |
| 686 | return appKryo.serialize(key); |
| 687 | } |
| 688 | |
| 689 | } |
Saurav Das | 2443119 | 2016-03-07 19:13:00 -0800 | [diff] [blame] | 690 | |
| 691 | @Override |
| 692 | public List<String> getNextMappings(NextGroup nextGroup) { |
| 693 | // TODO Implementation deferred to vendor |
| 694 | return null; |
| 695 | } |
alshabib | 0ccde6d | 2015-05-30 18:22:36 -0700 | [diff] [blame] | 696 | } |