Server Automation Support and News Forum
Showing results for 
Search instead for 
Do you mean 

CLI or Script for removing Server in HPSA

Highlighted
Occasional Visitor

CLI or Script for removing Server in HPSA

Hello,

 

I have to realize a decommission workflow and I have to make the automation for this workflow step.

 

So I'm looking for a script (Perl, Python, ...) or a CLI Command (Powershell or anything else) which allows me to deactivate and remove a Server from HPSA.

 

Can anybody help me or give me a hint?

 

Best regards

Robert

3 REPLIES
Trusted Contributor

Re: CLI or Script for removing Server in HPSA

Use OGFS API commands.

 

cd /opsw/api/com/opsware/server/ServerService/method
        hpsa_device_id=`./getServerVO self:n=$hpsa_device | grep mid | awk '{print $2}' FS="\""`
        ./decommission self:i=$hpsa_device_id
        ./remove self:i=$hpsa_device_id

 

Don

 

Visitor

Re: CLI or Script for removing Server in HPSA

Hi,

Can anyone please help me on how run commands in HP SA. I have a requirement where in I need to run commands to created the Device groups and run scripts dynamically. I need APIs/Web Service or any CLIs for to perform the same.

 

Thanks and Regards

Bhaskar.D

Occasional Visitor

Re: CLI or Script for removing Server in HPSA

Hi Bhaskar,

 

You can use pywist or WSDL for doing the same. If you are using webservice,

https://<HPSAHOST>/osapi/com/opsware/script/ServerScriptService?wsdl

Inside this, there is a methd to start the script. wherein you can run the script.