Exemple #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 InstanceList($this, $result);
 }
Exemple #2
0
 /**
  * Test list servers
  */
 public function testListServers()
 {
     $servers = $this->rackspace->listServers();
     $this->assertTrue($servers !== false);
 }