blob: bc3c64d3c7ecf6956dfcc43aeeb3276be0c79e49 [file] [log] [blame]
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -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
14 * limitations under the License.
15 */
16package org.onosproject.net.group.impl;
17
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080018import org.apache.felix.scr.annotations.Activate;
19import org.apache.felix.scr.annotations.Component;
20import org.apache.felix.scr.annotations.Deactivate;
Charles Chan0c7c43b2016-01-14 17:39:20 -080021import org.apache.felix.scr.annotations.Modified;
22import org.apache.felix.scr.annotations.Property;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080023import org.apache.felix.scr.annotations.Reference;
24import org.apache.felix.scr.annotations.ReferenceCardinality;
25import org.apache.felix.scr.annotations.Service;
Jian Lid9b5f552016-03-11 18:15:31 -080026import org.onlab.util.Tools;
Charles Chan0c7c43b2016-01-14 17:39:20 -080027import org.onosproject.cfg.ComponentConfigService;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080028import org.onosproject.core.ApplicationId;
Andrea Campanella1ea15102017-09-04 16:00:09 +020029import org.onosproject.mastership.MastershipService;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080030import org.onosproject.net.DeviceId;
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -080031import org.onosproject.net.device.DeviceEvent;
32import org.onosproject.net.device.DeviceListener;
33import org.onosproject.net.device.DeviceService;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080034import org.onosproject.net.group.Group;
35import org.onosproject.net.group.GroupBuckets;
36import org.onosproject.net.group.GroupDescription;
37import org.onosproject.net.group.GroupEvent;
38import org.onosproject.net.group.GroupKey;
39import org.onosproject.net.group.GroupListener;
40import org.onosproject.net.group.GroupOperation;
41import org.onosproject.net.group.GroupOperations;
42import org.onosproject.net.group.GroupProvider;
43import org.onosproject.net.group.GroupProviderRegistry;
44import org.onosproject.net.group.GroupProviderService;
45import org.onosproject.net.group.GroupService;
46import org.onosproject.net.group.GroupStore;
47import org.onosproject.net.group.GroupStore.UpdateType;
48import org.onosproject.net.group.GroupStoreDelegate;
Jian Lid9b5f552016-03-11 18:15:31 -080049import org.onosproject.net.provider.AbstractListenerProviderRegistry;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080050import org.onosproject.net.provider.AbstractProviderService;
Charles Chan0c7c43b2016-01-14 17:39:20 -080051import org.osgi.service.component.ComponentContext;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080052import org.slf4j.Logger;
53
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070054import java.util.Collection;
55import java.util.Collections;
Charles Chan0c7c43b2016-01-14 17:39:20 -080056import java.util.Dictionary;
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070057
Andrea Campanella1ea15102017-09-04 16:00:09 +020058import static com.google.common.base.Strings.isNullOrEmpty;
59import static org.onlab.util.Tools.get;
Changhoon Yoon541ef712015-05-23 17:18:34 +090060import static org.onosproject.security.AppGuard.checkPermission;
Jian Lid9b5f552016-03-11 18:15:31 -080061import static org.onosproject.security.AppPermission.Type.GROUP_READ;
62import static org.onosproject.security.AppPermission.Type.GROUP_WRITE;
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070063import static org.slf4j.LoggerFactory.getLogger;
Changhoon Yoonb856b812015-08-10 03:47:19 +090064
Changhoon Yoon541ef712015-05-23 17:18:34 +090065
66
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080067/**
68 * Provides implementation of the group service APIs.
69 */
70@Component(immediate = true)
71@Service
72public class GroupManager
Thomas Vachuska42e8cce2015-07-29 19:25:18 -070073 extends AbstractListenerProviderRegistry<GroupEvent, GroupListener,
74 GroupProvider, GroupProviderService>
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080075 implements GroupService, GroupProviderRegistry {
76
77 private final Logger log = getLogger(getClass());
78
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080079 private final GroupStoreDelegate delegate = new InternalGroupStoreDelegate();
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -080080 private final DeviceListener deviceListener = new InternalDeviceListener();
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080081
Andrea Campanella1ea15102017-09-04 16:00:09 +020082 private final GroupDriverProvider defaultProvider = new GroupDriverProvider();
83
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -080084 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
85 protected GroupStore store;
86
87 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -080088 protected DeviceService deviceService;
89
Charles Chan0c7c43b2016-01-14 17:39:20 -080090 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
91 protected ComponentConfigService cfgService;
92
Andrea Campanella1ea15102017-09-04 16:00:09 +020093 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
94 protected MastershipService mastershipService;
95
96 private static final int DEFAULT_POLL_FREQUENCY = 30;
97 @Property(name = "fallbackGroupPollFrequency", intValue = DEFAULT_POLL_FREQUENCY,
98 label = "Frequency (in seconds) for polling groups via fallback provider")
99 private int fallbackGroupPollFrequency = DEFAULT_POLL_FREQUENCY;
100
Charles Chan0c7c43b2016-01-14 17:39:20 -0800101 @Property(name = "purgeOnDisconnection", boolValue = false,
102 label = "Purge entries associated with a device when the device goes offline")
103 private boolean purgeOnDisconnection = false;
Andrea Campanella1ea15102017-09-04 16:00:09 +0200104
Charles Chan0c7c43b2016-01-14 17:39:20 -0800105
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800106 @Activate
Charles Chan0c7c43b2016-01-14 17:39:20 -0800107 public void activate(ComponentContext context) {
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800108 store.setDelegate(delegate);
109 eventDispatcher.addSink(GroupEvent.class, listenerRegistry);
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -0800110 deviceService.addListener(deviceListener);
Charles Chan0c7c43b2016-01-14 17:39:20 -0800111 cfgService.registerProperties(getClass());
112 modified(context);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800113 log.info("Started");
114 }
115
116 @Deactivate
117 public void deactivate() {
Andrea Campanella3f1c61e2016-04-01 17:30:12 -0700118 deviceService.removeListener(deviceListener);
Charles Chan0c7c43b2016-01-14 17:39:20 -0800119 cfgService.unregisterProperties(getClass(), false);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800120 store.unsetDelegate(delegate);
121 eventDispatcher.removeSink(GroupEvent.class);
122 log.info("Stopped");
123 }
124
Charles Chan0c7c43b2016-01-14 17:39:20 -0800125 @Modified
126 public void modified(ComponentContext context) {
127 if (context != null) {
128 readComponentConfiguration(context);
129 }
Andrea Campanella1ea15102017-09-04 16:00:09 +0200130 defaultProvider.init(deviceService, new InternalGroupProviderService(defaultProvider),
131 mastershipService, fallbackGroupPollFrequency);
Andrea Campanella6ee73922016-02-03 18:00:00 -0800132 }
133
134 @Override
135 protected GroupProvider defaultProvider() {
136 return defaultProvider;
Charles Chan0c7c43b2016-01-14 17:39:20 -0800137 }
138
139 /**
140 * Extracts properties from the component configuration context.
141 *
142 * @param context the component context
143 */
144 private void readComponentConfiguration(ComponentContext context) {
145 Dictionary<?, ?> properties = context.getProperties();
146 Boolean flag;
147
Jian Lid9b5f552016-03-11 18:15:31 -0800148 flag = Tools.isPropertyEnabled(properties, "purgeOnDisconnection");
Charles Chan0c7c43b2016-01-14 17:39:20 -0800149 if (flag == null) {
150 log.info("PurgeOnDisconnection is not configured, " +
151 "using current value of {}", purgeOnDisconnection);
152 } else {
153 purgeOnDisconnection = flag;
154 log.info("Configured. PurgeOnDisconnection is {}",
155 purgeOnDisconnection ? "enabled" : "disabled");
156 }
Andrea Campanella1ea15102017-09-04 16:00:09 +0200157 String s = get(properties, "fallbackGroupPollFrequency");
158 try {
159 fallbackGroupPollFrequency = isNullOrEmpty(s) ? DEFAULT_POLL_FREQUENCY : Integer.parseInt(s);
160 } catch (NumberFormatException e) {
161 fallbackGroupPollFrequency = DEFAULT_POLL_FREQUENCY;
162 }
Charles Chan0c7c43b2016-01-14 17:39:20 -0800163 }
164
165 /**
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800166 * Create a group in the specified device with the provided parameters.
167 *
168 * @param groupDesc group creation parameters
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800169 */
170 @Override
171 public void addGroup(GroupDescription groupDesc) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900172 checkPermission(GROUP_WRITE);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800173 store.storeGroupDescription(groupDesc);
174 }
175
176 /**
177 * Return a group object associated to an application cookie.
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700178 * <p>
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800179 * NOTE1: The presence of group object in the system does not
180 * guarantee that the "group" is actually created in device.
181 * GROUP_ADDED notification would confirm the creation of
182 * this group in data plane.
183 *
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700184 * @param deviceId device identifier
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800185 * @param appCookie application cookie to be used for lookup
186 * @return group associated with the application cookie or
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700187 * NULL if Group is not found for the provided cookie
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800188 */
189 @Override
190 public Group getGroup(DeviceId deviceId, GroupKey appCookie) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900191 checkPermission(GROUP_READ);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800192 return store.getGroup(deviceId, appCookie);
193 }
194
195 /**
196 * Append buckets to existing group. The caller can optionally
197 * associate a new cookie during this updation. GROUP_UPDATED or
198 * GROUP_UPDATE_FAILED notifications would be provided along with
199 * cookie depending on the result of the operation on the device.
200 *
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700201 * @param deviceId device identifier
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800202 * @param oldCookie cookie to be used to retrieve the existing group
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700203 * @param buckets immutable list of group bucket to be added
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800204 * @param newCookie immutable cookie to be used post update operation
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700205 * @param appId Application Id
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800206 */
207 @Override
208 public void addBucketsToGroup(DeviceId deviceId,
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700209 GroupKey oldCookie,
210 GroupBuckets buckets,
211 GroupKey newCookie,
212 ApplicationId appId) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900213 checkPermission(GROUP_WRITE);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800214 store.updateGroupDescription(deviceId,
215 oldCookie,
216 UpdateType.ADD,
217 buckets,
218 newCookie);
219 }
220
221 /**
222 * Remove buckets from existing group. The caller can optionally
223 * associate a new cookie during this updation. GROUP_UPDATED or
224 * GROUP_UPDATE_FAILED notifications would be provided along with
225 * cookie depending on the result of the operation on the device.
226 *
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700227 * @param deviceId device identifier
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800228 * @param oldCookie cookie to be used to retrieve the existing group
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700229 * @param buckets immutable list of group bucket to be removed
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800230 * @param newCookie immutable cookie to be used post update operation
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700231 * @param appId Application Id
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800232 */
233 @Override
234 public void removeBucketsFromGroup(DeviceId deviceId,
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700235 GroupKey oldCookie,
236 GroupBuckets buckets,
237 GroupKey newCookie,
238 ApplicationId appId) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900239 checkPermission(GROUP_WRITE);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800240 store.updateGroupDescription(deviceId,
241 oldCookie,
242 UpdateType.REMOVE,
243 buckets,
244 newCookie);
245 }
246
Victor Silva0282ab82016-11-15 16:30:27 -0300247 /**
248 * Set buckets for an existing group. The caller can optionally
249 * associate a new cookie during this updation. GROUP_UPDATED or
250 * GROUP_UPDATE_FAILED notifications would be provided along with
251 * cookie depending on the result of the operation on the device.
252 *
253 * This operation overwrites the previous group buckets entirely.
254 *
255 * @param deviceId device identifier
256 * @param oldCookie cookie to be used to retrieve the existing group
257 * @param buckets immutable list of group buckets to be set
258 * @param newCookie immutable cookie to be used post update operation
259 * @param appId Application Id
260 */
261 @Override
262 public void setBucketsForGroup(DeviceId deviceId,
263 GroupKey oldCookie,
264 GroupBuckets buckets,
265 GroupKey newCookie,
266 ApplicationId appId) {
267 checkPermission(GROUP_WRITE);
268 store.updateGroupDescription(deviceId,
269 oldCookie,
270 UpdateType.SET,
271 buckets,
272 newCookie);
273 }
274
Kavitha Alagesanc69c66a2016-06-15 14:26:04 +0530275 @Override
276 public void purgeGroupEntries(DeviceId deviceId) {
277 checkPermission(GROUP_WRITE);
278 store.purgeGroupEntry(deviceId);
279 }
280
Victor Silva4e8b7832016-08-17 17:11:19 -0300281 @Override
282 public void purgeGroupEntries() {
283 checkPermission(GROUP_WRITE);
284 store.purgeGroupEntries();
285 }
Kavitha Alagesanc69c66a2016-06-15 14:26:04 +0530286
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800287 /**
288 * Delete a group associated to an application cookie.
289 * GROUP_DELETED or GROUP_DELETE_FAILED notifications would be
290 * provided along with cookie depending on the result of the
291 * operation on the device.
292 *
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700293 * @param deviceId device identifier
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800294 * @param appCookie application cookie to be used for lookup
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700295 * @param appId Application Id
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800296 */
297 @Override
298 public void removeGroup(DeviceId deviceId,
299 GroupKey appCookie,
300 ApplicationId appId) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900301 checkPermission(GROUP_WRITE);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800302 store.deleteGroupDescription(deviceId, appCookie);
303 }
304
305 /**
306 * Retrieve all groups created by an application in the specified device
307 * as seen by current controller instance.
308 *
309 * @param deviceId device identifier
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700310 * @param appId application id
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800311 * @return collection of immutable group objects created by the application
312 */
313 @Override
314 public Iterable<Group> getGroups(DeviceId deviceId,
315 ApplicationId appId) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900316 checkPermission(GROUP_READ);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800317 return store.getGroups(deviceId);
318 }
319
Jonathan Hart32600692015-03-09 10:38:40 -0700320 @Override
321 public Iterable<Group> getGroups(DeviceId deviceId) {
Changhoon Yoonb856b812015-08-10 03:47:19 +0900322 checkPermission(GROUP_READ);
Jonathan Hart32600692015-03-09 10:38:40 -0700323 return store.getGroups(deviceId);
324 }
325
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800326 @Override
327 protected GroupProviderService createProviderService(GroupProvider provider) {
328 return new InternalGroupProviderService(provider);
329 }
330
331 private class InternalGroupStoreDelegate implements GroupStoreDelegate {
332 @Override
333 public void notify(GroupEvent event) {
334 final Group group = event.subject();
335 GroupProvider groupProvider =
336 getProvider(group.deviceId());
337 GroupOperations groupOps = null;
338 switch (event.type()) {
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700339 case GROUP_ADD_REQUESTED:
340 log.debug("GROUP_ADD_REQUESTED for Group {} on device {}",
341 group.id(), group.deviceId());
342 GroupOperation groupAddOp = GroupOperation.
343 createAddGroupOperation(group.id(),
344 group.type(),
345 group.buckets());
346 groupOps = new GroupOperations(
347 Collections.singletonList(groupAddOp));
348 groupProvider.performGroupOperation(group.deviceId(), groupOps);
349 break;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800350
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700351 case GROUP_UPDATE_REQUESTED:
352 log.debug("GROUP_UPDATE_REQUESTED for Group {} on device {}",
353 group.id(), group.deviceId());
354 GroupOperation groupModifyOp = GroupOperation.
355 createModifyGroupOperation(group.id(),
356 group.type(),
357 group.buckets());
358 groupOps = new GroupOperations(
359 Collections.singletonList(groupModifyOp));
360 groupProvider.performGroupOperation(group.deviceId(), groupOps);
361 break;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800362
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700363 case GROUP_REMOVE_REQUESTED:
364 log.debug("GROUP_REMOVE_REQUESTED for Group {} on device {}",
365 group.id(), group.deviceId());
366 GroupOperation groupDeleteOp = GroupOperation.
367 createDeleteGroupOperation(group.id(),
368 group.type());
369 groupOps = new GroupOperations(
370 Collections.singletonList(groupDeleteOp));
371 groupProvider.performGroupOperation(group.deviceId(), groupOps);
372 break;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800373
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700374 case GROUP_ADDED:
375 case GROUP_UPDATED:
376 case GROUP_REMOVED:
377 case GROUP_ADD_FAILED:
378 case GROUP_UPDATE_FAILED:
379 case GROUP_REMOVE_FAILED:
helenyrwu89470f12016-08-12 13:18:10 -0700380 case GROUP_BUCKET_FAILOVER:
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700381 post(event);
382 break;
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700383 default:
384 break;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800385 }
386 }
387 }
388
389 private class InternalGroupProviderService
390 extends AbstractProviderService<GroupProvider>
391 implements GroupProviderService {
392
393 protected InternalGroupProviderService(GroupProvider provider) {
394 super(provider);
395 }
396
397 @Override
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700398 public void groupOperationFailed(DeviceId deviceId, GroupOperation operation) {
sangho7ff01812015-02-09 16:21:53 -0800399 store.groupOperationFailed(deviceId, operation);
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800400 }
401
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800402 @Override
403 public void pushGroupMetrics(DeviceId deviceId,
404 Collection<Group> groupEntries) {
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700405 log.trace("Received group metrics from device {}", deviceId);
Srikanth Vavilapalli23181912015-05-04 09:48:09 -0700406 checkValidity();
407 store.pushGroupMetrics(deviceId, groupEntries);
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -0800408 }
helenyrwu89470f12016-08-12 13:18:10 -0700409
410 @Override
411 public void notifyOfFailovers(Collection<Group> failoverGroups) {
412 store.notifyOfFailovers(failoverGroups);
413 }
Srikanth Vavilapallied12ae52015-02-09 14:43:19 -0800414 }
415
416 private class InternalDeviceListener implements DeviceListener {
417
418 @Override
419 public void event(DeviceEvent event) {
420 switch (event.type()) {
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700421 case DEVICE_REMOVED:
422 case DEVICE_AVAILABILITY_CHANGED:
Charles Chan0c7c43b2016-01-14 17:39:20 -0800423 DeviceId deviceId = event.subject().id();
424 if (!deviceService.isAvailable(deviceId)) {
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700425 log.debug("Device {} became un available; clearing initial audit status",
426 event.type(), event.subject().id());
427 store.deviceInitialAuditCompleted(event.subject().id(), false);
Charles Chan0c7c43b2016-01-14 17:39:20 -0800428
429 if (purgeOnDisconnection) {
430 store.purgeGroupEntry(deviceId);
431 }
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700432 }
433 break;
Thomas Vachuska42e8cce2015-07-29 19:25:18 -0700434 default:
435 break;
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800436 }
437 }
438 }
helenyrwu89470f12016-08-12 13:18:10 -0700439
Srikanth Vavilapalli45c27c82015-01-30 12:57:56 -0800440}