12-14-2021 08:17 AM
i, I am trying to extract the hardware inventory from ACI using an API. The information is required to maintain an accurate lifecyle inventory.
I have tried the following api:
I am after the same level of detail as is provided by the following cli command:
fabric <node-id> show inventory
The above command also has filtering based on inventory type e.g. chassis fans module power_supply
The default option is all items.
Is it possible to get the same information using an API call.
I have also tried using "moquery -c fabricNode,eqptFt,eqptPsu", but the detail isn't the same as the cli output from show inventory.
Hence the query.
Solved! Go to Solution.
12-14-2021 02:46 PM
You can try:
moquery -c topSystem -x query-target=subtree -x target-subtree-class=topSystem,eqptCh,eqptFan,eqptPsu
Add classes that you want to include in the last filter.
12-14-2021 02:46 PM
You can try:
moquery -c topSystem -x query-target=subtree -x target-subtree-class=topSystem,eqptCh,eqptFan,eqptPsu
Add classes that you want to include in the last filter.
12-17-2021 06:42 AM
Thanks for supply the query above. I managed to turn the moquery into a API call which works a treat.
Returns all nodes and details
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