cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
531
Views
1
Helpful
2
Replies

pyats connection to N9K in ACI mode

rdefreitas
Beginner
Beginner

I was hoping someone can give me some insight into this PYATS error when trying to learn "interfaces" on a NXOS switch running in ACI mode. If I issue the command "pyats learn interface --testbed-file testbed.yml" I get this error message listed below. Is PYATS able to learn or parse ACI configurations from the APIC itself or do I need to use this tool against the NXOS switch running in ACI mode only?

 

Learning '['interface']' on devices '['nexus-test-sw-01']'
Connecting to 'nexus-test-sw-01' with alias 'rest'
<Response [200]>
Connected successfully to 'nexus-test-sw-01'
0%| | 0/1 [00:00<?, ?it/s]Caught error while executing target in child process-0:
target = _retrieve_ops
args = (<Device nexus-test-sw-01 at 0x7f47a65a5fc0>, 'interface', '.')
kwargs = {}

Traceback (most recent call last):
File "src/pyats/async_/parallelcall.py", line 90, in pyats.async_.parallelcall.ChildLabor.run
File "src/genie/cli/commands/learn.py", line 338, in genie.cli.commands.learn.LearnCommand._retrieve_ops
File "src/pyats/topology/device.py", line 559, in pyats.topology.device.Device.__getattr__
AttributeError: 'Device' object has no attribute 'log'
0%| | 0/1 [00:00<?, ?it/s]

'Device' object has no attribute 'log'

 

----------------------------------------------------

My testbed file:

testbed:
credentials:
default:
username: admin
password: XXXXXXXXXX
devices:
nexus-test-sw-01:
os: nxos
platform: apic
custom:
abstraction:
order: [os]
connections:
rest:
class: rest.connector.Rest
ip: 10.XX.XX.XX

2 Replies 2

Sergiu.Daniluk
VIP Alumni
VIP Alumni

Thank you for replying, I was able to get help on this issue. Turns out the problem was with my testbed file, once corrected I wa able to validate the testbed yaml file.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: