订购裸机服务器时出现子网错误

时间:2016-11-13 20:52:27

标签: ibm-cloud-infrastructure

我使用以下json参数来订购Baremetal服务器

`{
    "parameters": [
        {
            "location": "449494",
            "packageId": 257,
            "hardware": [
                {
                    "hostname": "BMtest1",
                    "domain": "domain.com",
                    "primaryBackendNetworkComponent": {
                        "networkVlanId": "1229225"
                    }
                }
            ],
            "prices": [
                {
                    "id": "49515"
                },
                {
                    "id": "50357"
                },
                {
                    "id": "49759"
                },
                {
                    "id": "876"
                },
                {
                    "id": "55"
                },
                {
                    "id": "57"
                },
                {
                    "id": "175791"
                },
                {
                    "id": "273"
                },
                {
                    "id": "21"
                },
                {
                    "id": "49495"
                },
                {
                    "id": "906"
                },
                {
                    "id": "418"
                },
                {
                    "id": "420"
                },
                {
                    "id": "58"
                }
            ]
        }
    ]
}`

verifyOrder调用成功并返回详细信息。 但是当我下订单时,会出现以下错误: {"error":"A valid subnet id must be provided.","code":"SoftLayer_Exception_Public"}

如何更正此错误。如果要添加一些其他参数,请告诉我。

1 个答案:

答案 0 :(得分:0)

您需要在没有引号的情况下发送" 1229225"

  

" networkVlanId":1229225

试试这个:

{
    "parameters": [
        {
            "location": "449494",
            "packageId": 257,
            "hardware": [
                {
                    "hostname": "BMtest1",
                    "domain": "domain.com",
                    "primaryBackendNetworkComponent": {
                        "networkVlanId": 1229225
                    }
                }
            ],
            "prices": [
                {
                    "id": "49515"
                },
                {
                    "id": "50357"
                },
                {
                    "id": "49759"
                },
                {
                    "id": "876"
                },
                {
                    "id": "55"
                },
                {
                    "id": "57"
                },
                {
                    "id": "175791"
                },
                {
                    "id": "273"
                },
                {
                    "id": "21"
                },
                {
                    "id": "49495"
                },
                {
                    "id": "906"
                },
                {
                    "id": "418"
                },
                {
                    "id": "420"
                },
                {
                    "id": "58"
                }
            ]
        }
    ]
}`