4) Final Test
To test without creating a client, I found interesting information in the PureApplication infocenter. Connect a deployed server or the shared service server itself via ssh.
cd /0config export $(./get_userdata.sh) export header=$(/opt/python-2.6.4/bin/python create_security_header.py)
curl -H "X-IWD-Authorization : $header" -kv -H Content-Type:application/json -X GET https://localhost:9999/sharedservice/poolmanager/state
Response: {“SharedService”:”poolmanager”,”returnCode”:200,”OperationResults”:[{“return_value”:”PoolSizeValue:20″,”roleNode”:”SharedService-PoolManager.11361439381343.PoolManager”,”result”:”SUCCESS”}],”errorMessage”:null}
curl -H "X-IWD-Authorization : $header" -kv -H Content-Type:application/json -X POST -d '{}' https://localhost:9999/sharedservice/poolmanager/pool
Response: {“SharedService”:”poolmanager”,”returnCode”:200,”OperationResults”:[{“return_value”:”PoolSizeValue:19″,”roleNode”:”SharedService-PoolManager.11361439381343.PoolManager”,”result”:”SUCCESS”}],”errorMessage”:null}
curl -H "X-IWD-Authorization : $header" -kv -H Content-Type:application/json -X GET https://localhost:9999/sharedservice/poolmanager/threshold/20
Response: {“SharedService”:”poolmanager”,”returnCode”:200,”OperationResults”:[{“return_value”:”Reached:19″,”roleNode”:”SharedService-PoolManager.11361439381343.PoolManager”,”result”:”SUCCESS”}],”errorMessage”:null}
curl -H "X-IWD-Authorization : $header" -kv -H Content-Type:application/json -X DELETE -d '{}' https://localhost:9999/sharedservice/poolmanager/pool
Response: {“SharedService”:”poolmanager”,”returnCode”:200,”OperationResults”:[{“return_value”:”PoolSizeValue:20″,”roleNode”:”SharedService-PoolManager.11361439381343.PoolManager”,”result”:”SUCCESS”}],”errorMessage”:null}
It is possible that you have to reiterate the following command between each call:
export header=$(/opt/python-2.6.4/bin/python create_security_header.py)
You can also look at the PoolManager log for more information or debugging.