diff --git a/client/images/spin/128x128/Preloader_1.gif b/client/images/spin/128x128/Preloader_1.gif
new file mode 100644
index 0000000..dafe17e
Binary files /dev/null and b/client/images/spin/128x128/Preloader_1.gif differ
diff --git a/client/images/spin/128x128/Preloader_10.gif b/client/images/spin/128x128/Preloader_10.gif
new file mode 100644
index 0000000..cdfa680
Binary files /dev/null and b/client/images/spin/128x128/Preloader_10.gif differ
diff --git a/client/images/spin/128x128/Preloader_2.gif b/client/images/spin/128x128/Preloader_2.gif
new file mode 100644
index 0000000..3cb9003
Binary files /dev/null and b/client/images/spin/128x128/Preloader_2.gif differ
diff --git a/client/images/spin/128x128/Preloader_3.gif b/client/images/spin/128x128/Preloader_3.gif
new file mode 100644
index 0000000..7f7d415
Binary files /dev/null and b/client/images/spin/128x128/Preloader_3.gif differ
diff --git a/client/images/spin/128x128/Preloader_4.gif b/client/images/spin/128x128/Preloader_4.gif
new file mode 100644
index 0000000..78baff6
Binary files /dev/null and b/client/images/spin/128x128/Preloader_4.gif differ
diff --git a/client/images/spin/128x128/Preloader_5.gif b/client/images/spin/128x128/Preloader_5.gif
new file mode 100644
index 0000000..c9c1530
Binary files /dev/null and b/client/images/spin/128x128/Preloader_5.gif differ
diff --git a/client/images/spin/128x128/Preloader_6.gif b/client/images/spin/128x128/Preloader_6.gif
new file mode 100644
index 0000000..3203d7f
Binary files /dev/null and b/client/images/spin/128x128/Preloader_6.gif differ
diff --git a/client/images/spin/128x128/Preloader_7.gif b/client/images/spin/128x128/Preloader_7.gif
new file mode 100644
index 0000000..2eb19be
Binary files /dev/null and b/client/images/spin/128x128/Preloader_7.gif differ
diff --git a/client/images/spin/128x128/Preloader_8.gif b/client/images/spin/128x128/Preloader_8.gif
new file mode 100644
index 0000000..3ba8217
Binary files /dev/null and b/client/images/spin/128x128/Preloader_8.gif differ
diff --git a/client/images/spin/128x128/Preloader_9.gif b/client/images/spin/128x128/Preloader_9.gif
new file mode 100644
index 0000000..7018192
Binary files /dev/null and b/client/images/spin/128x128/Preloader_9.gif differ
diff --git a/client/images/spin/32x32/Preloader_1.gif b/client/images/spin/32x32/Preloader_1.gif
new file mode 100644
index 0000000..b810330
Binary files /dev/null and b/client/images/spin/32x32/Preloader_1.gif differ
diff --git a/client/images/spin/32x32/Preloader_10.gif b/client/images/spin/32x32/Preloader_10.gif
new file mode 100644
index 0000000..f9c462f
Binary files /dev/null and b/client/images/spin/32x32/Preloader_10.gif differ
diff --git a/client/images/spin/32x32/Preloader_2.gif b/client/images/spin/32x32/Preloader_2.gif
new file mode 100644
index 0000000..f23998f
Binary files /dev/null and b/client/images/spin/32x32/Preloader_2.gif differ
diff --git a/client/images/spin/32x32/Preloader_3.gif b/client/images/spin/32x32/Preloader_3.gif
new file mode 100644
index 0000000..bb7c60d
Binary files /dev/null and b/client/images/spin/32x32/Preloader_3.gif differ
diff --git a/client/images/spin/32x32/Preloader_4.gif b/client/images/spin/32x32/Preloader_4.gif
new file mode 100644
index 0000000..117c756
Binary files /dev/null and b/client/images/spin/32x32/Preloader_4.gif differ
diff --git a/client/images/spin/32x32/Preloader_5.gif b/client/images/spin/32x32/Preloader_5.gif
new file mode 100644
index 0000000..7169708
Binary files /dev/null and b/client/images/spin/32x32/Preloader_5.gif differ
diff --git a/client/images/spin/32x32/Preloader_6.gif b/client/images/spin/32x32/Preloader_6.gif
new file mode 100644
index 0000000..9087ded
Binary files /dev/null and b/client/images/spin/32x32/Preloader_6.gif differ
diff --git a/client/images/spin/32x32/Preloader_7.gif b/client/images/spin/32x32/Preloader_7.gif
new file mode 100644
index 0000000..0b1e633
Binary files /dev/null and b/client/images/spin/32x32/Preloader_7.gif differ
diff --git a/client/images/spin/32x32/Preloader_8.gif b/client/images/spin/32x32/Preloader_8.gif
new file mode 100644
index 0000000..6816be3
Binary files /dev/null and b/client/images/spin/32x32/Preloader_8.gif differ
diff --git a/client/images/spin/32x32/Preloader_9.gif b/client/images/spin/32x32/Preloader_9.gif
new file mode 100644
index 0000000..e38dd5a
Binary files /dev/null and b/client/images/spin/32x32/Preloader_9.gif differ
diff --git a/client/images/spin/64x64/Preloader_1.gif b/client/images/spin/64x64/Preloader_1.gif
new file mode 100644
index 0000000..2004c5f
Binary files /dev/null and b/client/images/spin/64x64/Preloader_1.gif differ
diff --git a/client/images/spin/64x64/Preloader_10.gif b/client/images/spin/64x64/Preloader_10.gif
new file mode 100644
index 0000000..944ec82
Binary files /dev/null and b/client/images/spin/64x64/Preloader_10.gif differ
diff --git a/client/images/spin/64x64/Preloader_2.gif b/client/images/spin/64x64/Preloader_2.gif
new file mode 100644
index 0000000..9821827
Binary files /dev/null and b/client/images/spin/64x64/Preloader_2.gif differ
diff --git a/client/images/spin/64x64/Preloader_3.gif b/client/images/spin/64x64/Preloader_3.gif
new file mode 100644
index 0000000..52b81ba
Binary files /dev/null and b/client/images/spin/64x64/Preloader_3.gif differ
diff --git a/client/images/spin/64x64/Preloader_4.gif b/client/images/spin/64x64/Preloader_4.gif
new file mode 100644
index 0000000..3408b5d
Binary files /dev/null and b/client/images/spin/64x64/Preloader_4.gif differ
diff --git a/client/images/spin/64x64/Preloader_5.gif b/client/images/spin/64x64/Preloader_5.gif
new file mode 100644
index 0000000..6f0585d
Binary files /dev/null and b/client/images/spin/64x64/Preloader_5.gif differ
diff --git a/client/images/spin/64x64/Preloader_6.gif b/client/images/spin/64x64/Preloader_6.gif
new file mode 100644
index 0000000..c577f24
Binary files /dev/null and b/client/images/spin/64x64/Preloader_6.gif differ
diff --git a/client/images/spin/64x64/Preloader_7.gif b/client/images/spin/64x64/Preloader_7.gif
new file mode 100644
index 0000000..5f6dd5e
Binary files /dev/null and b/client/images/spin/64x64/Preloader_7.gif differ
diff --git a/client/images/spin/64x64/Preloader_8.gif b/client/images/spin/64x64/Preloader_8.gif
new file mode 100644
index 0000000..b57e4d8
Binary files /dev/null and b/client/images/spin/64x64/Preloader_8.gif differ
diff --git a/client/images/spin/64x64/Preloader_9.gif b/client/images/spin/64x64/Preloader_9.gif
new file mode 100644
index 0000000..fc3ddb7
Binary files /dev/null and b/client/images/spin/64x64/Preloader_9.gif differ
diff --git a/client/index.html b/client/index.html
index ba183df..8d81ac3 100644
--- a/client/index.html
+++ b/client/index.html
@@ -26,6 +26,9 @@
@@ -81,7 +84,9 @@
+
+
diff --git a/client/js/controllers/home/machineDetails.js b/client/js/controllers/home/machineDetails.js
new file mode 100644
index 0000000..f84a073
--- /dev/null
+++ b/client/js/controllers/home/machineDetails.js
@@ -0,0 +1,39 @@
+/**
+ * The home controller
+ *
+ * @param {$scope} $scope The $scope service from angular
+ */
+mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', function ($scope, Compute, $rootScope, $timeout)
+{
+
+ $scope.machine={};
+ $("#waitingForToggleMachine").hide();
+
+ $scope.$on('showMachineDetailsEvent', function(eventName ,machine){
+ $scope.machine=machine;
+ $('#machineDetailsModal').modal({backdrop: false, keyboard: true});
+ });
+
+
+ $scope.toggleMachineState=function(){
+ $("#waitingForToggleMachine").show();
+
+ // Fake timeout
+ $timeout(function(){
+ $("#waitingForToggleMachine").hide();
+ }, 3000);
+ $timeout(function(){
+ $scope.machine.online=!$scope.machine.online;
+
+ }, 3000);
+
+
+ };
+
+ $scope.applyModifications=function(){
+ //Todo
+ }
+
+
+
+}]);
diff --git a/client/js/controllers/home/main.js b/client/js/controllers/home/main.js
index d25bfad..4e3bcda 100644
--- a/client/js/controllers/home/main.js
+++ b/client/js/controllers/home/main.js
@@ -3,15 +3,22 @@
*
* @param {$scope} $scope The $scope service from angular
*/
-mainApp.controller('homeCtrl', [ '$scope', 'Compute', function ($scope, Compute)
+mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope)
{
-
var updatePage=function(){
// TODO Update graph etc...
}
// Retrieve all Data
Compute.pullData(updatePage);
-
+
+ Compute.getMachines(function(adzda){});
+
+ $scope.raiseShowMachineDetailsEvent=function(){
+ var machine={name: "Machine 1", online:true};
+ $rootScope.$broadcast("showMachineDetailsEvent", machine);
+ }
+
+
}]);
diff --git a/client/js/controllers/login.js b/client/js/controllers/login.js
index 829fc1d..1a89563 100644
--- a/client/js/controllers/login.js
+++ b/client/js/controllers/login.js
@@ -13,14 +13,19 @@ mainApp.controller('loginCtrl', ['$scope','$sce','Identity', function ($scope,$s
if(!Identity.isAlreadyLogin()){
$('#loginModal').modal({backdrop: 'static', keyboard: false});
}
+
+ // Manager logout event
$scope.$on('logoutEvent', function(){
+ Identity.logout();
$('#loginModal').modal({backdrop: 'static', keyboard: false});
});
-
+
+ // Hide loading button and message alert
$('#loadingLoginButton').hide();
$('#failedToLoginAlert').hide();
-
+
+ // Defined function for login
$scope.loginAction=function(){
// Begin login state for template
diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js
index e01df34..940d794 100644
--- a/client/js/controllers/status.js
+++ b/client/js/controllers/status.js
@@ -10,13 +10,11 @@ mainApp.controller('statusCtrl', ['$scope','Identity', '$rootScope', function ($
{
// Give profile to model
- $scope.profile=Identity.profile;
+ $scope.profile=Identity.getProfile();
// Function to logout
- $scope.logout=function(){
- Identity.logout();
+ $scope.raiseLogoutEvent=function(){
$rootScope.$broadcast('logoutEvent');
-
};
}]);
diff --git a/client/js/services/Compute.js b/client/js/services/Compute.js
index c5c8da9..8148948 100644
--- a/client/js/services/Compute.js
+++ b/client/js/services/Compute.js
@@ -2,11 +2,12 @@
mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
-
+ // Create data
var data={};
data.machines={};
+
// Parser
var parseGetMachinesAnswer=function(response, failedToSendRequest){
@@ -16,8 +17,24 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
// Get Machine
var getMachines=function(callback){
+ var params={
+ "token" : Identity.getToken(),
+ "task" : "compute",
+ "action":"getServer",
+ "serverId":"69d5bcc4-2fab-4634-b0d2-f455fee5b7bd"
+ };
+
var result=$http.post('../server/index.php',
- $.param({"token" : Identity.profile.token, "task" : "Compute"}));
+ $.param(params));
+
+ // Wait and handle the response
+ result.then(function (response){
+ console.log(response.data.Servers);
+ callback(parseGetMachinesAnswer(response, false));
+ },function(response){
+ alert(response.status);
+ callback(parseGetMachinesAnswer(response, true));
+ });
};
@@ -31,8 +48,8 @@ mainApp.factory('Compute',[ '$http', 'Identity', function($http, Identity){
// Return services objects
return {
- getMachines: getMachines
- pullData: pullData
+ getMachines: getMachines,
+ pullData: pullData,
data:data
};
diff --git a/client/js/services/Identity.js b/client/js/services/Identity.js
index 8ee664c..b1d2a48 100644
--- a/client/js/services/Identity.js
+++ b/client/js/services/Identity.js
@@ -7,37 +7,47 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
var profile={};
profile.username=null;
profile.projectname=null;
- profile.token=null;
-
-
- /**
- * Save profile in cookies
- */
- var saveCookieForSession=function(){
- $cookies.putObject('profile', 5);
- };
-
+ var token=null;
+
/*
* @returns {boolean} Return true if a cookie is found (and load it in profile) false else
*/
var isAlreadyLogin=function(){
+
+ // Load cookies
var profileInCookie=$cookies.getObject('profile');
- console.log(profileInCookie);
+ var tokenPart_0InCookie=$cookies.getObject('token.part_0');
+ var tokenPart_1InCookie=$cookies.getObject('token.part_1');
+
- if(typeof profileInCookie !== 'undefined'){
+ // Check if cookie is defined
+ if(typeof profileInCookie !== 'undefined'
+ && typeof tokenPart_0InCookie !== 'undefined'
+ && typeof tokenPart_1InCookie !== 'undefined'
+ ){
+
+ // If yes, put it into variables
angular.extend(profile, profileInCookie);
+ token=tokenPart_0InCookie+tokenPart_1InCookie;
+
+ // Return I'm Login
return true;
}
+ // Return I'm not Login
return false;
}
+
+
/*
* Destroy profile cookies
*/
var logout=function(){
$cookies.remove('profile');
+ $cookies.remove('token.part_0');
+ $cookies.remove('token.part_1');
}
@@ -49,15 +59,28 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
*/
var parseLoginAnswer=function(response, failedToSendRequest){
-
+ // Defined return object
var requestParserResult={};
requestParserResult.status=1;
requestParserResult.failReason=null;
if (typeof response.data.token !== 'undefined') {
+ // Set status code
requestParserResult.status=0;
- profile.token=response.data.token;
- saveCookieForSession();
+
+ // Find the middle of the token to split it
+ var middle=parseInt(response.data.token.length/2);
+
+ // Create expire date (cookie expire in 55 mins)
+ var expireDate=new Date();
+ expireDate.setMinutes(expireDate.getMinutes()+55);
+
+ // Save profile
+ $cookies.putObject('profile', profile, {'expires': expireDate});
+ // Save first part of token
+ $cookies.putObject('token.part_0', response.data.token.substring(0, middle), {'expires': expireDate});
+ // Save second part of token
+ $cookies.putObject('token.part_1', response.data.token.substring(middle, response.data.token.length), {'expires': expireDate});
}
else if(failedToSendRequest){
requestParserResult.failReason="Failed to send request";
@@ -69,7 +92,6 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
return requestParserResult;
};
-
/**
* Function to connect to OpenStack
@@ -87,24 +109,39 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
profile.projectname=projectname;
var result=$http.post('../server/index.php',
- $.param({"task" : "Authenticate", "user" : username, "password" : password, "project" : projectname}));
+ $.param({"task" : "Authenticate", "user" : username, "password" : password, "project" : projectname}));
// Wait and handle the response
result.then(function (response){
- callback(parseLoginAnswer(response), false);
+ callback(parseLoginAnswer(response, false));
},function(response){
- callback(parseLoginAnswer(response), true)
+ callback(parseLoginAnswer(response, true));
});
};
+ /*
+ * Get the profile
+ */
+ var getProfile=function(){
+ return profile;
+ }
+
+ /*
+ * Get the token
+ */
+ var getToken=function(){
+ return token;
+ }
+
// Return services objects
return {
login: login,
- profile: profile,
+ getProfile: getProfile,
isAlreadyLogin: isAlreadyLogin,
- logout:logout
+ logout:logout,
+ getToken:getToken
};
diff --git a/client/partials/home/machineDetails.html b/client/partials/home/machineDetails.html
new file mode 100644
index 0000000..606edcf
--- /dev/null
+++ b/client/partials/home/machineDetails.html
@@ -0,0 +1,84 @@
+
diff --git a/client/partials/home/main.html b/client/partials/home/main.html
index 7a5045a..37638d3 100644
--- a/client/partials/home/main.html
+++ b/client/partials/home/main.html
@@ -1,8 +1,11 @@
-
+
Home
Main Content
+
+
+
-
\ No newline at end of file
+
diff --git a/client/partials/nav.html b/client/partials/nav.html
index 3c72844..b3ef76a 100644
--- a/client/partials/nav.html
+++ b/client/partials/nav.html
@@ -32,7 +32,7 @@
Informations
Settings
- Logout
+ Logout
diff --git a/server/Test/AppTestClass.php b/server/Test/AppTestClass.php
index 40a5847..3ff0aea 100755
--- a/server/Test/AppTestClass.php
+++ b/server/Test/AppTestClass.php
@@ -12,6 +12,7 @@ class AppTest{
protected $openstack;
protected $pluginsApi;
+ protected $postParams;
protected $tokenClass;
protected $tokenPost;
protected $output;
@@ -23,8 +24,13 @@ class AppTest{
$this->tokenClass = new genTokenOptions($args);
$this->openstack = new OpenStack\OpenStack([]);
$this->pluginsApi = plugin_api::getInstance();
- $this->output = array();
$this->errorClass = new errorManagement($this);
+ $this->output = array();
+<<<<<<< HEAD
+ $this->errorClass = new errorManagement($this);
+=======
+ $this->postParams = $_POST;
+>>>>>>> develop
}
@@ -48,6 +54,16 @@ class AppTest{
$opt = $this->tokenClass->getOptions($service);
return $this->openstack->imagesV2($opt);
break;
+ case "Compute":
+ if($this->tokenPost == NULL) $this->tokenClass->genComputeToken();
+ $opt = $this->tokenClass->getOptions($service);
+ return $this->openstack->computeV2($opt);
+ break;
+ case "Network":
+ if($this->tokenPost == NULL) $this->tokenClass->genNetworkToken();
+ $opt = $this->tokenClass->getOptions($service);
+ return $this->openstack->networkingV2($opt);
+ break;
}
}
@@ -61,10 +77,21 @@ class AppTest{
$this->tokenClass->genNetworkToken();
$this->setOutput("token", $this->tokenClass->getBackup());
- }catch(Exception $e){
- echo $e;
- exit();
- }
+ }catch(BadResponseError $e){
+ $this->errorClass->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->errorClass->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->errorClass->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->errorClass->NotImplementedHandler($e);
+ }
+
+ }
+
+ public function getPostParam($name){
+
+ return $this->postParams[$name];
}
@@ -75,12 +102,16 @@ class AppTest{
}
public function show(){
- echo json_encode($this->output);
+ return json_encode($this->output);
}
+<<<<<<< HEAD
public function getErrorInstance(){
return $this->errorClass;
}
-}
\ No newline at end of file
+}
+=======
+}
+>>>>>>> develop
diff --git a/server/Test/computeTest.php b/server/Test/computeTest.php
new file mode 100644
index 0000000..3ce1f2e
--- /dev/null
+++ b/server/Test/computeTest.php
@@ -0,0 +1,20 @@
+re '../vendor/autoload.php';
+include('/istic-openstack/server/init.php');
+include_once("../core/Compute.php");
+$compute = new compute($App);
+
+$servers = $compute->listServers();
+
+$servers= $compute->listServers(true);
+foreach($servers as $server){
+ //print_r($server);
+ echo $server->name." ".$server->id."
";
+
+//$opt = Array();
+//$opt['name'] = "Test";
+//$serverid = Array("id"=>"69d5bcc4-2fab-4634-b0d2-f455fee5b7bd");
+//$serverid["id"] = "{69d5bcc4-2fab-4634-b0d2-f455fee5b7bd}";
+//unset($server);
+//$server = $compute->getServer($serverid);
+//echo $server->name." ".$server->image;
+//$server->update(array('name' => 'test'));
diff --git a/server/core/App.php b/server/core/App.php
old mode 100644
new mode 100755
index babb3d9..edb75f6
--- 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);
}
@@ -50,6 +50,16 @@ class App{
$opt = $this->tokenClass->getOptions($service);
return $this->openstack->imagesV2($opt);
break;
+ case "Network":
+ if($this->tokenPost == NULL) $this->tokenClass->genNetworkToken();
+ $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;
}
}
@@ -95,6 +105,7 @@ class App{
public function show(){
echo json_encode($this->output);
+ //error_log(var_dump(json_encode($this->output), true), 0);
}
-}
\ No newline at end of file
+}
diff --git a/server/core/Compute.php b/server/core/Compute.php
index 8d1c8b6..94e219c 100644
--- a/server/core/Compute.php
+++ b/server/core/Compute.php
@@ -1 +1,176 @@
+app = $app;
+ $this->libClass = $app->getLibClass("Compute");
+ }
+ /**
+ * Execute an action
+ *
+ * @param String $action name of another function of this class
+ *
+ * @return void
+ */
+ public function action($action){
+
+ $this->{$action.""}();
+
+ }
+ /**
+ * List servers.
+ * @return array
+ */
+ public function listServers()
+ {
+ $servers = $this->libClass->listServers();
+ $this->app->setOutput("Servers", $servers);
+ return;
+ }
+ /**
+ * List flavors.
+ * @return array
+ */
+ public function listFlavors()
+ {
+ $flavors = $this->libClass->listFlavors();
+ $this->app->setOutput("Flavors", $flavors);
+ return;
+ }
+ /**
+ * List images.
+ * @return array
+ */
+ public function listImages()
+ {
+ $images = $this->libClass->listImages();
+ $this->app->setOutput("Images", $images);
+ return;
+ }
+ /**
+ * Create server.
+ * @return array
+ *
+ public function createServer()
+ {
+
+ $server = $this->libClass->createServer();
+ }
+ */
+ /**
+ * Get server details.
+ * @return array
+ */
+ public function getServer()
+ {
+ $serverId = $this->app->getPostParam("serverId");
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->retrieve();
+ $this->app->setOutput("MyServer", $server);
+ return;
+ }
+ /**
+ * Get flavor details.
+ * @return array
+ */
+ public function getFlavor()
+ {
+ $flavorId = $this->app->getPostParam("flavorId");
+ $opt = array('id' => $flavorId);
+ $flavor = $this->libClass->getFlavor($opt);
+ $flavor->retrieve();
+ $this->app->setOutput("MyFlavor", $flavor);
+ return;
+ }
+ /**
+ * Get image details.
+ * @return array
+ */
+ public function getImage()
+ {
+ $imageId = $this->app->getPostParam("imageId");
+ $opt = array('id' => $imageId);
+ $image = $this->libClass->getImage($opt);
+ $image->retrieve();
+ $this->app->setOutput("MyImage", $image);
+ return;
+ }
+ /* working on tests
+
+ public function update()
+ {
+ $image = $this->app->getServer(array $options = []);
+
+ }
+ public function delete()
+ {
+ //TODO
+ }
+ public function changePassword($newPassword)
+ {
+ //TODO
+ }
+ public function reboot($type = Enum::REBOOT_SOFT)
+ {
+ //TODO
+ }
+ public function rebuild(array $options)
+ {
+ //TODO
+ }
+ public function resize($flavorId)
+ {
+ //TODO
+ }
+ public function confirmResize()
+ {
+ //TODO
+ }
+ public function revertResize()
+ {
+ //TODO
+ }
+ public function createImage(array $options)
+ {
+ //TODO
+ }
+ public function listAddresses(array $options = [])
+ {
+ //TODO
+ }
+ public function getMetadata()
+ {
+ //TODO
+ }
+ public function resetMetadata(array $metadata)
+ {
+ //TODO
+ }
+ public function mergeMetadata(array $metadata)
+ {
+ //TODO
+ }
+ public function getMetadataItem($key)
+ {
+ //TODO
+ }
+ public function deleteMetadataItem($key)
+ {
+ //TODO
+ }
+*/
+}
diff --git a/server/core/LibOverride/genTokenOptions.php b/server/core/LibOverride/genTokenOptions.php
old mode 100644
new mode 100755
index b71defa..50826ed
--- a/server/core/LibOverride/genTokenOptions.php
+++ b/server/core/LibOverride/genTokenOptions.php
@@ -260,13 +260,14 @@ class genTokenOptions
public function loadBackup($back){
$backup = unserialize($back);
+
$this->backup["roles"] = $backup["roles"];
$this->backup["project"] = $backup["project"];
$this->backup["user"] = $backup["user"];
- loadComputeBackup($backup["Compute"]);
- loadIdentityBackup($backup["Identity"]);
- loadImageBackup($backup["Image"]);
- loadNetworkBackup($backup["Network"]);
+ $this->loadComputeBackup($backup["Compute"]);
+ $this->loadIdentityBackup($backup["Identity"]);
+ $this->loadImageBackup($backup["Image"]);
+ $this->loadNetworkBackup($backup["Network"]);
}
@@ -324,6 +325,7 @@ class genTokenOptions
private function unserializeToken($tokenSerialized){
$Saved = file_get_contents("core/LibOverride/projectTokenData/".$this->backup["project"]);
+ $Saved = unserialize($Saved);
$api = new Api();
$token = new Models\Token($this->httpClient, $api);
$token->methods = unserialize($tokenSerialized["methods"]);
diff --git a/server/index.php b/server/index.php
index 166e82e..f888671 100644
--- a/server/index.php
+++ b/server/index.php
@@ -27,12 +27,26 @@
$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);
$imageObject->action($action);
$App->show();
break;
+
+ case "compute":
+ include_once("core/Compute.php");
+ $computeObject = new compute($App);
+ $computeObject->action($action);
+ $App->show();
+ break;
}
diff --git a/server/vendor/php-opencloud/openstack b/server/vendor/php-opencloud/openstack
index 1419eb2..15aca73 160000
--- a/server/vendor/php-opencloud/openstack
+++ b/server/vendor/php-opencloud/openstack
@@ -1 +1 @@
-Subproject commit 1419eb2e01164bb6b8b837df37724423907352d7
+Subproject commit 15aca73f423166c7ef8337ba08615c103c66e931