March 12, 2018


VSI Flavors
Our public virtual server offering now comes in four distinct virtual server families: balanced, balanced local storage, compute, and memory. With this enhancement, IBM continues its effort to provide you with a first-class public cloud experience by taking the guesswork out of provisioning the right instance flavor for your workload needs.

The introduction of Flavors to VSI ordering significantly changes how VSIs are ordered, and the old style of ordering will eventually become unsupported. This page will hopefully explain what changes need to be made to any scripts that order VSIs.

Support for flavors has been added to the SLCLI, so make sure you have at least version 5.4.0.

Getting a Flavor List

SoftLayer_Virtual_Guest::getCreateObjectOptions is where you can find out the flavor listing, along with all other options you might want to supply to SoftLayer_Virtual_Guest::createObject

In the response from getCreateObjectOptions, will be a key “flavors”, with an array of different flavors and some information about their configuration.

$ curl -g -u ${SLAUTH} "https://api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/getCreateObjectOptions" | python -m json.tool


{ommitted}
    "flavors": [
        {
            "flavor": {
                "keyName": "B1_1X2X25",
                "name": "B1.1x2x25",
                "configuration": [
                    {
                        "category": {
                            "name": "First Disk"
                        },
                        "price": {
                            "hourlyRecurringFee": "0",
                            "item": {
                                "description": "25 GB (SAN)"
                            }
                        }
                    },
                    {
                        "category": {
                            "name": "RAM"
                        },
                        "price": {
                            "hourlyRecurringFee": ".03",
                            "item": {
                                "description": "2 GB"
                            }
                        }
                    },
                    {
                        "category": {
                            "name": "Computing Instance"
                        },
                        "price": {
                            "hourlyRecurringFee": ".023",
                            "item": {
                                "description": "1 x 2.0 GHz Core"
                            }
                        }
                    }
                ],
                "totalMinimumHourlyFee": "0.053",
                "totalMinimumRecurringFee": "35.17"
            },
            "template": {
                "id": null,
                "supplementalCreateObjectOptions": {
                    "flavorKeyName": "B1_1X2X25"
                }
            }
        },
{ommitted}

The same information can be retrieved from the SLCLI as well.

slcli vs create-options

Ordering a Flavor

Basically, instead of specifying a CPU, Memory, and Disk specifically, you remove those options and instead add a new “supplementalCreateObjectOptions” field that has the flavor. Here is a REST Example

And here is how to use the SLCLI for ordering

slcli vs create --os=UBUNTU_LATEST_64 \
    --flavor=BL1_2X4X100  \
    --billing=hourly  \
    --domain=softlayer.com  \
    --hostname=sldn-testing  \
    --datacenter=hou02

Feedback?

We would love to hear it
Open an issue