[NETCONF-566] NetconfMessageTransformer action list message issue Created: 18/Sep/18  Updated: 16/Jan/19  Resolved: 16/Jan/19

Status: Resolved
Project: netconf
Component/s: None
Affects Version/s: Fluorine, Neon, Fluorine SR1
Fix Version/s: Neon, Fluorine SR2

Type: Bug Priority: High
Reporter: Anna Bencúrová Assignee: Anna Bencúrová
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File action-test@2018-10-03.yang    

 Description   

When sending action rpc through dom or binding action service while action is placed in list, the output is containing the tag with name of list twice. I assume it is due presence of MapNode and MapNodeEntry in yangInstanceIdentifier.

Model is attached.

Invocation (I have removed optional checks and result handling):

Optional<MountPoint> mountPointOpt = mountPointService.getMountPoint(NETCONF_MOUNTPOINT_II).toJavaUtil();
Optional<ActionService> serviceOpt = mountPointOpt.get().getService(org.opendaylight.controller.md.sal.binding.api.ActionService.class).toJavaUtil();
ActionService actionService = serviceOpt.get();
InstanceIdentifier<ActionExampleList> listId = InstanceIdentifier.builder(ActionExampleList.class, new ActionExampleListKey(2)).build();
Remove action = actionService.getActionHandle(Remove.class);
Preconditions.checkNotNull(action, "Action " + Remove.QNAME + " is not supported on device.");
Input input = new InputBuilder().setForce(true).build();
FluentFuture<RpcResult<Output>> outputFuture = action.invoke((KeyedInstanceIdentifier<ActionExampleList, ActionExampleListKey>) listId, input);
RpcResult<Output> result = outputFuture.get();

This will produce message with duplicate tag:

<rpc message-id="m-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <action xmlns="urn:ietf:params:xml:ns:yang:1">
        <ActionExampleList xmlns="urn:example:action-test">
            <ActionExampleList>
                <ActionExampleID>2</ActionExampleID>
                <Remove>
                    <Force>true</Force>
                </Remove>
            </ActionExampleList>
        </ActionExampleList>
    </action>
</rpc>

 



 Comments   
Comment by Jakub Morvay [ 01/Oct/18 ]

apuchyova Can you please attach model and data to easily replicate this?

Comment by Anna Bencúrová [ 03/Oct/18 ]

Hi JMorvay, I updated description and added model attachment, hope it helps. Thank you.

Generated at Wed Feb 07 20:15:21 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.