<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
            xmlns:py="http://genshi.edgewall.org/">
<xi:include href="admin.html" />
<head>
    <title>仮想マシン作成</title>
</head>
<body>
<h2>仮想マシン作成</h2>
<form id="config" class="addnew"  method="get">
<fieldset>
<legend>メディアの変更</legend>
<div class="field">
<table>
<tr>
<th><label for="id_lunid">CD-ROM</label>:</th>
<td>
  <select name="lunid" id="id_lunid">
  <option value="0" selected="${dom.lun==0 and 'selected' or None}">-</option>
  <option py:for="lun in range(0, len(storagecnf.isoimages))" value="${lun+1}" selected="${dom.lun==lun and 'selected' or None}">${storagecnf.isoimages[lun]}</option>
  </select>
</td>
</tr>
</table>
</div>
<div class="buttons"> 
    <input type="submit" name="cdrom" value="変更" /> 
</div> 
</fieldset>
</form>


<form id="config" class="addnew"  method="get">
 <fieldset>
  <legend>仮想マシンの設定</legend>
  <div class="field">
<table>
<tr>
<th><label for="id_virtio">準仮想化</label></th>
<td>
   <select name="virtio" id="id_virtio">
   	<option value="False" selected="${dom.virtio == False and 'selected' or None}">無効</option>
   	<option value="True" selected="${dom.virtio and 'selected' or None}">有効</option>
   </select>
</td>
</tr>
<tr>
<th><label for="id_mem">メモリ</label></th><td><input id="id_mem" name="mem" type="text" value="${dom.mem}" /></td>
</tr>
<tr>
<th><label for="id_vcpu">CPU数</label></th><td><input id="id_vcpu" name="vcpu" type="text" value="${dom.vcpu}" /></td>
</tr>
</table>
</div>
<div class="buttons"> 
    <input type="submit" name="edit" value="変更" /> 
</div> 
</fieldset>
</form>


<form id="createvm" method="post" action="createvm/">
    <table class="listing reports">
    <tr>
    	<th colspan="3" class="caption">仮想マシンの情報</th>
  </tr>

    <tr>
    	<th></th><th>名前</th><td>${dom.name}</td>
    </tr>
    <tr>
	<th></th>
    	<th>VMが動作しているホスト</th>
        <td>${hosturl}</td>
    </tr>
    <tr>
    	<th></th><th>状態</th><td>${dom.status}</td>
    </tr>
    <tr>
    	<th></th><th>IPアドレス</th><td>${dom.ip}</td>
    </tr>
    <tr>
    	<th></th><th>Macアドレス</th><td>${dom.mac}</td>
    </tr>
    <tr>
    	<th></th><th>VNCポート</th><td>${dom.vncport}</td>
    </tr>

    <tr>
	<th></th>
    	<th>準仮想化(VirtIO)</th>
    	<td>
   	   <select name="virtio" id="virtio">
   	   	<option value="False" selected="${dom.virtio == False and 'selected' or None}">無効</option>
    	   	<option value="True" selected="${dom.virtio and 'selected' or None}">有効</option>
    	   </select>
    	</td>
    </tr>
    <tr>
    	<th colspan="3" class="caption">プロセッサ・メモリ</th>
    </tr>

    <tr>
	<th></th>
    	<th>仮想CPU</th>
    	<td>
           <input type="text" readonly="readonly" value="${dom.vcpu}" />
    	</td>
    </tr>
    <tr>
	<th></th>
    	<th>メモリ</th>
    	<td>
           <input type="text" readonly="readonly" value="${dom.mem}" />
    	</td>
    </tr>
    <tr>
    	<th colspan="3" class="caption">ハードディスク</th>
    </tr>
    <tr>
	<th></th>
    	<th>ディスクサイズ</th>
 	<td>
		-GB
	</td>
    </tr>
    <tr>
	<th></th>
    	<th>ディスクタイプ</th>
 	<td>
		${dom.disktype}
	</td>
    </tr>
    <tr>
    	<th colspan="3" class="caption">CD-ROM</th>
    </tr>

    <tr>
	<th></th>
    	<th>CD-ROM</th><td>
	   <select name="lunid" id="lunid">
       	   	<option value="0" selected="${dom.lun==0 and 'selected' or None}">-</option>
    	   	<option py:for="lun in range(0, len(storagecnf.isoimages))" value="${lun+1}" selected="${dom.lun==lun and 'selected' or None}">${storagecnf.isoimages[lun]}</option>
    	   </select>
	</td>
    </tr>
   </table>
   <input value="変更を反映" type="submit" />
   <input value="キャンセル" type="submit" />
</form>
</body>
</html>
