The <lease> element is used by Haizea's XML-RPC API to send lease requests to Haizea, and to return lease information to the client. It is also used in the LWF format to describe lease requests.
The <lease> element has two attributes: id, a unique integer identifier (assigned by Haizea), and preemptible, indicating whether the lease can be safely preempted (yes or no)
<lease id="..." preemptible="..."> ... </lease>
The <lease> element has four child elements:
If an exact starting time is specified, then this element has an <exact> child element with a time attribute specifying the starting time using an ISO timestamp (YYYY-MM-DD HH:MM:SS) or a relative starting time (+DD:HH:MM:SS), which is interpreted as being relative to the time the lease is submitted to Haizea.
<start> <exact time="..."/> </exact>
If the lease is requested to start immediately, then this element has an empty <now> child element:
<start> <now/> </exact>
<software> <disk-image id="..." size="..."/> </software>
The disk-image child element specifies information about the disk image: id, a unique identifier, and size, its size in megabytes.
Additionally, the software environment can be left unspecified, which means that Haizea can assume that setting up the software environment will be handled by another entity:
<software> <none/> </software>
The following specifies a best-effort lease, requesting one node with one CPU and 1024 MB of memory, for one hour, and a software environment contained in diskimage foobar1.img (a 1GB image).
<lease id="1" preemptible="true"> <nodes> <node-set numnodes="1"> <res amount="100" type="CPU"/> <res amount="1024" type="Memory"/> </node-set> </nodes> <start/> <duration time="01:00:00"/> <software> <disk-image id="foobar1.img" size="1024"/> </software> </lease>
Borja Sotomayor 2009-12-17