Skip to content

YError exception not raised as expected #773

@111pontes

Description

@111pontes

Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.

Expected Behavior

YDK should generate YError exceptions.

Current Behavior

YDK generates RuntimeError exception when an invalid namespace is sent in a NETCONF subtree filter.

Steps to Reproduce

Using Path API, send a NETCONF get RPC with filter:

<netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring2">
  <schemas/>
</netconf-state>

Logs

RuntimeError: YServiceProviderError: <?xml version="1.0"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <rpc-error>
    <error-type>protocol</error-type>
    <error-tag>unknown-namespace</error-tag>
    <error-severity>error</error-severity>
    <error-info>
      <bad-element>netconf-state</bad-element>
      <bad-namespace>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring2</bad-namespace>
    </error-info>
  </rpc-error>
</rpc-reply>

System Information

$ python --version
Python 3.5.2
$ pip list | grep ydk
ydk                     0.7.1
ydk-models-cisco-ios-xr 6.3.2
ydk-models-ietf         0.1.5
$

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions