use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey in project genius by opendaylight.
the class MDSALManager method deleteFlowEntityInternal.
public void deleteFlowEntityInternal(FlowEntity flowEntity, WriteTransaction tx) {
BigInteger dpId = flowEntity.getDpnId();
short tableId = flowEntity.getTableId();
FlowKey flowKey = new FlowKey(new FlowId(flowEntity.getFlowId()));
deleteFlow(dpId, tableId, flowKey, tx);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey in project genius by opendaylight.
the class MDSALManager method writeFlowEntityInternal.
public void writeFlowEntityInternal(FlowEntity flowEntity, WriteTransaction tx) {
FlowKey flowKey = new FlowKey(new FlowId(flowEntity.getFlowId()));
FlowBuilder flowbld = flowEntity.getFlowBuilder();
InstanceIdentifier<Flow> flowInstanceId = buildFlowInstanceIdentifier(flowEntity.getDpnId(), flowEntity.getTableId(), flowKey);
tx.put(LogicalDatastoreType.CONFIGURATION, flowInstanceId, flowbld.build(), true);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey in project genius by opendaylight.
the class FlowBasedServicesUtils method removeEgressDispatcherFlow.
private static void removeEgressDispatcherFlow(BigInteger dpId, String iface, WriteTransaction writeTransaction, short currentServiceIndex) {
// build the flow and install it
String flowRef = getFlowRef(dpId, NwConstants.EGRESS_LPORT_DISPATCHER_TABLE, iface, currentServiceIndex);
FlowKey flowKey = new FlowKey(new FlowId(flowRef));
Node nodeDpn = buildInventoryDpnNode(dpId);
InstanceIdentifier<Flow> flowInstanceId = InstanceIdentifier.builder(Nodes.class).child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class).child(Table.class, new TableKey(NwConstants.EGRESS_LPORT_DISPATCHER_TABLE)).child(Flow.class, flowKey).build();
writeTransaction.delete(LogicalDatastoreType.CONFIGURATION, flowInstanceId);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey in project genius by opendaylight.
the class FlowBasedServicesUtils method removeEgressSplitHorizonDispatcherFlow.
public static void removeEgressSplitHorizonDispatcherFlow(BigInteger dpId, String iface, WriteTransaction writeTransaction) {
// BigInteger.ONE is used for checking the Split-Horizon flag
BigInteger shFlagSet = BigInteger.ONE;
String shFlowRef = getSplitHorizonFlowRef(dpId, NwConstants.EGRESS_LPORT_DISPATCHER_TABLE, iface, shFlagSet);
FlowKey shFlowKey = new FlowKey(new FlowId(shFlowRef));
Node nodeDpn = buildInventoryDpnNode(dpId);
InstanceIdentifier<Flow> shFlowInstanceId = InstanceIdentifier.builder(Nodes.class).child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class).child(Table.class, new TableKey(NwConstants.EGRESS_LPORT_DISPATCHER_TABLE)).child(Flow.class, shFlowKey).build();
writeTransaction.delete(LogicalDatastoreType.CONFIGURATION, shFlowInstanceId);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey in project genius by opendaylight.
the class FlowBasedServicesUtils method removeLPortDispatcherFlow.
public static void removeLPortDispatcherFlow(BigInteger dpId, String iface, BoundServices boundServicesOld, WriteTransaction writeTransaction, short currentServiceIndex) {
LOG.debug("Removing LPort Dispatcher Flows {}, {}", dpId, iface);
boundServicesOld.getAugmentation(StypeOpenflow.class);
// build the flow and install it
String flowRef = getFlowRef(dpId, NwConstants.LPORT_DISPATCHER_TABLE, iface, currentServiceIndex);
FlowKey flowKey = new FlowKey(new FlowId(flowRef));
Node nodeDpn = buildInventoryDpnNode(dpId);
InstanceIdentifier<Flow> flowInstanceId = InstanceIdentifier.builder(Nodes.class).child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class).child(Table.class, new TableKey(NwConstants.LPORT_DISPATCHER_TABLE)).child(Flow.class, flowKey).build();
writeTransaction.delete(LogicalDatastoreType.CONFIGURATION, flowInstanceId);
}
Aggregations