Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-566

NetconfMessageTransformer action list message issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Neon, Fluorine SR2
    • Fluorine, Neon, Fluorine SR1
    • None
    • None

      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>

       

            apuchyova Anna Bencúrová
            apuchyova Anna Bencúrová
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: