SoftLayer API硬件:提供BareMetal Server期间的网络(VLAN)详细信息

时间:2016-02-11 12:10:39

标签: ibm-cloud-infrastructure

提供BareMetal服务器:

使用下面提到的博客,我可以提供每小时的裸机服务器。

http://sldn.softlayer.com/blog/bpotter/ordering-bare-metal-servers-using-softlayer-api

但我无法在请求对象中设置VLAN详细信息。如果我在有效负载中传递VLAN详细信息,则会收到错误消息:

"error":"VLANs may not be specified for Bare Metal Server configurations.","code":"SoftLayer_Exception_Public"}.

另外我想知道我是否可以将private only network flag设置为true?

1 个答案:

答案 0 :(得分:0)

很高兴看到您的有效负载,但VLAN的配置在http://sldn.softlayer.com/reference/services/SoftLayer_Hardware/createObject

你的有效载荷应该是喜欢它的东西:

hw = {
    'datacenter': {'name': 'tor01'},
    'hostname': 'simplebmi',
    'domain': 'test.com',
    'hourlyBillingFlag': True,
    'fixedConfigurationPreset': {'keyName': 'S1270_8GB_2X1TBSATA_NORAID'},
    'networkComponents': [{
        'maxSpeed': 1000,
    }],
    'operatingSystemReferenceCode': 'UBUNTU_14_64',
     "primaryNetworkComponent": { 
        "networkVlan": { 
            "id": 52123
        } 
    }, 
   "primaryBackendNetworkComponent": { 
        "networkVlan": { 
            "id": 2 
        } 
    } 
}

并且是的,您可以设置仅限私有网络,只需将其添加到有效负载:

"privateNetworkOnlyFlag": true

此致