在#SoftLayer #BlueMix上订购Vyatta路由器,订单JSON如下
gatewayOrder = {
'orderContainers': [{
'quantity': 2, # high availability is 2 quantity
'hardware': [
{
'hostname': vyatta_fr_hostname,
'domain': vyatta_domain,
'networkVlans': [
{'vlanNumber': vlanPub },
{'vlanNumber': vlanPriv }
]},
{
'hostname': vyatta_bu_hostname,
'domain': vyatta_domain,
'networkVlans': [
{'vlanNumber': vlanPub },
{'vlanNumber': vlanPriv }
]}
],
'location': locationId,
'packageId': pkgIdGW,
'prices': [
{'id': vyatta_system_dual_intel_2620 },
{'id': vyatta_os_vyatta_5600 },
{'id': vyatta_64_gb_ram },
{'id': vyatta_disk_controller },
{'id': vyatta_disk_500_gb },
{'id': vyatta_disk_4_tb },
{'id': vyatta_net_20000 },
{'id': vyatta_net_10_gbps },
{'id': vyatta_kvm_reboot },
{'id': vyatta_ssl_vpn },
{'id': vyatta_1_ip },
{'id': vyatta_redundant_power },
{'id': vyatta_host_monitoring },
{'id': vyatta_auto_reboot },
{'id': vyatta_notification_email },
{'id': vyatta_nessus },
],
}]
}
Vlan没有被添加到订单中。为什么呢?
答案 0 :(得分:1)
尝试以下休息示例:
method: POST
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder
JSON body:
{
"parameters": [
{
"orderContainers": [
{
"hardware": [
{
"hostname": "vyattaVlantest",
"domain": "domain.com",
"primaryBackendNetworkComponent":{
"networkVlanId":1111111
},
"primaryNetworkComponent":{
"networkVlanId":2222222
}
}
],
"location":"DALLAS13" ,
"packageId": 236,
"quantity": 1,
"prices": [
{
"id": 177611
},
{
"id": 17182
},
{
"id": 201189
},
{
"id": 876
},
{
"id": 14031
},
{
"id": 342
},
{
"id": 273
},
{
"id": 792
},
{
"id": 55
},
{
"id": 58
},
{
"id": 420
},
{
"id": 418
},
{
"id": 21
},
{
"id": 57
},
{
"id": 906
}
]
}
]
}
]
}
响应中的返回值应显示如下内容:
"primaryBackendNetworkComponent": {
"networkVlanId": 1111111,
"networkVlan": {
"id": 1111111,
"primarySubnetId": 123123123,
"vlanNumber": 591
}
},
"primaryNetworkComponent": {
"networkVlanId": 2222222,
"networkVlan": {
"id": 2222222,
"primarySubnetId": 789789789,
"vlanNumber": 768
}
}
}
],
答案 1 :(得分:0)
这不起作用。现在api抱怨VLAN不是标准的
您正确指定了VLAN ID,但没有选择正确的VLAN。您只能在标准版本上订购Vyattas,也就是说,作为网关或关联版本的网关尚未作为网关的一部分。
控制门户网站订单页面也应该反映这一点。