IWsEndUserSetEnqueueServerCreation Method
|
Performs a creation of a virtual server. By the method SetEnqueueServerCreation() 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.
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 SetEnqueueServerCreation(
NewServer server,
SurveyAnswer[] surveyanswers = null
)
<OperationContractAttribute>
Function SetEnqueueServerCreation (
server As NewServer,
Optional surveyanswers As SurveyAnswer() = Nothing
) As WsResult
[OperationContractAttribute]
WsResult^ SetEnqueueServerCreation(
NewServer^ server,
array<SurveyAnswer^>^ surveyanswers = nullptr
)
[<OperationContractAttribute>]
abstract SetEnqueueServerCreation :
server : NewServer *
?surveyanswers : SurveyAnswer[]
(* Defaults:
let _surveyanswers = defaultArg surveyanswers null
*)
-> WsResult
function SetEnqueueServerCreation(
server : NewServer,
surveyanswers : SurveyAnswer[]
) : WsResult
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.
- surveyanswers (Optional)
- Type: Aruba.Cloud.Provisioning.EntitiesSurveyAnswer
Return Value
Type:
WsResult
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
In the following example in C# code, we create a new Virtual Machine Server.
Notice the AdditionaLicenses field, that needs to be populated only when connecting an HD from FTP.
private static void CreateServer()
{
try
{
NewServer serverToCreate = new NewServer()
{
AdministratorPassword = "Passw@ord",
CPUQuantity = 4,
Name = "NewServer01",
OSTemplateId = 5,
RAMQuantity = 8 ,
AdditionalLicenses = new List<TemplateLicense>()
{
new TemplateLicense(){TemplateLicenseID = 60, DefaultValue = 1 },
new TemplateLicense(){TemplateLicenseID = 93, DefaultValue = 5 }
},
VirtualDisks = new List<VirtualDiskDetails>()
{
new VirtualDiskDetails (){ Size = 10, VirtualDiskType = VirtualDiskTypes.PrimaryVirtualDisk },
new VirtualDiskDetails (){ Size = 50, VirtualDiskType = VirtualDiskTypes.AdditionalVirtualDisk1 },
}.ToArray(),
Note = "Server creato tramite chiamata a WSEndUser",
NetworkAdaptersConfiguration = new List<NetworkAdapterConfiguration>()
{
new NetworkAdapterConfiguration ()
{
NetworkAdapterType = NetworkAdapterTypes.Ethernet0,
PrivateVLan = new PrivateVLanDetails()
{
Gateway = "82.149.68.75",
IPAddress = "95.110.154.9",
SubNetMask = "255.255.255.0",
PrivateVLanResourceId = 2647
}
}
}.ToArray()
};
WsResult result = client.SetEnqueueServerCreation(serverToCreate);
if (!result.Success)
{
throw new ApplicationException(String.Format(
"An error has occurred while invoking SetEnqueueServerCreation(). {0}", result.ResultMessage));
}
}
catch (Exception ex)
{
throw new ApplicationException(String.Format("An error has occurred while taking a snapshot{0}", ex.Message));
}
}
See Also