Skip to content
Yashas Kumar edited this page Feb 24, 2016 · 10 revisions

Introduction

This page documents the API for Tango's Virtual Machine Management Systems (VMMSs). See the vmms directory in Tango for examples implementations of the API.

API

Here are the functions necessary to implement the API. Note that for certain VMMSs, some of these methods will be no-ops since the VMMS doesn't require any particular instructions to perform the specified actions.

initializeVM

initializeVM(self, vm)

Creates a new VM instance for the VMMS from vm, which is a TangoMachine object defined in tangoObjects.py.

waitVM

waitVM(self, vm, max_secs)

Waits at most max_secs for a VM to be ready to run jobs.

copyIn

Copies the input files for a job into the VM. inputFiles is a list of InputFile objects defined in tangoObjects.py.

runJob

runJob(self, vm, runTimeout, maxOutputFileSize)

Runs the autodriver binary on the VM. The autodriver runs make on the VM (which in turn runs the job via the Makefile that was provided as a part of the input files for the job). The output from the autodriver most likely should be redirected to some feedback file to be used in the next method of the API.

copyOut

copyOut(self, vm, destFile)

Copies the output file for the job out of the VM into destFile on the Tango host machine.

destroyVM

destroyVM(self, vm)

Removes a VM from the Tango system.

safeDestroyVM

safeDestroyVM(self, vm)

Removes a VM from the Tango system and makes sure that it has been removed.

getVMs

getVMs(self)

Returns a complete list of VMs associated with this Tango system.

Clone this wiki locally