#from skeleton import skeleton
#extends skeleton
#import datetime
#def title
VM List
#end def
#def createForm()
#if $cant_add_vm
$cant_add_vm
#else
Create a new VM
#if $err
We had a problem with your request:
#else if $varExists('new_machine')
Congratulations! You successfully created a new VM called $new_machine.
#end if
#end if
#end def
#def machineRow($machine)
|
$machine.name |
${machine.memory}M |
$machine.owner |
$machine.administrator |
#if $machine.nics
#set $nic = $machine.nics[0]
$nic.ip |
#else
|
#end if
#slurp
#if $machine.uptime
${datetime.timedelta(seconds=int(machine.uptime))}#slurp
#end if
|
#slurp
#if $has_vnc[$machine] == True
Console#slurp
#else if $has_vnc[$machine] != 'Off'
#filter None
$has_vnc[$machine]
#end filter
#end if
|
$machine.description |
#end def
#def machineList($machines)
|
Name |
Memory |
Owner#slurp
#filter None
$helppopup('Owner')#slurp
#end filter
|
Administrator#slurp
#filter None
$helppopup('Administrator')#slurp
#end filter
|
IP |
Uptime |
VNC |
#for $machine in $machines:
#filter None
$machineRow($machine)
#end filter
#end for
#end def
#def body
What is XVM?
#if not $machines
You don't currently control any VMs.
#end if
refresh
#filter None
$machineList($machines)
#end filter
#filter None
$createForm()
#end filter
#end def