function cli_serverstop($host, $server) { if (!($etva_node = EtvaNodePeer::retrieveByIp($host))) { $error = array('success' => false, 'error' => $host . ' : Virt agent not found'); return json_encode($error); } $this->request->setParameter('nid', $etva_node->getId()); $this->request->setParameter('server', $server); $action = $this->getAction('server', 'jsonStop'); $result = $action->executeJsonStop($this->request); return $result; }