3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.containermanager;
12 import java.util.List;
15 import org.opendaylight.controller.sal.utils.Status;
18 * Container Manager provides an ability for the Network Administrators to
19 * partitions a production network into smaller, isolated and manageable
20 * networks. IContainerManager interface exposes these Container management capabilities
21 * via the supported APIs
23 public interface IContainerManager {
29 * ContainerConfig object that carries name of the Container to be
31 * @return returns the status code of adding a container
33 public Status addContainer(ContainerConfig configObject);
39 * ContainerConfig object that carries the name of the Container to be
41 * @return returns the status code of removing a container
43 public Status removeContainer(ContainerConfig configObject);
48 * @param containerName
50 * @return returns the status code of removing a container
52 public Status removeContainer(String containerName);
55 * Adds resources to a given container. Updates the container data based on new
59 * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
61 * @return returns the status code of adding a container entry
63 public Status addContainerEntry(String containerName, List<String> portList);
66 * Remove a resource from a given container. Updates the container data based on new
70 * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
72 * @return returns the status code of removing a container entry
74 public Status removeContainerEntry(String containerName, List<String> portList);
77 * Adds/Removes a container flow
80 * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
82 * @return returns the status code of adding a container flow
84 public Status addContainerFlows(String containerName, List<ContainerFlowConfig> configObject);
87 * Remove a container flow
90 * refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
92 * @return returns the status of removing a container flow
94 public Status removeContainerFlows(String containerName, List<ContainerFlowConfig> configObject);
97 * Remove a container flow
99 * @param containerName
100 * the name of the container
102 * the name of the container flow
103 * @return the status of the request
105 public Status removeContainerFlows(String containerName, Set<String> name);
108 * Get the list of {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
109 * ContainerConfig} objects representing all the containers that have been
110 * configured previously.
112 * @return the lsit of {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
113 * ContainerConfig} objects configured so far
115 public List<ContainerConfig> getContainerConfigList();
118 * Get the configuration object for the specified container
120 * @param containerName
121 * the name of the container
122 * @return a copy of the {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
123 * ContainerConfig} object for the specified container if present, null
126 public ContainerConfig getContainerConfig(String containerName);
129 * Returns a list of container names that currently exist.
131 * @return array of String container names
133 public List<String> getContainerNameList();
136 * Check for the existence of a container
139 * Name of the Container
141 * @return true if it exists, false otherwise
143 public boolean doesContainerExist(String ContainerId);
146 * Get an array of ContainerFlowConfig objects representing all the
147 * container flows that have been configured previously.
149 * @return array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig
150 * ContainerFlowConfig}
152 public Map<String, List<ContainerFlowConfig>> getContainerFlows();
155 * Get an array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig
156 * ContainerFlowConfig} objects representing all the container flows that
157 * have been configured previously on the given containerName
159 * @param containerName
161 * @return array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig
162 * ContainerFlowConfig}
164 public List<ContainerFlowConfig> getContainerFlows(String containerName);
167 * Get an the list of names of the container flows that have been configured
168 * previously on the given containerName
170 * @param containerName
172 * @return the array containing the names of the container flows configured
173 * on the specified container
175 public List<String> getContainerFlowNameList(String containerName);
178 * Returns true if there are any non-default Containers present.
180 * @return true if any non-default container is present false otherwise.
182 public boolean hasNonDefaultContainer();
185 * Returns a list of the existing containers.
187 * @return List of Container name strings.
189 public List<String> getContainerNames();
192 * Returns whether the controller is running in container mode
194 * @return true if controller is in container mode, false otherwise
196 public boolean inContainerMode();