Click or drag to resize

IWsEndUserSetEnqueueServerCreationEx Method

Performs a creation of a virtual server with the generated server returned as a result with all the info needed for the following steps (ie: getting the SmartVMWarePackageID). By the method SetEnqueueServerCreationEx() of Aruba is WsEndUser can create a virtual server by specifying the characteristics of the various resources that make up. The method, in the case of a CREATION OF virtualMachine with a custom template or template Premium (generated by selling a template created by a director of a company) retrieves the image file required to create a car space FTP User that created it. Plus, it returns the info needed for the creation of the virtual server.

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<SetEnqueueServerCreationResult> SetEnqueueServerCreationEx(
	NewServer server
)

Parameters

server
Type: Aruba.Cloud.Provisioning.EntitiesNewServer
NewServer class object that represents the structure of the server to create. The class NewServer contains inside all the information needed to complete the task of creating the virtual server, and all related resources. To get more details, see the definition of the NewServer.

Return Value

Type: WsResultSetEnqueueServerCreationResult
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 WsResult.
Remarks
If it is required to create a SmartVMWare virtual server it is necessary to set the property SmartVMWarePackageID, see the details of this property for more info.
Examples
This example send a server creation request with a preconfigured package(es: SMALL). Notice that the "IsLuckySmart" is set to TRUE.
public SetEnequeueServerCreationResult SetEnqueueServerCreationEx()
{
    NewServer newServer = new NewServer()
    {
        AdministratorPassword = "abc123",
        Name = "myNewServer",
        OSTemplateId = 12,  //you must retrieve a valid ID
        SmartVMWarePackageID = 1, //you must retrieve a valid ID
        ConfigureIPv6 = false,
        IsLuckySmart = true
    };

    using (var client = new WsEndUserClient())
    {
        WsResultOfSetEnqueueServerCreationResult result = client.SetEnqueueServerCreationEx(server);
        if (result.Success)
            return result.Value;
        else
        {
            throw new CodedException(GetErrorCode(result.ResultCode), result.ResultMessage);
        }
    }
}
See Also