Ibm cloud 如何在SL中检查订单状态?

Ibm cloud 如何在SL中检查订单状态?,ibm-cloud,ibm-cloud-infrastructure,bare-metal-server,Ibm Cloud,Ibm Cloud Infrastructure,Bare Metal Server,这是我放置裸机服务器的代码。placeOrder函数将返回订单收据。然后,我从SL portal检查订单状态,并将其更改为“已批准” 我的问题是,我们是否有任何API来检查何时配置裸机服务器?我们需要在配置裸机服务器之后对其进行配置 var sess = session.New(userName, apiKey, endpoint) accountService := services.GetAccountService(sess) order := datatypes.Container_

这是我放置裸机服务器的代码。placeOrder函数将返回订单收据。然后,我从SL portal检查订单状态,并将其更改为“已批准”

我的问题是,我们是否有任何API来检查何时配置裸机服务器?我们需要在配置裸机服务器之后对其进行配置

var sess = session.New(userName, apiKey, endpoint)
accountService := services.GetAccountService(sess)  
order := datatypes.Container_Product_Order{
    Quantity:            sl.Int(1),
    Hardware: []datatypes.Hardware{
        {
            Hostname: sl.String("test10g"),
            Domain:   sl.String("example.com"),
            PrimaryBackendNetworkComponent: &datatypes.Network_Component{           
                NetworkVlan: &datatypes.Network_Vlan{Id: sl.Int(2288425)},          
            },
        },
    },
    Location:  sl.String("DALLAS10"),
    PackageId: sl.Int(911),  // Single E3-1270 v6
    Prices: []datatypes.Product_Item_Price{
        {Id : sl.Int(206249)},  // server
        {Id : sl.Int(209427)},  // ram
        {Id : sl.Int(175789)},  // os
        {Id : sl.Int(32927)},   // disk controller 
        {Id : sl.Int(49761)},   // disk 0
        {Id : sl.Int(50359)},   // bandwidth
        {Id : sl.Int(35686)},   // portSpeed
        {Id : sl.Int(34241)},   // monitoring
        {Id : sl.Int(34996)},   // response
        {Id : sl.Int(33483)},   // vpn management
        {Id : sl.Int(35310)},   // vulnerabilityScanner
        {Id : sl.Int(34807)},   // pri_ip_address
        {Id : sl.Int(32500)},   // notification
        {Id : sl.Int(25014)},   // remote_management
    },       
}
service := services.GetProductOrderService(sess)
receipt, err := service.PlaceOrder(&order, sl.Bool(false))

// Any functions to check the order status here? 
// Need some code to waiting for the baremetal server to become ready.
您需要使用该方法并使其重复查询服务器,直到填写“ProvisioningDate”参数,一旦填写完毕,则配置完成

有关更多信息,请参见以下内容: