bugs
This commit is contained in:
parent
6db5da757b
commit
d81a376894
4 changed files with 50 additions and 20 deletions
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
include_once("../config.inc.php");
|
include_once("/istic-openstack/server/config.inc.php");
|
||||||
require "../vendor/autoload.php";
|
require "../vendor/autoload.php";
|
||||||
include_once("../core/Plugin_Api.php");
|
include_once("/istic-openstack/server/core/Plugin_Api.php");
|
||||||
include_once("../core/LibOverride/genTokenOptions.php");
|
include_once("/istic-openstack/server/core/LibOverride/genTokenOptions.php");
|
||||||
|
|
||||||
$user = "admin";
|
$user = "admin";
|
||||||
$password = "ae5or6cn";
|
$password = "ae5or6cn";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
require '../vendor/autoload.php';
|
require '../vendor/autoload.php';
|
||||||
include('../index.php');
|
include('/istic-openstack/server/init.php');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$options = Array();
|
$options = Array();
|
||||||
|
@ -31,6 +31,7 @@ $openstack = new OpenStack\OpenStack($options);
|
||||||
//$servers = $compute->listServers(true);
|
//$servers = $compute->listServers(true);
|
||||||
echo 'toto';
|
echo 'toto';
|
||||||
|
|
||||||
|
$image = new Image($App);
|
||||||
|
|
||||||
$opt = Array();
|
$opt = Array();
|
||||||
$opt['name'] = "Test";
|
$opt['name'] = "Test";
|
||||||
|
@ -46,7 +47,7 @@ $opt['minRam'] = 10;
|
||||||
|
|
||||||
|
|
||||||
//Liste des images
|
//Liste des images
|
||||||
$images = $imageObject->list_images();
|
$images = $image->list_images();
|
||||||
|
|
||||||
echo "Images présentes :";
|
echo "Images présentes :";
|
||||||
echo "</br>";
|
echo "</br>";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
include_once("core/Plugin_Api.php");
|
include_once("/istic-openstack/server/core/Plugin_Api.php");
|
||||||
include_once("core/LibOverride/genTokenOptions.php");
|
include_once("/istic-openstack/server/core/LibOverride/genTokenOptions.php");
|
||||||
|
|
||||||
class App{
|
class App{
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,55 @@
|
||||||
<?php
|
<?php
|
||||||
ini_set('display_errors', 1);
|
|
||||||
date_default_timezone_set("Europe/Paris");
|
|
||||||
|
|
||||||
class Image {
|
//require 'CoreInterface.php';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File containing the Image Class.
|
||||||
|
*
|
||||||
|
* @version 1.0 Initialisation of this file
|
||||||
|
* @since 1.0 Core application's file
|
||||||
|
*
|
||||||
|
* @author Yogg 'yogg at epsina . com'
|
||||||
|
*
|
||||||
|
* @todo Complete the functions with errors detection and finish the descriptions
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Image Class of the back-end application
|
||||||
|
*
|
||||||
|
* ADD CLASS DESCRIPTION
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class image{
|
||||||
|
//implements Core
|
||||||
|
|
||||||
|
/** @var App $app protected, contains the main app object */
|
||||||
|
protected $app;
|
||||||
|
|
||||||
protected $oidentity;
|
/** @var OpenStack\Identity $libClass protected, contains the library Identity object */
|
||||||
//protected $plugins;
|
protected $libClass;
|
||||||
|
|
||||||
|
/** @var array $actions protected, contains the functions which can be call by the front-end */
|
||||||
|
protected $actions = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Image constructor
|
||||||
*
|
*
|
||||||
* @param $openstack
|
* @param App $app the main app object
|
||||||
*
|
|
||||||
* @param $options
|
|
||||||
*
|
*
|
||||||
**/
|
* @throws [Type] [<description>]
|
||||||
public function __construct($ostack, $options){ //, $apiP
|
*
|
||||||
$this->oidentity = $ostack->imagesV2($options);
|
* @return Image
|
||||||
//$this->plugins = $apiP;
|
*/
|
||||||
|
public function __construct($app){
|
||||||
|
$this->app = $app;
|
||||||
|
$this->libClass = $app->getLibClass("Image");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Details about an image
|
* Details about an image
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue