Added the missing Copyright headers to most of the java files.
[ovsdb.git] / ovsdb / src / test / java / org / opendaylight / ovsdb / plugin / OvsdbTestBridgeConfigIT.java
1 /*
2  * [[ Authors will Fill in the Copyright header ]]
3  *
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
7  *
8  * Authors : Brent Salisbury, Hugo Trippaers
9  */
10 package org.opendaylight.ovsdb.plugin;
11
12 import java.util.HashMap;
13 import java.util.Map;
14
15 import org.junit.Test;
16 import org.opendaylight.controller.sal.core.Node;
17 import org.opendaylight.controller.sal.networkconfig.bridgedomain.ConfigConstants;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20
21 import com.google.gson.internal.Pair;
22
23 public class OvsdbTestBridgeConfigIT extends OvsdbTestBase {
24     private static final Logger logger = LoggerFactory
25             .getLogger(OvsdbTestSetManagerIT.class);
26
27     @Test
28     public void setBridgeConfig() throws Throwable{
29         Pair<ConnectionService, Node> connection = getTestConnection();
30         ConnectionService connectionService = connection.first;
31         Node node = connection.second;
32
33         Map<ConfigConstants, Object> configs = new HashMap<ConfigConstants, Object>();
34
35         Map<String, String> exterIDPairs = new HashMap<String, String>();
36         exterIDPairs.put("bridge-foo", "bri-bar");
37         //Will accept multiple array pairs. Pairs must be arrays not maps.
38         configs.put(ConfigConstants.CUSTOM, exterIDPairs);
39
40         ConfigurationService configurationService = new ConfigurationService();
41         configurationService.setConnectionServiceInternal(connectionService);
42         configurationService.addBridgeDomainConfig(node, "br0", configs);
43     }
44
45 }