napalm-automation / napalm-junos

Apache License 2.0
22 stars 42 forks source link

get_probes_config gives traceback #198

Closed wasabi222 closed 6 years ago

wasabi222 commented 7 years ago

Description of Issue/Question

It looks like the junos_views.yml probes config has a bad path of get: services/rpm/probe/test (line 560) where it should just be get: services/rpm/probe, which I tested and am no longer receiving an error on, however I'm not actually able to retrieve the probe config with that command.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

[x ] Yes [ ] No

Setup

napalm-junos version

(Paste verbatim output from pip freeze | grep napalm-junos between quotes below)

napalm-junos==0.12.0

JunOS version

(Paste verbatim output from show version and haiku between quotes below)

root@junos.test.env> show version and haiku
Hostname: junos.test.env
Model: firefly-perimeter
JUNOS Software Release [12.1X47-D20.7]

        ... hush puppies.... good beer ...
        ... the sea just before sunset ...
        ... living like a king ...

Steps to Reproduce the Issue

device.get_probes_config()

Error Traceback

(Paste the complete traceback of the exception between quotes below)

...
/usr/local/lib/python2.7/dist-packages/jnpr/junos/decorators.pyc in wrapper(*args, **kwargs)
     29         else:
     30             try:
---> 31                 return function(*args, **kwargs)
     32             except Exception:
     33                 raise

/usr/local/lib/python2.7/dist-packages/jnpr/junos/device.pyc in execute(self, rpc_cmd, ignore_warning, **kvargs)
    788             raise EzErrors.RpcError(cmd=rpc_cmd_e,
    789                                     rsp=rsp,
--> 790                                     errs=ex)
    791         # Something unexpected happened - raise it up
    792         except Exception as err:

RpcError: RpcError(severity: error, bad_element: test, message: syntax error)
mirceaulinic commented 6 years ago

Hi @wasabi222 - sorry for late reply.

Can you please provide more details? I've never seen any errors with the RPM probes config getter, and I used it quite frequently. It's equally true that I have never tried on a VM - maybe that could be the problem. But to be able to debug this, I would need more details, i.e. the structure of the XML object retrieved from the device (show configuration services rpm | display xml).

mirceaulinic commented 6 years ago

Ping @wasabi222 - did you see the question above?

wasabi222 commented 6 years ago

Sorry Mircea - this got lost in the sauce when I was on vacation - I believe this is specific to vmx. I will get you these details before the week's end.

wasabi222 commented 6 years ago

I just tried this again and there were no issues on vmx. I'm closing this out.