0
votes

The product order specifies DEDICATED cpus, memory and disk.
I set the hostid (dedicated host) but get error
"There was a problem with this order: Invalid price 16 x 2.0 GHz or higher Cores (Dedicated Host) (200327) provided on the order container. Please select a dedicated instance Computing Instance price to order a dedicated instance."

Here is the order (for e.g)

{
"orderContainers": [
    {
        "hostId": "204603", 
        "provisionScripts": [
            "https://10.140.132.215:8443/bootstrap_base.sh"
        ], 
        "location": 449600, 
        "packageId": 46, 
        "prices": [
            { "id": 200327 }, 
            { "id": 23070 }, 
            { "id": 200399 }, 
            { "id": 200423 }, 
            { "id": 212490 }, 
            { "id": 200367 }, 
            { "id": 203855 }, 
            { "id": 34183 }, 
            { "id": 34807 }, 
            { "id": 80265 }, 
            { "id": 32500 }, 
            { "id": 32627}, 
            { "id": 33483 }, 
            { "id": 35310 }
        ], 
        "virtualGuests": [
            {
                "primaryBackendNetworkComponent": {
                    "networkVlan": { "id": 1374047 }, 
                    "networkVlanId": 1374047
                }, 
                "domain": "dddddd", 
                "hostname": "test", 
                "primaryNetworkComponent": {
                    "networkVlan": { "id": 1374043 }, 
                    "networkVlanId": 1374043
                }
            }
        ], 
        "sshKeys": [
            {
                "sshKeyIds": [
                    388713, 
                    410311
                ]
            }
        ], 
        "quantity": 1
    }
]
}
1

1 Answers

0
votes

The dedicated host is in a datacenter so I recommend to remove the location property and add complexType instead

Try with the following:

{
"orderContainers": [
    {
        "complexType":"SoftLayer_Container_Product_Order_Virtual_Guest",
        "hostId": 204603, 
        "provisionScripts": [
            "https://10.140.132.215:8443/bootstrap_base.sh"
        ], 
        "packageId": 46, 
        "prices": [
            { "id": 200327 }, 
            { "id": 23070 }, 
            { "id": 200399 }, 
            { "id": 200423 }, 
            { "id": 212490 }, 
            { "id": 200367 }, 
            { "id": 203855 }, 
            { "id": 34183 }, 
            { "id": 34807 }, 
            { "id": 80265 }, 
            { "id": 32500 }, 
            { "id": 32627}, 
            { "id": 33483 }, 
            { "id": 35310 }
        ], 
        "virtualGuests": [
            {
                "primaryBackendNetworkComponent": {
                    "networkVlan": { "id": 1374047 }, 
                    "networkVlanId": 1374047
                }, 
                "domain": "dddddd", 
                "hostname": "test", 
                "primaryNetworkComponent": {
                    "networkVlan": { "id": 1374043 }, 
                    "networkVlanId": 1374043
                }
            }
        ], 
        "sshKeys": [
            {
                "sshKeyIds": [
                    388713, 
                    410311
                ]
            }
        ], 
        "quantity": 1
    }
]
}