VM manager, it is used for two purposes: - Daemon which control VMs lifecycle, requires params spawner,terminator - Client to acquire and release VM in builder process
Parameters: |
|
---|
Adds newly spawned VM into the pool of available builders
Parameters: |
|
---|---|
Return type: | VmDescriptor |
Parameters: | vm_ip – |
---|---|
Returns: | List of found VMD with the give ip |
Return type: | list of VmDescriptor |
Return bool: | True when user are allowed to acquire more VM |
---|
Try to acquire VM from pool
Parameters: |
|
---|---|
Return type: | VmDescriptor |
Raises: | NoVmAvailable when manager couldn’t find suitable VM for the given group and user |
Initiate VM termination process using redis publish.
Parameters: | allowed_pre_state (str constant from VmState) – When defined force check that old state is among allowed ones. |
---|
Backend forgets about VM after this method
Raises VmError: | if VM has wrong state |
---|
Select VM-s for the given group and allowed states
Parameters: |
|
---|---|
Returns: | Filtered VM-s |
Return type: | list of VmDescriptor |