BUG-2218: Keep existing link augmentations during discovery process
[controller.git] / opendaylight / adsal / containermanager / api / src / main / java / org / opendaylight / controller / containermanager / IContainerManager.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
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
8  */
9
10 package org.opendaylight.controller.containermanager;
11
12 import java.util.List;
13 import java.util.Map;
14 import java.util.Set;
15 import org.opendaylight.controller.sal.utils.Status;
16
17 /**
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
22  */
23 public interface IContainerManager {
24
25     /**
26      * Create a Container
27      *
28      * @param configObject
29      *            ContainerConfig object that carries name of the Container to be
30      *            created
31      * @return returns the status code of adding a container
32      */
33     public Status addContainer(ContainerConfig configObject);
34
35     /**
36      * Remove a container
37      *
38      * @param configObject
39      *            ContainerConfig object that carries the name of the Container to be
40      *            removed
41      * @return returns the status code of removing a container
42      */
43     public Status removeContainer(ContainerConfig configObject);
44
45     /**
46      * Remove a container
47      *
48      * @param containerName
49      *            the container name
50      * @return returns the status code of removing a container
51      */
52     public Status removeContainer(String containerName);
53
54     /**
55      * Adds resources to a given container. Updates the container data based on new
56      * resources added
57      *
58      * @param configObject
59      *            refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
60      *            ContainerConfig}
61      * @return returns the status code of adding a container entry
62      */
63     public Status addContainerEntry(String containerName, List<String> portList);
64
65     /**
66      * Remove a resource from a given container. Updates the container data based on new
67      * resources removed.
68      *
69      * @param configObject
70      *            refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
71      *            ContainerConfig}
72      * @return returns the status code of removing a container entry
73      */
74     public Status removeContainerEntry(String containerName, List<String> portList);
75
76     /**
77      * Adds/Removes a container flow
78      *
79      * @param configObject
80      *            refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
81      *            ContainerConfig}
82      * @return returns the status code of adding a container flow
83      */
84     public Status addContainerFlows(String containerName, List<ContainerFlowConfig> configObject);
85
86     /**
87      * Remove a container flow
88      *
89      * @param configObject
90      *            refer to {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
91      *            ContainerConfig}
92      * @return returns the status of removing a container flow
93      */
94     public Status removeContainerFlows(String containerName, List<ContainerFlowConfig> configObject);
95
96     /**
97      * Remove a container flow
98      *
99      * @param containerName
100      *            the name of the container
101      * @param name
102      *            the name of the container flow
103      * @return the status of the request
104      */
105     public Status removeContainerFlows(String containerName, Set<String> name);
106
107     /**
108      * Get the list of {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
109      * ContainerConfig} objects representing all the containers that have been
110      * configured previously.
111      *
112      * @return the lsit of {@link com.ContainerConfig.csdn.containermanager.ContainerConfig
113      *         ContainerConfig} objects configured so far
114      */
115     public List<ContainerConfig> getContainerConfigList();
116
117     /**
118      * Get the configuration object for the specified container
119      *
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
124      *         otherwise
125      */
126     public ContainerConfig getContainerConfig(String containerName);
127
128     /**
129      * Returns a list of container names that currently exist.
130      *
131      * @return array of String container names
132      */
133     public List<String> getContainerNameList();
134
135     /**
136      * Check for the existence of a container
137      *
138      * @param ContainerId
139      *            Name of the Container
140      *
141      * @return true if it exists, false otherwise
142      */
143     public boolean doesContainerExist(String ContainerId);
144
145     /**
146      * Get an array of ContainerFlowConfig objects representing all the
147      * container flows that have been configured previously.
148      *
149      * @return array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig
150      *         ContainerFlowConfig}
151      */
152     public Map<String, List<ContainerFlowConfig>> getContainerFlows();
153
154     /**
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
158      *
159      * @param containerName
160      *            the container name
161      * @return array of {@link org.opendaylight.controller.containermanager.ContainerFlowConfig
162      *         ContainerFlowConfig}
163      */
164     public List<ContainerFlowConfig> getContainerFlows(String containerName);
165
166     /**
167      * Get an the list of names of the container flows that have been configured
168      * previously on the given containerName
169      *
170      * @param containerName
171      *            the container name
172      * @return the array containing the names of the container flows configured
173      *         on the specified container
174      */
175     public List<String> getContainerFlowNameList(String containerName);
176
177     /**
178      * Returns true if there are any non-default Containers present.
179      *
180      * @return  true if any non-default container is present false otherwise.
181      */
182     public boolean hasNonDefaultContainer();
183
184     /**
185      * Returns a list of the existing containers.
186      *
187      * @return  List of Container name strings.
188      */
189     public List<String> getContainerNames();
190
191     /**
192      * Returns whether the controller is running in container mode
193      *
194      * @return true if controller is in container mode, false otherwise
195      */
196     public boolean inContainerMode();
197 }