Bug fix for new mapping table. 89/20389/1
authorThomas Bachman <tbachman@yahoo.com>
Thu, 14 May 2015 14:34:44 +0000 (10:34 -0400)
committerThomas Bachman <tbachman@yahoo.com>
Thu, 14 May 2015 14:34:44 +0000 (10:34 -0400)
The new mapping table needs to have the parent
nodes created.  This adds the true flag to cause
that to happen in the puts to the data store.

Change-Id: I2fe7477bc9c93d74a36c81213a1b3fac44636f6e
Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
neutron-mapper/src/main/java/org/opendaylight/groupbasedpolicy/neutron/mapper/mapping/NeutronPortAware.java

index a14e4d0a10022514f4e3a60f00766562a202356b..45fdaa65e50306063415429dcce9f895adca0eaf 100644 (file)
@@ -201,10 +201,10 @@ public class NeutronPortAware implements INeutronPortAware {
         EndpointKey epKey = new EndpointKey(fwCtx.getL2BridgeDomain().getId(), new MacAddress(port.getMacAddress()));
         UniqueId portId = new UniqueId(port.getID());
         EndpointByPort endpointByPort = createEndpointByPort(epKey, portId);
-        rwTx.put(LogicalDatastoreType.OPERATIONAL, IidFactory.endpointByPortIid(portId), endpointByPort);
+        rwTx.put(LogicalDatastoreType.OPERATIONAL, IidFactory.endpointByPortIid(portId), endpointByPort, true);
         PortByEndpoint portByEndpoint = createPortByEndpoint(portId, epKey);
         rwTx.put(LogicalDatastoreType.OPERATIONAL,
-                IidFactory.portByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), portByEndpoint);
+                IidFactory.portByEndpointIid(epKey.getL2Context(), epKey.getMacAddress()), portByEndpoint, true);
 
         try {
             RegisterEndpointInput registerEpRpcInput = createRegisterEndpointInput(port, fwCtx);