46350f367d338dd8d4a86ea4cf1acc4f8a30a219
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / sal / configuration / IPluginInNetworkConfigurationService.java
1 package org.opendaylight.ovsdb.sal.configuration;
2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.opendaylight.controller.sal.core.Node;
7
8 /**
9  * @file IPluginInConfigurationService.java
10  *
11  */
12 public interface IPluginInNetworkConfigurationService {
13
14     /**
15      * Create a Bridge Domain
16      *
17      * @param node Node serving this configuration service
18      * @param bridgeDomainIdentifier String representation of a Bridge Domain
19      */
20     public boolean createBridgeDomain(Node node, String bridgeIdentifier) throws Throwable;
21
22     /**
23      * Delete a Bridge Domain
24      *
25      * @param node Node serving this configuration service
26      * @param bridgeDomainIdentifier String representation of a Bridge Domain
27      */
28     public boolean deleteBridgeDomain(Node node, String bridgeIdentifier);
29
30     /**
31      * Returns the configured Bridge Domains
32      *
33      * @param node Node serving this configuration service
34      * @return Bridge Domains
35      */
36     public List<String> getBridgeDomains(Node node);
37
38     /**
39      * add Bridge Domain Configuration
40      *
41      * @param node Node serving this configuration service
42      * @param bridgeDomainIdentifier String representation of a Bridge Domain
43      * @param configs Map representation of ConfigName and Configuration Value in Strings.
44      */
45     public boolean addBridgeDomainConfig(Node node, String bridgeIdentifier, Map <String, String> config);
46
47     /**
48      * Delete Bridge Domain Configuration
49      *
50      * @param node Node serving this configuration service
51      * @param bridgeDomainIdentifier String representation of a Bridge Domain
52      * @param configs Map representation of ConfigName and Configuration Value in Strings.
53      */
54     public boolean removeBridgeDomainConfig(Node node, String bridgeIdentifier, Map <String, String> config);
55
56     /**
57      * Returns Bridge Domain Configurations
58      *
59      * @param node Node serving this configuration service
60      * @param bridgeDomainIdentifier String representation of a Bridge Domain
61      * @return Bridge Domain configurations
62      */
63
64     public Map <String, String> getBridgeDomainConfigs(Node node, String bridgeIdentifier);
65
66     /**
67      * Create a Bridge Connector
68      *
69      * @param node Node serving this configuration service
70      * @param bridgeConnectorIdentifier String representation of the node connector.
71      */
72     public boolean createBridgeConnector(Node node, String bridgeConnectorIdentifier);
73
74     /**
75      * Delete a Bridge Connector
76      *
77      * @param node Node serving this configuration service
78      * @param bridgeConnectorIdentifier String representation of the node connector.
79      */
80     public boolean deleteBridgeConnector(Node node, String bridgeConnectorIdentifier);
81
82     /**
83      * Add/Associate BridgeConnectors on a given Bridge Domain
84      *
85      * @param node Node serving this configuration service
86      * @param bridgeDomainIdentifier String representation of a Bridge Domain
87      * @param bridgeConnectorIdentifier String representation of the node connector.
88      */
89     public boolean associateBridgeConnector(Node node, String bridgeIdentifier, String bridgeConnectorIdentifier);
90
91     /**
92      * Add/Associate BridgeConnectors on a given Bridge Domain
93      *
94      * @param node Node serving this configuration service
95      * @param bridgeDomainIdentifier String representation of a Bridge Domain
96      * @param bridgeConnectorIdentifier String representation of the node connector.
97      */
98     public boolean disassociateBridgeConnector(Node node, String bridgeIdentifier, String bridgeConnectorIdentifier);
99
100     /**
101      * add Bridge Connector Configuration
102      *
103      * @param node Node serving this configuration service
104      * @param bridgeConnectorIdentifier String representation of the node connector.
105      * @param config Map representation of ConfigName and Configuration Value in Strings.
106      */
107     public boolean addBridgeConnectorConfig(Node node, String bridgeConnectorIdentifier, Map <String, String> config);
108
109     /**
110      * Delete Bridge Connector Configuration
111      *
112      * @param node Node serving this configuration service
113      * @param bridgeConnectorIdentifier String representation of the node connector.
114      * @param config Map representation of ConfigName and Configuration Value in Strings.
115      */
116     public boolean removeBridgeConnectorConfig(Node node, String bridgeConnectorIdentifier, Map <String, String> config);
117
118     /**
119      * Returns Bridge Connector Configurations
120      *
121      * @param node Node serving this configuration service
122      * @param bridgeConnectorIdentifier String representation of a Bridge Connector
123      * @return Bridge Connector configurations
124      */
125     public Map <String, String> getBridgeConnectorConfigs(Node node, String bridgeConnectorIdentifier);
126
127     /**
128      * Create a Port Attached to a Bridge
129      * Ex. ovs-vsctl add-port br0 vif0
130      * @param node Node serving this configuration service
131      * @param bridgeDomainIdentifier String representation of a Bridge Domain
132      * @param portIdentifier String representation of a user defined Port Name
133      */
134     public boolean addPort(Node node, String bridgeIdentifier, String portIdentifier) throws Throwable;
135
136     /**
137      * Create an Encapsulated Tunnel Interface and destination Tunnel Endpoint
138      * Ex. ovs-vsctl add-port br0 vxlan1 -- set interface vxlan1 type=vxlan options:remote_ip=192.168.1.11
139      * @param node Node serving this configuration service
140      * @param bridgeDomainIdentifier String representation of a Bridge Domain
141      * @param portIdentifier String representation of a user defined Port Name
142      * @param tunnelendpoint IP address of the destination Tunnel Endpoint
143      * @param tunencap is the tunnel encapsulation options being CAPWAP, GRE or VXLAN
144      * The Bridge must already be defined before calling addTunnel.
145      */
146     public boolean addTunnel(Node node, String bridgeIdentifier, String portIdentifier,
147             String TunnelEndPoint, String TunEncap) throws Throwable;
148
149     /**
150      * Generic Configuration Event/Command. It is not practically possible to define all the possible combinations
151      * of configurations across various plugins. Hence having a generic event/command will help bridge the gap until
152      * a more abstracted explicit call is defined in Configuration Service.
153      */
154     public Object genericConfigurationEvent(Node node, Map <String, String> config);
155 }