use of org.opendaylight.netvirt.aclservice.utils.AclNodeDefaultFlowsTxBuilder in project netvirt by opendaylight.
the class AclNodeListener method add.
@Override
protected void add(InstanceIdentifier<FlowCapableNode> key, FlowCapableNode dataObjectModification) {
NodeKey nodeKey = key.firstKeyOf(Node.class);
BigInteger dpId = MDSALUtil.getDpnIdFromNodeName(nodeKey.getId());
LOG.info("Received ACL node [{}] add event", dpId);
if (securityGroupMode != null && securityGroupMode != SecurityGroupMode.Stateful) {
LOG.error("Invalid security group mode ({}) obtained from AclserviceConfig. dpId={}", securityGroupMode, dpId);
return;
}
jobCoordinator.enqueueJob(String.valueOf(dpId), () -> Collections.singletonList(txRunner.callWithNewWriteOnlyTransactionAndSubmit(tx -> {
new AclNodeDefaultFlowsTxBuilder(dpId, mdsalManager, config, tx).build();
LOG.info("Adding default ACL flows for dpId={}", dpId);
})), AclConstants.JOB_MAX_RETRIES);
LOG.trace("FlowCapableNode (dpid: {}) add event is processed.", dpId);
}
Aggregations