SoftLayer_Account :: getOperatingSystemReloadImages [英] SoftLayer_Account::getOperatingSystemReloadImages

查看:154
本文介绍了SoftLayer_Account :: getOperatingSystemReloadImages的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用API​​ OSReload期间获得可用的操作系统列表。
我找到了方法SoftLayer_Account :: getOperatingSystemReloadImages是mentioned.But无法找到这种方法的使用。
谁可以帮我这个?
谢谢你。


解决方案

我没能找到这个方法 getOperatingSystemReloadImages 。但我发现一种方式来获得操作系统重装选择:

首先,我们需要知道用来订购服务器的包。例如,对于虚拟客户机,使用的包是 46 。但是,如果你想证实这一点,请执行以下恢复要求:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[package]方法:GET

然后,要获得刷新选项,执行:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemPrices?objectFilter={ itemPrices:{类别:{类code:{操作:OS}}}}&安培; objectMask =面膜[ID项[softwareDescription],分类[类别code ]]方法:GET

参考文献:

SoftLayer_Virtual_Guest :: getBillingItem

SoftLayer_Product_Package :: getItemPrices

编辑:

现在,为了使用SoftLayer_Virtual_Guest :: reloadOperatingSystem,我们需要添加使用JSON机身配置的一些参数:令牌和配置(编号:< A HREF =htt​​p://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/reloadOperatingSystem相对=nofollow> SoftLayer_Virtual_Guest :: reloadOperatingSystem )

下面是一个 REST 例如:

网址:

<$p$p><$c$c>https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[virtual_Guest_ID]/reloadOperatingSystem

方法:POST

JSON:

  {
  参数:
    力,
    {
      itemPrices:[
        {
          ID:45466
        }
      ]
    }
  ]
}

其中:45466是OS的新priceId

I want to use API to get the available OS list during OSReload. I found the method SoftLayer_Account::getOperatingSystemReloadImages is mentioned.But cannot find the usage about this method. Who can help me on this? Thanks.

解决方案

I was not able to find this method getOperatingSystemReloadImages. But I found a way to get OS reload options:

First, we need to know the package used to order the server. For example for Virtual Guests, the package used is 46. But if you want to confirm this, please execute the following Rest request:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[vsi_id]/getBillingItem?objectMask=mask[package]

Method: GET

Then, to get "Reload options", execute:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemPrices?objectFilter={   "itemPrices": {     "categories": {       "categoryCode": {         "operation": "os"       }     }   } }&objectMask=mask[id,item[softwareDescription], categories[categoryCode]]

Method: GET

References:

SoftLayer_Virtual_Guest::getBillingItem

SoftLayer_Product_Package::getItemPrices

EDIT:

Now, in order to use " SoftLayer_Virtual_Guest::reloadOperatingSystem", we need add some parameters in Json body configuration: "token" and "config" (Ref: SoftLayer_Virtual_Guest::reloadOperatingSystem)

Below is a REST example:

URL:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Virtual_Guest/[virtual_Guest_ID]/reloadOperatingSystem

Method: POST

Json:

{
  "parameters": [
    "FORCE",
    {
      "itemPrices": [
        {
          "id": 45466
        }
      ]
    }
  ]
}

Where: 45466 is the new priceId of the OS

这篇关于SoftLayer_Account :: getOperatingSystemReloadImages的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆