如何使用 Softlayer 下达升级防火墙订单
How to place a upgrade firewall order with Softlayer
我正在尝试使用 softlayer rest api 向已创建的多 vlan 防火墙添加插件。我知道为此我需要填充 Product_Order_Network_Protection_Firewall_Dedicated_Upgrade 数据类型并为此下订单。这是我为下订单填充和发送的数据结构。
{
"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]
}
执行此操作后,我得到 200 ok,然后是下订单呼叫的正常响应。
但是在检查升级状态时我没有看到任何东西,我在 Soflayer 上也没有看到任何东西 UI。为了检查升级状态,我使用以下 api:-
https://api.softlayer.com/rest/v3.1/SoftLayer_Network_Vlan_Firewall/13597/getUpgradeRequest?objectMask=mask[status].
请告诉我我遗漏了什么。
原因是你的json body最后设置的boolean为"true",这与saveAsQuote参数有关,你可以把它从请求中取出来,或者设置为"false"所以订单可以通过,而且需要指定属性对象
在请求订单中使用以下 json 正文:
{
"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
]
}
我正在尝试使用 softlayer rest api 向已创建的多 vlan 防火墙添加插件。我知道为此我需要填充 Product_Order_Network_Protection_Firewall_Dedicated_Upgrade 数据类型并为此下订单。这是我为下订单填充和发送的数据结构。
{
"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]
}
执行此操作后,我得到 200 ok,然后是下订单呼叫的正常响应。
但是在检查升级状态时我没有看到任何东西,我在 Soflayer 上也没有看到任何东西 UI。为了检查升级状态,我使用以下 api:-
https://api.softlayer.com/rest/v3.1/SoftLayer_Network_Vlan_Firewall/13597/getUpgradeRequest?objectMask=mask[status].
请告诉我我遗漏了什么。
原因是你的json body最后设置的boolean为"true",这与saveAsQuote参数有关,你可以把它从请求中取出来,或者设置为"false"所以订单可以通过,而且需要指定属性对象
在请求订单中使用以下 json 正文:
{
"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
]
}