requestMachines reference
The requestMachines script raises an asynchronous request to get hosts from the cloud provider.
Calling convention
Linux®:
requestMachines.sh -f input.jsonWindows:
requestMachines.bat -f input.jsonInput
(Required) A JSON file in the following format:
{
"template":
{
"templateId": "(mandatory)(string) Unique ID that can identify this template in the cloud provider",
"machineCount": (mandatory)(numeric) Number of hosts of this template to be provisioned.
}
}For
example:
{
"template":
{
"templateId": "Template-VM-SYMA",
"machineCount": 1
}
}Find a sample requestMachines at:
- Linux: $EGO_TOP/hostfactory/1.2/samples/providers/custom/scripts/requestMachines.sh.
- Windows: Installation_top\hostfactory\1.2\samples\providers\custom\scripts\requestMachines.bat.
Output
A JSON file in the following
format:
{
"message": "(optional)(string) Any additional message the caller should know",
"requestId": "(mandatory)(string) Unique ID to identify this request in the cloud provider"
} For
example:
{
"message":"Request VM from AWS successful.",
"requestId":"req-f0d97275-dce2-4f22-94a4-44717e802b97"
}