Init file for php-opencloud api - Config file
This commit is contained in:
parent
a44cc1d2e3
commit
5f34f504b0
4 changed files with 84 additions and 0 deletions
35
server/init.php
Normal file
35
server/init.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
include_once("config.inc.php");
|
||||
require "vendor/autoload.php";
|
||||
|
||||
//traitement requete, recuperation data
|
||||
if(isset($_POST["key"])){
|
||||
//recuperation des donnes sauvegardes
|
||||
|
||||
}else if(isset($_POST["user"]) && isset($_POST["password"]) && isset($_POST["project"]) ){
|
||||
|
||||
$user = $_POST["user"];
|
||||
$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" => $urlAuth
|
||||
);
|
||||
}
|
||||
|
||||
$openstack_api = new OpenStack\OpenStack($Args);
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue