@Deprecated
private void removeTenantNetworkDomains(Network network, TenantId tenantId, ReadWriteTransaction rwTx) {
L2FloodDomainId l2FdId = new L2FloodDomainId(network.getUuid().getValue());
Optional<L2FloodDomain> potentialL2Fd = DataStoreHelper.removeIfExists(LogicalDatastoreType.CONFIGURATION,
IidFactory.l2FloodDomainIid(tenantId, l2FdId), rwTx);
if (!potentialL2Fd.isPresent()) {
LOG.warn("Illegal state - l2-flood-domain {} does not exist.", l2FdId.getValue());
return;
}
L2BridgeDomainId l2BdId = new L2BridgeDomainId(l2FdId);
Optional<L2BridgeDomain> potentialL2Bd = DataStoreHelper.removeIfExists(LogicalDatastoreType.CONFIGURATION,
IidFactory.l2BridgeDomainIid(tenantId, l2BdId), rwTx);
if (!potentialL2Bd.isPresent()) {
LOG.warn("Illegal state - l2-bridge-domain {} does not exist.", l2BdId.getValue());
return;
}
L3ContextId l3CtxId = new L3ContextId(l2FdId);
Optional<L3Context> potentialL3Ctx = DataStoreHelper.removeIfExists(LogicalDatastoreType.CONFIGURATION,
IidFactory.l3ContextIid(tenantId, l3CtxId), rwTx);
if (!potentialL3Ctx.isPresent()) {
LOG.warn("Illegal state - l3-context {} does not exist.", l3CtxId.getValue());
return;
}
}
}