IJsonpWsEndUserGetIsos Method
|
Gets a list of available ISO images. By the method GetIsos () of Aruba WsEndUser,
you can get a list of objects of class Iso representing the ISO images available
for the account specified at the time of authentication.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetIsos/{jsonp}/{userName}/{token}")]
Stream GetIsos(
string jsonp,
string userName,
string token
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "GetIsos/{jsonp}/{userName}/{token}")>
Function GetIsos (
jsonp As String,
userName As String,
token As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"GetIsos/{jsonp}/{userName}/{token}")]
Stream^ GetIsos(
String^ jsonp,
String^ userName,
String^ token
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetIsos/{jsonp}/{userName}/{token}")>]
abstract GetIsos :
jsonp : string *
userName : string *
token : string -> Stream
function GetIsos(
jsonp : String,
userName : String,
token : String
) : Stream
Parameters
- jsonp
- Type: SystemString
- userName
- Type: SystemString
- token
- Type: SystemString
Return Value
Type:
Stream
The method returns an object WsResult<IsoDetails[]> containing the image information associated with the account.
Examples
In the following example describes a method, called TestGetIsos (), which via a method call GetIsos()
Aruba's WsEndUser, get a list of strings representing the reason why some ISO images virtual were invalid.
private static List<String> TestGetIsos(WsEndUserClient client)
{
List<String> listOfInvalidityReason = new List<String>();
try
{
WsResultOfArrayOfIsoDetails result = client.GetIsos();
if (result.Success)
{
IEnumerable<IsoDetails> listOfInvalidIso = result.Value.Where(p => p.InvalidityCode != 0);
foreach (IsoDetails iso in listOfInvalidIso)
listOfInvalidityReason.Add(iso.InvalidityReason);
}
}
catch (Exception ex)
{
throw new ApplicationException(
String.Format("An error has occurred while gathering virtual iso details. {0}", ex.Message));
}
return listOfInvalidityReason;
}
See Also