From d5472da07e0d9e8ca64a66880d46969d799d9784 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 29 Apr 2012 12:44:42 +0200 Subject: [PATCH] Add status updates --- frontend/classes/class.container.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/classes/class.container.php b/frontend/classes/class.container.php index 436a114..42ea421 100644 --- a/frontend/classes/class.container.php +++ b/frontend/classes/class.container.php @@ -63,6 +63,9 @@ class Container extends CPHPDatabaseRecordClass // TODO: set sensible values depending on container resource configuration // http://wiki.openvz.org/UBC_consistency_check + $this->uStatus = CVM_STATUS_CREATED; + $this->InsertIntoDatabase(); + $command = shrink_command("vzctl set {$this->sInternalId} --onboot yes --setmode restart @@ -101,6 +104,9 @@ class Container extends CPHPDatabaseRecordClass if($result->returncode == 0) { + $this->uStatus = CVM_STATUS_CONFIGURED; + $this->InsertIntoDatabase(); + return true; } else @@ -121,6 +127,8 @@ class Container extends CPHPDatabaseRecordClass if($result->returncode == 0) { + $this->uStatus = CVM_STATUS_STARTED; + $this->InsertIntoDatabase(); return true; } else