OpenFLow plugin & SAL API documentation
[controller.git] / opendaylight / sal / networkconfiguration / api / src / main / java / org / opendaylight / controller / sal / networkconfig / bridgedomain / IPluginInBridgeDomainConfigService.java
1 package org.opendaylight.controller.sal.networkconfig.bridgedomain;
2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.opendaylight.controller.sal.core.Node;
7 import org.opendaylight.controller.sal.core.NodeConnector;
8 import org.opendaylight.controller.sal.utils.Status;
9
10 /**
11  * This interface defines bridge domain configuration service methods to be
12  * implemented by protocol plugins
13  */
14 public interface IPluginInBridgeDomainConfigService {
15     /**
16      * Create a Bridge Domain
17      *
18      * @param node Node serving this configuration service
19      * @param bridgeIdentifier String representation of a Bridge Domain
20      * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
21      * @return Status.StatusCode.SUCCESS if bridge domain is created successfully. Failure Status otherwise.
22      * @note This method will return false if one or more of the supplied params is not supported by the
23      * protocol plugin that serves the Node.
24      */
25     public Status createBridgeDomain(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params) throws Throwable;
26
27     /**
28      * Delete a Bridge Domain
29      *
30      * @param node Node serving this configuration service
31      * @param bridgeIdentifier String representation of a Bridge Domain
32      * @return Status.StatusCode.SUCCESS if bridge domain is deleted successfully. Failure Status otherwise.
33      */
34     public Status deleteBridgeDomain(Node node, String bridgeIdentifier);
35
36     /**
37      * Returns the configured Bridge Domains
38      *
39      * @param node Node serving this configuration service
40      * @return List of Bridge Domain Identifiers
41      */
42     public List<String> getBridgeDomains(Node node);
43
44     /**
45      * add Bridge Domain Configuration
46      *
47      * @param node Node serving this configuration service
48      * @param bridgeIdentifier String representation of a Bridge Domain
49      * @param params Map representation of config Name (ConfigConstants) and config value(represented as Object).
50      * @return Status.StatusCode.SUCCESS if bridge domain configuration is added successfully. Failure Status otherwise.
51      * @note This method will return false if one or more of the supplied params is not supported by the
52      * protocol plugin that serves the Node.
53      */
54     public Status addBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params);
55
56     /**
57      * Delete Bridge Domain Configuration
58      *
59      * @param node Node serving this configuration service
60      * @param bridgeIdentifier String representation of a Bridge Domain
61      * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
62      * @return Status.StatusCode.SUCCESS if bridge domain configuration is deleted successfully. Failure Status otherwise.
63      * @note This method will return false if one or more of the supplied params is not supported by the
64      * protocol plugin that serves the Node.
65      */
66     public Status removeBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params);
67
68     /**
69      * Returns Bridge Domain Configurations
70      *
71      * @param node Node serving this configuration service
72      * @param bridgeIdentifier String representation of a Bridge Domain
73      * @return Map representation of config Name (ConfigConstants) and config value(represented as Object).
74      */
75
76     public Map<ConfigConstants, Object> getBridgeDomainConfigs(Node node, String bridgeIdentifier);
77
78     /**
79      * Returns a Node dedicated to a Bridge Domain (if available) that is created using createBridgeDomain.
80      * @param configNode Node serving this configuration service.
81      * @param bridgeIdentifier Name of the bridge domain that would map to a dedicated Node
82      * @return Node dedicated to a bridge domain that is created using createBridgeDomain.
83      *         returns null if there is no such dedicated node is available or represented.
84      */
85     public Node getBridgeDomainNode(Node configNode, String bridgeIdentifier);
86
87     /**
88      * Add a port to a bridge domain
89      *
90      * @param node Node serving this configuration service
91      * @param bridgeIdentifier String representation of a Bridge Domain
92      * @param portIdentifier String representation of a Port.
93      * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
94      * @return Status.StatusCode.SUCCESS if a port is added successfully. Failure Status otherwise.
95      * @note This method will return false if one or more of the supplied params is not supported by the
96      * protocol plugin that serves the Node.
97      */
98     public Status addPort(Node node, String bridgeIdentifier, String portIdentifier,
99                            Map<ConfigConstants, Object> params);
100
101     /**
102      * Delete a Port from a bridge domain
103      *
104      * @param node Node serving this configuration service
105      * @param bridgeIdentifier String representation of a Bridge Domain
106      * @param portIdentifier String representation of a Port.
107      * @return Status.StatusCode.SUCCESS if a port is added successfully. Failure Status otherwise.
108      */
109     public Status deletePort(Node node, String bridgeIdentifier, String portIdentifier);
110
111     /**
112      * add Port Configuration
113      *
114      * @param node Node serving this configuration service
115      * @param bridgeIdentifier String representation of a Bridge Domain
116      * @param portIdentifier String representation of a Port.
117      * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
118      * @return Status.StatusCode.SUCCESS if a port configuration is added successfully. Failure Status otherwise.
119      * @note This method will return false if one or more of the supplied params is not supported by the
120      * protocol plugin that serves the Node.
121      */
122     public Status addPortConfig(Node node, String bridgeIdentifier, String portIdentifier,
123                                  Map<ConfigConstants, Object> params);
124
125     /**
126      * Delete Port Configuration
127      *
128      * @param node Node serving this configuration service
129      * @param portIdentifier String representation of a Port.
130      * @param config Map representation of ConfigName and Configuration Value in Strings.
131      * @return Status.StatusCode.SUCCESS if a port configuration is removed successfully. Failure Status otherwise.
132      * @note This method will return false if one or more of the supplied params is not supported by the
133      * protocol plugin that serves the Node.
134      */
135     public Status removePortConfig(Node node, String bridgeIdentifier, String portIdentifier, Map<ConfigConstants, Object> params);
136
137     /**
138      * Returns Port Configurations
139      *
140      * @param node Node serving this configuration service
141      * @param bridgeIdentifier String representation of a Bridge Domain
142      * @param portIdentifier String representation of a Port.
143      * @return Map representation of Configuration Name (ConfigConstants) and Configuration value (represented as Object).
144      */
145     public Map<ConfigConstants, Object> getPortConfigs(Node node, String bridgeIdentifier, String portIdentifier);
146
147
148     /**
149      * Returns a NodeConnector mapped to a Port (if available) that is created using addPort.
150      * @param configNode Node serving this configuration service.
151      * @param bridgeIdentifier Name of the bridge domain that would map to a dedicated Node
152      * @param portIdentifier String representation of a Port.
153      * @return NodeConnector that is mapped to a port created using addPort.
154      *         returns null if there is no such nodeConnector is available or mapped.
155      */
156     public NodeConnector getNodeConnector(Node configNode, String bridgeIdentifier, String portIdentifier);
157 }