Search in sources :

Example 1 with BarrootKey

use of org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.BarrootKey in project controller by opendaylight.

the class Bug2562DeserializedUnkeyedListTest method writeRoot.

private void writeRoot(final LogicalDatastoreType store) {
    final ReadWriteTransaction readWriteTransaction = getDataBroker().newReadWriteTransaction();
    final Barroot barRoot = new BarrootBuilder().setType(2).setValue(2).setKey(new BarrootKey(2)).build();
    final ArrayList<Barroot> barRootList = new ArrayList<>();
    barRootList.add(barRoot);
    final Fooroot fooRoot = new FoorootBuilder().setBarroot(barRootList).build();
    final ArrayList<Fooroot> fooRootList = new ArrayList<>();
    fooRootList.add(fooRoot);
    final Root root = new RootBuilder().setFooroot(fooRootList).build();
    readWriteTransaction.put(store, ROOT_PATH, root);
    assertCommit(readWriteTransaction.submit());
}
Also used : RootBuilder(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.RootBuilder) Root(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root) Fooroot(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.Fooroot) Barroot(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.Barroot) ArrayList(java.util.ArrayList) BarrootBuilder(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.BarrootBuilder) ReadWriteTransaction(org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction) BarrootKey(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.BarrootKey) FoorootBuilder(org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.FoorootBuilder)

Aggregations

ArrayList (java.util.ArrayList)1 ReadWriteTransaction (org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction)1 Root (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.Root)1 RootBuilder (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.RootBuilder)1 Fooroot (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.Fooroot)1 FoorootBuilder (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.FoorootBuilder)1 Barroot (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.Barroot)1 BarrootBuilder (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.BarrootBuilder)1 BarrootKey (org.opendaylight.yang.gen.v1.opendaylight.test.bug._2562.namespace.rev160101.root.fooroot.BarrootKey)1