Changing of IidFactory 10/21210/1
authorMartin Sunal <msunal@cisco.com>
Wed, 27 May 2015 14:09:15 +0000 (16:09 +0200)
committerMartin Sunal <msunal@cisco.com>
Wed, 27 May 2015 14:09:15 +0000 (16:09 +0200)
- solves compilation error

Signed-off-by: Martin Sunal <msunal@cisco.com>
neutron-mapper/src/main/java/org/opendaylight/groupbasedpolicy/neutron/mapper/mapping/NeutronFloatingIpAware.java
neutron-mapper/src/main/java/org/opendaylight/groupbasedpolicy/neutron/mapper/mapping/NeutronPortAware.java

index c90d7d34833bfbc86d3ec145f2a20e790e2c36f3..2b5a26ba6f98b8bb529b322ade3a70c2ee660792 100644 (file)
@@ -5,7 +5,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.groupbasedpolicy.neutron.mapper.util.IidFactory;
+import org.opendaylight.groupbasedpolicy.neutron.gbp.util.NeutronGbpIidFactory;
 import org.opendaylight.groupbasedpolicy.neutron.mapper.util.Utils;
 import org.opendaylight.groupbasedpolicy.util.DataStoreHelper;
 import org.opendaylight.neutron.spi.INeutronFloatingIPAware;
@@ -69,9 +69,9 @@ public class NeutronFloatingIpAware implements INeutronFloatingIPAware {
         if ((!oldFixedIPAddress.isEmpty() && newFixedIPAddress.isEmpty())
                 || (!oldPortUUID.isEmpty() && newPortUUID.isEmpty())) {
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.internalPortByFloatingIpPortIid(floatingIpPortId), rwTx);
+                    NeutronGbpIidFactory.internalPortByFloatingIpPortIid(floatingIpPortId), rwTx);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.floatingIpPortByInternalPortIid(new UniqueId(oldPortUUID)), rwTx);
+                    NeutronGbpIidFactory.floatingIpPortByInternalPortIid(new UniqueId(oldPortUUID)), rwTx);
             // TODO unregister EP representing floating ip port
         } else if (!newFixedIPAddress.isEmpty() && !newPortUUID.isEmpty()) {
             // workaround for https://bugs.opendaylight.org/show_bug.cgi?id=3368
@@ -89,9 +89,9 @@ public class NeutronFloatingIpAware implements INeutronFloatingIPAware {
                 .setInternalPortId(internalPortId)
                 .setInternalPortIpAddress(Utils.createIpAddress(newFixedIPAddress))
                 .build();
-            rwTx.put(LogicalDatastoreType.OPERATIONAL, IidFactory.internalPortByFloatingIpPortIid(floatingIpPortId),
+            rwTx.put(LogicalDatastoreType.OPERATIONAL, NeutronGbpIidFactory.internalPortByFloatingIpPortIid(floatingIpPortId),
                     internalPortByFloatingIpPort, true);
-            rwTx.put(LogicalDatastoreType.OPERATIONAL, IidFactory.floatingIpPortByInternalPortIid(internalPortId),
+            rwTx.put(LogicalDatastoreType.OPERATIONAL, NeutronGbpIidFactory.floatingIpPortByInternalPortIid(internalPortId),
                     new FloatingIpPortByInternalPortBuilder(internalPortByFloatingIpPort).build(), true);
         }
         boolean isSubmitToDsSuccessful = DataStoreHelper.submitToDs(rwTx);
index 5970f5a6856d7cd451f05087dd267b02c8dd7a6b..63523e1b8b34e04eaaf1620b1d834cc5a66afa87 100644 (file)
@@ -254,11 +254,11 @@ public class NeutronPortAware implements INeutronPortAware {
         } else if (isFloatingIpPort(port)) {
             LOG.trace("Adding FloatingIpPort-Endpoint mapping for port {} and endpoint {}", port.getID(), epKey);
             EndpointByFloatingIpPort endpointByPort = MappingFactory.createEndpointByFloatingIpPort(epKey, portId);
-            rwTx.put(LogicalDatastoreType.OPERATIONAL, IidFactory.endpointByFloatingIpPortIid(portId),
+            rwTx.put(LogicalDatastoreType.OPERATIONAL, NeutronGbpIidFactory.endpointByFloatingIpPortIid(portId),
                     endpointByPort, true);
             FloatingIpPortByEndpoint portByEndpoint = MappingFactory.createFloatingIpPortByEndpoint(portId, epKey);
             rwTx.put(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.floatingIpPortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()),
+                    NeutronGbpIidFactory.floatingIpPortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()),
                     portByEndpoint, true);
         } else {
             LOG.trace("Adding Port-Endpoint mapping for port {} (device owner {}) and endpoint {}", port.getID(),
@@ -616,27 +616,27 @@ public class NeutronPortAware implements INeutronPortAware {
         if (isRouterInterfacePort(port)) {
             LOG.trace("Adding RouterInterfacePort-Endpoint mapping for port {} and endpoint {}", port.getID(), epKey);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.endpointByRouterInterfacePortIid(portId), rwTx);
+                    NeutronGbpIidFactory.endpointByRouterInterfacePortIid(portId), rwTx);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.routerInterfacePortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
+                    NeutronGbpIidFactory.routerInterfacePortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
         } else if (isRouterGatewayPort(port)) {
             LOG.trace("Adding RouterGatewayPort-Endpoint mapping for port {} and endpoint {}", port.getID(), epKey);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.endpointByRouterGatewayPortIid(portId), rwTx);
+                    NeutronGbpIidFactory.endpointByRouterGatewayPortIid(portId), rwTx);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.routerGatewayPortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
+                    NeutronGbpIidFactory.routerGatewayPortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
         } else if (isFloatingIpPort(port)) {
             LOG.trace("Adding FloatingIpPort-Endpoint mapping for port {} and endpoint {}", port.getID(), epKey);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.endpointByFloatingIpPortIid(portId), rwTx);
+                    NeutronGbpIidFactory.endpointByFloatingIpPortIid(portId), rwTx);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.floatingIpPortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
+                    NeutronGbpIidFactory.floatingIpPortByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
         } else {
             LOG.trace("Adding Port-Endpoint mapping for port {} (device owner {}) and endpoint {}", port.getID(),
                     port.getDeviceOwner(), epKey);
-            DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL, IidFactory.endpointByPortIid(portId), rwTx);
+            DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL, NeutronGbpIidFactory.endpointByPortIid(portId), rwTx);
             DataStoreHelper.removeIfExists(LogicalDatastoreType.OPERATIONAL,
-                    IidFactory.portByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
+                    NeutronGbpIidFactory.portByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), rwTx);
         }
     }