Search in sources :

Example 1 with ListenerTestBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.ListenerTestBuilder in project controller by opendaylight.

the class Bug4513Test method writeListItem.

private ListItem writeListItem() {
    WriteTransaction writeTransaction = getDataBroker().newWriteOnlyTransaction();
    final ListItem item = new ListItemBuilder().setSip("name").setOp(43L).build();
    ListenerTestBuilder builder = new ListenerTestBuilder().setListItem(Arrays.asList(item));
    writeTransaction.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(ListenerTest.class).build(), builder.build());
    assertCommit(writeTransaction.submit());
    return item;
}
Also used : WriteTransaction(org.opendaylight.controller.md.sal.binding.api.WriteTransaction) ListenerTestBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.ListenerTestBuilder) ListItemBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.listener.test.ListItemBuilder) ListItem(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.listener.test.ListItem)

Aggregations

WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)1 ListenerTestBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.ListenerTestBuilder)1 ListItem (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.listener.test.ListItem)1 ListItemBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.listener.rev150825.listener.test.ListItemBuilder)1