Click or drag to resize

IWsEndUserSetEnqueueVirtualDiskManage Method

Performs an operation on a resource management type VirtualDisk.

Using the method SetEnqueueVirtualDiskManage () to Aruba WsEndUser you can queue a task (Job) management of a virtual disk. The operations that can be made are of different types, all shown in the following table:

CreateCreate a new virtual disk
DeleteDeletes an existing virtual disk
ResizeAssigns a new dimension to an existing virtual disk

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult SetEnqueueVirtualDiskManage(
	int serverId,
	VirtualDiskUpdate disk
)

Parameters

serverId
Type: SystemInt32
Value of type System.Int32 that is the unique identifier of the virtual server on which to perform the management operation the virtual disk.
disk
Type: Aruba.Cloud.Provisioning.EntitiesVirtualDiskUpdate
VirtualDiskUpdate class object that represents the virtual disk on which to perform the management operation. The class VirtualDiskUpdate contains within it all the information needed to complete the requested operation, depending on the type of operation task to be performed. To get more details, see the definition of the VirtualDiskUpdate.

Return Value

Type: WsResult
The method returns an object WsResult containing information on the outcome of the method call. For further details on the information returned by the method refer to the definition of the class
Remarks
The operation management of a virtual disk can only be completed if the virtual server is not in the stopped state, stored or being deleted. Once queued operation, you can not append other operations up to which the first will not be completed.

Furthermore, there are additional conditions for which an operation can not be performed for the administration of a Virtual Disk:

OperationCondition
DeleteThe virtual disk to be deleted is the primary disk of the virtual server
ResizeTo resize the virtual disk size is less than or greater than the limits imposed by the template.
CreateTo resize the virtual disk size is less than or greater than the limits imposed by the template.
CreateThere is already a virtual disk of the same type (eg there is already a primary virtual disk).
Examples
In the following example describes a user-defined method, called ManageVirtualDisk (), that performs a cancellation of the first virtual disk next to the primary of a virtual server with id 859.
private static void ManageVirtualDisk()
{
  try
  {
    VirtualDiskUpdate diskToDelete = new VirtualDiskUpdate()
    {
      VirtualDiskUpdateType = VirtualDiskOperationTypes.Delete,
      VirtualDiskType = VirtualDiskTypes.AdditionalVirtualDisk1                   
    };

    WsResult result = client.SetEnqueueVirtualDiskManage(859, diskToDelete);

    if (!result.Success)
    {
      throw new ApplicationException(String.Format(
        "An error has occurred while invoking SetEnqueueVirtualDiskManage(). {0}", result.ResultMessage));
    }
  }
  catch (Exception ex)
  {
    throw new ApplicationException(
      String.Format("An error has occurred while deleting a virtual disk {0}", ex.Message));
  }
}
See Also