0

我使用什么 SoftLayer API 来获取我拥有的 EVault 插件的列表?它可以是我拥有的所有 EVault 插件,也可以是与特定 EVault 或特定主机关联的所有插件。

我需要获取一个包含每个详细信息的列表,或者获取一个列表,然后找到一种从列表中获取每个详细信息的方法。

也许我错过了,但我没有看到来自 SoftLayer_Network_Storage_Backup_Evault 的任何有用的 API,或者没有看到任何包含“插件”一词的 SoftLayer 服务 API。

4

2 回答 2

0

尝试这个:

<?php

require_once ('/SoapClient.class.php');

$username = 'set me';
$key = 'set me';

$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $username, $key);

$objectMask = new SoftLayer_ObjectMask();
$objectMask->evaultNetworkStorage->pluginBillingItems;
$objectMask->evaultNetworkStorage->pluginBillingItems->item;
$accountClient->setObjectMask($objectMask);

# Getting the billing items
$result = $accountClient->getEvaultNetworkStorage();

print_r($result);
于 2016-01-11T14:32:24.950 回答
0

您可以使用“SoftLayer_Product_Package::getCategories”来获取 Evault 插件项目。

参考:

http://sldn.softlayer.com/reference/services/SoftLayer_Product_Package/getCategories

例如:

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Package/0/getCategories?objectMask=mask[id,categoryCode,groups[prices[id,item]]]

Method: GET

Where: 
The package used for Evault is 0
The “categoryCode” that we are interested in: "categoryCode": "evault_plugin"

结果将是这样的:

{
"categoryCode": "evault_plugin"
"id": 57
"groups": [1]
0:  {
"itemCategoryId": 57
"packageId": 0
"sort": 0
"prices": [30]
0:  {
"id": 11111
"item": {
"description": "EVault Plugin - Sharepoint"
"id": 111
"itemTaxCategoryId": 166
"keyName": "EVAULT_PLUGIN_SHAREPOINT"
"softwareDescriptionId": 175
"upgradeItemId": null
}-
}-
1:  {
"id": 22222
"item": {
"description": "EVault Plugin - Oracle"
"id": 222
"itemTaxCategoryId": 166
"keyName": "EVAULT_PLUGIN_ORACLE"
"softwareDescriptionId": 177
"upgradeItemId": null
}-
}-
2:  {
"id": 33333
"item": {
"description": "EVault Plugin - Open TXN Manager"
"id": 333
"itemTaxCategoryId": 166
"keyName": "EVAULT_PLUGIN_OPEN_TXN_MANAGER"
"softwareDescriptionId": 176
"upgradeItemId": null
}-
}
….
于 2016-01-08T15:50:26.317 回答