/** * Return the status of an instance * * @param string * @return string|boolean */ public function statusInstance($id) { $this->adapterResult = $this->rackspace->getServer($id); if ($this->adapterResult === false) { return false; } $array = $this->adapterResult->toArray(); return $this->mapStatus[$array['status']]; }
/** * Get the server * * @param integer $id * @return Zend_Service_Rackspace_Servers_Server|boolean */ public function getServer($id) { if (empty($this->serversId)) { $this->getServersId(); } if (in_array($id, $this->serversId)) { return $this->service->getServer($id); } return false; }
/** * Get the progress's status * * @return integer|boolean */ public function getProgress() { $data = $this->service->getServer($this->id); if ($data !== false) { $data = $data->toArray(); $this->progress = $data['progress']; return $this->progress; } return false; }
/** * Test Get Server */ public function testGetServer() { $server = $this->rackspace->getServer(self::$serverId); $this->assertTrue($server !== false); $this->assertEquals(TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME, $server->getName()); }