Search code examples
apiibm-cloud-infrastructure

SoftLayer API Hardware : Fast Provision of BM Server PresetConfiguration OS


Using the Fast Provision of BM Server REST API :

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

SoftLayer_Hardware/getCreateObjectOptions : In the response we will get fixed preset configuration,datacenter,operating system details,etc.,

When I provision using OS Reference code ESXI_5.1_64, I am getting the below mentioned error. In the request I have not mentioned networkComponents details and if i add "networkComponents": [{ "maxSpeed": 100 }], details then also i am getting the below mentioned error message.

{
"error": "VMware ESXi 5.5 cannot be ordered with 100 Mbps Public & Private Network Uplinks"
"code": "SoftLayer_Exception_Public"
} 

Also if i use some of the operating system reference codes i am getting the below mentioned error.

{
"error": "Unable to match an OS with reference code: XENSERVER_6.0_64"
"code": "SoftLayer_Exception_NotFound"
}

 "operatingSystemReferenceCode": "XENSERVER_6.0_64"  "operatingSystemReferenceCode": "REDHAT_6_64"

Solution

  • 1. The exception:

    { "error": "VMware ESXi 5.5 cannot be ordered with 100 Mbps Public & Private Network Uplinks" "code": "SoftLayer_Exception_Public" }

    Reason: The VMware OSes cannot be ordered with "100 Mbps Public & Private Network Uplinks" (e.g. "networkComponents": [{ "maxSpeed": 100 }]). VMware OSes must be ordered at least with "1 Gbps Public & Private Network Uplinks". (e.g. "networkComponents": [{ "maxSpeed": 1000}]).

    2. The exception:

    { "error": "Unable to match an OS with reference code: XENSERVER_6.0_64" "code": "SoftLayer_Exception_NotFound" }

    Probably you are trying to order a hourly server ("hourlyBillingFlag": true), this can be the reason of the exception, because this OS is only available for Monthly billing fee.

    Note: If this is not the reason ("hourlyBillingFlag": true), you can attach the code that you are trying, in order to identify the issue and provide more feedback about it.

    How identify the type of billing for the items?

    Using SoftLayer_Hardware::getCreateObjectOptions method, you will get a response like this:

    38:  {
    "itemPrice": {
    "hourlyRecurringFee": ".024"
    "recurringFee": "17"
    "item": {
    "description": "Windows Server 2012 R2 Standard Edition (64 bit)"
    }-
    }-
    "template": {
    "operatingSystemReferenceCode": "WIN_2012-STD-R2_64"
    }-
    }
    

    "hourlyRecurringFee" means that the item is available per hour and "recurringFee" per month. The "XENSERVER_6.0_64" item is only available for month because it only has "recurringFee" property and not "hourlyRecurringFee"property.