question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to gather RPC aps information using interface name

See original GitHub issue

Hi I am trying to use PyEZ to to create an automation script. My goal is saving response from “show aps interface” with interface name in a variable. But I found that there is a bug that result in a mismatch between xml schema and pyez lib. When I show rpc in device I got:

juniper@PE2G01_RE0> show aps interface cstm1-0/2/0 | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/17.3R3/junos">
    <rpc>
        <get-aps-interface-information>
                <intf_name>cstm1-0/2/0</intf_name>
        </get-aps-interface-information>
    </rpc>
    <cli>
        <banner>{master}</banner>
    </cli>
</rpc-reply>

{master}

But when I passed the interface name in a variable as following:

interface_aps = device.rpc.get_aps_interface_information(intf_name="cstm1-0/2/0")

I got this error:

jnpr.junos.exception.RpcError: RpcError(severity: error, bad_element: intf-name, message: error: syntax error, expecting <invoke-on>
error: syntax error)
  • It seems like the lib always convert intf_name to intf-name before lookup for results. Therefore it leads to mismatch since xml schema in device is intf_name. Is there any way to fix it ? Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rahkumar651991commented, Sep 16, 2021

hi @moophat

We don’t recommend such changes to hide a bug. Let me know if anything else is required or we can close this issue for now?

0reactions
rahkumar651991commented, Oct 12, 2021

closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bountysource
Unable to gather RPC aps information using interface name.
Read more >
Solved: Unable to get new APs addedd to the Mobility Express ...
I have a 1815i with latest Mobility image working (I have to tftp this image). The WLC web is reachable and the underlying...
Read more >
RPC error troubleshooting guidance - Windows Client
In this article. How the connection works; Troubleshooting RPC errors; Collecting data for deeper troubleshooting. Applies to: Windows Client.
Read more >
Understanding RPC Vs REST For HTTP APIs
This article discusses REST and RPC in the context of building HTTP APIs. Knowing their differences can be incredibly useful for either ...
Read more >
Understanding RPC, REST and GraphQL | APIs You Won't Hate
About 99% of people get this wrong, so you can be in the top 1% with a ... a function in JavaScript, taking...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found