An excerpt from call, https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/getAllObjects
{
"firstOrderStepId": 1,
"id": 50,
"isActive": 1,
"keyName": "BARE_METAL_INSTANCE",
"name": "Bare Metal Instance",
"unitSize": 1
},
Using this id I make call: https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/50/getRegions dal01, dal05, dal06, dal07 and dal09 are returned but dal10 is not. This explains the error I am getting when attempting to verify a BM order in dal10:
The location provided for this order is invalid. (HTTP 200)
If I use the UI I can order bare metals in dal10. Why can I not do this through the api?
Hardware template I am using:
hardwareTpl = datatypes.Hardware{
Datacenter: &datatypes.Location{Name: sl.String("dal10")},
Domain: sl.String("xxx"),
Hostname: sl.String("xxx"),
HourlyBillingFlag: sl.Bool(false),
MemoryCapacity: sl.Uint(32),
OperatingSystemReferenceCode: sl.String("UBUNTU_16_64"),
PrimaryBackendNetworkComponent: &datatypes.Network_Component{Id: sl.Int(vlanPriId), MaxSpeed: sl.Int(10000)},
PrimaryNetworkComponent: &datatypes.Network_Component{Id: sl.Int(vlanPubId), MaxSpeed: sl.Int(10000)},
ProcessorCoreAmount: sl.Uint(4),
}
That is correct, the UI uses other packages to order Bare Metal servers, I recommend to use this request:
https://api.softlayer.com/rest/v3/SoftLayer_Product_Package_Server/getAllObjects
That is gonna return all the packages that the UI displays