Pattern-type (Part 13): How to create shared services for IBM SmartCloud Application Workload Service

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.

All SCAWS pattern-type educations

4 thoughts on “Pattern-type (Part 13): How to create shared services for IBM SmartCloud Application Workload Service

  1. I want to develop an external shared service for IWD 4.0. could you provide any pointers ?

Comments are closed.