HP CloudSystem Matrix/Matrix Operating Environment 7.0 Integration Interfaces API and CLI Operations Reference Guide

6 Example Usage
The web service operations may be called individually for targeted purposes or they may be
sequenced to perform more complex actions.
Physical Server Maintenance Example
If a physical server in use by an infrastructure service experiences a hardware failure, one may
wish to move it to the Maintenance pool in IO and use another server in the infrastructure service.
The following sequence of operations may be used for that purpose. (Note: Error handling is not
considered in this example.)
Find the logical server associated with the server hostname.
findLogicalServer
hostId = hostname
The result is a logicalServer.
Deactivate the logical server.
deactivateLogicalServers
serviceName = logicalServer.serviceName
logicalServers = { logicalServer.name }.
The result is requestId1.
Wait for the deactivateLogicalServers operation to complete.
getRequestInfo
requestId = requestId1
Repeat periodically until the returned request.status is a terminal status.
Move the server to the IO Maintenance pool.
moveServerToServerPool
destinationPoolName = “Maintenance
serverResourceId = logicalServer.resourceId
Activate the logical server.
activateLogicalServers
serviceName = logicalServer.serviceName
logicalServers = { logicalServer.name }
The result is requestId2.
Wait for the activateLogicalServers operation to complete.
getRequestInfo
requestId = requestId2
Repeat periodically until the returned request.status is a terminal status.
50 Example Usage