Exemplo n.º 1
0
 /**
  * Return a list of the available instancies
  *
  * @return InstanceList|boolean
  */
 public function listInstances()
 {
     $this->adapterResult = $this->rackspace->listServers(true);
     if ($this->adapterResult === false) {
         return false;
     }
     $array = $this->adapterResult->toArray();
     $result = array();
     foreach ($array as $instance) {
         $result[] = $this->convertAttributes($instance);
     }
     return new Zend_Cloud_Infrastructure_InstanceList($this, $result);
 }
Exemplo n.º 2
0
 /**
  * Test list servers
  */
 public function testListServers()
 {
     $servers = $this->rackspace->listServers();
     $this->assertTrue($servers !== false);
 }