Remove plugin dependencies
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / impl / TenantNetworkManagerImpl.java
index 37604285bcc51c302f1ce6ca24337c0b7f177336..9012e79e0a7f2645e1cd19d0f2abec88b443e3fe 100644 (file)
@@ -16,11 +16,10 @@ import org.opendaylight.neutron.spi.NeutronPort;
 import org.opendaylight.ovsdb.lib.notation.OvsdbSet;
 import org.opendaylight.ovsdb.lib.notation.Row;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Constants;
+import org.opendaylight.ovsdb.openstack.netvirt.api.MdsalConsumer;
 import org.opendaylight.ovsdb.openstack.netvirt.api.NetworkingProviderManager;
 import org.opendaylight.ovsdb.openstack.netvirt.api.TenantNetworkManager;
 import org.opendaylight.ovsdb.openstack.netvirt.api.VlanConfigurationCache;
-import org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService;
-import org.opendaylight.ovsdb.plugin.api.OvsdbConnectionService;
 import org.opendaylight.ovsdb.schema.openvswitch.Interface;
 import org.opendaylight.ovsdb.schema.openvswitch.Port;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
@@ -36,8 +35,9 @@ public class TenantNetworkManagerImpl implements TenantNetworkManager {
     static final Logger logger = LoggerFactory.getLogger(TenantNetworkManagerImpl.class);
 
     // The implementation for each of these services is resolved by the OSGi Service Manager
-    private volatile OvsdbConfigurationService ovsdbConfigurationService;
-    private volatile OvsdbConnectionService connectionService;
+    //private volatile OvsdbConfigurationService ovsdbConfigurationService;
+    //private volatile OvsdbConnectionService connectionService;
+    private volatile MdsalConsumer mdsalConsumer;
     private volatile INeutronNetworkCRUD neutronNetworkCache;
     private volatile INeutronPortCRUD neutronPortCache;
     private volatile VlanConfigurationCache vlanConfigurationCache;
@@ -64,6 +64,7 @@ public class TenantNetworkManagerImpl implements TenantNetworkManager {
 
     @Override
     public void programInternalVlan(Node node, String portUUID, NeutronNetwork network) {
+        /* TODO SB_MIGRATION
         Preconditions.checkNotNull(ovsdbConfigurationService);
 
         int vlan = vlanConfigurationCache.getInternalVlan(node, network.getID());
@@ -78,10 +79,12 @@ public class TenantNetworkManagerImpl implements TenantNetworkManager {
         tags.add((long) vlan);
         port.setTag(tags);
         ovsdbConfigurationService.updateRow(node, port.getSchema().getName(), null, portUUID, port.getRow());
+        */
     }
 
     @Override
     public boolean isTenantNetworkPresentInNode(Node node, String segmentationId) {
+        /* TODO SB_MIGRATION
         Preconditions.checkNotNull(ovsdbConfigurationService);
 
         String networkId = this.getNetworkId(segmentationId);
@@ -89,9 +92,9 @@ public class TenantNetworkManagerImpl implements TenantNetworkManager {
             logger.debug("Tenant Network not found with Segmenation-id {}",segmentationId);
             return false;
         }
-
-        try {
-            /*
+        */
+        /*try {*/
+            /* TODO SB_MIGRATION this code was already commented out
             // Vlan Tag based identification
             Map<String, Row> portTable = ovsdbConfigService.getRows(node, Port.NAME.getName());
             if (portTable == null) {
@@ -108,8 +111,8 @@ public class TenantNetworkManagerImpl implements TenantNetworkManager {
                     return true;
                 }
             }
-             */
-            // External-id based more accurate VM Location identification
+             */ //TODO SB_MIGRATION this code was already commented out
+            /*// External-id based more accurate VM Location identification
             Map<String, Row> ifTable = ovsdbConfigurationService.getRows(node, ovsdbConfigurationService.getTableName(node, Interface.class));
             if (ifTable == null) {
                 logger.debug("Interface table is null for Node {} ", node);
@@ -135,7 +138,7 @@ public class TenantNetworkManagerImpl implements TenantNetworkManager {
 
         logger.debug("Tenant Network {} with Segmenation-id {} is NOT present in Node {}",
                 networkId, segmentationId, node);
-
+*/
         return false;
     }