In my Ruby script, I can't seem to get the Softlayer_Product_Package_Server relational properties from the SoftLayer API endpoint. My Ruby code:
packageServerList = client['SoftLayer_Product_Package_Server'].getAllObjects
packageServerList.each do |packageServer|
packageServer['package']
end
The packageServer['package']
just gives me a null object. Some of the other relations have the same issue ("brand", "catalog", "itemPrice"), but "item" seems to work. Taken from:
This is confusing because the REST request works and shows the data from a 'package' object mask.
To get relational or/and count properties, it's necessary to use an Object Masks, please make the below change in your code:
packageServerList = client['SoftLayer_Product_Package_Server'].object_mask('mask[package, brand, caralog]').getAllObjects
References: