11-15-2017 11:09 AM
The goal: Create a script that modifies existing ACI tenants and adds vrf and bridge domains to already created tenants.
I used API inspector to retrieve the JSON post snippet that modifies an existing tenant. Then I used arya.py to convert that JSON snippet into a python script with the various cobra modules. All appears to be fine until I run the script and I get the following message.
Traceback (most recent call last):
File "test3.py", line 75, in <module>
fvTenant = cobra.model.fv.Tenant(topMo)
TypeError: __init__() takes at least 3 arguments (2 given)
Attached is the JSON code from API inspector and the converted code. I have no problems creating fresh new tenants using this procedure but updating existing ones I do.
Can someone please review and make recommendations?
Thank you!
Solved! Go to Solution.
11-15-2017 01:09 PM
I found my issue.
on this line of code
I had this and it was missing the tenant and I needed this
had = fvTenant = cobra.model.fv.Tenant(topMo)
needed = fvTenant = cobra.model.fv.Tenant(topMo,ten)
Now I have the required info.
11-15-2017 01:09 PM
I found my issue.
on this line of code
I had this and it was missing the tenant and I needed this
had = fvTenant = cobra.model.fv.Tenant(topMo)
needed = fvTenant = cobra.model.fv.Tenant(topMo,ten)
Now I have the required info.
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:
This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community