2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sal.networkconfig.bridgedomain;
10 import java.util.List;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.core.NodeConnector;
15 import org.opendaylight.controller.sal.utils.Status;
18 * This interface defines bridge domain configuration service methods to be
19 * implemented by protocol plugins
21 public interface IPluginInBridgeDomainConfigService {
23 * Create a Bridge Domain
25 * @param node Node serving this configuration service
26 * @param bridgeIdentifier String representation of a Bridge Domain
27 * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
28 * @return Status.StatusCode.SUCCESS if bridge domain is created successfully. Failure Status otherwise.
29 * @note This method will return false if one or more of the supplied params is not supported by the
30 * protocol plugin that serves the Node.
32 public Status createBridgeDomain(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params) throws BridgeDomainConfigServiceException;
35 * Delete a Bridge Domain
37 * @param node Node serving this configuration service
38 * @param bridgeIdentifier String representation of a Bridge Domain
39 * @return Status.StatusCode.SUCCESS if bridge domain is deleted successfully. Failure Status otherwise.
41 public Status deleteBridgeDomain(Node node, String bridgeIdentifier);
44 * Returns the configured Bridge Domains
46 * @param node Node serving this configuration service
47 * @return List of Bridge Domain Identifiers
49 public List<String> getBridgeDomains(Node node);
52 * add Bridge Domain Configuration
54 * @param node Node serving this configuration service
55 * @param bridgeIdentifier String representation of a Bridge Domain
56 * @param params Map representation of config Name (ConfigConstants) and config value(represented as Object).
57 * @return Status.StatusCode.SUCCESS if bridge domain configuration is added successfully. Failure Status otherwise.
58 * @note This method will return false if one or more of the supplied params is not supported by the
59 * protocol plugin that serves the Node.
61 public Status addBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params);
64 * Delete Bridge Domain Configuration
66 * @param node Node serving this configuration service
67 * @param bridgeIdentifier String representation of a Bridge Domain
68 * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
69 * @return Status.StatusCode.SUCCESS if bridge domain configuration is deleted successfully. Failure Status otherwise.
70 * @note This method will return false if one or more of the supplied params is not supported by the
71 * protocol plugin that serves the Node.
73 public Status removeBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params);
76 * Returns Bridge Domain Configurations
78 * @param node Node serving this configuration service
79 * @param bridgeIdentifier String representation of a Bridge Domain
80 * @return Map representation of config Name (ConfigConstants) and config value(represented as Object).
83 public Map<ConfigConstants, Object> getBridgeDomainConfigs(Node node, String bridgeIdentifier);
86 * Returns a Node dedicated to a Bridge Domain (if available) that is created using createBridgeDomain.
87 * @param configNode Node serving this configuration service.
88 * @param bridgeIdentifier Name of the bridge domain that would map to a dedicated Node
89 * @return Node dedicated to a bridge domain that is created using createBridgeDomain.
90 * returns null if there is no such dedicated node is available or represented.
92 public Node getBridgeDomainNode(Node configNode, String bridgeIdentifier);
95 * Add a port to a bridge domain
97 * @param node Node serving this configuration service
98 * @param bridgeIdentifier String representation of a Bridge Domain
99 * @param portIdentifier String representation of a Port.
100 * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
101 * @return Status.StatusCode.SUCCESS if a port is added successfully. Failure Status otherwise.
102 * @note This method will return false if one or more of the supplied params is not supported by the
103 * protocol plugin that serves the Node.
105 public Status addPort(Node node, String bridgeIdentifier, String portIdentifier,
106 Map<ConfigConstants, Object> params);
109 * Delete a Port from a bridge domain
111 * @param node Node serving this configuration service
112 * @param bridgeIdentifier String representation of a Bridge Domain
113 * @param portIdentifier String representation of a Port.
114 * @return Status.StatusCode.SUCCESS if a port is added successfully. Failure Status otherwise.
116 public Status deletePort(Node node, String bridgeIdentifier, String portIdentifier);
119 * add Port Configuration
121 * @param node Node serving this configuration service
122 * @param bridgeIdentifier String representation of a Bridge Domain
123 * @param portIdentifier String representation of a Port.
124 * @param params Map representation of config name (ConfigConstants) and Parameter value (represented as Object).
125 * @return Status.StatusCode.SUCCESS if a port configuration is added successfully. Failure Status otherwise.
126 * @note This method will return false if one or more of the supplied params is not supported by the
127 * protocol plugin that serves the Node.
129 public Status addPortConfig(Node node, String bridgeIdentifier, String portIdentifier,
130 Map<ConfigConstants, Object> params);
133 * Delete Port Configuration
135 * @param node Node serving this configuration service
136 * @param portIdentifier String representation of a Port.
137 * @param config Map representation of ConfigName and Configuration Value in Strings.
138 * @return Status.StatusCode.SUCCESS if a port configuration is removed successfully. Failure Status otherwise.
139 * @note This method will return false if one or more of the supplied params is not supported by the
140 * protocol plugin that serves the Node.
142 public Status removePortConfig(Node node, String bridgeIdentifier, String portIdentifier, Map<ConfigConstants, Object> params);
145 * Returns Port Configurations
147 * @param node Node serving this configuration service
148 * @param bridgeIdentifier String representation of a Bridge Domain
149 * @param portIdentifier String representation of a Port.
150 * @return Map representation of Configuration Name (ConfigConstants) and Configuration value (represented as Object).
152 public Map<ConfigConstants, Object> getPortConfigs(Node node, String bridgeIdentifier, String portIdentifier);
156 * Returns a NodeConnector mapped to a Port (if available) that is created using addPort.
157 * @param configNode Node serving this configuration service.
158 * @param bridgeIdentifier Name of the bridge domain that would map to a dedicated Node
159 * @param portIdentifier String representation of a Port.
160 * @return NodeConnector that is mapped to a port created using addPort.
161 * returns null if there is no such nodeConnector is available or mapped.
163 public NodeConnector getNodeConnector(Node configNode, String bridgeIdentifier, String portIdentifier);