11/6/2017 - 8:14 PM

LBaaS API result testing

LBaaS API result testing

Get the members for a LBaaS instance

tycho ◎ curl -s "https://$SOFTLAYER_USERNAME:$" | pmj | jq -r '.members[]'

  "address": "",
  "createDate": "2017-11-03T10:11:36-07:00",
  "modifyDate": "2017-11-03T10:18:21-07:00",
  "provisioningStatus": "ACTIVE",
  "uuid": "f8dd3e5b-52db-4d81-b068-56cb163aeb2c",
  "weight": null
  "address": "",
  "createDate": "2017-11-03T10:11:35-07:00",
  "modifyDate": "2017-11-03T10:18:21-07:00",
  "provisioningStatus": "ACTIVE",
  "uuid": "02d9d843-0778-45df-ad2d-a0c0309911b8",
  "weight": null

Take the provided UUID and get the VSI details ... or so you would think

tycho ◎ curl -s "https://$SOFTLAYER_USERNAME:$" | pmj
    "code": "SoftLayer_Exception_ObjectNotFound",
    "error": "Unable to find object with global identifier of '02d9d843-0778-45df-ad2d-a0c0309911b8'."

Instead use the provided IP to pull VSI details


tycho ◎ curl -s "https://$SOFTLAYER_USERNAME:$$filter" | pmj
        "accountId": 78003,
        "createDate": "2017-11-03T09:58:54-07:00",
        "dedicatedAccountHostOnlyFlag": false,
        "domain": "",
        "fullyQualifiedDomainName": "",
        "globalIdentifier": "385f0804-87f0-45f6-b7c1-596a36200d2d",
        "hostname": "node2",
        "id": 43309513,
        "lastPowerStateId": null,
        "lastVerifiedDate": null,
        "maxCpu": 1,
        "maxCpuUnits": "CORE",
        "maxMemory": 2048,
        "metricPollDate": null,
        "modifyDate": "2017-11-03T10:02:16-07:00",
        "primaryBackendIpAddress": "",
        "primaryIpAddress": "",
        "provisionDate": "2017-11-03T10:02:16-07:00",
        "startCpus": 1,
        "status": {
            "keyName": "ACTIVE",
            "name": "Active"
        "statusId": 1001,
        "typeId": 1,
        "uuid": "228238b2-78ff-fd9e-9c6d-dc78d7648c6c"

Notice how even the UUID is different from what is returned from the LBaaS members call.