IJsonPostWsEndUserSetEnqueueUnmountDvdIso Method
|
By the method one can unmount an ISO image from a virtual machine.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax[OperationContractAttribute]
[WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)]
Stream SetEnqueueUnmountDvdIso(
ServerRequest request
)
<OperationContractAttribute>
<WebInvokeAttribute(Method := "POST", ResponseFormat := WebMessageFormat.Json)>
Function SetEnqueueUnmountDvdIso (
request As ServerRequest
) As Stream
[OperationContractAttribute]
[WebInvokeAttribute(Method = L"POST", ResponseFormat = WebMessageFormat::Json)]
Stream^ SetEnqueueUnmountDvdIso(
ServerRequest^ request
)
[<OperationContractAttribute>]
[<WebInvokeAttribute(Method = "POST", ResponseFormat = WebMessageFormat.Json)>]
abstract SetEnqueueUnmountDvdIso :
request : ServerRequest -> Stream
function SetEnqueueUnmountDvdIso(
request : ServerRequest
) : Stream
Parameters
- request
- Type: Aruba.Cloud.WsEndUser.JsonServerRequest
Return Value
Type:
Stream
The method returns a WsResult object containing information about the result of the method call.
Examples
The following example describes a user-defined method, named UnmountDvdIso(), which performs an
unmount of an ISO from a virtual server. By calling the WsEndUser's method SetEnqueueUnmountDvdIso(),
the ISO image previously mounted on the server with id 859 will umount.
private static void UnmountDvdIso(WsEndUserClient client)
{
try
{
WsResultOfServerDetails serverDetails = client.GetServerDetails(859);
if (serverDetails != null && serverDetails.Value.VirtualDVDs.Count() > 0)
{
WsResult result = client.SetEnqueueUnmountDvdIso(859);
if (!result.Success)
{
throw new ApplicationException(String.Format(
"An error has occurred while invoking SetEnqueueUnmountDvdIso(). {0}", result.ResultMessage));
}
}
}
catch (Exception ex)
{
throw new ApplicationException(
String.Format("An error has occurred while unmounting an ISO image {0}", ex.Message));
}
}
See Also