08-14-2019 03:46 PM
I'm trying bind port channel to EPG using below script but got an error 'IndexError: list index out of range'
!
pc = aci.PortChannel('ipgl-test-pg1-pc') ##ipgl-test-pg1-pc is already created on fabric
!
vlan_intf = aci.L2Interface('vlan-304','vlan','304')
vlan_intf.attach(pc)
!acitoolkit, APIC
tenant = aci.Tenant('test111')
app = aci.AppProfile("ap111", tenant)
epg = aci.EPG("epg111", app)
epg.attach(vlan_intf)
!
resp = tenant.push_to_apic(session)
##output when run the script
C:\Tools\01_API>python 05_epg_associate_vpc.py
Traceback (most recent call last):
File "05_epg_associate_vpc.py", line 29, in <module>
resp = tenant.push_to_apic(session)
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acitoolkit.py", line 113, in push_to_
apic
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acitoolkit.py", line 102, in get_json
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acibaseobject.py", line 1027, in get_
json
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acitoolkit.py", line 341, in get_json
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acibaseobject.py", line 1027, in get_
json
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acitoolkit.py", line 1392, in get_jso
n
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acitoolkit.py", line 441, in _get_pat
h
File "C:\Users\pcceadmin\AppData\Local\Programs\Python\Python37-32\lib\site-pa
ckages\acitoolkit-0.4-py3.7.egg\acitoolkit\acitoolkit.py", line 5025, in _get_pa
th
IndexError: list index out of range
Advise please
09-19-2022 02:22 AM
Hi, did you find out how to fix the issue? I'm currently working with acitoolkit and trying to automate the EPG propagation into vPCs
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