Ejemplo n.º 1
0
 /**
  * Get the progress's status
  * 
  * @return integer|boolean
  */
 public function getProgress()
 {
     $data= $this->service->getImage($this->id);
     if ($data!==false) {
         $data= $data->toArray();
         $this->progress= $data['progress'];
         return $this->progress;
     }
     return false;
 }
Ejemplo n.º 2
0
 /**
  * Test delete server
  */
 public function testDeleteServer()
 {
     $this->assertTrue($this->rackspace->deleteServer(self::$serverId));
 }
Ejemplo n.º 3
0
Archivo: Server.php Proyecto: noose/zf2
 /**
  * Reboot the server
  * 
  * @return boolean 
  */
 public function reboot($hard=false)
 {
     return $this->service->rebootServer($this->id,$hard);
 }
Ejemplo n.º 4
0
 /**
  * Set the error message and code
  * 
  * @return void
  */
 protected function setError()
 {
     $this->errorMsg = $this->rackspace->getErrorMsg();
     $this->errorCode = $this->rackspace->getErrorCode();
 }
Ejemplo n.º 5
0
 /**
  * Create a server in the shared Ip Group
  * 
  * @param array $data
  * @param array $metadata
  * @param array $files 
  * @return Zend\Service\Rackspace\Servers\Server|boolean
  */
 public function createServer(array $data, $metadata=array(),$files=array()) 
 {
     $data['sharedIpGroupId']= (integer) $this->id;
     return $this->service->createServer($data,$metadata,$files);
 }
Ejemplo n.º 6
0
 /**
  * Get the last HTTP response
  * 
  * @return Zend\Http\Response 
  */
 public function getLastHttpResponse()
 {
     return $this->rackspace->getHttpClient()->getLastResponse();
 }