0
votes

I've been searching SLAPI to order a baremetal servers with partition template for OS.

After I read some articles to order the RAID and configure the partition template data, I found that the ID or description of the OS is required to get the template data.

so, I've tried to get these information of OS with SLAPIs but I couldn't.

For the 'CentOS 7.x (64 bit)', the OS description should be 'linux' but I don't know how to get it with the OS item ID is 5920 and the item price ID is 44988 in dal03.

Here is referred article: Configuring Softlayer Disk Partitions at Order Time

and the response from calling [services/SoftLayer_Hardware_Component_Partition_OperatingSystem]/getAllobjects

[{
    "description": "linux",
    "id": 1,
    "notes": "All flavors"
}, {
    "description": "windows",
    "id": 2,
    "notes": "All RH-based or closely related"
}, {
    "description": "freebsd",
    "id": 3,
    "notes": "FreeBSD, etc.."
}]

and the response of item price (44988) is :

{
    "currentPriceFlag": null,
    "hourlyRecurringFee": "0",
    "id": 44988,
    "itemId": 5920,
    "laborFee": "0",
    "locationGroupId": null,
    "onSaleFlag": null,
    "oneTimeFee": "0",
    "quantity": null,
    "recurringFee": "0",
    "setupFee": "0",
    "sort": 0,
    "item": {
        "capacity": "0",
        "description": "CentOS 7.x (64 bit)",
        "id": 5920,
        "itemTaxCategoryId": 166,
        "keyName": "OS_CENTOS_7_X_64_BIT",
        "softwareDescriptionId": 1400,
        "units": "N/A",
        "upgradeItemId": null,
        "itemCategory": {
            "categoryCode": "os",
            "id": 12,
            "name": "Operating System",
            "quantityLimit": 0
        },
        "softwareDescription": {
            "controlPanel": 0,
            "id": 1400,
            "licenseTermValue": null,
            "longDescription": "CentOS / CentOS / 7.0-64",
            "manufacturer": "CentOS",
            "name": "CentOS",
            "operatingSystem": 1,
            "referenceCode": "CENTOS_7_64",
            "upgradeSoftwareDescriptionId": null,
            "upgradeSwDescId": null,
            "version": "7.0-64",
            "virtualLicense": 0,
            "virtualizationPlatform": 0,
            "requiredUser": "root"
        }
    }
}
1

1 Answers

0
votes

That insformation is not in the API, you have to use your own code in order to pick out the correct template, for that you could use the description of the item e.g. if the item description contains CentOS or Ubuntu or RedHat use linux if the item description contains Windows use windows if the item description contains FreeBSD use freebsd

Regards