Update MRI projects for Aluminium
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / SouthboundUtil.java
index 378ac16d8a6ff6b2ca4c8e9d3b1bd1c5e1281e00..12c9275bf275c4eca47b7c44ef4d2b4333fbe5f1 100644 (file)
@@ -16,7 +16,6 @@ import java.net.SocketException;
 import java.util.Enumeration;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
-
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.ReadTransaction;
 import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
@@ -37,10 +36,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public final class SouthboundUtil {
-
     private static final Logger LOG = LoggerFactory.getLogger(SouthboundUtil.class);
     private static final String SCHEMA_VERSION_MISMATCH =
             "{} column for {} table is not supported by this version of the {} schema: {}";
+    private static final InterfaceExternalIds INTERACE_CREATED_BY_OPENDAYLIGHT = createExternalIdsForInterface(
+        SouthboundConstants.CREATED_BY, SouthboundConstants.ODL);
+    private static final PortExternalIds PORT_CREATED_BY_OPENDAYLIGHT = createExternalIdsForPort(
+        SouthboundConstants.CREATED_BY, SouthboundConstants.ODL);
 
     private SouthboundUtil() {
         // Prevent instantiating a utility class
@@ -190,6 +192,14 @@ public final class SouthboundUtil {
             .setExternalIdValue(value).build();
     }
 
+    public static InterfaceExternalIds interfaceCreatedByOpenDaylight() {
+        return INTERACE_CREATED_BY_OPENDAYLIGHT;
+    }
+
+    public static PortExternalIds portCreatedByOpenDaylight() {
+        return PORT_CREATED_BY_OPENDAYLIGHT;
+    }
+
     @SuppressWarnings("checkstyle:IllegalCatch")
     public static String getOvsdbNodeId(InstanceIdentifier<Node> nodeIid) {
         String nodeId = "";