cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
264
Views
2
Helpful
3
Replies

pyats api's are not all available on pyats object dev.api

pmerlitt
Cisco Employee
Cisco Employee

from pyats.topology import loader

testbed = loader.load('pyATS/testbed.yaml')

dev = testbed.devices['cat8000v']

dev.connect(via='ssh')

dev.api.unconfigure_trustpoint(tp_name = 'TP-NAME')

I get a Traceback with the final error... Could not find the API under ('iosxe', 'router', None), and common

 

when i do a dir(dev.api) I get a subset of the api functions I would expect to get according to:

https://pubhub.devnetcloud.com/media/genie-feature-browser/docs/#/apis

 

I've had this working in the past, but I don't know what's different.  My venv?  My testbed.yaml file?  my import statement?  Anyone?

1 Accepted Solution

Accepted Solutions

pmerlitt
Cisco Employee
Cisco Employee

Thanks bigevilbeard for your response.  It did guide me in the right direction and I did figure it out.  testbed.yaml file had ios_xe as the os instead of iosxe... so only the common methods were added to the object.  I fixed the typo and all the iosxe methods I expected were there.

View solution in original post

3 Replies 3

Check pyATS Version and Packages see what hey are update pyATS to the latest version using pip install --upgrade pyats

verify that you have the necessary Genie packages installed for your device type

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

pyats is up to date.  I'm not sure how to determine whether I have appropriate genie packages.  I added a Cat8000v to my environment when I was using a Cat9000 before, so this could be my issue.  I need Genie packages for the 8000v maybe?

pmerlitt
Cisco Employee
Cisco Employee

Thanks bigevilbeard for your response.  It did guide me in the right direction and I did figure it out.  testbed.yaml file had ios_xe as the os instead of iosxe... so only the common methods were added to the object.  I fixed the typo and all the iosxe methods I expected were there.