[NETCONF-652] NetconfMessageTransformer doesn't include namespace of action to XML action request Created: 08/Jan/20  Updated: 08/Jan/20  Resolved: 08/Jan/20

Status: Resolved
Project: netconf
Component/s: None
Affects Version/s: None
Fix Version/s: Magnesium, Sodium SR2

Type: Bug Priority: Medium
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


 Description   

NetconfMessageTransformer doesn't include namespace of an action to XML action request, which is problem, when the action is augmented into some data tree.

Example:

If we have for example these two modules. So the second module augments interface of the device with the action "disable":

module example-server-farm {
    yang-version 1.1;
    namespace "urn:example:server-farm";
    prefix "sfarm";
    container device {
        list interface {
            key name;
            leaf name {
                type string;
            }
        }
    }
}
module augmented-action {
    yang-version 1.1;
    namespace "urn:example:augmented-action";
    prefix "augaction";

    import example-server-farm { prefix sfarm; }

    augment "/sfarm:device/sfarm:interface" {
        action disable {
        }
    }
}

 

Message from current implementation of NetconfMessageTransformer will look like:

<rpc message-id="m-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <action xmlns="urn:ietf:params:xml:ns:yang:1">
         <device xmlns="urn:example:server-farm">
              <interface>
                  <name>test</name>
                  <disable/>
              </interface>
          </device>
     </action>
 </rpc>

 

But correct one should contain namespace for disable action tag itself:

 <rpc message-id="m-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <action xmlns="urn:ietf:params:xml:ns:yang:1">
         <device xmlns="urn:example:server-farm">
              <interface>
                  <name>test</name>
                  <disable xmlns="urn:example:augmented-action"/>
              </interface>
          </device>
     </action>
 </rpc>

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