订购VSI时如何指定链接速度

时间:2018-12-10 04:24:00

标签: ibm-cloud-infrastructure

我正在使用VirtualGuestService的createObject方法创建VSI

我将模板中的端口速度设置为1 Gb,但始终以10 Mb创建。

1 个答案:

答案 0 :(得分:0)

您必须在模板中以兆位为单位设置端口速度,这意味着1Gb将为1000兆位。

尝试使用以下模板:

{
    "parameters": [
        {
            "hostname": "test",
            "domain": "test.local",
            "datacenter": {
                "name": "dal13"
                },
            "hourlyBillingFlag": "true",
            "operatingSystemReferenceCode": "CENTOS_7_64",
            "networkComponents": [
                     {
                         "maxSpeed": 1000
                     }
                  ],
            "privateNetworkOnlyFlag": "true",
            "supplementalCreateObjectOptions": {
                         "flavorKeyName": "AC1_8X60X25"
           }
        }
    ]
}

参考:

https://softlayer.github.io/reference/services/SoftLayer_Virtual_Guest/createObject/

要获取可用的端口速度,可以使用以下rest api调用:

方法:GET

https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/getCreateObjectOptions 

通过“ networkComponents”搜索端口速度选项。

您将收到类似以下示例的答复:

"networkComponents": [
          {
            "itemPrice": {
                "hourlyRecurringFee": "0",
                "recurringFee": "0",
                "dedicatedHostInstanceFlag": true,
                "item": {
                    "description": "1 Gbps Public & Private Network Uplinks (Dedicated Host)"
                }
            },
            "template": {
                "id": null,
                "networkComponents": [
                    {
                        "maxSpeed": 1000
                    }
                ],
                "privateNetworkOnlyFlag": false
            }
        },        
]