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=0ae12c54560ef14cb8c08beef4553f7523d41578;hp=89c0c0b217f6de65dfc6a2bfd855e6d259b65782;hpb=c11fedfa1195b5d17cb2493fba1a4f0fde862ce1;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 89c0c0b217..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,36 +10,188 @@ 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 - * - * + * 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. * - * @return true, if any non-default container is present, else false + * @return true if any non-default container is present false otherwise. */ public boolean hasNonDefaultContainer(); /** - * Returns a list of Containers that currently exist. + * Returns a list of the existing containers. * - * @return array of String Container names + * @return List of Container name strings. */ 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 */ - public Status saveContainerConfig(); + public boolean inContainerMode(); }