use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.StaleFlowBuilder in project openflowplugin by opendaylight.
the class FlowListenerTest method staleMarkedFlowCreationTest.
@Test
public void staleMarkedFlowCreationTest() throws Exception {
addFlowCapableNode(NODE_KEY);
StaleFlowKey flowKey = new StaleFlowKey(new FlowId("stale_Flow"));
InstanceIdentifier<Table> tableII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY).augmentation(FlowCapableNode.class).child(Table.class, tableKey);
InstanceIdentifier<StaleFlow> flowII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY).augmentation(FlowCapableNode.class).child(Table.class, tableKey).child(StaleFlow.class, flowKey);
Table table = new TableBuilder().setKey(tableKey).setStaleFlow(Collections.<StaleFlow>emptyList()).build();
StaleFlow flow = new StaleFlowBuilder().setKey(flowKey).setTableId((short) 2).build();
WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
writeTx.put(LogicalDatastoreType.CONFIGURATION, tableII, table);
writeTx.put(LogicalDatastoreType.CONFIGURATION, flowII, flow);
assertCommit(writeTx.submit());
}
Aggregations