Computing > 7 - Unified Storage Management > Edit a Unified Storage

7.3 Edit a Unified Storage

By using the Aruba WsEndUser method SetEnqueueModifySharedStorage you can modify a network storage size.

Parameters
storageId
Type: int
Value of type int with the storage identifier.


quantity
Type: int
New size of the storage in GB


/// IWsEndUser.SetEnqueueModifySharedStorage Method (c# .NET)
public static string SetEnqueueModifySharedStorage(WsEndUserClient client,
        int storageId, int quantity)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // create the object EnqueueModifySharedStorageRequest  for the request 
        // with data to process
        EnqueueModifySharedStorageRequest request = 
            new EnqueueModifySharedStorageRequest();
        request.SharedStorageID = storageId;
        request.Quantity = quantity;

        // call method SetEnqueueModifySharedStorage 
        // obtaining a WsResult item
        WsResult result = client.SetEnqueueModifySharedStorage( request);

        //if the call is Success print history values
        if (result.Success)
        {
            // get Value returned from server
            stringBuilder.Append(" Operation successfully. Result Code : ");
            stringBuilder.Append(result.ResultCode);
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
/// IWsEndUser.SetEnqueueModifySharedStorage Method (JAVA)
public static String SetEnqueueModifySharedStorage(IWsEndUser client,
	int storageId, int quantity)
{
    //specify the account login details 
    ((BindingProvider) client).getRequestContext()
	    .put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
    ((BindingProvider) client).getRequestContext()
	    .put(BindingProvider.PASSWORD_PROPERTY, "0123456789");

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
	// create the object EnqueueModifySharedStorageRequest  for the request 
	// with data to process
	EnqueueModifySharedStorageRequest request = 
            new EnqueueModifySharedStorageRequest();
	request.setSharedStorageID(storageId);
	request.setQuantity(quantity);

	// call method SetEnqueueModifySharedStorage 
	// obtaining a WsResult item
	WsResult result = client.setEnqueueModifySharedStorage( request);

	//if the call is Success print history values
	if (result.isSuccess())
	{
	    // get Value returned from server
	    stringBuilder.append(" Operation successfully. Result Code : ");
	    stringBuilder.append(result.getResultCode());
	}
	else
	{
	    throw new Exception(result.getResultMessage());
	}
    }
    catch (Exception ex)
    {
	//show error
	System.out.println(ex);
    }

    return stringBuilder.toString();
}
Version
API: v2.8 URL:https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl
See also