Need a script to initiate Configuration Inventory
Closed this issue · 19 comments
Hello, im looking for a script which would kick off collection of Configuration data from single or multiple iDRACs
Currently as far as im aware there is only schedule job in OME which performs the collection on daily basis, but as for our automation approach i would like the ability to start the process via REST or script for single iDRAC
thx
I'd be willing to take a look at it. I'm not sure what is meant by configuration data though - do you have a screenshot or something?
Hi, pls see attached.
Our plan is to fully automated the new iDrac configuration process.
- discover iDrac in OME
- upgrade to the latest FW
- apply the company standard configuration to iDrac
Our current process:
- we initiate python script to discover new Device in OME - this script is avail on GitHub in Dell repo
- next what we want to do:
- run script to collect Configuration Inventory Data ( OME has scheduled job which runs once per day for all devices ) for new device. This is important in order to be able to compare existing iDrac configuration to Configuration Template settings
- run another script which would assign the Configuration Template to new Device and run remediation ( this would configure the new iDrac as per our requirements )
Let me know if you would need any more details
@markatdxb - I haven't used that functionality before. I'll take a look and report back here!
@markatdxb - Just wanted to give you a heads up I think I have a working solution. Took me a bit because it required an undocumented API call and had to study up on how the configuration inventory specifically worked. I'll PR it here tomorrow.
Request completed in that PR in Python.
@markatdxb - did this do what you were looking for?
@grantcurell Sorry i cant find your script refresh_device_inventory in repo
Sorry about that - I updated the names so PowerShell and Python matched. The scripts are also now listed here
@grantcurell - just tested the script. i specified single idrac IP but log shows inventory refresh runs on all devices
@markatdxb huh - I just hopped in bed. I'll give it a go tomorrow and see what's up.
Possible I am missing something, but on a quick skim, It looks like your default is to not skip the config inventory - if no group name is specified I think after refreshing the inventory the script will go through and default to running config inventory on the All Devices Group -
@markatdxb - could you retry setting the -skip flag to true?
just tested to add --skip-config-inventory - didnt work - it ran but didnt pull configuration data
@markatdxb on the way back home from a morning meeting now - I'll take a look. Just to clarify though, if you skip config inventory the tab under devices does not update
Only the firmware versions and stuff
@markatdxb - at first I thought there was a problem, but then I remembered the config inventory operates on the configuration group. See help text:
parser.add_argument("--groupname", "-g", required=False, default="All Devices",
help="The name of the group containing the devices whose inventory you want to refresh. "
"Defaults to all devices. Due to the way the API functions, if you want to refresh the "
"configuration inventory, you must have all applicable devices in a group. The "
"configuration inventory is specific to the tab called \"Configuration Inventory\" under "
"a device's view. You can use the create_static_group and add_device_to_static group "
@grantcurell - if I understand above correctly I need to put device to some temp group first, run the script and remove device from the group?
@markatdxb unfortunately yes. That's for the configuration inventory only (the tab as shown below)
for just refreshing the firmware list and all that you don't need the group. The config inventory is the same as this button:
The regular inventory is the same as pressing this button:
I actually didn't know there was a distinction until I wrote this code 😂
I just added a warning that will give people a heads up.