import org.opendaylight.groupbasedpolicy.neutron.mapper.util.SubnetUtils;
import org.opendaylight.groupbasedpolicy.util.DataStoreHelper;
import org.opendaylight.groupbasedpolicy.util.IidFactory;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.common.endpoint.fields.NetworkContainmentBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.base_endpoint.rev160427.common.endpoint.fields.network.containment.containment.NetworkDomainContainmentBuilder;
l3ContextBuilder.setName(name);
}
L3Context l3Context = l3ContextBuilder.setId(l3ContextId).build();
- wTx.put(LogicalDatastoreType.CONFIGURATION, IidFactory.l3ContextIid(tenantId, l3ContextId), l3Context);
+ wTx.put(LogicalDatastoreType.CONFIGURATION, IidFactory.l3ContextIid(tenantId, l3ContextId), l3Context, true);
}
@Override
L2L3IidFactory.l2BridgeDomainIid(tenantId, l2BdId), rwTx);
if (!optBd.isPresent()) {
LOG.warn(
- "Could not read L2-Bridge-Domain {} Modifiaction of it's parent to L3-Context of router {} aborted.",
+ "Could not read L2-Bridge-Domain {}. Modification of its parent to L3-Context of router {} aborted.",
l2BdId, newRouter.getUuid());
rwTx.cancel();
return;
l3Context = optL3Context.get();
} else { // add L3 context if missing
l3Context = createL3CtxFromRouter(newRouter);
- rwTx.put(LogicalDatastoreType.CONFIGURATION, l3ContextIid, l3Context);
+ rwTx.put(LogicalDatastoreType.CONFIGURATION, l3ContextIid, l3Context, true);
}
if (newRouter.getGatewayPortId() != null && oldRouter.getGatewayPortId() == null) {
return;
}
IpAddress gatewayIp = potentialSubnet.get().getGatewayIp();
+ NetworkDomainId networkContainment = new NetworkDomainId(ipWithSubnetFromGwPort.getSubnetId().getValue());
boolean registeredExternalGateway = epRegistrator.registerL3EpAsExternalGateway(tenantId, gatewayIp,
- l3ContextId, new NetworkDomainId(ipWithSubnetFromGwPort.getSubnetId().getValue()));
+ l3ContextId, networkContainment);
if (!registeredExternalGateway) {
LOG.warn("Could not add L3Prefix as gateway of default route. Gateway port {}", gwPort);
rwTx.cancel();
IidFactory.l2BridgeDomainIid(tenantId, l2BdId), rwTx);
if (!optBd.isPresent()) {
LOG.warn(
- "Could not read L2-Bridge-Domain {} Modifiaction of it's parent to L3-Context of router {} aborted.",
+ "Could not read L2-Bridge-Domain {}. Modification of its parent to L3-Context of router {} aborted.",
l2BdId, newRouter.getUuid());
rwTx.cancel();
return;