greyhoundforty
11/4/2016 - 3:56 PM

VSI testing

VSI testing

How to tell if a VSI is on a Public or Private node

Use the SoftLayer_Virtual_Guest service with the getObject method and look for dedicatedAccountHostOnlyFlag. In the following example the response from the API is true which means this is a Private Node VSI.

curl -s --user "$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY" "https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/GUEST_ID/getObject?objectMask=mask\[dedicatedAccountHostOnlyFlag\]

{"dedicatedAccountHostOnlyFlag":true}%

How to tell if a VSI is using SAN or Local Storage

Use the SoftLayer_Virtual_Guest service with the getLocalDiskFlag method. If the response is true the VSI is using a local disk. If it is false then the VSI is using SAN storage.

curl -s --user "$SOFTLAYER_USERNAME:$SOFTLAYER_API_KEY" "https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/GUEST_ID/getLocalDiskFlag" | python -m json.tool

false