IWsEndUserGetCustomVirtualDisks Method
|
Get a list of VirtualDisk imported. By the method GetCustomVirtualDisks() of Aruba WsEndUser, it is possible to obtain a
CustomVirtualDisk list of class objects that represent virtual disks imported in the ftp to the user
specified in the authentication phase. And 'possible to filter the hypervisor for virtual disks, using a member of the
HyperVisorType, or obtain a list is not filtered, using HyperVisorType.All
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<CustomVirtualDisk[]> GetCustomVirtualDisks(
HypervisorTypes hypervisorType
)
<OperationContractAttribute>
Function GetCustomVirtualDisks (
hypervisorType As HypervisorTypes
) As WsResult(Of CustomVirtualDisk())
[OperationContractAttribute]
WsResult<array<CustomVirtualDisk^>^>^ GetCustomVirtualDisks(
HypervisorTypes hypervisorType
)
[<OperationContractAttribute>]
abstract GetCustomVirtualDisks :
hypervisorType : HypervisorTypes -> WsResult<CustomVirtualDisk[]>
function GetCustomVirtualDisks(
hypervisorType : HypervisorTypes
) : WsResult<CustomVirtualDisk[]>
Parameters
- hypervisorType
- Type: Aruba.Cloud.Provisioning.EntitiesHypervisorTypes
Member dell'enumerazion HypervisorTypes. Indicates the type of hypervisor on which to conduct the search filter CustomVirtualDisk.
Return Value
Type:
WsResultCustomVirtualDisk
The method returns an object WsResult<CustomVirtualDisk[]> containing the information on the virtual disk imported.
Examples
The following example describes a method, called TestGetCustomVirtualDisks(), which means a call to GetCustomVirtualDisks()
to Aruba WsEndUser, get a list of imported virtual disks to be connected to the virtual servers.
private List<String> TestGetCustomVirtualDisk(WsEndUserClient client)
{
List<String> recentCustomVirtualDisk = new List<String>() ;
try
{
WsResultOfArrayOfCustomVirtualDisk result = client.GetCustomVirtualDisks(HypervisorTypes.All) ;
if (result.Success)
{
IEnumerable<CustomVirtualDisk> listOfRecentCustomVirtualDisk = result.Value.Where(p => p.CreationDate > new DateTime(2012, 01, 13));
foreach (CustomVirtualDisk cvd in listOfRecentCustomVirtualDisk)
{
recentCustomVirtualDisk.Add(cvd.RelativePathFile);
}
}
}
catch (Exception ex)
{
throw new ApplicationException(String.Format(
"An error has occurred while obtaining custom virtual disks information. {0}", ex.Message));
}
return recentCustomVirtualDisk;
}
See Also