public function restore_ok($uuid, $ok) { $c = new Criteria(); $c->add(EtvaNodePeer::UUID, $uuid); $etva_node = EtvaNodePeer::doSelectOne($c); $ok_array = (array) $ok; $message = 'Node restore ok'; //notify system log sfContext::getInstance()->getEventDispatcher()->notify(new sfEvent($etva_node->getName(), 'event.log', array('message' => $message, 'priority' => EtvaEventLogger::INFO))); /* * check if is an appliance restore operation...it should be... */ $apli = new Appliance(); $action = $apli->getStage(Appliance::RESTORE_STAGE); if ($action) { $apli->setStage(Appliance::RESTORE_STAGE, Appliance::VA_COMPLETED); $apli->disable(false); } // remove backup VA file $apli->del_backupconf_file(Appliance::VA_ARCHIVE_FILE, $etva_node->getUuid(), 'VA'); return array('success' => true); }