X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fcontainermanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcontainermanager%2FIContainerManager.java;h=b2e2a7631b483a977f71e5bbedb4fc7f240243d5;hb=642eb8ecef35197915cd766dd60439812122b0c5;hp=9300921be9c424dbc2b10146926a9d42dcb81f9c;hpb=be985b56087bb36174d7ea7d25d202b7eef3a2fa;p=controller.git diff --git a/opendaylight/containermanager/api/src/main/java/org/opendaylight/controller/containermanager/IContainerManager.java b/opendaylight/containermanager/api/src/main/java/org/opendaylight/controller/containermanager/IContainerManager.java index 9300921be9..b2e2a7631b 100644 --- a/opendaylight/containermanager/api/src/main/java/org/opendaylight/controller/containermanager/IContainerManager.java +++ b/opendaylight/containermanager/api/src/main/java/org/opendaylight/controller/containermanager/IContainerManager.java @@ -10,15 +10,170 @@ package org.opendaylight.controller.containermanager; import java.util.List; - +import java.util.Map; +import java.util.Set; import org.opendaylight.controller.sal.utils.Status; /** - * Container Manager Interface - provides methods to get information on existing OSGI containers - * + * Container Manager provides an ability for the Network Administrators to + * partitions a production network into smaller, isolated and manageable + * networks. IContainerManager interface exposes these Container management capabilities + * via the supported APIs */ public interface IContainerManager { + /** + * Create a Container + * + * @param configObject + * ContainerConfig object that carries name of the Container to be + * created + * @return returns the status code of adding a container + */ + public Status addContainer(ContainerConfig configObject); + + /** + * Remove a container + * + * @param configObject + * ContainerConfig object that carries the name of the Container to be + * removed + * @return returns the status code of removing a container + */ + public Status removeContainer(ContainerConfig configObject); + + /** + * Remove a container + * + * @param containerName + * the container name + * @return returns the status code of removing a container + */ + public Status removeContainer(String containerName); + + /** + * Adds resources to a given container. Updates the container data based on new + * resources added + * + * @param configObject + * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} + * @return returns the status code of adding a container entry + */ + public Status addContainerEntry(String containerName, List portList); + + /** + * Remove a resource from a given container. Updates the container data based on new + * resources removed. + * + * @param configObject + * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} + * @return returns the status code of removing a container entry + */ + public Status removeContainerEntry(String containerName, List portList); + + /** + * Adds/Removes a container flow + * + * @param configObject + * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} + * @return returns the status code of adding a container flow + */ + public Status addContainerFlows(String containerName, List configObject); + + /** + * Remove a container flow + * + * @param configObject + * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} + * @return returns the status of removing a container flow + */ + public Status removeContainerFlows(String containerName, List configObject); + + /** + * Remove a container flow + * + * @param containerName + * the name of the container + * @param name + * the name of the container flow + * @return the status of the request + */ + public Status removeContainerFlows(String containerName, Set name); + + /** + * Get the list of {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} objects representing all the containers that have been + * configured previously. + * + * @return the lsit of {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} objects configured so far + */ + public List getContainerConfigList(); + + /** + * Get the configuration object for the specified container + * + * @param containerName + * the name of the container + * @return a copy of the {@link com.ContainerConfig.csdn.containermanager.ContainerConfig + * ContainerConfig} object for the specified container if present, null + * otherwise + */ + public ContainerConfig getContainerConfig(String containerName); + + /** + * Returns a list of container names that currently exist. + * + * @return array of String container names + */ + public List getContainerNameList(); + + /** + * Check for the existence of a container + * + * @param ContainerId + * Name of the Container + * + * @return true if it exists, false otherwise + */ + public boolean doesContainerExist(String ContainerId); + + /** + * Get an array of ContainerFlowConfig objects representing all the + * container flows that have been configured previously. + * + * @return array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig + * ContainerFlowConfig} + */ + public Map> getContainerFlows(); + + /** + * Get an array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig + * ContainerFlowConfig} objects representing all the container flows that + * have been configured previously on the given containerName + * + * @param containerName + * the container name + * @return array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig + * ContainerFlowConfig} + */ + public List getContainerFlows(String containerName); + + /** + * Get an the list of names of the container flows that have been configured + * previously on the given containerName + * + * @param containerName + * the container name + * @return the array containing the names of the container flows configured + * on the specified container + */ + public List getContainerFlowNameList(String containerName); + /** * Returns true if there are any non-default Containers present. * @@ -34,12 +189,9 @@ public interface IContainerManager { public List getContainerNames(); /** - * Save the current container configuration to disk. - * TODO : REMOVE THIS FUNCTION and make Save as a service rather than the - * current hack of calling individual save routines. + * Returns whether the controller is running in container mode * - * @return status code + * @return true if controller is in container mode, false otherwise */ - @Deprecated - public Status saveContainerConfig(); + public boolean inContainerMode(); }