This commit is contained in:
Yoggzo 2016-02-29 14:20:13 +01:00
parent 6349739a6c
commit cfce59d6dc
47 changed files with 500 additions and 52 deletions

15
server/core/App.php Normal file → Executable file
View file

@ -33,7 +33,7 @@ class App{
public function setToken($token){
$this->tokenPost = $token;
$this->tokenClass->loadBackup($his->tokenPost);
$this->tokenClass->loadBackup($this->tokenPost);
}
@ -50,6 +50,16 @@ class App{
$opt = $this->tokenClass->getOptions($service);
return $this->openstack->imagesV2($opt);
break;
case "Network":
if($this->tokenPost == NULL) $this->tokenClass->genNetworkToken();
$opt = $this->tokenClass->getOptions($service);
return $this->openstack->networkingV2($opt);
break;
case "Compute":
if($this->tokenPost == NULL) $this->tokenClass->genComputeToken();
$opt = $this->tokenClass->getOptions($service);
return $this->openstack->computeV2($opt);
break;
}
}
@ -95,6 +105,7 @@ class App{
public function show(){
echo json_encode($this->output);
//error_log(var_dump(json_encode($this->output), true), 0);
}
}
}