Does anyone have or can provide a sample code for ordering an EVault backup in SoftLayer? It looks little different from regular ordering where you select the item to order, then pick some options then make a verifyOrder() call. For EVault, I first have to go to one of the server devices then add (kind of like an upgrade, but different because it's not listed as upgradable item).
When I try to see what SoftLayer UI calls, it does a POST and passes whole bunch of data as request body. I seriously doubt I need to gather all that and pass.
So if someone already knows this or have sample, could you please share a sample code that will order or verify the price for adding EVault backup to a device? A PHP code sample is preferred, but anything that will show me the process logic and the input that I need to provide, that will be great.
Thank you in advance.
Try the following:
Additionally, this is a REST request to get valid item prices for Evault:
Method: GET
EDIT
This is an example of an Evault order for Hardware (Bar metal). I changed some variable names to the previous script (maybe it needs to be improved).
To clarify some doubts, the order template that we are using is a generic template for verifyOrder/placeOrder method. This template is used to order different kind of items (Virtual Guests, Hardware, network storage, execute upgrades, etc.). When using this template, we are not entirely free to change the format; only, we can restrict the values that we will use in a specific order. Maybe there is confusion when we see that “virtualGuests”property is an array in our example; one reason we are able to order multiple Virtual guests at the same time with the same template. But in our case we need to configure only one Virtual Guest to order Evault, but we don’t need to change the template. The only thing that the order needs to identity what kind of order is the container (in our case: “SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Vault”), using this property, the order can verify if the values are according to the type of order.
For better understanding of the structure of template, Below there are the same order examples using REST:
Method: POST
Json - Order Evault for VSI:
Json - Order Evault for Hardware:
It is the same as an order, you just need to use the http://sldn.softlayer.com/reference/datatypes/SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Vault container and specify the virtualGuests or the hardware that you wish to attach to the Evault.