X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fcontainermanager%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcontainermanager%2Finternal%2FContainerManager.java;h=0fee183b67b8c1be06725b310c4111fbf3f9f8a8;hp=ad897fd6899b01a2645aee018198fd0b8742129a;hb=b212b6f1705c32374c75ea3c784c441419fa5b9f;hpb=f08d2774c06e55e377191b027ec9131921977e70 diff --git a/opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/ContainerManager.java b/opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/ContainerManager.java index ad897fd689..0fee183b67 100644 --- a/opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/ContainerManager.java +++ b/opendaylight/containermanager/implementation/src/main/java/org/opendaylight/controller/containermanager/internal/ContainerManager.java @@ -9,7 +9,6 @@ package org.opendaylight.controller.containermanager.internal; -import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.ObjectInputStream; @@ -751,26 +750,6 @@ public class ContainerManager extends Authorization implements IContaine return status; } - private void removeComponentsStartUpfiles(String containerName) { - String startupLocation = String.format("./%s", GlobalConstants.STARTUPHOME.toString()); - String containerPrint = String.format("_%s.", containerName.toLowerCase(Locale.ENGLISH)); - - File directory = new File(startupLocation); - String[] fileList = directory.list(); - - logger.trace("Deleting startup configuration files for container {}", containerName); - if (fileList != null) { - for (String fileName : fileList) { - if (fileName.contains(containerPrint)) { - String fullPath = String.format("%s/%s", startupLocation, fileName); - File file = new File(fullPath); - boolean done = file.delete(); - logger.trace("{} {}", (done ? "Deleted: " : "Failed to delete: "), fileName); - } - } - } - } - /** * Create and initialize default all resource group and create association * with default well known users and profiles, if not already learnt from @@ -1013,19 +992,6 @@ public class ContainerManager extends Authorization implements IContaine notifyContainerModeChange(delete, notifyLocal); // Notify listeners notifyContainerAwareListeners(container, delete); - - /* - * This is a quick fix until configuration service becomes the - * centralized configuration management place. Here container manager - * will remove the startup files for all the bundles that are present in - * the container being deleted. Do the cleanup here in Container manger - * as do not want to put this temporary code in Configuration manager - * yet which is ODL. - */ - if (delete) { - // TODO: remove when Config Mgr takes over - removeComponentsStartUpfiles(containerName); - } } private void notifyContainerEntryChangeInternal(String containerName, List ncList, UpdateType update, boolean notifyLocal) {