IJsonpWsEndUserSetEnqueueUnmountDvdIso 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]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueUnmountDvdIso/{jsonp}/{userName}/{token}/{serverId}")]
Stream SetEnqueueUnmountDvdIso(
string jsonp,
string userName,
string token,
string serverId
)<OperationContractAttribute>
<WebGetAttribute(ResponseFormat := WebMessageFormat.Json, UriTemplate := "SetEnqueueUnmountDvdIso/{jsonp}/{userName}/{token}/{serverId}")>
Function SetEnqueueUnmountDvdIso (
jsonp As String,
userName As String,
token As String,
serverId As String
) As Stream[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat::Json, UriTemplate = L"SetEnqueueUnmountDvdIso/{jsonp}/{userName}/{token}/{serverId}")]
Stream^ SetEnqueueUnmountDvdIso(
String^ jsonp,
String^ userName,
String^ token,
String^ serverId
)[<OperationContractAttribute>]
[<WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "SetEnqueueUnmountDvdIso/{jsonp}/{userName}/{token}/{serverId}")>]
abstract SetEnqueueUnmountDvdIso :
jsonp : string *
userName : string *
token : string *
serverId : string -> Stream
function SetEnqueueUnmountDvdIso(
jsonp : String,
userName : String,
token : String,
serverId : String
) : Stream
Parameters
- jsonp
- Type: SystemString
- userName
- Type: SystemString
- token
- Type: SystemString
- serverId
- Type: SystemString
Value of type System.Int32 representing the unique identifier of the virtual server to restore.
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