use of org.opendaylight.controller.config.api.ConfigSystemService in project controller by opendaylight.
the class BlueprintBundleTracker method shutdownAllContainers.
private void shutdownAllContainers() {
shuttingDown = true;
restartService.close();
// Close all CSS modules first.
ConfigSystemService configSystem = getOSGiService(ConfigSystemService.class);
if (configSystem != null) {
configSystem.closeAllConfigModules();
}
LOG.info("Shutting down all blueprint containers...");
Collection<Bundle> containerBundles = new HashSet<>(Arrays.asList(bundleContext.getBundles()));
while (!containerBundles.isEmpty()) {
// eligible to be destroyed. We loop until we've destroyed them all.
for (Bundle bundle : getBundlesToDestroy(containerBundles)) {
containerBundles.remove(bundle);
BlueprintContainer container = blueprintExtenderService.getContainer(bundle);
if (container != null) {
blueprintExtenderService.destroyContainer(bundle, container);
}
}
}
LOG.info("Shutdown of blueprint containers complete");
}
Aggregations