libnetconf icon indicating copy to clipboard operation
libnetconf copied to clipboard

<default-operation>none</default-operation> problem

Open zyboy2000 opened this issue 6 years ago • 3 comments

send rpc with this

<default-operation>none</default-operation>

reply message is error; without it, reply message is ok

<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target>
    <running/>
  </target>
  <default-operation>none</default-operation>  //without this, reply message is ok
  <config>
    <telemetry-system xmlns="http://openconfig.net/yang/telemetry">
      <destination-groups>
        <destination-group xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
                      nc:operation="replace">
          <group-id>1</group-id>
          <config>
            <group-id>1</group-id>
          </config>
          <destinations>
            <destination>
              <destination-address>13.251.1.23</destination-address>
              <destination-port>0</destination-port>
              <config>
                <destination-address>13.251.1.23</destination-address>
                <destination-port>0</destination-port>
              </config>
              </config>
            </destination>
          </destinations>
        </destination-group>
      </destination-groups>
    </telemetry-system>
  </config>
</edit-config>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="19">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>data-missing</error-tag>
    <error-severity>error</error-severity>
    <error-message>Request could not be completed because the relevant data model content does not exist.</error-message>
  </rpc-error>
</rpc-reply>

zyboy2000 avatar Nov 26 '19 12:11 zyboy2000

Hi, I just want to make sure first that you are talking about this libnetconf that you created the issue in, not libnetconf2.

If so, then it seems it does not support changing default-operation. There is nothing we will do about that, use the new libnetconf2 if you need to change it.

Regards, Michal

EDIT: Actually, you may be using libnetconf2. In any case, this seems like a valid error, read none operation definition.

michalvasko avatar Nov 26 '19 12:11 michalvasko

i use libnetconf1.0 it does not support changing default-operation?

zyboy2000 avatar Nov 26 '19 12:11 zyboy2000

Hi, I think it does, the error would probably be different if it did not. So like I said, I believe the error is correct, the operation on

<telemetry-system xmlns="http://openconfig.net/yang/telemetry">

is none and if it does not exist in the datastore, the error you see is printed, exactly as specified.

Regards, Michal

michalvasko avatar Nov 26 '19 13:11 michalvasko