Request Analyse reviewed, Server Initialisation Reviewed, Core Class Interface Created, App created
This commit is contained in:
parent
b39f5c1cd4
commit
c2a5b1880c
6 changed files with 147 additions and 83 deletions
|
@ -1,13 +1,15 @@
|
|||
<?php
|
||||
include_once("config.inc.php");
|
||||
include_once("core/Plugin_Api.php");
|
||||
require "vendor/autoload.php";
|
||||
include_once("core/LibOverride/genTokenOptions.php");
|
||||
include_once("core/Identity.php");
|
||||
include_once("core/App.php");
|
||||
|
||||
$user = "";
|
||||
$password = "";
|
||||
$project = "";
|
||||
|
||||
|
||||
//traitement requete, recuperation data
|
||||
if(isset($_POST["key"])){
|
||||
//recuperation des donnes sauvegardes
|
||||
if(isset($_POST["token"])){
|
||||
|
||||
$token = $_POST["token"];
|
||||
|
||||
}else if(isset($_POST["user"]) && isset($_POST["password"]) && isset($_POST["project"]) ){
|
||||
|
||||
|
@ -15,28 +17,14 @@
|
|||
$password = $_POST["password"];
|
||||
$project = $_POST["project"];
|
||||
|
||||
$Args = Array(
|
||||
"user" => Array(
|
||||
"name" => $user,
|
||||
"password" => $password,
|
||||
"domain" => Array(
|
||||
"name" => "Default")
|
||||
),
|
||||
"scope" => Array(
|
||||
"project" => Array(
|
||||
"name" => $project,
|
||||
"domain" => Array(
|
||||
"name" => "Default")
|
||||
)
|
||||
),
|
||||
"authUrl" => $config["urlAuth"]
|
||||
);
|
||||
} else {
|
||||
} /*else { // Test Backend
|
||||
$user = "admin";
|
||||
$password = "ae5or6cn";
|
||||
$project = "admin";
|
||||
|
||||
$Args = Array(
|
||||
}*/
|
||||
|
||||
$Args = Array(
|
||||
"user" => Array(
|
||||
"name" => $user,
|
||||
"password" => $password,
|
||||
|
@ -52,21 +40,7 @@
|
|||
),
|
||||
"authUrl" => $config["urlAuth"]
|
||||
);
|
||||
}
|
||||
|
||||
$pluginApi = plugin_api::getInstance();
|
||||
|
||||
//$openstack_api = new OpenStack\OpenStack($Args);
|
||||
//$id = new identity($openstack_api, $pluginApi);
|
||||
|
||||
//$token = $id->genToken();
|
||||
|
||||
$tmp = new genTokenOptions($Args);
|
||||
$tmp->genIdentityToken();
|
||||
$array = $tmp->getOptions("Identity");
|
||||
$openstack_api = new OpenStack\OpenStack([]);
|
||||
|
||||
$identityBack = $tmp->getBackup("Identity");
|
||||
//file_put_contents("token", serialize($tmp));
|
||||
$App = new App($Args);
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue