02-07-2023 08:38 AM
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
02-13-2023 02:12 AM
Did you checked this discussion: https://community.cisco.com/t5/tools/pyats-connection-to-n9k-in-aci-mode/td-p/4091792
It might be helpful.
09-06-2023 11:12 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide