03-17-2023 12:15 AM
has anyone tried before automating cisco ACI using excel sheets , by filling ACI Objects and uploading them to ACI ?
If yes , do you have any template to be followed?
03-17-2023 05:32 PM
Hi @IslamOmar ,
Lots of people have put stuff on GitHub - have you tried there?
https://www.google.com/search?q=aci+excel+github
03-18-2023 11:03 PM
Hi , have checked that but I'm looking for specifically an excel sheet template that you upload directly to ACI for configuring objects without using any automation tools .
03-19-2023 01:21 PM
Hi @IslamOmar ,
You can upload information into ACI in either XML or JSON formats.
Excel does not have options to save data in these formats. However, both XML and JSON are text formats - more on that later
The point is - to get a flat file database structure (a.k.a. spreadsheet) into a format that can be fed into ACI is going to require some kind of program to take the excel format and put it into XML or JSON then sent it to ACI.
Which is what all the projects on Github do (AFAIK) - using python or some other programming language. So you are not going to find a way to "upload directly" into ACI.
BUT
As I said before, both XML and JSON are text formats, and excel does have a Save As text file option. In the past I have successfully created a spreadsheet that had a tab pre-configured with each row corresponding to a line in JSON format, taking values from another tab in the SS. By saving that tab in text format (TBH I just select all and copy to a text editor) I've been able to create JSON formatted files from excel, and import the result directly into another program (in my case it was the HyperFlex installer).
So to create a Tenant (for example) in Excel, you could have a tab that had the lines:
{ "fvTenant": { "attributes": { "annotation": "", "descr": "Created for IslamOmar", "dn": "tn-Test", "name": "Test", "nameAlias": "", "ownerKey": "", "ownerTag": "", "userdom": ":all:" } } }
Where those lines extracted the values from another sheet - if the other sheet was called Raw and had these values in cells A1:B2
Tenant Name | Description |
Test | Created for IslamOmar |
then the formula view for the Json tab would be:
{ "fvTenant": { "attributes": { "annotation": "", ="""descr"": """&Raw!B2&"""," ="""dn"": ""tn-"&Raw!A2&"""," ="""name"": """&Raw!A2&"""," "nameAlias": "", "ownerKey": "", "ownerTag": "", "userdom": ":all:" } } }
There you go! It CAN be done.
But trust me, it is MUCH simpler to write a little python code than fiddle with all those double and triple quotes in Excel (it would probably have been easier if I used a combination of ' and ")
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