<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:14:07 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-80] RPC POST to yang-ext:mount doesn&apos;t support XML Attributes</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-80</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Context:&lt;/p&gt;

&lt;p&gt;I&apos;m using the controller&apos;s ability to mount netconf devices to make it easy to script RESTCONF clients to access such devices&apos;s configuration.  So I&apos;d like to pass RPC get-config requests through RESTCONF yang-ext:mount which will only work if they include XML attributes and/or the json equivalent as per the NETCONF spec.&lt;/p&gt;

&lt;p&gt;JSON Example:&lt;/p&gt;


&lt;p&gt;1. Mount a netconf device, any will do&lt;br/&gt;
2. POST to &lt;a href=&quot;http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/1-netconf-device/yang-ext:mount/ietf-netconf:get-config&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/1-netconf-device/yang-ext:mount/ietf-netconf:get-config&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;with payload:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
  &quot;ietf-netconf:input&quot;: {&lt;br/&gt;
    &quot;source&quot;: &lt;/p&gt;
{
      &quot;running&quot;: [null]
    }
&lt;p&gt;,&lt;br/&gt;
    &quot;filter&quot;: {&lt;br/&gt;
    },&lt;br/&gt;
    &quot;@filter&quot;: &lt;/p&gt;
{xpath,//users
    }
&lt;p&gt;  }&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;&amp;lt;errors &lt;br/&gt;
    xmlns=&quot;urn:ietf:params:xml:ns:yang:ietf-restconf&quot;&amp;gt;&lt;br/&gt;
    &amp;lt;error&amp;gt;&lt;br/&gt;
        &amp;lt;error-type&amp;gt;protocol&amp;lt;/error-type&amp;gt;&lt;br/&gt;
        &amp;lt;error-tag&amp;gt;malformed-message&amp;lt;/error-tag&amp;gt;&lt;br/&gt;
        &amp;lt;error-message&amp;gt;Error parsing input: Schema node with name @filter wasn&apos;t found under (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)input.&amp;lt;/error-message&amp;gt;&lt;br/&gt;
        &amp;lt;error-info&amp;gt;java.lang.IllegalStateException: Schema node with name @filter wasn&apos;t found under (urn:ietf:params:xml:ns:netconf:base:1.0?revision=2011-06-01)input.&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream.resolveNamespace(JsonParserStream.java:253)&lt;br/&gt;
	at org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream.read(JsonParserStream.java:154)&lt;br/&gt;
  .&lt;br/&gt;
  .&lt;br/&gt;
  .&lt;/p&gt;



&lt;p&gt;XML Example: &lt;/p&gt;

&lt;p&gt;1. Mount a netconf device, any will do&lt;br/&gt;
2. POST to &lt;a href=&quot;http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/1-netconf-device/yang-ext:mount/ietf-netconf:get-config&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/1-netconf-device/yang-ext:mount/ietf-netconf:get-config&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With payload:&lt;/p&gt;

&lt;p&gt;&amp;lt;input xmlns=&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&amp;gt;&lt;br/&gt;
 &amp;lt;source&amp;gt;&lt;br/&gt;
   &amp;lt;running/&amp;gt;&lt;br/&gt;
 &amp;lt;/source&amp;gt;&lt;br/&gt;
 &amp;lt;filter type=&quot;xpath&quot; select=&quot;//users&quot;/&amp;gt;&lt;br/&gt;
 &amp;lt;/input&amp;gt;&lt;/p&gt;


&lt;p&gt;This will strip the attributes and return the entire configuration instead of the filtered config.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21093">NETCONF-80</key>
            <summary>RPC POST to yang-ext:mount doesn&apos;t support XML Attributes</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="10003" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Confirmed</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="jameshall03885@gmail.com">James Gregory Hall</reporter>
                        <labels>
                    </labels>
                <created>Thu, 8 Oct 2015 19:28:31 +0000</created>
                <updated>Thu, 4 Nov 2021 23:31:58 +0000</updated>
                                                                            <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="38981" author="jameshall03885@gmail.com" created="Thu, 8 Oct 2015 19:32:34 +0000"  >&lt;p&gt;Having read a similar &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-52&quot; title=&quot;Using restconf rpc to edit the configuration of netconf enabled device, controller will remove the attribute of content&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-52&quot;&gt;NETCONF-52&lt;/a&gt; there is a response:&lt;/p&gt;

&lt;p&gt;&quot;When editing configuration on a mounted Netconf device over Restconf, ODL hides the edit+commit rpcs to make Restconf behave as expected (you alse cannot choose which datastore to edit). And I dont think we should change that.&quot;&lt;/p&gt;

&lt;p&gt;I belive it&apos;s clear that yang-ext:mount RPC&apos;s which use XML Attributes can&apos;t work without passing through the attributes.&lt;/p&gt;</comment>
                            <comment id="38982" author="tony.tkacik@gmail.com" created="Mon, 12 Oct 2015 09:10:13 +0000"  >&lt;p&gt;{&lt;br/&gt;
  &quot;ietf-netconf:input&quot;: {&lt;br/&gt;
    &quot;source&quot;: &lt;/p&gt;
{
      &quot;running&quot;: [null]
    }
&lt;p&gt;,&lt;br/&gt;
    &quot;filter&quot;: {&lt;br/&gt;
    },&lt;br/&gt;
    &quot;@filter&quot;: &lt;/p&gt;
{xpath,//users
    }
&lt;p&gt;  }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Where (which draft) is @filter type of attributes specified?&lt;br/&gt;
Could you please provide pointer?&lt;/p&gt;</comment>
                            <comment id="38983" author="jameshall03885@gmail.com" created="Thu, 15 Oct 2015 16:23:30 +0000"  >&lt;p&gt;Apparently there is no &quot;standard&quot; for converting xml -&amp;gt; json.  So we can put that issue aside temporarily ... if we accept that NETCONF RPC&apos;s can&apos;t be made through RESTCONF with json, you must use xml.&lt;/p&gt;

&lt;p&gt;So lets focus on the issue of XML attributes &amp;amp; RESTCONF yang-ext:mount RPCs.&lt;/p&gt;</comment>
                            <comment id="70108" author="rovarga" created="Thu, 4 Nov 2021 22:59:19 +0000"  >&lt;p&gt;So the attributes/JSON gap is bridged via &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc7952#section-5.2.3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;annotations&lt;/a&gt; on anyxml. The syntax is going to be slightly different, but that&apos;s not of import.&lt;/p&gt;

&lt;p&gt;So when a device advertises the &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc6241#section-8.9.3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;:xpath&lt;/a&gt; capability, we need to play pretend there is an RFC6241bis, which defines RFC7952 annotations to carry filter attributes, as per &lt;a href=&quot;https://datatracker.ietf.org/doc/html/rfc6241#section-8.9.5.1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;section 8.9.5.1&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-xml&quot;&gt;
         &lt;span class=&quot;code-tag&quot;&gt;&lt;span class=&quot;code-comment&quot;&gt;&amp;lt;!-- get the user named fred --&amp;gt;&lt;/span&gt;&lt;/span&gt;
         &amp;lt;filter &lt;span class=&quot;code-keyword&quot;&gt;xmlns:t&lt;/span&gt;=&lt;span class=&quot;code-quote&quot;&gt;&quot;http://example.com/schema/1.2/config&quot;&lt;/span&gt;
                 type=&lt;span class=&quot;code-quote&quot;&gt;&quot;xpath&quot;&lt;/span&gt;
                 select=&lt;span class=&quot;code-quote&quot;&gt;&quot;/t:top/t:users/t:user[t:name=&lt;span class=&quot;code-quote&quot;&gt;&apos;fred&apos;&lt;/span&gt;]&quot;&lt;/span&gt;/&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When we bind to such a context, we will recognize the attributes on input and be able to translate them back and forth.&lt;/p&gt;

&lt;p&gt;Alternatively, we can get this working by completely passing the request document to the NETCONF device without alteration. That should become possible once we have &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-718&quot; title=&quot;Switch to using asynchronous JAX-RS interface&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-718&quot;&gt;NETCONF-718&lt;/a&gt; and its follow-ups done.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4440</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=4440]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i01wbz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>