0
hw = {
'datacenter': {'name': 'che01'},
'hostname': 'baremetal',
'domain': 'cds.net',
'hourlyBillingFlag': True,
'fixedConfigurationPreset': {'keyName': 'S1270_32GB_1X1TBSATA_NORAID'},
'networkComponents': [{
'maxSpeed': 1000
# 'redundancyEnabledFlag': True,
}],
'operatingSystemReferenceCode': 'UBUNTU_14_64'
}
productOrder = slClient['Hardware'].generateOrderTemplate(hw)
order = slClient['Hardware'].createObject(productOrder)
運行上面的代碼,它給這個錯誤:供應baremetal是給「主機名」必須設置錯誤
SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_MissingCreationProperty): The property 'hostname' must be set to create an instance of 'SoftLayer_Hardware' I hostname is specified, still it is giving hostname property is not set.
能否請您讓我知道我在做正確?