<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15:46 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-740] RFC8040 compliance: API Resource</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-740</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://tools.ietf.org/html/rfc8040#section-3.3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc8040#section-3.3&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; The \{+restconf} root resource name used in responses representing the
 root of the &quot;ietf-restconf&quot; module MUST identify the &quot;ietf-restconf&quot;
 YANG module. For example, a request to GET the root resource
 &quot;/restconf&quot; in JSON format will return a representation of the API
 resource named &quot;ietf-restconf:restconf&quot;.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;&amp;gt; curl -u admin:admin &lt;a href=&quot;http://localhost:8181/rests&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/rests&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;&#160;404 Not Found&lt;/p&gt;</description>
                <environment>&lt;ul&gt;
	&lt;li&gt;ODL aluminum&lt;/li&gt;
	&lt;li&gt;feature:install&#160;odl-restconf-nb-rfc8040&lt;/li&gt;
	&lt;li&gt;feature:install&#160;odl-toaster&lt;/li&gt;
&lt;/ul&gt;
</environment>
        <key id="33502">NETCONF-740</key>
            <summary>RFC8040 compliance: API Resource</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <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="ivanhrasko">Ivan Hrasko</assignee>
                                    <reporter username="hjslgfsd7">Valentin Mayamsin</reporter>
                        <labels>
                            <label>pick-next</label>
                            <label>pt</label>
                    </labels>
                <created>Mon, 2 Nov 2020 22:04:54 +0000</created>
                <updated>Thu, 22 Jun 2023 12:17:54 +0000</updated>
                                            <version>Aluminium</version>
                                    <fixVersion>7.0.0</fixVersion>
                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="69419" author="rovarga" created="Mon, 19 Jul 2021 08:53:28 +0000"  >&lt;p&gt;This requires updating JAX-RS structure so that we also service the root element and return the combination of individual API resources.&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;     +---- {+restconf}
           +---- data
           | ...
           +---- operations?
           | ...
           +--ro yang-library-version    string&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;i.e. we are servicing /data, /yang-library-version and /operations, but do not service /.&lt;/p&gt;</comment>
                            <comment id="71712" author="ivanhrasko" created="Tue, 29 Nov 2022 08:03:59 +0000"  >&lt;p&gt;We need to find out some way how to return a combination of /data, /yang-library-version and /operations.&lt;/p&gt;

&lt;p&gt;The problem of &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/netconf/+/102819/9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;patchset 9&lt;/a&gt; is that we are not able to read other data except of YANG library version.&lt;/p&gt;

&lt;p&gt;There are at least these possibilities:&lt;br/&gt;
1. Rewrite &lt;b&gt;RestconfImpl&lt;/b&gt; class to implement all needed services (&lt;b&gt;RestconfDataService&lt;/b&gt;, &lt;b&gt;RestconfOperationsService&lt;/b&gt;) via delegation.&lt;/p&gt;

&lt;p&gt;It requires the constructor as following:&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-java&quot;&gt;
&#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; RestconfImpl(&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; DatabindProvider databindProvider, &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; RestconfDataService dataService,
&#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; RestconfOperationsService operationsService) {
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.databindProvider = requireNonNull(databindProvider);
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.dataService = requireNonNull(dataService);
&#160; &#160; &#160; &#160; &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.operationsService = requireNonNull(operationsService);
&#160; &#160; }&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and additional changes in &lt;b&gt;RestconfApplication&lt;/b&gt; and &#160;maybe also in &lt;b&gt;restconf-bp.xml&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;2. Refactor &lt;b&gt;RestconfDataServiceImpl&lt;/b&gt; and &lt;b&gt;RestconfOperationsServiceImpl&lt;/b&gt; logic into utility methods which allows us to read data and operations from &lt;b&gt;RestconfImpl&lt;/b&gt; class.&lt;/p&gt;

&lt;p&gt;3. Copy and paste code which we need...&lt;/p&gt;</comment>
                            <comment id="71725" author="ivanhrasko" created="Fri, 9 Dec 2022 16:20:16 +0000"  >&lt;p&gt;Following solution will not work for similar reasons like in &lt;a href=&quot;https://jira.opendaylight.org/browse/NETCONF-822&quot; title=&quot;Discover RPC operation through RESTCONF is failing with response 500&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETCONF-822&quot;&gt;&lt;del&gt;NETCONF-822&lt;/del&gt;&lt;/a&gt;. We cannot create full data like this:&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-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; libVersion = getLibraryVersion().getData();
&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; data = ((NormalizedNodePayload) readData(uriInfo).getEntity()).getData();

&lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;var&lt;/span&gt; result = Builders.containerBuilder()
        .withNodeIdentifier(NodeIdentifier.create(Restconf.QNAME))
        .withChild((LeafNode) libVersion)
        .withChild((ContainerNode) data)
        .build(); &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;because then we get a failure from writers:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Caused by: java.lang.IllegalArgumentException: Data tree child (urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring?revision=2017-01-26)restconf-state not present in schema parent (urn:ietf:params:xml:ns:yang:ietf-restconf?revision=2017-01-26)restconf
&#160; &#160; at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.notPresent(SchemaInferenceStack.java:1046) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.lambda$pushData$6(SchemaInferenceStack.java:853) ~[?:?]
&#160; &#160; at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:853) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:847) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:841) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.enterDataTree(SchemaInferenceStack.java:531) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack.enterDataTree(NormalizedNodeStreamWriterStack.java:204) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack.startContainerNode(NormalizedNodeStreamWriterStack.java:276) ~[?:?]
&#160; &#160; at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.startContainerNode(JSONNormalizedNodeStreamWriter.java:406) ~[?:?]
&#160; &#160; at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter.wasProcessedAsCompositeNode(ParameterAwareNormalizedNodeWriter.java:273) ~[?:?]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;what&apos;s true because Restconf YANG model defines &lt;b&gt;data&lt;/b&gt; as just empty container &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.&lt;/p&gt;</comment>
                            <comment id="71726" author="ivanhrasko" created="Fri, 9 Dec 2022 16:22:19 +0000"  >&lt;p&gt;OK.. we can maybe try to adjust little bit - but I expect it will not work anyway..&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="35133">NETCONF-855</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03vuv:</customfieldvalue>

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