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

NetconfMessageTransformer doesn't include namespace of action to XML action request

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • Magnesium, Sodium SR2
    • None
    • None

    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>

      Attachments

        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: