changeset 1:eb4fee3d9bb8

added StoragePools management functions (storage_controller)
author Shoshi TAMAKI <shoshi@cr.ie.u-ryukyu.ac.jp>
date Wed, 27 Jul 2011 00:00:25 +0900
parents 261e66bd5a0c
children bea0f05fb3c8
files app/config/bootstrap.php app/controllers/create_controller.php app/controllers/define_controller.php app/controllers/pages_controller.php app/controllers/storage_controller.php app/controllers/vncviewer_controller.php app/tmp/cache/persistent/cake_core_default_ja app/tmp/cache/persistent/cake_core_dir_map app/tmp/cache/persistent/cake_core_file_map app/tmp/cache/persistent/cake_core_object_map app/tmp/logs/debug.log app/tmp/logs/error.log app/views/create/exec.ctp app/views/define/exec.ctp app/views/elements/storage/poolinfo.ctp app/views/elements/storage/volumeinfotable.ctp app/views/pages/display.ctp app/views/storage/add_volume.ctp app/views/storage/delete_volume.ctp app/views/storage/edit_pool.ctp app/views/storage/error.ctp app/views/storage/exec.ctp app/views/vncviewer/error.ctp app/views/vncviewer/exec.ctp
diffstat 24 files changed, 519 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/app/config/bootstrap.php	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/config/bootstrap.php	Wed Jul 27 00:00:25 2011 +0900
@@ -58,11 +58,11 @@
 	);
 
 	static $node_actions = array(
-		"create","network","storage",
+		"define","storage","network"
 	);
 
 	static $domain_actions = array(
-		"vncviewer","shutdown","start",
+		"vncviewer","shutdown","create"
 	);
 
 	public static function GetConnection()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controllers/create_controller.php	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,38 @@
+<?php
+
+class CreateController extends AppController
+{
+	public $uses = null;
+	public $name = "create";
+	
+	public function exec()
+	{
+		if(!isset($this->params["url"]["uuid"])){
+			$this->set("content","Error : domain uuid is required.");
+			return;
+		}
+
+		$uuid = $this->params["url"]["uuid"];
+		$con = WebVirtUtil::GetConnection();
+		if($con === FALSE){
+			$this->set("content","Error : ".libvirt_get_last_error($con));
+			return;
+		}
+
+		$dom = libvirt_domain_lookup_by_uuid_string($con,$uuid);
+		$name = libvirt_domain_get_name($dom);
+		if($con === FALSE){
+			$this->set("content","Error : ".libvirt_get_last_error($con));
+			return;
+		}
+
+		$result = @libvirt_domain_create($dom);
+		if($result === FALSE){
+			$this->set("content","Error : ".libvirt_get_last_error($con));	
+		}else{
+			$this->set("content","Launching a ".$name);
+		}
+	}
+}
+
+?>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controllers/define_controller.php	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,17 @@
+<?php
+
+class DefineController extends AppController
+{
+	public $name = "Define";
+	public $uses = null;
+
+	public function exec()
+	{
+	}
+
+	public function create()
+	{
+	}
+}
+
+?>
--- a/app/controllers/pages_controller.php	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/controllers/pages_controller.php	Wed Jul 27 00:00:25 2011 +0900
@@ -16,28 +16,55 @@
 
 		$this->set("title_for_laytout",WebVirtUtil::$wvirt_config["APP_NAME"]." - ".WebVirtUtil::$wvirt_config["APP_VERSION"]);
 
-		$hostname = libvirt_get_hostname($con);
+		$hostname = libvirt_connect_get_hostname($con);
 		$this->set("hostname",$hostname);
 		$nodeinfo = libvirt_node_get_info($con);
 		$this->set("nodeinfo",$nodeinfo);
 		$this->set("actions",WebVirtUtil::$node_actions);
 
 		$domains = libvirt_list_domains($con);
-
-		$vmlist = array();
+		$domlist = array();
 		foreach($domains as $dom){
-			$name = libvirt_domain_get_name($dom);
-			$info = libvirt_domain_get_info($dom);
+			$res = libvirt_domain_lookup_by_name($con,$dom);
+			$name = libvirt_domain_get_name($res);
+			$info = libvirt_domain_get_info($res);
+			$status = "NO STATE";
+
+			switch($info["state"]){
+				case VIR_DOMAIN_NOSTATE:
+					$status = "NO STATE";
+					break;
+				case VIR_DOMAIN_RUNNING:
+					$status = "RUNNING";
+					break;
+				case VIR_DOMAIN_BLOCKED:
+					$status = "BLOCKED";
+					break;
+				case VIR_DOMAIN_PAUSED:
+					$status = "PAUSED";
+					break;
+				case VIR_DOMAIN_SHUTDOWN:
+					$status = "SHUTDOWN";
+					break;
+				case VIR_DOMAIN_SHUTOFF:
+					$status = "SHUTOFF";
+					break;
+				case VIR_DOMAIN_CRASHED:
+					$status = "CRASHED";
+					break;
+			}
+
 			$actions = array();
-			array_push($vmlist,array("name" => $name,
+			array_push($domlist,array("name" => $name,
 				"memory" => $info["memory"],
 				"nrVirtCpu" => $info["nrVirtCpu"],
+				"status" => $status,
 				"actions" => WebVirtUtil::$domain_actions,
-				"uuid" => libvirt_domain_get_uuid_string($dom),
+				"uuid" => libvirt_domain_get_uuid_string($res),
 			));
 		}
 
-		$this->set("domains",$vmlist);
+		$this->set("domains",$domlist);
 	}
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/controllers/storage_controller.php	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,204 @@
+<?php
+
+class StorageController extends AppController
+{
+	public $name = "Storage";
+	public $uses = null;
+
+	public function index()
+	{
+		$this->redirect("exec");
+	}
+
+	public function exec()
+	{
+		$con = WebVirtUtil::GetConnection();
+
+		$pools = array();
+		foreach(libvirt_list_storagepools($con) as $name){
+			$pool = libvirt_storagepool_lookup_by_name($con,$name);
+			$uuid = libvirt_storagepool_get_uuid_string($pool);
+			$info = libvirt_storagepool_get_info($pool);
+			$state = "NOT RUNNING";
+			switch($info["state"]){
+				case 0:
+					break;
+				case 1:
+					$state = "INITIALIZING";
+					break;
+				case 2:
+					$state = "RUNNING";
+					break;
+				case 3:
+					$state = "DEGRADED";
+					break;
+				case 4:
+					$state = "INACCESSIBLE";
+					break;
+			}
+			$capacity = $info["capacity"];
+			$allocation = $info["allocation"];
+			$available = $info["available"];
+
+			$volumes = array();
+			foreach(libvirt_storagepool_list_volumes($pool) as $vname){
+				$volume = libvirt_storagevolume_lookup_by_name($pool,$vname);
+				$vinfo = libvirt_storagevolume_get_info($volume);
+				$vpath = libvirt_storagevolume_get_path($volume);
+				$vtype = ($vinfo["type"] == 0) ? "FILE" : "BLOCK";
+				$vcapa = $vinfo["capacity"];
+				$valloc = $vinfo["allocation"];
+				
+				array_push($volumes,array("name" => $vname,"path" => $vpath,"type" => $vtype,
+							"capacity" => $vcapa,"allocation" => $valloc));
+			}
+			
+			array_push($pools,array("name" => $name,"state" => $state,"capacity" => $capacity,
+						"allocation" => $allocation,"available" => $available,
+						"volumes" => $volumes,"uuid" => $uuid));
+		}
+		$this->set("storagepools",$pools);
+
+	}
+
+	public function EditPool()
+	{
+		if(!isset($this->params["url"]["id"])){
+			$this->set("content","StoragePool ID is required.");
+			$this->render("storage/Error");
+			exit();
+		}
+
+		$con = WebVirtUtil::GetConnection();
+		$id = $this->params["url"]["id"];
+		$res = libvirt_storagepool_lookup_by_uuid_string($con,$id);
+
+		$pool = array();
+		$pool["id"] = $id;
+		$pool["name"] = libvirt_storagepool_get_name($res);
+		$info = libvirt_storagepool_get_info($res);
+		$state = "NOT RUNNING";
+		switch($info["state"]){
+			case 0:
+				break;
+			case 1:
+				$state = "INITIALIZING";
+				break;
+			case 2:
+				$state = "RUNNING";
+				break;
+			case 3:
+				$state = "DEGRADED";
+				break;
+			case 4:
+				$state = "INACCESSIBLE";
+				break;
+		}
+		$pool["state"] = $state;
+		$pool["capacity"] = $info["capacity"];
+		$pool["allocation"] = $info["allocation"];
+		$pool["available"] = $info["available"];
+
+		$volumes = array();
+		foreach(libvirt_storagepool_list_volumes($res) as $vname){
+			$volume = libvirt_storagevolume_lookup_by_name($res,$vname);
+			$vinfo = libvirt_storagevolume_get_info($volume);
+			$vpath = libvirt_storagevolume_get_path($volume);
+			$vtype = ($vinfo["type"] == 0) ? "FILE" : "BLOCK";
+			$vcapa = $vinfo["capacity"];
+			$valloc = $vinfo["allocation"];
+			
+			array_push($volumes,array("name" => $vname,"path" => $vpath,"type" => $vtype,
+						"capacity" => $vcapa,"allocation" => $valloc));
+		}
+		$pool["volumes"] = $volumes;
+		$this->set("pool",$pool);
+	}
+
+	public function DeleteVolume()
+	{
+		if(!isset($this->params["form"])){
+			$this->set("content","invalid volume information");
+			$this->render("error");
+			return;
+		}
+
+		$con = WebVirtUtil::GetConnection();
+		if($con === FALSE){
+			$this->set("content","libvirt Error :".libvirt_get_last_error());
+			$this->render("error");
+			return;
+		}
+
+		$pid = $this->params["form"]["pid"];
+		$pool = @libvirt_storagepool_lookup_by_uuid_string($con,$pid);
+		$vname = $this->params["form"]["vname"];
+		$volume = @libvirt_storagevolume_lookup_by_name($pool,$vname);
+		if($volume === FALSE){
+			$this->set("content","libvirt Error :".libvirt_get_last_error());
+			$this->render("error");
+			return;
+		}
+
+		// 0 => VIR_STORAGE_VOL_DELETE_NORMAL : Delete metadata only (fast operation)
+		$ret = @libvirt_storagevolume_delete($volume,0);
+		if($volume === FALSE){
+			$this->set("content","libvirt Error :".libvirt_get_last_error());
+			$this->render("error");
+			return;
+		}
+
+		$this->set("content",$vname." was successfully deleted");
+	}
+
+	public function AddVolume()
+	{
+		if(!isset($this->params["form"])){
+			$this->set("content","invalid volume definition");
+			$this->render("error");
+			return;
+		}
+
+		$id = htmlspecialchars($this->params["form"]["id"]);
+		$name = htmlspecialchars($this->params["form"]["name"]);
+		$capacity = htmlspecialchars($this->params["form"]["capacity"]);
+		$allocate = htmlspecialchars($this->params["form"]["allocate"]);
+
+		//validate
+
+		$xml = "<volume>";
+		$xml .= "<name>".$name."</name>";
+		$xml .= "<capacity>".$capacity."</capacity>";
+		$xml .= "<allocation>".$allocate."</allocation>";
+		$xml .= "</volume>";
+
+		$con = WebVirtUtil::GetConnection();
+		if($con === FALSE){
+			$this->set("content","libvirt Error : ".libvirt_get_last_error());
+			$this->render("error");
+			return;
+		}
+
+		$res = @libvirt_storagepool_lookup_by_uuid_string($con,$id);
+		if($res === FALSE){
+			$this->set("content","libvirt Error : ".libvirt_get_last_error());
+			$this->render("error");
+			return;
+		}
+
+		$ret = @libvirt_storagevolume_create_xml($res,$xml);
+		if($ret === FALSE){
+			$this->set("content","libvirt Error : ".libvirt_get_last_error());
+			$this->render("error");
+			return;
+		}
+
+		$info = @libvirt_storagevolume_get_info($ret);
+		$info["name"] = $name;
+		$info["path"] = @libvirt_storagevolume_get_path($ret);
+		$this->set("content",$name." was successfully created");
+		$this->set("volumeinfo",$info);
+	}
+}
+
+?>
--- a/app/controllers/vncviewer_controller.php	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/controllers/vncviewer_controller.php	Wed Jul 27 00:00:25 2011 +0900
@@ -8,6 +8,7 @@
 	public static $ERROR_TABLE = array(
 				0 => "uuid is required to process this action",
 				1 => "vnc is not supported.",
+				2 => "domain is inactive.",
 			);
 
 	public function exec()
@@ -18,7 +19,12 @@
 
 		$con = WebVirtUtil::GetConnection();
 		$dom = libvirt_domain_lookup_by_uuid_string($con,$this->params['url']['uuid']);
-		$xml = simplexml_load_string(libvirt_domain_get_xml_desc($dom));
+		$info = libvirt_domain_get_info($dom);
+		if($info["state"] != VIR_DOMAIN_RUNNING){
+			$this->redirect(array("action" => "error","?" => array("e" => 2)),200,true);
+		}
+
+		$xml = simplexml_load_string(libvirt_domain_get_xml_desc($dom,null));
 
 		$port = -1;
 		foreach($xml->devices->graphics as $graphic){
@@ -41,7 +47,7 @@
 	{
 		if(isset($this->params["url"]["e"])){
 			$e = (int)$this->params["url"]["e"];
-			trigger_error(self::$ERROR_TABLE[$e]);
+			$this->set("content",self::$ERROR_TABLE[$e]);
 		}
 	}
 }
--- a/app/tmp/cache/persistent/cake_core_default_ja	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/tmp/cache/persistent/cake_core_default_ja	Wed Jul 27 00:00:25 2011 +0900
@@ -1,2 +1,2 @@
-1311508879
+1311692182
 a:1:{s:11:"LC_MESSAGES";a:0:{}}
--- a/app/tmp/cache/persistent/cake_core_dir_map	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/tmp/cache/persistent/cake_core_dir_map	Wed Jul 27 00:00:25 2011 +0900
@@ -1,2 +1,2 @@
-1311508879
-a:7:{s:31:"/var/www/html/webvirt/cake/libs";a:25:{i:0;s:31:"/var/www/html/webvirt/cake/libs";i:1;s:37:"/var/www/html/webvirt/cake/libs/cache";i:2;s:42:"/var/www/html/webvirt/cake/libs/controller";i:3;s:53:"/var/www/html/webvirt/cake/libs/controller/components";i:4;s:35:"/var/www/html/webvirt/cake/libs/log";i:5;s:37:"/var/www/html/webvirt/cake/libs/model";i:6;s:47:"/var/www/html/webvirt/cake/libs/model/behaviors";i:7;s:49:"/var/www/html/webvirt/cake/libs/model/datasources";i:8;s:53:"/var/www/html/webvirt/cake/libs/model/datasources/dbo";i:9;s:36:"/var/www/html/webvirt/cake/libs/view";i:10;s:45:"/var/www/html/webvirt/cake/libs/view/elements";i:11;s:51:"/var/www/html/webvirt/cake/libs/view/elements/email";i:12;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/html";i:13;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/text";i:14;s:43:"/var/www/html/webvirt/cake/libs/view/errors";i:15;s:44:"/var/www/html/webvirt/cake/libs/view/helpers";i:16;s:44:"/var/www/html/webvirt/cake/libs/view/layouts";i:17;s:50:"/var/www/html/webvirt/cake/libs/view/layouts/email";i:18;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/html";i:19;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/text";i:20;s:47:"/var/www/html/webvirt/cake/libs/view/layouts/js";i:21;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/rss";i:22;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/xml";i:23;s:42:"/var/www/html/webvirt/cake/libs/view/pages";i:24;s:46:"/var/www/html/webvirt/cake/libs/view/scaffolds";}s:37:"/var/www/html/webvirt/app/controllers";a:2:{i:0;s:37:"/var/www/html/webvirt/app/controllers";i:1;s:48:"/var/www/html/webvirt/app/controllers/components";}s:31:"/var/www/html/webvirt/app/views";a:18:{i:0;s:31:"/var/www/html/webvirt/app/views";i:1;s:40:"/var/www/html/webvirt/app/views/elements";i:2;s:46:"/var/www/html/webvirt/app/views/elements/email";i:3;s:51:"/var/www/html/webvirt/app/views/elements/email/html";i:4;s:51:"/var/www/html/webvirt/app/views/elements/email/text";i:5;s:38:"/var/www/html/webvirt/app/views/errors";i:6;s:39:"/var/www/html/webvirt/app/views/helpers";i:7;s:39:"/var/www/html/webvirt/app/views/layouts";i:8;s:45:"/var/www/html/webvirt/app/views/layouts/email";i:9;s:50:"/var/www/html/webvirt/app/views/layouts/email/html";i:10;s:50:"/var/www/html/webvirt/app/views/layouts/email/text";i:11;s:42:"/var/www/html/webvirt/app/views/layouts/js";i:12;s:43:"/var/www/html/webvirt/app/views/layouts/rss";i:13;s:43:"/var/www/html/webvirt/app/views/layouts/xml";i:14;s:37:"/var/www/html/webvirt/app/views/pages";i:15;s:41:"/var/www/html/webvirt/app/views/scaffolds";i:16;s:40:"/var/www/html/webvirt/app/views/shutdown";i:17;s:41:"/var/www/html/webvirt/app/views/vncviewer";}s:36:"/var/www/html/webvirt/cake/libs/view";a:16:{i:0;s:36:"/var/www/html/webvirt/cake/libs/view";i:1;s:45:"/var/www/html/webvirt/cake/libs/view/elements";i:2;s:51:"/var/www/html/webvirt/cake/libs/view/elements/email";i:3;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/html";i:4;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/text";i:5;s:43:"/var/www/html/webvirt/cake/libs/view/errors";i:6;s:44:"/var/www/html/webvirt/cake/libs/view/helpers";i:7;s:44:"/var/www/html/webvirt/cake/libs/view/layouts";i:8;s:50:"/var/www/html/webvirt/cake/libs/view/layouts/email";i:9;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/html";i:10;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/text";i:11;s:47:"/var/www/html/webvirt/cake/libs/view/layouts/js";i:12;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/rss";i:13;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/xml";i:14;s:42:"/var/www/html/webvirt/cake/libs/view/pages";i:15;s:46:"/var/www/html/webvirt/cake/libs/view/scaffolds";}s:48:"/var/www/html/webvirt/app/controllers/components";a:1:{i:0;s:48:"/var/www/html/webvirt/app/controllers/components";}s:53:"/var/www/html/webvirt/cake/libs/controller/components";a:1:{i:0;s:53:"/var/www/html/webvirt/cake/libs/controller/components";}s:39:"/var/www/html/webvirt/app/views/helpers";a:1:{i:0;s:39:"/var/www/html/webvirt/app/views/helpers";}}
+1311692186
+a:7:{s:31:"/var/www/html/webvirt/cake/libs";a:25:{i:0;s:31:"/var/www/html/webvirt/cake/libs";i:1;s:37:"/var/www/html/webvirt/cake/libs/cache";i:2;s:42:"/var/www/html/webvirt/cake/libs/controller";i:3;s:53:"/var/www/html/webvirt/cake/libs/controller/components";i:4;s:35:"/var/www/html/webvirt/cake/libs/log";i:5;s:37:"/var/www/html/webvirt/cake/libs/model";i:6;s:47:"/var/www/html/webvirt/cake/libs/model/behaviors";i:7;s:49:"/var/www/html/webvirt/cake/libs/model/datasources";i:8;s:53:"/var/www/html/webvirt/cake/libs/model/datasources/dbo";i:9;s:36:"/var/www/html/webvirt/cake/libs/view";i:10;s:45:"/var/www/html/webvirt/cake/libs/view/elements";i:11;s:51:"/var/www/html/webvirt/cake/libs/view/elements/email";i:12;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/html";i:13;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/text";i:14;s:43:"/var/www/html/webvirt/cake/libs/view/errors";i:15;s:44:"/var/www/html/webvirt/cake/libs/view/helpers";i:16;s:44:"/var/www/html/webvirt/cake/libs/view/layouts";i:17;s:50:"/var/www/html/webvirt/cake/libs/view/layouts/email";i:18;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/html";i:19;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/text";i:20;s:47:"/var/www/html/webvirt/cake/libs/view/layouts/js";i:21;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/rss";i:22;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/xml";i:23;s:42:"/var/www/html/webvirt/cake/libs/view/pages";i:24;s:46:"/var/www/html/webvirt/cake/libs/view/scaffolds";}s:37:"/var/www/html/webvirt/app/controllers";a:2:{i:0;s:37:"/var/www/html/webvirt/app/controllers";i:1;s:48:"/var/www/html/webvirt/app/controllers/components";}s:31:"/var/www/html/webvirt/app/views";a:22:{i:0;s:31:"/var/www/html/webvirt/app/views";i:1;s:38:"/var/www/html/webvirt/app/views/create";i:2;s:38:"/var/www/html/webvirt/app/views/define";i:3;s:40:"/var/www/html/webvirt/app/views/elements";i:4;s:46:"/var/www/html/webvirt/app/views/elements/email";i:5;s:51:"/var/www/html/webvirt/app/views/elements/email/html";i:6;s:51:"/var/www/html/webvirt/app/views/elements/email/text";i:7;s:48:"/var/www/html/webvirt/app/views/elements/storage";i:8;s:38:"/var/www/html/webvirt/app/views/errors";i:9;s:39:"/var/www/html/webvirt/app/views/helpers";i:10;s:39:"/var/www/html/webvirt/app/views/layouts";i:11;s:45:"/var/www/html/webvirt/app/views/layouts/email";i:12;s:50:"/var/www/html/webvirt/app/views/layouts/email/html";i:13;s:50:"/var/www/html/webvirt/app/views/layouts/email/text";i:14;s:42:"/var/www/html/webvirt/app/views/layouts/js";i:15;s:43:"/var/www/html/webvirt/app/views/layouts/rss";i:16;s:43:"/var/www/html/webvirt/app/views/layouts/xml";i:17;s:37:"/var/www/html/webvirt/app/views/pages";i:18;s:41:"/var/www/html/webvirt/app/views/scaffolds";i:19;s:40:"/var/www/html/webvirt/app/views/shutdown";i:20;s:39:"/var/www/html/webvirt/app/views/storage";i:21;s:41:"/var/www/html/webvirt/app/views/vncviewer";}s:36:"/var/www/html/webvirt/cake/libs/view";a:16:{i:0;s:36:"/var/www/html/webvirt/cake/libs/view";i:1;s:45:"/var/www/html/webvirt/cake/libs/view/elements";i:2;s:51:"/var/www/html/webvirt/cake/libs/view/elements/email";i:3;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/html";i:4;s:56:"/var/www/html/webvirt/cake/libs/view/elements/email/text";i:5;s:43:"/var/www/html/webvirt/cake/libs/view/errors";i:6;s:44:"/var/www/html/webvirt/cake/libs/view/helpers";i:7;s:44:"/var/www/html/webvirt/cake/libs/view/layouts";i:8;s:50:"/var/www/html/webvirt/cake/libs/view/layouts/email";i:9;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/html";i:10;s:55:"/var/www/html/webvirt/cake/libs/view/layouts/email/text";i:11;s:47:"/var/www/html/webvirt/cake/libs/view/layouts/js";i:12;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/rss";i:13;s:48:"/var/www/html/webvirt/cake/libs/view/layouts/xml";i:14;s:42:"/var/www/html/webvirt/cake/libs/view/pages";i:15;s:46:"/var/www/html/webvirt/cake/libs/view/scaffolds";}s:48:"/var/www/html/webvirt/app/controllers/components";a:1:{i:0;s:48:"/var/www/html/webvirt/app/controllers/components";}s:53:"/var/www/html/webvirt/cake/libs/controller/components";a:1:{i:0;s:53:"/var/www/html/webvirt/cake/libs/controller/components";}s:39:"/var/www/html/webvirt/app/views/helpers";a:1:{i:0;s:39:"/var/www/html/webvirt/app/views/helpers";}}
--- a/app/tmp/cache/persistent/cake_core_file_map	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/tmp/cache/persistent/cake_core_file_map	Wed Jul 27 00:00:25 2011 +0900
@@ -1,2 +1,2 @@
-1311508879
-a:5:{s:4:"Core";a:7:{s:6:"Router";s:42:"/var/www/html/webvirt/cake/libs/router.php";s:13:"ClassRegistry";s:50:"/var/www/html/webvirt/cake/libs/class_registry.php";s:12:"Overloadable";s:48:"/var/www/html/webvirt/cake/libs/overloadable.php";s:8:"Security";s:44:"/var/www/html/webvirt/cake/libs/security.php";s:4:"l10n";s:40:"/var/www/html/webvirt/cake/libs/l10n.php";s:9:"Multibyte";s:45:"/var/www/html/webvirt/cake/libs/multibyte.php";s:4:"i18n";s:40:"/var/www/html/webvirt/cake/libs/i18n.php";}s:10:"Controller";a:4:{s:9:"Component";s:56:"/var/www/html/webvirt/cake/libs/controller/component.php";s:10:"Controller";s:57:"/var/www/html/webvirt/cake/libs/controller/controller.php";s:13:"AppController";s:61:"/var/www/html/webvirt/cake/libs/controller/app_controller.php";s:15:"PagesController";s:58:"/var/www/html/webvirt/app/controllers/pages_controller.php";}s:4:"View";a:2:{s:6:"Helper";s:47:"/var/www/html/webvirt/cake/libs/view/helper.php";s:4:"View";s:45:"/var/www/html/webvirt/cake/libs/view/view.php";}s:9:"Component";a:1:{s:16:"SessionComponent";s:65:"/var/www/html/webvirt/cake/libs/controller/components/session.php";}s:6:"Helper";a:4:{s:9:"AppHelper";s:59:"/var/www/html/webvirt/cake/libs/view/helpers/app_helper.php";s:13:"SessionHelper";s:56:"/var/www/html/webvirt/cake/libs/view/helpers/session.php";s:10:"HtmlHelper";s:53:"/var/www/html/webvirt/cake/libs/view/helpers/html.php";s:10:"FormHelper";s:53:"/var/www/html/webvirt/cake/libs/view/helpers/form.php";}}
+1311692186
+a:5:{s:4:"Core";a:7:{s:6:"Router";s:42:"/var/www/html/webvirt/cake/libs/router.php";s:13:"ClassRegistry";s:50:"/var/www/html/webvirt/cake/libs/class_registry.php";s:12:"Overloadable";s:48:"/var/www/html/webvirt/cake/libs/overloadable.php";s:8:"Security";s:44:"/var/www/html/webvirt/cake/libs/security.php";s:4:"l10n";s:40:"/var/www/html/webvirt/cake/libs/l10n.php";s:9:"Multibyte";s:45:"/var/www/html/webvirt/cake/libs/multibyte.php";s:4:"i18n";s:40:"/var/www/html/webvirt/cake/libs/i18n.php";}s:10:"Controller";a:5:{s:9:"Component";s:56:"/var/www/html/webvirt/cake/libs/controller/component.php";s:10:"Controller";s:57:"/var/www/html/webvirt/cake/libs/controller/controller.php";s:13:"AppController";s:61:"/var/www/html/webvirt/cake/libs/controller/app_controller.php";s:15:"PagesController";s:58:"/var/www/html/webvirt/app/controllers/pages_controller.php";s:16:"CreateController";s:59:"/var/www/html/webvirt/app/controllers/create_controller.php";}s:4:"View";a:2:{s:6:"Helper";s:47:"/var/www/html/webvirt/cake/libs/view/helper.php";s:4:"View";s:45:"/var/www/html/webvirt/cake/libs/view/view.php";}s:9:"Component";a:1:{s:16:"SessionComponent";s:65:"/var/www/html/webvirt/cake/libs/controller/components/session.php";}s:6:"Helper";a:4:{s:9:"AppHelper";s:59:"/var/www/html/webvirt/cake/libs/view/helpers/app_helper.php";s:13:"SessionHelper";s:56:"/var/www/html/webvirt/cake/libs/view/helpers/session.php";s:10:"HtmlHelper";s:53:"/var/www/html/webvirt/cake/libs/view/helpers/html.php";s:10:"FormHelper";s:53:"/var/www/html/webvirt/cake/libs/view/helpers/form.php";}}
--- a/app/tmp/cache/persistent/cake_core_object_map	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/tmp/cache/persistent/cake_core_object_map	Wed Jul 27 00:00:25 2011 +0900
@@ -1,2 +1,2 @@
-1311508879
+1311692186
 a:1:{s:6:"plugin";a:0:{}}
--- a/app/tmp/logs/debug.log	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/tmp/logs/debug.log	Wed Jul 27 00:00:25 2011 +0900
@@ -58,3 +58,36 @@
 2011-07-24 20:37:39 Notice: Notice (1024): authentication failed in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 13]
 2011-07-24 21:00:57 Notice: Notice (8): Undefined index: APP_USERNAME in [/var/www/html/webvirt/app/config/bootstrap.php, line 71]
 2011-07-24 21:00:57 Notice: Notice (8): Undefined index: APP_PASSWORD in [/var/www/html/webvirt/app/config/bootstrap.php, line 72]
+2011-07-24 21:18:31 Notice: Notice (1024): vnc is not supported. in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 44]
+2011-07-24 21:41:19 Notice: Notice (1024): cannot recv data: : Connection reset by peer in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 13]
+2011-07-24 21:41:40 Notice: Notice (8): Undefined variable: domains in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-24 21:43:28 Notice: Notice (8): Undefined variable: active_domains in [/var/www/html/webvirt/app/views/pages/display.ctp, line 25]
+2011-07-24 21:53:42 Notice: Notice (8): Trying to get property of non-object in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 23]
+2011-07-24 21:56:33 Notice: Notice (8): Trying to get property of non-object in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 23]
+2011-07-25 02:57:05 Notice: Notice (1024): cannot recv data: : Connection reset by peer in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 13]
+2011-07-26 12:49:19 Notice: Notice (8): Undefined index: state in [/var/www/html/webvirt/app/views/storage/edit_pool.ctp, line 12]
+2011-07-26 15:37:05 Notice: Notice (8): Undefined index: name in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 122]
+2011-07-26 15:43:59 Notice: Notice (8): Undefined index: name in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 122]
+2011-07-26 15:44:43 Notice: Notice (8): Undefined index: name in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 122]
+2011-07-26 16:30:08 Notice: Notice (8): Undefined variable: res in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-26 17:15:29 Notice: Notice (8): Trying to get property of non-object in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 30]
+2011-07-26 18:18:40 Notice: Notice (8): Trying to get property of non-object in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 30]
+2011-07-26 22:13:41 Notice: Notice (8): Undefined variable: pool in [/var/www/html/webvirt/app/views/storage/exec.ctp, line 2]
+2011-07-26 22:30:56 Notice: Notice (8): Undefined property: View::$pool in [/var/www/html/webvirt/app/views/elements/storage/poolinfo.ctp, line 10]
+2011-07-26 22:30:56 Notice: Notice (8): Undefined property: View::$pool in [/var/www/html/webvirt/app/views/elements/storage/poolinfo.ctp, line 11]
+2011-07-26 22:30:56 Notice: Notice (8): Undefined property: View::$pool in [/var/www/html/webvirt/app/views/elements/storage/poolinfo.ctp, line 12]
+2011-07-26 22:30:56 Notice: Notice (8): Undefined property: View::$pool in [/var/www/html/webvirt/app/views/elements/storage/poolinfo.ctp, line 13]
+2011-07-26 22:30:56 Notice: Notice (8): Undefined property: View::$pool in [/var/www/html/webvirt/app/views/elements/storage/poolinfo.ctp, line 14]
+2011-07-26 22:35:33 Notice: Notice (8): Trying to get property of non-object in [/var/www/html/webvirt/app/views/elements/storage/poolinfo.ctp, line 10]
+2011-07-26 22:42:35 Notice: Notice (8): Undefined variable: volume in [/var/www/html/webvirt/app/views/storage/edit_pool.ctp, line 6]
+2011-07-26 23:15:31 Notice: Notice (8): Undefined index: id in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 135]
+2011-07-26 23:15:31 Notice: Notice (8): Undefined index: capacity in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 137]
+2011-07-26 23:15:31 Notice: Notice (8): Undefined index: allocate in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 138]
+2011-07-26 23:29:19 Notice: Notice (8): Undefined index: pid in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 133]
+2011-07-26 23:29:19 Notice: Notice (8): Undefined index: vname in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 135]
+2011-07-26 23:48:18 Notice: Notice (8): Undefined variable: info in [/var/www/html/webvirt/app/views/storage/add_volume.ctp, line 3]
+2011-07-26 23:48:50 Notice: Notice (8): Undefined index: name in [/var/www/html/webvirt/app/views/elements/storage/volumeinfotable.ctp, line 11]
+2011-07-26 23:48:50 Notice: Notice (8): Undefined index: path in [/var/www/html/webvirt/app/views/elements/storage/volumeinfotable.ctp, line 13]
+2011-07-26 23:49:04 Notice: Notice (8): Undefined index: name in [/var/www/html/webvirt/app/views/elements/storage/volumeinfotable.ctp, line 11]
+2011-07-26 23:49:04 Notice: Notice (8): Undefined index: path in [/var/www/html/webvirt/app/views/elements/storage/volumeinfotable.ctp, line 13]
+2011-07-26 23:50:26 Notice: Notice (8): Undefined variable: vname in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 197]
--- a/app/tmp/logs/error.log	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/tmp/logs/error.log	Wed Jul 27 00:00:25 2011 +0900
@@ -30,3 +30,53 @@
 2011-07-24 16:29:51 Warning: Warning (2): libvirt_domain_shutdown() [<a href='http://php.net/function.libvirt-domain-shutdown'>function.libvirt-domain-shutdown</a>]: operation virDomainShutdown forbidden for read only access in [/var/www/html/webvirt/app/controllers/shutdown_controller.php, line 28]
 2011-07-24 16:36:53 Warning: Warning (2): libvirt_domain_shutdown() [<a href='http://php.net/function.libvirt-domain-shutdown'>function.libvirt-domain-shutdown</a>]: operation virDomainShutdown forbidden for read only access in [/var/www/html/webvirt/app/controllers/shutdown_controller.php, line 28]
 2011-07-24 20:37:39 Warning: Warning (2): libvirt_connect() [<a href='http://php.net/function.libvirt-connect'>function.libvirt-connect</a>]: authentication failed in [/var/www/html/webvirt/app/config/bootstrap.php, line 76]
+2011-07-24 21:41:19 Warning: Warning (2): libvirt_connect() [<a href='http://php.net/function.libvirt-connect'>function.libvirt-connect</a>]: cannot recv data: : Connection reset by peer in [/var/www/html/webvirt/app/config/bootstrap.php, line 71]
+2011-07-24 21:41:40 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-24 21:43:28 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-24 21:43:28 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-24 21:43:28 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 36]
+2011-07-24 21:43:28 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/app/views/pages/display.ctp, line 25]
+2011-07-24 21:44:04 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-24 21:44:04 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-24 21:44:04 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 36]
+2011-07-24 21:45:09 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-24 21:45:09 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 31]
+2011-07-24 21:45:09 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 37]
+2011-07-24 21:45:21 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-24 21:45:21 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 31]
+2011-07-24 21:45:21 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 37]
+2011-07-24 21:47:32 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-24 21:47:32 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-24 21:47:32 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, integer given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 35]
+2011-07-24 21:53:46 Warning: Warning (2): libvirt_domain_create() [<a href='http://php.net/function.libvirt-domain-create'>function.libvirt-domain-create</a>]: Requested operation is not valid: domain is already running in [/var/www/html/webvirt/app/controllers/create_controller.php, line 29]
+2011-07-25 02:57:05 Warning: Warning (2): libvirt_connect() [<a href='http://php.net/function.libvirt-connect'>function.libvirt-connect</a>]: cannot recv data: : Connection reset by peer in [/var/www/html/webvirt/app/config/bootstrap.php, line 71]
+2011-07-26 12:48:20 Warning: Warning (2): libvirt_storagepool_get_info() expects parameter 1 to be resource, array given in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 73]
+2011-07-26 12:48:20 Warning: Warning (2): libvirt_storagepool_get_info() [<a href='http://php.net/function.libvirt-storagepool-get-info'>function.libvirt-storagepool-get-info</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/storage_controller.php, line 73]
+2011-07-26 13:14:54 Warning: Warning (512): Method FormHelper::check does not exist in [/var/www/html/webvirt/cake/libs/view/helper.php, line 154]
+2011-07-26 13:21:58 Warning: Warning (512): Method FormHelper::check does not exist in [/var/www/html/webvirt/cake/libs/view/helper.php, line 154]
+2011-07-26 16:28:01 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, string given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-26 16:28:01 Warning: Warning (2): libvirt_domain_get_name() [<a href='http://php.net/function.libvirt-domain-get-name'>function.libvirt-domain-get-name</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-26 16:28:01 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, string given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-26 16:28:01 Warning: Warning (2): libvirt_domain_get_info() [<a href='http://php.net/function.libvirt-domain-get-info'>function.libvirt-domain-get-info</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-26 16:28:01 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, string given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 62]
+2011-07-26 16:28:01 Warning: Warning (2): libvirt_domain_get_uuid_string() [<a href='http://php.net/function.libvirt-domain-get-uuid-string'>function.libvirt-domain-get-uuid-string</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 62]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_lookup_by_name() expects parameter 1 to be resource, null given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_lookup_by_name() [<a href='http://php.net/function.libvirt-domain-lookup-by-name'>function.libvirt-domain-lookup-by-name</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 28]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_get_name() expects parameter 1 to be resource, boolean given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_get_name() [<a href='http://php.net/function.libvirt-domain-get-name'>function.libvirt-domain-get-name</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 29]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_get_info() expects parameter 1 to be resource, boolean given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_get_info() [<a href='http://php.net/function.libvirt-domain-get-info'>function.libvirt-domain-get-info</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_get_uuid_string() expects parameter 1 to be resource, boolean given in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 63]
+2011-07-26 16:30:08 Warning: Warning (2): libvirt_domain_get_uuid_string() [<a href='http://php.net/function.libvirt-domain-get-uuid-string'>function.libvirt-domain-get-uuid-string</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 63]
+2011-07-26 17:15:29 Warning: Warning (2): libvirt_domain_get_xml_desc() expects at least 2 parameters, 1 given in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 27]
+2011-07-26 17:15:29 Warning: Warning (2): libvirt_domain_get_xml_desc() [<a href='http://php.net/function.libvirt-domain-get-xml-desc'>function.libvirt-domain-get-xml-desc</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 27]
+2011-07-26 17:15:29 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 30]
+2011-07-26 17:15:29 Warning: Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/webvirt/cake/libs/debugger.php:673) in [/var/www/html/webvirt/cake/libs/controller/controller.php, line 742]
+2011-07-26 18:18:40 Warning: Warning (2): libvirt_domain_get_xml_desc() expects at least 2 parameters, 1 given in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 27]
+2011-07-26 18:18:40 Warning: Warning (2): libvirt_domain_get_xml_desc() [<a href='http://php.net/function.libvirt-domain-get-xml-desc'>function.libvirt-domain-get-xml-desc</a>]: Invalid arguments in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 27]
+2011-07-26 18:18:40 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/app/controllers/vncviewer_controller.php, line 30]
+2011-07-26 18:18:40 Warning: Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/webvirt/cake/libs/debugger.php:673) in [/var/www/html/webvirt/cake/libs/controller/controller.php, line 742]
+2011-07-26 20:05:30 Warning: Warning (2): libvirt_domain_get_info() [<a href='http://php.net/function.libvirt-domain-get-info'>function.libvirt-domain-get-info</a>]: operation failed: could not query memory balloon allocation in [/var/www/html/webvirt/app/controllers/pages_controller.php, line 30]
+2011-07-26 22:17:42 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/cake/libs/view/helpers/html.php, line 644]
+2011-07-26 22:17:42 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/cake/libs/view/helpers/html.php, line 688]
+2011-07-26 22:42:35 Warning: Warning (2): Invalid argument supplied for foreach() in [/var/www/html/webvirt/app/views/elements/storage/volumeinfotable.ctp, line 9]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/create/exec.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,1 @@
+<h1><?php echo $content; ?></h1>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/define/exec.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,1 @@
+<h2>define new domain</h2>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/elements/storage/poolinfo.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,16 @@
+<table>
+	<tr>		
+		<th>Name</th>
+		<th>State</th>
+		<th>Capacity</th>
+		<th>Allocation</th>
+		<th>Available</th>
+	</tr>
+	<tr>
+		<td><?php echo $pool["name"]; ?></td>	
+		<td><?php echo $pool["state"]; ?></td>	
+		<td><?php echo $pool["capacity"]; ?></td>	
+		<td><?php echo $pool["allocation"]; ?></td>	
+		<td><?php echo $pool["available"]; ?></td>	
+	</tr>
+</table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/elements/storage/volumeinfotable.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,18 @@
+<table>
+	<tr>
+		<th>Name</th>
+		<th>Type</th>
+		<th>Path</th>
+		<th>Capacity</th>
+		<th>Allocation</th>
+	</tr>
+<?php foreach($volumes as $volume) { ?>
+	<tr>
+		<td><?php echo $volume["name"]; ?></td>
+		<td><?php echo $volume["type"]; ?></td>
+		<td><?php echo $volume["path"]; ?></td>
+		<td><?php echo $volume["capacity"]; ?></td>
+		<td><?php echo $volume["allocation"]; ?></td>
+	</td>
+<?php } ?>
+</table>
--- a/app/views/pages/display.ctp	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/views/pages/display.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -21,12 +21,20 @@
 <?php } ?>
 	</tr>
 </table>
+<h2>Domains</h2>
 <?php foreach($domains as $dom){ ?>
-<h4><?php echo $dom["name"]; ?></h4>
-<ul>
-	<li>Memory : <?php echo $dom["memory"]; ?></li>
-	<li>VCPUs : <?php echo $dom["nrVirtCpu"]; ?></li>
-</ul>
+<h3><?php echo $dom["name"]; ?></h3>
+<table>
+	<tr>
+		<th>Memory</th>
+		<th>Number of CPUs</th>
+		<th>Status</th>
+	<tr>
+		<td><?php echo $dom["memory"]; ?></td>
+		<td><?php echo $dom["nrVirtCpu"]; ?></td>
+		<td><?php echo $dom["status"]; ?></td>
+	</tr>
+</table>
 <table>
 	<tr>
 		<th>Actions</th>
@@ -37,5 +45,5 @@
 <?php } ?>
 	</tr>
 </table>
-<br/>
 <?php } ?>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/storage/add_volume.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,4 @@
+<h2>StoragePools::AddVolume</h2>
+<p class="success"><?php echo $content; ?></p>
+<?php echo $this->element("storage/volumeinfotable",array("volumes" => array($volumeinfo))); ?>
+<p><a href="./">Back</a></p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/storage/delete_volume.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,3 @@
+<h2>StoragePool::DeleteVolume</h2>
+<p class="success"><strong><?php echo $content; ?></strong></p>
+<p><a href="./">Back</a></p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/storage/edit_pool.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,47 @@
+<h2>StoragePool::EditPool</h2>
+<h3><?php echo $pool["name"]; ?></h3>
+<h4>StoragePool Information</h4>
+<?php echo $this->element("storage/poolinfo",array("pool" => $pool)); ?>
+<h4>Volumes</h4>
+<?php echo $this->element("storage/volumeinfotable",array("volumes" => $pool["volumes"])); ?>
+<h4>Add New Volume</h4>
+<form method="post" action="AddVolume">
+<input name="id" type="hidden" value="<?php echo $pool["id"]; ?>"/>
+<table>
+	<tr>
+		<th>Volume Name</th>
+		<th>Capacity (MiB)</th>
+		<th>Allocate (MiB)</th>
+	</tr>
+	<tr>
+		<td><input type="text" name="name"/></td>
+		<td><input type="text" name="capacity"/></td>
+		<td><input type="text" name="allocate"/></td>
+	</tr>
+</table>
+<input type="submit" value="AddVolume"/>
+</form>
+<br/>
+<h4>Delete Volume</h4>
+<form method="post" action="DeleteVolume">
+<input type="hidden" name="pid" value="<?php echo $pool["id"]; ?>"/>
+<table>
+	<tr>
+		<th>Volume Name</th>
+	</tr>
+	<tr>
+		<td>
+			<select name="vname">
+<?php 
+	foreach($pool["volumes"] as $volume){
+		echo "<option value=\"".$volume["name"]."\">".$volume["name"]."</option>";
+	}
+?>
+			</select>
+		</td>
+	</tr>
+</table>
+<?php echo $this->Form->end("DeleteVolume"); ?>
+</form>
+<p><a href="./">Back</a></p>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/storage/error.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,3 @@
+<h2>StoragePool::Error</h2>
+<p class="error"><strong><?php echo $content; ?></strong></p>
+<p><a href="./">Back</a></p>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/storage/exec.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -0,0 +1,16 @@
+<h2>StoragePools</h2>
+<?php foreach($storagepools as $pool){ ?>
+<h3><?php echo $pool["name"]; ?></h3>
+<?php echo $this->element("storage/poolinfo",array("pool" => $pool)); ?>
+<table>
+	<tr>
+		<th>Actions.</th>
+	</tr>
+	<tr>
+		<td><?php echo $this->Html->link("Edit",array("action" => "EditPool","?" => array("id" => $pool["uuid"]))); ?></td>
+	</tr>
+</table>
+<h4>Volumes</h4>
+<?php echo $this->element("storage/volumeinfotable",array("volumes" => $pool["volumes"])); ?>
+<?php } ?>
+<p><a href="../">Back</a></p>
--- a/app/views/vncviewer/error.ctp	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/views/vncviewer/error.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -1,1 +1,1 @@
-<h2>Error</h2>
+<h2>Error : <?php echo $content; ?></h2>
--- a/app/views/vncviewer/exec.ctp	Sun Jul 24 21:08:31 2011 +0900
+++ b/app/views/vncviewer/exec.ctp	Wed Jul 27 00:00:25 2011 +0900
@@ -1,5 +1,5 @@
-<h3><?php echo $hostname; ?>:<?php echo $port; ?></h3>
-<applet archive="tightvnc-jviewer.jar" code="com.glavsoft.viewer.Viewer" width="800" height="600">
+<h1>Opening VNCViewer ... <?php echo $hostname; ?>:<?php echo $port; ?></h1>
+<applet archive="tightvnc-jviewer.jar" code="com.glavsoft.viewer.Viewer" width="1" height="1">
 	<param name="Host" value="<?php echo $hostname; ?>"/>
 	<param name="Port" value="<?php echo $port; ?>"/>
 	<param name="OpenNewWindow" value="yes"/>