Remove plugin dependencies
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / impl / VlanConfigurationCacheImpl.java
index 767be4625c92e6ac8e0423de5b465ff11573946f..ee1dc7fc66ae45c5e1bbdb005aef1b17f35a8e02 100644 (file)
@@ -14,9 +14,9 @@ package org.opendaylight.ovsdb.openstack.netvirt.impl;
 import org.opendaylight.ovsdb.lib.notation.Row;
 import org.opendaylight.ovsdb.lib.notation.UUID;
 import org.opendaylight.ovsdb.openstack.netvirt.NodeConfiguration;
+import org.opendaylight.ovsdb.openstack.netvirt.api.MdsalConsumer;
 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.schema.openvswitch.Interface;
 import org.opendaylight.ovsdb.schema.openvswitch.OpenVSwitch;
 import org.opendaylight.ovsdb.schema.openvswitch.Port;
@@ -36,7 +36,8 @@ public class VlanConfigurationCacheImpl implements VlanConfigurationCache {
     private Map<String, NodeConfiguration> configurationCache = Maps.newConcurrentMap();
 
     private volatile TenantNetworkManager tenantNetworkManager;
-    private volatile OvsdbConfigurationService ovsdbConfigurationService;
+    //private volatile OvsdbConfigurationService ovsdbConfigurationService;
+    private volatile MdsalConsumer mdsalConsumer; // TODO SB_MIGRATION
 
     private NodeConfiguration getNodeConfiguration(Node node){
         String nodeUuid = getNodeUUID(node);
@@ -51,21 +52,24 @@ public class VlanConfigurationCacheImpl implements VlanConfigurationCache {
     }
 
     private String getNodeUUID(Node node) {
+        String nodeUuid = mdsalConsumer.getNodeUUID(node);
+        /* TODO SB_MIGRATION
         Preconditions.checkNotNull(ovsdbConfigurationService);
         String nodeUuid = new String();
+
         try {
             Map<String, Row> ovsTable = ovsdbConfigurationService.getRows(node, ovsdbConfigurationService.getTableName(node, OpenVSwitch.class));
             nodeUuid = (String)ovsTable.keySet().toArray()[0];
         }
         catch (Exception e) {
             logger.error("Unable to get the Open_vSwitch table for Node {}", node, e);
-        }
+        }*/
 
         return nodeUuid;
     }
 
     private void initializeNodeConfiguration(String nodeUuid, Node node) {
-
+        /* TODO SB_MIGRATION
         NodeConfiguration nodeConfiguration = new NodeConfiguration();
         Integer vlan;
         String networkId = null;
@@ -123,7 +127,7 @@ public class VlanConfigurationCacheImpl implements VlanConfigurationCache {
         }
         catch (Exception e) {
             logger.debug("Error getting Port table for Node {}", node, e);
-        }
+        }*/
     }
 
     /*