Added the missing Copyright headers to most of the java files.
[ovsdb.git] / ovsdb / src / test / java / org / opendaylight / ovsdb / plugin / OvsdbTestAddPortIT.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.io.IOException;
13 import java.util.Properties;
14
15 import org.junit.Before;
16 import org.junit.Test;
17 import org.opendaylight.controller.sal.core.Node;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20
21 import com.google.gson.internal.Pair;
22
23 public class OvsdbTestAddPortIT extends OvsdbTestBase {
24     private static final Logger logger = LoggerFactory
25             .getLogger(OvsdbTestAddPortIT.class);
26     private Properties props;
27
28     @Before
29     public void loadProps() throws IOException {
30         props = loadProperties();
31     }
32
33     @Test
34     public void addPort() throws Throwable{
35         Pair<ConnectionService, Node> connection = getTestConnection();
36         ConnectionService connectionService = connection.first;
37         Node node = connection.second;
38
39         /**
40          * Create a Port and attach it to a Bridge
41          * Ex. ovs-vsctl add-port br0 vif0
42          * @param node Node serving this configuration service
43          * @param bridgeDomainIdentifier String representation of a Bridge Domain
44          * @param portIdentifier String representation of a user defined Port Name
45          */
46         ConfigurationService configurationService = new ConfigurationService();
47         configurationService.setConnectionServiceInternal(connectionService);
48         configurationService.addPort(node, "JUNIT_BRIDGE_TEST", "Jvif0", null);
49     }
50 }