diff options
| -rwxr-xr-x | server/core/App.php | 9 | ||||
| -rw-r--r-- | server/index.php | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/server/core/App.php b/server/core/App.php index 5495a1f..282a1db 100755 --- a/server/core/App.php +++ b/server/core/App.php @@ -33,7 +33,7 @@ class App{ public function setToken($token){
$this->tokenPost = $token;
- $this->tokenClass->loadBackup($his->tokenPost);
+ $this->tokenClass->loadBackup($this->tokenPost);
}
@@ -55,6 +55,11 @@ class App{ $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;
}
}
@@ -102,4 +107,4 @@ class App{ echo json_encode($this->output);
}
-}
\ No newline at end of file +}
diff --git a/server/index.php b/server/index.php index 41b4e73..f888671 100644 --- a/server/index.php +++ b/server/index.php @@ -27,7 +27,14 @@ $identityObject->action($action); $App->show(); break; - + + case "network": + include_once("core/Network.php"); + $networkObject = new network($App); + $networkObject->action($action); + $App->show(); + break; + case "image": include_once("core/Image.php"); $imageObject = new image($App); |
