CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
291 stars 186 forks source link

user-rpc command with action RPC config throwing error in netopeer-cli #1487

Open balaji07s opened 8 months ago

balaji07s commented 8 months ago

Hi team,

Software version: libsysrepo v2.2.12 (SO v7.11.8)

When I execute the user-rpc command in Netopeer-CLI with the action RPC config, it fails with the error message "Node action not found in yang module". Could you please help with this? Is there anything that needs to be checked or upgraded?

Pasted the log and the XML RPC config used.

XML RPC:
======
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3013">
<action xmlns:bbf-hw="urn:bbf:yang:bbf-hardware" xmlns="urn:ietf:params:xml:ns:yang:1">
     <hardware xmlns="urn:ietf:params:xml:ns:yang:ietf-hardware">
      <component>
        <name>ontCard_ont1_1</name>
      <bbf-hw:reset>
        <bbf-hw:reset-type>bbf-hw:hardware-reset</bbf-hw:reset-type>
      </bbf-hw:reset>
      </component>
    </hardware>
  </action>
 </rpc>

LOG:
===
> user-rpc --content /root/onu_reset.xml |
ly ERROR: Node "action" not found in the "yang" module. (Line number 2.)
nc ERROR: Failed to create RPC, perhaps a required feature is disabled.
cli_send_recv: Failed to send the RPC.
michalvasko commented 8 months ago

This should be handled in recent versions of our projects but I think if you just drop the rpc element, it will work.

balaji07s commented 7 months ago

Hi michalvasko,

Software version: libsysrepo v2.2.12 (SO v7.11.8)

I have tried the same without the rpc element. Still getting the same error.

  <action xmlns:bbf-hw="urn:bbf:yang:bbf-hardware" xmlns="urn:ietf:params:xml:ns:yang:1">
    <hardware xmlns="urn:ietf:params:xml:ns:yang:ietf-hardware">
      <component>
        <name>ontCard_ont1_1</name>
        <bbf-hw:reset>
          <bbf-hw:reset-type>bbf-hw:hardware-reset</bbf-hw:reset-type>
        </bbf-hw:reset>
      </component>
    </hardware>
  </action>

LOG:
> user-rpc --content /root/balaji/hsia_configs/onu_reboot.xml
ly ERROR: Node "action" not found in the "yang" module. (Line number 2.)
nc ERROR: Failed to create RPC, perhaps a required feature is disabled.
cli_send_recv: Failed to send the RPC.
michalvasko commented 7 months ago

Firstly, you are using a year-old sysrepo and even though what matters in this case is the version of netopeer2, it likely is not newer. So I would suggest you update it. I am quite sure it works correctly in the current versions.