summaryrefslogtreecommitdiff
path: root/server/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'server/index.php')
-rw-r--r--[-rwxr-xr-x]server/index.php59
1 files changed, 31 insertions, 28 deletions
diff --git a/server/index.php b/server/index.php
index b3c061a..166e82e 100755..100644
--- a/server/index.php
+++ b/server/index.php
@@ -3,33 +3,36 @@
include_once("config.inc.php");
include_once("init.php");
-// $task = $_POST["task"];
-// $action = $_POST["action"];
-
-
- //$id = new identity($openstack_api, $pluginApi);
-
-// var_dump($id->genToken());
-// $identity = $openstack_api->identityV3($Args);
- //$tmp = $identity->listEndpoints();
- //foreach($tmp as $cred){
-// echo $cred->id." %%%%%% ";
- //}
- //$servers = $compute->listServers(true);
- //var_dump($servers);
- //foreach($servers as $server){
- // echo $server->id." !!!!!!!!! ";
- //}
-
- $tmp = new genTokenOptions($Args);
- $tmp->loadIdentityBackup($identityBack);
- $array = $tmp->getOptions("Identity");
-
- $openstackTest = new OpenStack\OpenStack([]);
- $identityTest = $openstackTest->identityV3($array);
- $domainsTest = $identityTest->listDomains();
- foreach($domainsTest as $domain){
- echo $domain->id." %%%%%% ";
+ if(isset($_POST["task"]) && isset($_POST["action"])){
+ $task = $_POST["task"];
+ $action = $_POST["action"];
+ }else if(isset($_POST["task"]) && $_POST["task"] == "Authenticate"){
+ $task = $_POST["task"];
+ }else{
+ //Gestion Erreur
+ }
+
+ if($task == "Authenticate"){
+
+ $App->authenticate();
+ $App->show();
+
+ }
+
+ switch($task)
+ {
+ case "identity":
+ include_once("core/Identity.php");
+ $identityObject = new identity($App);
+ $identityObject->action($action);
+ $App->show();
+ break;
+
+ case "image":
+ include_once("core/Image.php");
+ $imageObject = new image($App);
+ $imageObject->action($action);
+ $App->show();
+ break;
}
- // var_dump($openstack_api->getBuilderOptions());