blob: 658ddadf4025e16254bb4d841b55a1bf6fb36131 [file] [log] [blame]
Luca Prete9c2ee072016-02-16 11:00:44 -08001/*
Luca Prete99f6f282016-12-05 15:33:36 -08002 * Copyright 2015-present Open Networking Laboratory
Luca Prete9c2ee072016-02-16 11:00:44 -08003 *
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
Luca Prete99f6f282016-12-05 15:33:36 -080014 * limitations under the License.
Luca Prete9c2ee072016-02-16 11:00:44 -080015 */
16package org.onosproject.vpls;
17
nosignal5fd282e2016-09-16 16:11:40 -070018import com.google.common.collect.ImmutableSet;
19import com.google.common.collect.Lists;
Luca Prete9c2ee072016-02-16 11:00:44 -080020import com.google.common.collect.SetMultimap;
nosignal5fd282e2016-09-16 16:11:40 -070021import com.google.common.collect.Sets;
Luca Prete9c2ee072016-02-16 11:00:44 -080022import org.apache.felix.scr.annotations.Activate;
23import org.apache.felix.scr.annotations.Component;
24import org.apache.felix.scr.annotations.Deactivate;
25import org.apache.felix.scr.annotations.Reference;
26import org.apache.felix.scr.annotations.ReferenceCardinality;
27import org.onlab.packet.MacAddress;
28import org.onlab.packet.VlanId;
29import org.onosproject.app.ApplicationService;
30import org.onosproject.core.ApplicationId;
31import org.onosproject.core.CoreService;
nosignal5fd282e2016-09-16 16:11:40 -070032import org.onosproject.incubator.net.intf.Interface;
Luca Pretea8854822016-04-26 16:30:55 -070033import org.onosproject.incubator.net.intf.InterfaceEvent;
34import org.onosproject.incubator.net.intf.InterfaceListener;
Luca Prete9c2ee072016-02-16 11:00:44 -080035import org.onosproject.incubator.net.intf.InterfaceService;
Luca Prete092e8952016-10-26 16:25:56 +020036import org.onosproject.net.EncapsulationType;
nosignal5fd282e2016-09-16 16:11:40 -070037import org.onosproject.net.FilteredConnectPoint;
Luca Prete9c2ee072016-02-16 11:00:44 -080038import org.onosproject.net.Host;
nosignal5fd282e2016-09-16 16:11:40 -070039import org.onosproject.net.config.NetworkConfigEvent;
40import org.onosproject.net.config.NetworkConfigListener;
41import org.onosproject.net.config.NetworkConfigService;
42import org.onosproject.net.flow.DefaultTrafficSelector;
43import org.onosproject.net.flow.TrafficSelector;
44import org.onosproject.net.flow.criteria.Criterion;
45import org.onosproject.net.flow.criteria.VlanIdCriterion;
Luca Prete9c2ee072016-02-16 11:00:44 -080046import org.onosproject.net.host.HostEvent;
47import org.onosproject.net.host.HostListener;
48import org.onosproject.net.host.HostService;
nosignal5fd282e2016-09-16 16:11:40 -070049import org.onosproject.net.intent.Intent;
Luca Prete9c2ee072016-02-16 11:00:44 -080050import org.onosproject.net.intent.IntentService;
nosignal5fd282e2016-09-16 16:11:40 -070051import org.onosproject.net.intent.Key;
Luca Prete9c2ee072016-02-16 11:00:44 -080052import org.onosproject.routing.IntentSynchronizationService;
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +010053import org.onosproject.vpls.config.VplsConfigService;
Luca Prete9c2ee072016-02-16 11:00:44 -080054import org.slf4j.Logger;
55
nosignal5fd282e2016-09-16 16:11:40 -070056import java.util.Collection;
57import java.util.HashSet;
58import java.util.List;
Luca Prete9c2ee072016-02-16 11:00:44 -080059import java.util.Set;
nosignal5fd282e2016-09-16 16:11:40 -070060import java.util.stream.Collectors;
Luca Prete9c2ee072016-02-16 11:00:44 -080061
nosignal5fd282e2016-09-16 16:11:40 -070062import static org.onosproject.vpls.IntentInstaller.PREFIX_BROADCAST;
63import static org.onosproject.vpls.IntentInstaller.PREFIX_UNICAST;
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +010064import static org.slf4j.LoggerFactory.getLogger;
Luca Prete9c2ee072016-02-16 11:00:44 -080065
66/**
Luca Prete092e8952016-10-26 16:25:56 +020067 * Application to create L2 broadcast overlay networks using VLANs.
Luca Prete9c2ee072016-02-16 11:00:44 -080068 */
69@Component(immediate = true)
70public class Vpls {
nosignal5fd282e2016-09-16 16:11:40 -070071 static final String VPLS_APP = "org.onosproject.vpls";
72
73 private static final String HOST_FCP_NOT_FOUND =
74 "Filtered connected point for host {} not found";
75 private static final String HOST_EVENT = "Received HostEvent {}";
76 private static final String INTF_CONF_EVENT =
77 "Received InterfaceConfigEvent {}";
78 private static final String NET_CONF_EVENT =
79 "Received NetworkConfigEvent {}";
Yi Tseng28767f02016-09-13 04:27:20 -070080
Luca Prete9c2ee072016-02-16 11:00:44 -080081 private final Logger log = getLogger(getClass());
82
83 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
84 protected ApplicationService applicationService;
85
86 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
87 protected CoreService coreService;
88
89 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
90 protected HostService hostService;
91
92 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
93 protected IntentService intentService;
94
95 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
96 protected InterfaceService interfaceService;
97
98 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
99 protected IntentSynchronizationService intentSynchronizer;
100
nosignal5fd282e2016-09-16 16:11:40 -0700101 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
102 protected NetworkConfigService configService;
103
104 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100105 protected VplsConfigService vplsConfigService;
nosignal5fd282e2016-09-16 16:11:40 -0700106
Luca Prete9c2ee072016-02-16 11:00:44 -0800107 private final HostListener hostListener = new InternalHostListener();
108
Luca Prete092e8952016-10-26 16:25:56 +0200109 private final InternalInterfaceListener interfaceListener =
110 new InternalInterfaceListener();
Luca Pretea8854822016-04-26 16:30:55 -0700111
nosignal5fd282e2016-09-16 16:11:40 -0700112 private final InternalNetworkConfigListener configListener =
113 new InternalNetworkConfigListener();
114
Luca Prete9c2ee072016-02-16 11:00:44 -0800115 private IntentInstaller intentInstaller;
116
117 private ApplicationId appId;
118
Yi Tseng28767f02016-09-13 04:27:20 -0700119
Luca Prete9c2ee072016-02-16 11:00:44 -0800120 @Activate
121 public void activate() {
122 appId = coreService.registerApplication(VPLS_APP);
123
124 intentInstaller = new IntentInstaller(appId,
125 intentService,
126 intentSynchronizer);
127
Luca Prete2705d662016-04-29 15:30:23 -0700128 applicationService.registerDeactivateHook(appId, () -> {
129 intentSynchronizer.removeIntentsByAppId(appId);
130 });
Luca Prete9c2ee072016-02-16 11:00:44 -0800131
132 hostService.addListener(hostListener);
Luca Pretea8854822016-04-26 16:30:55 -0700133 interfaceService.addListener(interfaceListener);
nosignal5fd282e2016-09-16 16:11:40 -0700134 configService.addListener(configListener);
Luca Prete9c2ee072016-02-16 11:00:44 -0800135
nosignal5fd282e2016-09-16 16:11:40 -0700136 setupConnectivity(false);
Luca Prete9c2ee072016-02-16 11:00:44 -0800137
Luca Pretec21c6e62016-09-22 14:52:21 -0700138 log.info("Activated");
Luca Prete9c2ee072016-02-16 11:00:44 -0800139 }
140
141 @Deactivate
142 public void deactivate() {
Yi Tsenge53d2282017-01-11 14:40:48 -0800143 hostService.removeListener(hostListener);
144 interfaceService.removeListener(interfaceListener);
nosignal5fd282e2016-09-16 16:11:40 -0700145 configService.removeListener(configListener);
Yi Tseng28767f02016-09-13 04:27:20 -0700146 intentSynchronizer.removeIntentsByAppId(appId);
Luca Pretec21c6e62016-09-22 14:52:21 -0700147 log.info("Deactivated");
Luca Prete9c2ee072016-02-16 11:00:44 -0800148 }
149
nosignal5fd282e2016-09-16 16:11:40 -0700150 /**
151 * Sets up connectivity for all VPLSs.
152 *
153 * @param isNetworkConfigEvent true if this function is triggered
154 * by NetworkConfigEvent; false otherwise
155 */
156 private void setupConnectivity(boolean isNetworkConfigEvent) {
157 SetMultimap<String, Interface> networkInterfaces =
Luca Prete092e8952016-10-26 16:25:56 +0200158 vplsConfigService.ifacesByVplsName();
Luca Prete9c2ee072016-02-16 11:00:44 -0800159
nosignal5fd282e2016-09-16 16:11:40 -0700160 Set<String> vplsAffectedByApi =
Luca Prete092e8952016-10-26 16:25:56 +0200161 new HashSet<>(vplsConfigService.vplsAffectedByApi());
Luca Prete9c2ee072016-02-16 11:00:44 -0800162
nosignal5fd282e2016-09-16 16:11:40 -0700163 if (isNetworkConfigEvent && vplsAffectedByApi.isEmpty()) {
Luca Prete092e8952016-10-26 16:25:56 +0200164 vplsAffectedByApi.addAll(vplsConfigService.vplsNamesOld());
nosignal5fd282e2016-09-16 16:11:40 -0700165 }
Yi Tseng28767f02016-09-13 04:27:20 -0700166
Luca Prete092e8952016-10-26 16:25:56 +0200167 networkInterfaces.asMap().forEach((vplsName, interfaces) -> {
nosignal5fd282e2016-09-16 16:11:40 -0700168 Set<Host> hosts = Sets.newHashSet();
169 interfaces.forEach(intf -> {
170 // Add hosts that belongs to the specific VPLS
171 hostService.getConnectedHosts(intf.connectPoint())
172 .stream()
173 .filter(host -> host.vlan().equals(intf.vlan()))
174 .forEach(hosts::add);
175 });
176
Luca Prete092e8952016-10-26 16:25:56 +0200177 EncapsulationType encap =
178 vplsConfigService.encap(vplsName);
179
180 setupConnectivity(vplsName, interfaces, hosts, encap,
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100181 vplsAffectedByApi.contains(vplsName));
Luca Prete092e8952016-10-26 16:25:56 +0200182 vplsAffectedByApi.remove(vplsName);
nosignal5fd282e2016-09-16 16:11:40 -0700183 });
184
185 if (!vplsAffectedByApi.isEmpty()) {
Luca Prete092e8952016-10-26 16:25:56 +0200186 for (String vplsName : vplsAffectedByApi) {
187 withdrawIntents(vplsName, Lists.newArrayList());
nosignal5fd282e2016-09-16 16:11:40 -0700188 }
189 }
Luca Prete9c2ee072016-02-16 11:00:44 -0800190 }
191
192 /**
nosignal5fd282e2016-09-16 16:11:40 -0700193 * Sets up connectivity for specific VPLS.
Luca Prete9c2ee072016-02-16 11:00:44 -0800194 *
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100195 * @param vplsName the VPLS name
196 * @param interfaces the interfaces that belong to the VPLS
197 * @param hosts the hosts that belong to the VPLS
198 * @param encap the encapsulation type
nosignal5fd282e2016-09-16 16:11:40 -0700199 * @param affectedByApi true if this function is triggered from the APIs;
200 * false otherwise
Luca Prete9c2ee072016-02-16 11:00:44 -0800201 */
Luca Prete092e8952016-10-26 16:25:56 +0200202 private void setupConnectivity(String vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700203 Collection<Interface> interfaces,
204 Set<Host> hosts,
Luca Prete092e8952016-10-26 16:25:56 +0200205 EncapsulationType encap,
nosignal5fd282e2016-09-16 16:11:40 -0700206 boolean affectedByApi) {
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100207
nosignal5fd282e2016-09-16 16:11:40 -0700208 List<Intent> intents = Lists.newArrayList();
209 List<Key> keys = Lists.newArrayList();
210 Set<FilteredConnectPoint> fcPoints = buildFCPoints(interfaces);
Luca Prete9c2ee072016-02-16 11:00:44 -0800211
nosignal5fd282e2016-09-16 16:11:40 -0700212 intents.addAll(buildBroadcastIntents(
Luca Prete092e8952016-10-26 16:25:56 +0200213 vplsName, fcPoints, encap, affectedByApi));
214 intents.addAll(buildUnicastIntents(
215 vplsName, hosts, fcPoints, encap, affectedByApi));
Luca Prete9c2ee072016-02-16 11:00:44 -0800216
nosignal5fd282e2016-09-16 16:11:40 -0700217 if (affectedByApi) {
218 intents.forEach(intent -> keys.add(intent.key()));
Luca Prete092e8952016-10-26 16:25:56 +0200219 withdrawIntents(vplsName, keys);
nosignal5fd282e2016-09-16 16:11:40 -0700220 }
221
222 intentInstaller.submitIntents(intents);
Luca Prete9c2ee072016-02-16 11:00:44 -0800223 }
224
225 /**
nosignal5fd282e2016-09-16 16:11:40 -0700226 * Withdraws intents belonging to a VPLS, given a VPLS name.
Luca Prete9c2ee072016-02-16 11:00:44 -0800227 *
Luca Prete092e8952016-10-26 16:25:56 +0200228 * @param vplsName the VPLS name
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100229 * @param keys the keys of the intents to be installed
Luca Prete9c2ee072016-02-16 11:00:44 -0800230 */
Luca Prete092e8952016-10-26 16:25:56 +0200231 private void withdrawIntents(String vplsName, List<Key> keys) {
nosignal5fd282e2016-09-16 16:11:40 -0700232 List<Intent> intents = Lists.newArrayList();
Luca Prete9c2ee072016-02-16 11:00:44 -0800233
Luca Prete092e8952016-10-26 16:25:56 +0200234 intentInstaller.getIntentsFromVpls(vplsName)
nosignal5fd282e2016-09-16 16:11:40 -0700235 .forEach(intent -> {
236 if (!keys.contains(intent.key())) {
237 intents.add(intent);
238 }
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100239 });
Luca Prete9c2ee072016-02-16 11:00:44 -0800240
nosignal5fd282e2016-09-16 16:11:40 -0700241 intentInstaller.withdrawIntents(intents);
Luca Prete9c2ee072016-02-16 11:00:44 -0800242 }
243
nosignal5fd282e2016-09-16 16:11:40 -0700244 /**
245 * Sets up broadcast intents between any given filtered connect point.
246 *
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100247 * @param vplsName the VPLS name
248 * @param fcPoints the set of filtered connect points
249 * @param encap the encapsulation type
nosignal5fd282e2016-09-16 16:11:40 -0700250 * @param affectedByApi true if the function triggered from APIs;
251 * false otherwise
252 * @return the set of broadcast intents
253 */
Luca Prete092e8952016-10-26 16:25:56 +0200254 private Set<Intent> buildBroadcastIntents(String vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700255 Set<FilteredConnectPoint> fcPoints,
Luca Prete092e8952016-10-26 16:25:56 +0200256 EncapsulationType encap,
nosignal5fd282e2016-09-16 16:11:40 -0700257 boolean affectedByApi) {
258 Set<Intent> intents = Sets.newHashSet();
259 fcPoints.forEach(point -> {
260 Set<FilteredConnectPoint> otherPoints =
261 fcPoints.stream()
262 .filter(fcp -> !fcp.equals(point))
263 .collect(Collectors.toSet());
264
265 Key brcKey = intentInstaller.buildKey(PREFIX_BROADCAST,
266 point.connectPoint(),
Luca Prete092e8952016-10-26 16:25:56 +0200267 vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700268 MacAddress.BROADCAST);
269
Luca Prete092e8952016-10-26 16:25:56 +0200270 if ((!intentInstaller.intentExists(brcKey) || affectedByApi)
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100271 && !otherPoints.isEmpty()) {
nosignal5fd282e2016-09-16 16:11:40 -0700272 intents.add(intentInstaller.buildBrcIntent(brcKey,
273 point,
Luca Prete092e8952016-10-26 16:25:56 +0200274 otherPoints,
275 encap));
Yi Tsengbf8b67e2016-09-01 15:02:11 +0800276 }
277 });
nosignal5fd282e2016-09-16 16:11:40 -0700278
279 return ImmutableSet.copyOf(intents);
280 }
281
282 /**
283 * Sets up unicast intents between any given filtered connect point.
284 *
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100285 * @param vplsName the VPLS name
286 * @param hosts the set of destination hosts
287 * @param fcPoints the set of filtered connect points
288 * @param encap the encapsulation type
nosignal5fd282e2016-09-16 16:11:40 -0700289 * @param affectedByApi true if the function triggered from APIs;
290 * false otherwise
291 * @return the set of unicast intents
292 */
Luca Prete092e8952016-10-26 16:25:56 +0200293 private Set<Intent> buildUnicastIntents(String vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700294 Set<Host> hosts,
295 Set<FilteredConnectPoint> fcPoints,
Luca Prete092e8952016-10-26 16:25:56 +0200296 EncapsulationType encap,
nosignal5fd282e2016-09-16 16:11:40 -0700297 boolean affectedByApi) {
298 Set<Intent> intents = Sets.newHashSet();
299 hosts.forEach(host -> {
300 FilteredConnectPoint hostPoint = getHostPoint(host, fcPoints);
301
302 if (hostPoint == null) {
303 log.warn(HOST_FCP_NOT_FOUND, host);
304 return;
305 }
306
307 Set<FilteredConnectPoint> otherPoints =
308 fcPoints.stream()
309 .filter(fcp -> !fcp.equals(hostPoint))
310 .collect(Collectors.toSet());
311
312 Key uniKey = intentInstaller.buildKey(PREFIX_UNICAST,
313 host.location(),
Luca Prete092e8952016-10-26 16:25:56 +0200314 vplsName,
nosignal5fd282e2016-09-16 16:11:40 -0700315 host.mac());
316
317 if ((!intentInstaller.intentExists(uniKey) || affectedByApi) &&
318 !otherPoints.isEmpty()) {
319 intents.add(intentInstaller.buildUniIntent(uniKey,
320 otherPoints,
321 hostPoint,
Luca Prete092e8952016-10-26 16:25:56 +0200322 host,
323 encap));
nosignal5fd282e2016-09-16 16:11:40 -0700324 }
325 });
326
327 return ImmutableSet.copyOf(intents);
328 }
329
330 /**
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100331 * Returns the filtered connect point associated to a given host.
nosignal5fd282e2016-09-16 16:11:40 -0700332 *
333 * @param host the target host
334 * @param fcps the filtered connected points
335 * @return null if not found; the filtered connect point otherwise
336 */
337 private FilteredConnectPoint getHostPoint(Host host,
338 Set<FilteredConnectPoint> fcps) {
339 return fcps.stream()
340 .filter(fcp -> fcp.connectPoint().equals(host.location()))
341 .filter(fcp -> {
342 VlanIdCriterion vlanCriterion =
343 (VlanIdCriterion) fcp.trafficSelector().
344 getCriterion(Criterion.Type.VLAN_VID);
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100345 return vlanCriterion == null ||
nosignal5fd282e2016-09-16 16:11:40 -0700346 vlanCriterion.vlanId().equals(host.vlan());
347 })
348 .findFirst()
349 .orElse(null);
350 }
351
352 /**
353 * Computes a set of filtered connect points from a list of given interfaces.
354 *
355 * @param interfaces the interfaces to compute
356 * @return the set of filtered connect points
357 */
358 private Set<FilteredConnectPoint> buildFCPoints(Collection<Interface> interfaces) {
Luca Prete092e8952016-10-26 16:25:56 +0200359 // Build all filtered connected points in the VPLS
nosignal5fd282e2016-09-16 16:11:40 -0700360 return interfaces
361 .stream()
362 .map(intf -> {
363 TrafficSelector.Builder selectorBuilder =
364 DefaultTrafficSelector.builder();
nosignal5fd282e2016-09-16 16:11:40 -0700365 if (!intf.vlan().equals(VlanId.NONE)) {
366 selectorBuilder.matchVlanId(intf.vlan());
367 }
nosignal5fd282e2016-09-16 16:11:40 -0700368 return new FilteredConnectPoint(intf.connectPoint(),
369 selectorBuilder.build());
370 })
371 .collect(Collectors.toSet());
Luca Prete9c2ee072016-02-16 11:00:44 -0800372 }
373
374 /**
375 * Listener for host events.
376 */
nosignal5fd282e2016-09-16 16:11:40 -0700377 private class InternalHostListener implements HostListener {
Luca Prete9c2ee072016-02-16 11:00:44 -0800378 @Override
379 public void event(HostEvent event) {
nosignal5fd282e2016-09-16 16:11:40 -0700380 log.debug(HOST_EVENT, event);
Luca Prete9c2ee072016-02-16 11:00:44 -0800381 switch (event.type()) {
382 case HOST_ADDED:
383 case HOST_UPDATED:
384 case HOST_REMOVED:
nosignal5fd282e2016-09-16 16:11:40 -0700385 setupConnectivity(false);
Luca Prete9c2ee072016-02-16 11:00:44 -0800386 break;
nosignal5fd282e2016-09-16 16:11:40 -0700387
Luca Prete9c2ee072016-02-16 11:00:44 -0800388 default:
389 break;
390 }
391 }
392 }
Luca Pretea8854822016-04-26 16:30:55 -0700393
394 /**
395 * Listener for interface configuration events.
396 */
397 private class InternalInterfaceListener implements InterfaceListener {
398 @Override
399 public void event(InterfaceEvent event) {
nosignal5fd282e2016-09-16 16:11:40 -0700400 log.debug(INTF_CONF_EVENT, event);
Luca Pretea8854822016-04-26 16:30:55 -0700401 switch (event.type()) {
402 case INTERFACE_ADDED:
403 case INTERFACE_UPDATED:
404 case INTERFACE_REMOVED:
nosignal5fd282e2016-09-16 16:11:40 -0700405 setupConnectivity(false);
Luca Pretea8854822016-04-26 16:30:55 -0700406 break;
407 default:
408 break;
409 }
410 }
411 }
nosignal5fd282e2016-09-16 16:11:40 -0700412
413 /**
414 * Listener for VPLS configuration events.
415 */
416 private class InternalNetworkConfigListener implements NetworkConfigListener {
417 @Override
418 public void event(NetworkConfigEvent event) {
Carolina Fernandezb1cef5c2016-11-22 19:18:40 +0100419 if (event.configClass() == VplsConfigService.CONFIG_CLASS) {
nosignal5fd282e2016-09-16 16:11:40 -0700420 log.debug(NET_CONF_EVENT, event.configClass());
421 switch (event.type()) {
422 case CONFIG_ADDED:
423 case CONFIG_UPDATED:
424 case CONFIG_REMOVED:
425 setupConnectivity(true);
426 break;
nosignal5fd282e2016-09-16 16:11:40 -0700427 default:
428 break;
429 }
430 }
431 }
432 }
Luca Prete9c2ee072016-02-16 11:00:44 -0800433}