Subnet error while ordering baremetal server

2019-09-21 04:19发布

I use the following json parameters to order a Baremetal server

`{
    "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"
                }
            ]
        }
    ]
}`

the verifyOrder call is success and returns the details. But when I do place order it gives the following error: {"error":"A valid subnet id must be provided.","code":"SoftLayer_Exception_Public"}

How can I correct this error. Please let me know if some additional parameters are to be added.

1条回答
仙女界的扛把子
2楼-- · 2019-09-21 04:36

You need to send the "1229225" without quotes:

"networkVlanId": 1229225

Try this:

{
    "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"
                }
            ]
        }
    ]
}`
查看更多
登录 后发表回答