Search in sources :

Example 1 with PutTopInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.PutTopInputBuilder in project mdsal by opendaylight.

the class RpcDataSerializationTest method testRpcInputToNormalized.

@Test
public void testRpcInputToNormalized() {
    final PutTopInput bindingOriginal = new PutTopInputBuilder().setTopLevelList(ImmutableMap.of(LIST_KEY, new TopLevelListBuilder().withKey(LIST_KEY).build())).build();
    final ContainerNode dom = codecContext.toNormalizedNodeRpcData(bindingOriginal);
    assertNotNull(dom);
    assertEquals(PutTopInput.QNAME, dom.getIdentifier().getNodeType());
    final DataObject bindingDeserialized = codecContext.fromNormalizedNodeRpcData(PUT_TOP_INPUT, dom);
    assertEquals(bindingOriginal, bindingDeserialized);
}
Also used : PutTopInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.PutTopInputBuilder) TopLevelListBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) ContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode) PutTopInput(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.PutTopInput) Test(org.junit.Test)

Example 2 with PutTopInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.PutTopInputBuilder in project netconf by opendaylight.

the class MountPointEndToEndTest method testPutTopRpc.

private void testPutTopRpc(final DOMRpcService domRpcService, final DOMRpcResult result) throws InterruptedException, ExecutionException, TimeoutException {
    ContainerNode putTopInput = bindingToNormalized.toNormalizedNodeRpcData(new PutTopInputBuilder().setTopLevelList(oneTopLevelList()).build());
    testRpc(domRpcService, putTopRpcSchemaPath, putTopInput, result);
}
Also used : PutTopInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.PutTopInputBuilder) ContainerNode(org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)

Aggregations

ContainerNode (org.opendaylight.yangtools.yang.data.api.schema.ContainerNode)2 Test (org.junit.Test)1 PutTopInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.PutTopInputBuilder)1 PutTopInput (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.PutTopInput)1 PutTopInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.PutTopInputBuilder)1 TopLevelListBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListBuilder)1 DataObject (org.opendaylight.yangtools.yang.binding.DataObject)1