Merge "Cleaned up Integration Test setup" into topic/schema
[netvirt.git] / plugin / src / test / java / org / opendaylight / ovsdb / plugin / OvsdbTestDeletePortIT.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 org.junit.Test;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.slf4j.Logger;
15 import org.slf4j.LoggerFactory;
16
17 public class OvsdbTestDeletePortIT extends OvsdbTestBase {
18     private static final Logger logger = LoggerFactory
19             .getLogger(OvsdbTestAddPortIT.class);
20
21     @Test
22     public void deletePort() throws Throwable{
23         TestObjects testObjects = getTestConnection();
24         ConnectionService connectionService = testObjects.connectionService;
25         Node node = testObjects.node;
26
27         /**
28          * Deletes an existing port from an existing bridge
29          * Ex. ovs-vsctl del-port ovsbr0 tap0
30          * @param node Node serving this configuration service
31          * @param bridgeDomainIdentifier String representation of a Bridge Domain
32          * @param portIdentifier String representation of a user defined Port Name
33          */
34         ConfigurationService configurationService = new ConfigurationService();
35         configurationService.setConnectionServiceInternal(connectionService);
36         configurationService.deletePort(node, "ovsbr0", "tap2");
37     }
38 }