Skip to content

Gracefully handle errors better if xml command fails #60

Description

@ktbyers

The below would just come back as a generic Netmiko error intead of raising the underlying error that happened from the xml command.

Would be better if the xml command that resulted in an ERROR raised the underlying error message.

RP/0/RP0/CPU0:ios-xr#
RP/0/RP0/CPU0:ios-xr#terminal length 0
Fri Oct 12 19:56:36.548 UTC
RP/0/RP0/CPU0:ios-xr#terminal width 511
Fri Oct 12 19:56:36.774 UTC
RP/0/RP0/CPU0:ios-xr#
RP/0/RP0/CPU0:ios-xr#xml
Fri Oct 12 19:56:37.485 UTC
ERROR: 0xa3679c00 'XML Service Library' detected the 'fatal' condition 'The router is low on memory. Please retry the request after memory consumption has gone down.'
RP/0/RP0/CPU0:ios-xr#<?
                     ^
% Invalid input detected at '^' marker.
RP/0/RP0/CPU0:ios-xr#<xml version="1.0" encoding="UTF-8"?
                     ^
% Invalid input detected at '^' marker.
RP/0/RP0/CPU0:ios-xr#<xml version="1.0" encoding="UTF-8"><Request MajorVersion="1" MinorVersion="0"><Get><Operational><SystemTime/><PlatformInventory/>        </Operational></Get></Request>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions