05-02-2024 09:49 AM
Hello.
I am fairly new to Intersight and need to write a python script that transverses through the UCS fabric interconnects present in every domain , for each of them to obtain the relevant data and specific locators to be able to issue a "show version" command via cli and later create a .txt report includes the list of domains and fabric interconnects that didn´t passed certain filter.
I would appreciate any help to search for the API endpoints that could prove useful for this endeavor or any other suggestion related to the procedure I described.
Thanks.
05-28-2024 11:54 AM
05-28-2024 05:04 PM
You also may be able to skip writing the python script entirely. If you install isctl you can do something like this:
$ isctl get network elementsummary --filter "SwitchType eq 'FabricInterconnect'" -o custom-columns=Name:.Name,FirmwareVersion:.FirmwareVersion
-------------------------- --------------------
Name FirmwareVersion
-------------------------- --------------------
anzsp-mel03-hx FI-A 5.0(3)N2(4.21g)
anzsp-mel03-hx FI-B 5.0(3)N2(4.21g)
se-cis-5-6332 FI-A 5.0(3)N2(4.23d)
se-cis-5-6332 FI-B 5.0(3)N2(4.23d)
anzsp-nsd5-hx FI-A 5.0(3)N2(4.21g)
anzsp-nsd5-hx FI-B 5.0(3)N2(4.21g)
MEL-DC4-UCS FI-A 5.0(3)N2(4.23b)
MEL-DC4-UCS FI-B 5.0(3)N2(4.23b)
ANZ-SE-DC-HX FI-A 5.0(3)N2(4.21j)
ANZ-SE-DC-HX FI-B 5.0(3)N2(4.21j)
Hyperflex FI-A 5.0(3)N2(4.23d)
Hyperflex FI-B 5.0(3)N2(4.23d)
nsd5-static-ucsx FI-B 9.3(5)I42(3c)
nsd5-static-ucsx FI-A 9.3(5)I42(3c)
MEL-IMM-FI FI-A 9.3(5)I42(3f)
MEL-IMM-FI FI-B 9.3(5)I42(3f)
nsd5-dc-ucsx FI-A 9.3(5)I42(3d)
nsd5-dc-ucsx FI-B 9.3(5)I42(3d)
-------------------------- --------------------
Or you can output to a CSV file like this:
$ isctl get network elementsummary --filter "SwitchType eq 'FabricInterconnect'" -o csv > out.csv
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