Added VLAN tagging support to port creations
[ovsdb.git] / ovsdb / src / test / java / org / opendaylight / ovsdb / OvsdbTestAddPort.java
index e0c150d9708cca2cd7aa06efb92985c40d070d89..d7ce714ad76a690c969e191f8e1b4d7811cf9347 100755 (executable)
@@ -1,18 +1,15 @@
 package org.opendaylight.ovsdb;
 
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
 import org.junit.Test;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.core.NodeConnector;
-import org.opendaylight.ovsdb.database.Uuid;
-import org.opendaylight.ovsdb.internal.*;
+import org.opendaylight.ovsdb.internal.ConfigurationService;
+import org.opendaylight.ovsdb.internal.ConnectionService;
 import org.opendaylight.ovsdb.sal.connection.ConnectionConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import java.util.HashMap;
+import java.util.Map;
 
 public class OvsdbTestAddPort {
     private static final Logger logger = LoggerFactory
@@ -27,7 +24,7 @@ public class OvsdbTestAddPort {
         connectionService.init();
         String identifier = "TEST";
         Map<ConnectionConstants, String> params = new HashMap<ConnectionConstants, String>();
-        params.put(ConnectionConstants.ADDRESS, "192.168.56.101");
+        params.put(ConnectionConstants.ADDRESS, "172.16.58.170");
 
         Node node = connectionService.connect(identifier, params);
         if(node == null){
@@ -35,14 +32,14 @@ public class OvsdbTestAddPort {
             return;
         }
         /**
-         * Create a Bridge Domain
+         * Create a Port and attach it to a Bridge
+         * Ex. ovs-vsctl add-port br0 vif0
          * @param node Node serving this configuration service
          * @param bridgeDomainIdentifier String representation of a Bridge Domain
          * @param portIdentifier String representation of a user defined Port Name
-         * Temporarily add the bridge table _uuid to bridge_uuid in ConfigurationService
          */
         ConfigurationService configurationService = new ConfigurationService();
         configurationService.setConnectionServiceInternal(connectionService);
-        configurationService.addPort(node, "JUNIT_BRIDGE_TEST", "Jnic1");
+        configurationService.addPort(node, "JUNIT_BRIDGE_TEST", "Jvif0");
     }
 }
\ No newline at end of file