Search code examples
ibm-cloud-infrastructure

How to place a upgrade firewall order with Softlayer


I am trying to add an addon to an already created multi-vlan firewall using the softlayer rest api. I know that for doing this I need to populate the Product_Order_Network_Protection_Firewall_Dedicated_Upgrade datatype and do a place order for this. This is the data structure that i am populating and sending for Place Order.

{
"parameters": [{
        "complexType": "SoftLayer_Container_Product_Order_Network_Protection_Firewall_Dedicated_Upgrade",
        "location": "fra02",
        "packageId": 863,
        "prices": [{
                "id": 203375
            }
        ],
        "quantity": 1,
        "name": "TestMultiVLAN",
        "firewallId": 13597
    }, true]
}

After doing this I get a 200 ok and the the normal response from a place order call follows.

But while checking the status of the upgrade i dont see anything and neither do i see anything on Soflayer UI. For checking the status of the upgrade i am using the below api:-

https://api.softlayer.com/rest/v3.1/SoftLayer_Network_Vlan_Firewall/13597/getUpgradeRequest?objectMask=mask[status]. 

Please tell me what i am missing out in this.


Solution

  • The reason is the boolean set as "true" at the end in your json body, this is related to saveAsQuote parameter, you can take it out of the request, or set it as "false" so the order can go through, and also it is required to specify the properties object.

    Use the following json body with your request Order:

    {
    "parameters":[
        {
            "complexType" : "SoftLayer_Container_Product_Order_Network_Protection_Firewall_Dedicated_Upgrade",            
            "packageId" : 863,
            "firewallId" : 13597,          
            "prices" : [
                 {
                 "id": 203375
                  }
                  ],
            "properties" : [
                 {
                 "name":"MAINTENANCE_WINDOW",
                 "value":"2018-06-19T22:11:32+00:00"
                 }
            ]                 
        },
     false
    ]
    }