Open euserb opened 6 days ago
devices: pe1: alias: pe1 type: router os: iosxr tacacs: username: admin passwords: tacacs: admin connections: defaults: via: netconf netconf: class: yang.connector.Netconf ip: 172.20.20.15 port: 830 username: clab password: clab@123 credentials: netconf: username: clab password: clab@123
from pyats.topology.loader import load testbed = load(<path-to-testbed>) device1 = testbed.devices['pe1'] device1.connect(via='netconf') 2024-11-20T16:07:33: %NETCONF-INFO: NETCONF CONNECTED device1.connect(alias='get', via='netconf') { "name": "TypeError", "message": "'Netconf' object is not callable", "stack": "--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[13], line 1 ----> 1 device1.connect(alias='get', via='netconf') 2 # device1.connect(via='netconf') File src/pyats/connections/manager.py:500, in pyats.connections.manager.ConnectionManager.connect() File src/pyats/connections/manager.py:465, in pyats.connections.manager.ConnectionManager.instantiate() File src/pyats/connections/manager.py:97, in pyats.connections.manager.Connections.__getitem__() TypeError: 'Netconf' object is not callable" }
It seems that the alias doesn't work...
it seems that if I use any other alias it works... I'll change my code...
It seems that the alias doesn't work...