Sample code to handle the upgrade of EVault?

冷暖自知 提交于 2019-12-11 12:05:30

问题


Now that I have ordering EVault working, I need some help with upgrading it. Can anyone provide some sample code (PHP preferred) that will perform an upgrade of EVault backup in SoftLayer? If there are different input for upgrading EVault backup associated with Virtual Guest vs. Bare Metal, please provide the differences as well.

For an Endurance storage, I've used "Container_Product_Order_Network_Storage_Enterprise_SnapshotSpace_Upgrade" as complexType in the container, but I don't see anything for EVault listed in the SL Data Type list. And what are other inputs that I need to specify?

Any help will be appreciated. Thank you.


回答1:


Easy

<?php

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

$apiUser = 'set me';
$key = 'set me';

$evaultId = 4862895;

$evaultClient = SoftLayer_SoapClient::getClient('SoftLayer_Network_Storage_Backup_Evault', $evaultId, $apiUser, $key);

$upgradePrice = 560;

try {

    $result = $evaultClient->upgradeVolumeCapacity($upgradePrice);
    print_r($result);

} catch(Exception $e) {
    echo "Unable to upgrade Evault: " . $e -> getMessage();
}

To get the price call http://sldn.softlayer.com/reference/services/SoftLayer_Product_Package/getItems method. The package is 0 and you need to pick out the value from "upgradeItemId" field.

Regards



来源:https://stackoverflow.com/questions/34400989/sample-code-to-handle-the-upgrade-of-evault

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