User Input -> Update File -> Run Command using updated file
Posted: 23 May 2022 11:30
Good Evening Guys
I have a slightly complicated request for help. i am trying to automate a process for engineers in work to format the Nand/Flash on HP servers (i work with refurb hardware).
Basically, this is an XML file (Force_Format.xml) that is used to format the NAND:
<!-- Firmware support information for this script: -->
<!-- iLO 4 - Version 2.42 or later. -->
<!-- iLO 3 - None. -->
<!-- iLO 2 - None. -->
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Administrator" PASSWORD="password">
<RIB_INFO MODE="write">
<FORCE_FORMAT VALUE="all" />
</RIB_INFO>
</LOGIN>
</RIBCL>
...................and this is the command run in a command prompt to execute the above XML: "hpqlocfg -s 192.170.1.40 -n -v -f c:\Force_Format.xml" (where "hpqlocfg" is the app that is called, the IP address of the unit, the arguments and then the file). The idea is, you update the XML with the login/password and save it, then run the command to execute the XML on the unit at the given IP address.
I'm looking to create some sort of batch that runs the following process:
1. creates copy of "master" xml file
2. asks user for IP address
3. asks user for login
4. adds user 'login' input instead of "Administrator" in the copied XML file
5. asks user for password
6. adds user 'password' input instead of "password" in the copied XML file
7. runs the ""hpqlocfg -s 192.170.1.40 -n -v -f c:\Force_Format.xml" but with the user replaced IP address
8. deletes copied xml file
is that even remotely possible? because right now, my complete lack of skill set here has me writing standard processes instructing them how to do it by hand themselves!!!!
thanks in advance for any advice
I have a slightly complicated request for help. i am trying to automate a process for engineers in work to format the Nand/Flash on HP servers (i work with refurb hardware).
Basically, this is an XML file (Force_Format.xml) that is used to format the NAND:
<!-- Firmware support information for this script: -->
<!-- iLO 4 - Version 2.42 or later. -->
<!-- iLO 3 - None. -->
<!-- iLO 2 - None. -->
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="Administrator" PASSWORD="password">
<RIB_INFO MODE="write">
<FORCE_FORMAT VALUE="all" />
</RIB_INFO>
</LOGIN>
</RIBCL>
...................and this is the command run in a command prompt to execute the above XML: "hpqlocfg -s 192.170.1.40 -n -v -f c:\Force_Format.xml" (where "hpqlocfg" is the app that is called, the IP address of the unit, the arguments and then the file). The idea is, you update the XML with the login/password and save it, then run the command to execute the XML on the unit at the given IP address.
I'm looking to create some sort of batch that runs the following process:
1. creates copy of "master" xml file
2. asks user for IP address
3. asks user for login
4. adds user 'login' input instead of "Administrator" in the copied XML file
5. asks user for password
6. adds user 'password' input instead of "password" in the copied XML file
7. runs the ""hpqlocfg -s 192.170.1.40 -n -v -f c:\Force_Format.xml" but with the user replaced IP address
8. deletes copied xml file
is that even remotely possible? because right now, my complete lack of skill set here has me writing standard processes instructing them how to do it by hand themselves!!!!
thanks in advance for any advice