Subnet error while ordering baremetal server

有些话、适合烂在心里 提交于 2019-12-13 09:36:41

问题


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:


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


来源:https://stackoverflow.com/questions/40578689/subnet-error-while-ordering-baremetal-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!