summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/index.html4
-rwxr-xr-x[-rw-r--r--]client/js/controllers/home/home.js19
-rw-r--r--client/js/controllers/home/machineDetails.js7
-rw-r--r--client/js/controllers/image/image.js26
-rw-r--r--client/js/controllers/status.js1
-rw-r--r--client/js/services/Identity.js9
-rw-r--r--client/js/services/Image.js20
-rw-r--r--client/partials/image/image.html36
-rw-r--r--client/partials/image/upload.html25
-rw-r--r--index.php3
-rwxr-xr-xserver/Test/AppTestClass.php20
-rw-r--r--server/Test/DisplayListCidr.php26
-rw-r--r--server/Test/getIdNetwork.php34
-rw-r--r--server/Test/getNetwork.php26
-rw-r--r--server/Test/imageTests.php65
-rwxr-xr-xserver/core/Compute.php640
-rwxr-xr-xserver/core/ErrorManagement.php4
-rwxr-xr-xserver/core/Identity.php713
-rwxr-xr-xserver/core/Image.php750
-rw-r--r--server/core/Network.php1214
-rw-r--r--server/core/Network.php~952
m---------server/vendor/php-opencloud/openstack0
22 files changed, 3692 insertions, 902 deletions
diff --git a/client/index.html b/client/index.html
index a06994c..08be038 100644
--- a/client/index.html
+++ b/client/index.html
@@ -23,7 +23,7 @@
<div ng-include="'./partials/login.html'"></div>
<div ng-include="'./partials/home/machineDetails.html'"></div>
<div ng-include="'./partials/loading.html'"></div>
-
+<div ng-include="'./partials/image/upload.html'"></div>
<!-- MAIN GRID -->
@@ -66,7 +66,7 @@
<!-- Include JQuery -->
<script src="./vendors/jquery/jquery-2.2.0.min.js"></script>
-
+
<!-- Include Bootstrap -->
<script src="./vendors/bootstrap/js/bootstrap.min.js"></script>
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js
index d20779b..3332a10 100644..100755
--- a/client/js/controllers/home/home.js
+++ b/client/js/controllers/home/home.js
@@ -8,7 +8,7 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
var callMeAfterPullData=function(data){
$scope.machines=Compute.getData().machines;
- Loading.stop();
+ Loading.stop();
}
;
@@ -26,6 +26,7 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
Image.getImages(function(){});
+
$scope.raiseShowMachineDetailsEvent=function(id){
var callback=function(){
@@ -39,4 +40,20 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
}
+
+
+
+ if(Identity.isAlreadyLogin()){
+ if(Compute.getData().machines == null{
+ Loading.start();
+ Compute.pullData(callMeAfterPullData);
+ }
+ else{
+ if(Identity.isAlreadyLogin()){
+ callMeAfterPullData();
+ }
+ }
+ Image.getImages(function(){});
+ }
+
}]);
diff --git a/client/js/controllers/home/machineDetails.js b/client/js/controllers/home/machineDetails.js
index c015eaa..371310b 100644
--- a/client/js/controllers/home/machineDetails.js
+++ b/client/js/controllers/home/machineDetails.js
@@ -3,9 +3,10 @@
*
* @param {$scope} $scope The $scope service from angular
*/
-mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', function ($scope, Compute, $rootScope, $timeout)
+mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', 'Identity', function ($scope, Compute, $rootScope, $timeout, Identity)
{
+
// Init scope
$scope.machine={};
$scope.machineIsStarting=false; // For loading icon
@@ -27,7 +28,7 @@ mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$
$scope.machineIsStarting=false;
}, 3000);
$timeout(function(){
- $scope.machine.online=!$scope.machine.online;
+ $scope.machine.online=!$scope.machine.online;
}, 3000);
@@ -37,7 +38,7 @@ mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$
$scope.applyModifications=function(){
//Todo
}
-
+
}]);
diff --git a/client/js/controllers/image/image.js b/client/js/controllers/image/image.js
index e298fcc..b0b162b 100644
--- a/client/js/controllers/image/image.js
+++ b/client/js/controllers/image/image.js
@@ -3,19 +3,27 @@
*
* @param {$scope} $scope The $scope service from angular
*/
-mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', function ($scope, Image, Loading)
+mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', 'Identity', function ($scope, Image, Loading, Identity)
{
+
var callbackTest=function(){
$scope.images=Image.getData().images;
- Loading.stop();
+ Loading.stop();
};
- if(Image.getData().images==null){
- Loading.start();
- Image.getImages(callbackTest);
- }
- else{
- callbackTest();
- }
+ $scope.doUpload = function () {
+ Image.uploadImage($scope.myFile,function(){});
+ };
+ if(Identity.isAlreadyLogin()){
+
+ if(Image.getData().images==null){
+ Loading.start();
+ Image.getImages(callbackTest);
+ }
+ else{
+ callbackTest();
+ }
+
+ }
}]);
diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js
index 6f398ad..b4a5dd9 100644
--- a/client/js/controllers/status.js
+++ b/client/js/controllers/status.js
@@ -9,6 +9,7 @@
mainApp.controller('statusCtrl', ['$scope','Identity', '$rootScope', function ($scope, Identity, $rootScope)
{
+
// Give profile to model
$scope.profile=Identity.getProfile();
diff --git a/client/js/services/Identity.js b/client/js/services/Identity.js
index db93e97..f9d1df4 100644
--- a/client/js/services/Identity.js
+++ b/client/js/services/Identity.js
@@ -27,9 +27,12 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){
&& typeof tokenPart_1InCookie !== 'undefined'
){
- // If yes, put it into variables
- angular.extend(profile, profileInCookie);
- token=tokenPart_0InCookie+tokenPart_1InCookie;
+ if(token!==null){
+ // If yes, put it into variables
+ angular.extend(profile, profileInCookie);
+ token=tokenPart_0InCookie+tokenPart_1InCookie;
+
+ }
// Return I'm Login
return true;
diff --git a/client/js/services/Image.js b/client/js/services/Image.js
index 2e8c56f..decb5b2 100644
--- a/client/js/services/Image.js
+++ b/client/js/services/Image.js
@@ -44,6 +44,23 @@ mainApp.factory('Image',[ '$http', 'Identity', function($http, Identity){
};
+ var uploadImage=function(fileToUpload, callback) {
+
+
+ var result=$http.post('../server/index.php',
+ $.param({"token" : Identity.getToken(), "task" : "image", 'action':'uploadImage', 'filename':fileToUpload, 'id':'6564'}));
+
+ // Wait and handle the response
+ result.then(function (response){
+ callback(parseUploadImageAnswer(response, false));
+ },function(response){
+ callback(parseUploadImageAnswer(response, true));
+ });
+
+
+
+ }
+
var getData=function(response){
return data;
@@ -52,7 +69,8 @@ mainApp.factory('Image',[ '$http', 'Identity', function($http, Identity){
// Return services objects
return {
getImages:getImages,
- getData:getData
+ getData:getData,
+ uploadImage:uploadImage
};
diff --git a/client/partials/image/image.html b/client/partials/image/image.html
index 8af8af5..886a11d 100644
--- a/client/partials/image/image.html
+++ b/client/partials/image/image.html
@@ -1,10 +1,38 @@
- <div class="panel panel-default" ng-controller="imageCtrl">
+
+
+<div class="panel panel-default" ng-controller="imageCtrl">
<div class="panel-heading">
- Images disponibles
+ Image Manager
</div>
<div class="panel-body">
- <div ng-repeat="image in images">
- {{image.name}}
+
+
+ <div class="btn-group btn-group-md" role="group" aria-label="...">
+ <button type="button" class="btn btn-default" data-toggle="modal" data-target="#uploadImageModal"">Upload</button>
+ <button type="button" class="btn btn-default">Download</button>
</div>
+ <p></p>
+ <table class="table table-hover">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Size</th>
+ <th>Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="image in images">
+ <td>{{ image.name }}</td>
+ <td>{{ (image.size / 1048576).toFixed(2) }} MB</td>
+ <td><button type="button" class="btn btn-danger">Remove</button></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
</div>
</div>
diff --git a/client/partials/image/upload.html b/client/partials/image/upload.html
new file mode 100644
index 0000000..9049abf
--- /dev/null
+++ b/client/partials/image/upload.html
@@ -0,0 +1,25 @@
+<div class="modal fade" id="uploadImageModal" ng-controller="loginCtrl">
+ <div class="modal-dialog">
+ <div class="modal-content"></div>
+ </div>
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>-->
+ <h4 class="modal-title">Upload Image</h4>
+
+ </div>
+
+ <div class="modal-body">
+
+ <label class="control-label">Select File</label>
+ <input id="input-1" type="file" class="file">
+ <p></p>
+ <div class="modal-footer">
+ <!--<a href="#" data-dismiss="modal" class="btn btn-default">Close</a>-->
+
+ <a href="#" class="btn btn-lg btn-primary btn-block" id="loginButton">Upload</a>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/index.php b/index.php
index e69de29..cf60860 100644
--- a/index.php
+++ b/index.php
@@ -0,0 +1,3 @@
+<?php
+phpinfo();
+?>
diff --git a/server/Test/AppTestClass.php b/server/Test/AppTestClass.php
index b398088..e1631c5 100755
--- a/server/Test/AppTestClass.php
+++ b/server/Test/AppTestClass.php
@@ -1,24 +1,12 @@
<?php
include_once("../core/Plugin_Api.php");
include_once("../core/LibOverride/genTokenOptions.php");
-<<<<<<< HEAD
-<<<<<<< Updated upstream
-=======
include_once("../core/ErrorManagement.php");
use OpenCloud\Common\Error\BadResponseError;
use OpenCloud\Common\Error\BaseError;
use OpenCloud\Common\Error\NotImplementedError;
use OpenCloud\Common\Error\UserInputError;
->>>>>>> Stashed changes
-=======
-include_once("../core/ErrorManagement.php");
-
-use OpenStack\Common\Error\BadResponseError;
-use OpenStack\Common\Error\BaseError;
-use OpenStack\Common\Error\NotImplementedError;
-use OpenStack\Common\Error\UserInputError;
->>>>>>> develop
class AppTest{
@@ -101,10 +89,16 @@ class AppTest{
}
public function getPostParam($name){
-
+
return $this->postParams[$name];
}
+
+ public function setPostParam($name, $value){
+
+ $this->postParams[$name] = $value;
+
+ }
public function setOutput($key, $out){
diff --git a/server/Test/DisplayListCidr.php b/server/Test/DisplayListCidr.php
new file mode 100644
index 0000000..119b218
--- /dev/null
+++ b/server/Test/DisplayListCidr.php
@@ -0,0 +1,26 @@
+<?php
+
+ini_set('display_errors', 1);
+date_default_timezone_set("Europe/Paris");
+require 'vendor/autoload.php';
+
+ $options = Array();
+ $options["user"] = Array("name"=>"admin", "password"=>"ae5or6cn", "domain"=>["id"=>"Default"]);
+ $options["scope"] = Array("project"=>Array("name"=>"admin", "domain"=>["id"=>"Default"]));
+ $options["authUrl"] = "http://148.60.11.31:5000/v3";
+ $openstack = new OpenStack\OpenStack($options);
+ $networking = $openstack->networkingV2(["region"=>"RegionOne"]);
+ $ls = $networking->listSubnets();
+
+ foreach ($ls as $subnet) {
+ echo $subnet->cidr."<br>";
+}
+
+
+
+
+
+
+
+
+
diff --git a/server/Test/getIdNetwork.php b/server/Test/getIdNetwork.php
new file mode 100644
index 0000000..1e38627
--- /dev/null
+++ b/server/Test/getIdNetwork.php
@@ -0,0 +1,34 @@
+<?php
+
+ini_set('display_errors', 1);
+date_default_timezone_set("Europe/Paris");
+require 'vendor/autoload.php';
+
+ $options = Array();
+ $options["user"] = Array("name"=>"admin", "password"=>"ae5or6cn", "domain"=>["id"=>"Default"]);
+ $options["scope"] = Array("project"=>Array("name"=>"admin", "domain"=>["id"=>"Default"]));
+ $options["authUrl"] = "http://148.60.11.31:5000/v3";
+ $openstack = new OpenStack\OpenStack($options);
+ $networking = $openstack->networkingV2(["region"=>"RegionOne"]);
+
+ $ls = $networking->getNetwork('5f78d3c1-1f53-4be7-897b-cf3c797961e0');
+try{
+$ls->retrieve();
+
+
+
+echo "oui";}
+
+ catch (OpenStack\Common\Error\BadResponseError $e){
+echo "non"; }
+
+
+
+
+
+
+
+
+
+
+
diff --git a/server/Test/getNetwork.php b/server/Test/getNetwork.php
new file mode 100644
index 0000000..4c76480
--- /dev/null
+++ b/server/Test/getNetwork.php
@@ -0,0 +1,26 @@
+<?php
+
+ini_set('display_errors', 1);
+date_default_timezone_set("Europe/Paris");
+require 'vendor/autoload.php';
+
+ $options = Array();
+ $options["user"] = Array("name"=>"admin", "password"=>"ae5or6cn", "domain"=>["id"=>"Default"]);
+ $options["scope"] = Array("project"=>Array("name"=>"admin", "domain"=>["id"=>"Default"]));
+ $options["authUrl"] = "http://148.60.11.31:5000/v3";
+ $openstack = new OpenStack\OpenStack($options);
+ $networking = $openstack->networkingV2(["region"=>"RegionOne"]);
+ $ls = $networking->listNetworks();
+
+ foreach ($ls as $subnet) {
+ echo $subnet->id."<br>";
+}
+
+
+
+
+
+
+
+
+
diff --git a/server/Test/imageTests.php b/server/Test/imageTests.php
index 3af12fc..d184d44 100644
--- a/server/Test/imageTests.php
+++ b/server/Test/imageTests.php
@@ -14,55 +14,38 @@ $opt['minDisk'] = 1;
$opt['protected'] = false;
$opt['minRam'] = 10;
-//$new_image = $image->createImage($opt);
+//$App->setPostParam('id', 'sdfihlus154dfhj');
+//$err = $image->action("createImage");
+
//Liste des images
$image->action("listImage");
-//$images = $image->listImage();
$im = $App->show();
-$images = json_decode($im, true)["Images"];
-if(isset($images)){
- echo "Images présentes :";
- echo "</br>";
- foreach($images as $i){
- echo $i['name'];
- echo "</br>";
- }
+$images = json_decode($im, true)["Images"];
+$recup;
+
+echo "Images présentes :";
+echo "</br>";
+foreach($images as $i){
+ $recup = $i;
+ echo $recup['name'];
echo "</br>";
+ //echo $recup['id'];
+ }
+echo "</br>";
+echo "Erreur capturée: ";
+echo "</br>";
+
+/*
+$App->setPostParam('id', 354);
+$err = $image->action("deleteImage");
+$temp = $App->show();
+$ret = json_decode($temp, true)["Images"];
+echo $ret['id'];
+*/
- if(isset($list)){
- foreach ($list as $l) {
- echo $l;
- echo "</br>";
- }
-}
-}
-else{
- echo "Aucune image présente\n";
-}
-
-
-
-// Détails Image
-//$details = $image->imageDetails($id_image);
-
-//$image->deleteImage('123456');
-
-//$image->desactivateImage($id_image);
-//$image->reactivateImage($id_image);
-
-//$file_name = "/home/yogg/Downloads/TinyCore-6.4.1.iso";
-//$image->uploadImage($id_image, $file_name);
-//$image->downloadImage($id_image);
-/*
-$opt_update = Array();
-$opt_update['name'] = "Test";
-$opt_update['tags'] = null;
-$update = $image->updateImage($id_image, $opt_update);
-echo $update->name;
-*/
?> \ No newline at end of file
diff --git a/server/core/Compute.php b/server/core/Compute.php
index b658580..9b01d49 100755
--- a/server/core/Compute.php
+++ b/server/core/Compute.php
@@ -34,34 +34,51 @@ class compute
*/
public function listServers()
{
- $serverList = $this->libClass->listServers(true);
- $servers = Array();
- foreach($serverList as $server){
- $servers[$server->id] = Array();
- $server->flavor->retrieve();
- $server->image->retrieve();
- $server->retrieve();
- $servers[$server->id]["id"] = $server->id;
- $servers[$server->id]["name"] = $server->name;
- $servers[$server->id]["image"] = $server->image;
- $servers[$server->id]["ram"] = $server->flavor->ram;
- $servers[$server->id]["disk"] = $server->flavor->disk;
- $servers[$server->id]["flavor"] = $server->flavor;
- $servers[$server->id]["status"] = $server->status;
- $servers[$server->id]["created"] = $server->created;
- $servers[$server->id]["updated"] = $server->updated;
- $servers[$server->id]["ipv4"] = $server->ipv4;
- $servers[$server->id]["ipv6"] = $server->ipv6;
- $servers[$server->id]["progress"] = $server->progress;
- $servers[$server->id]["hostId"] = $server->hostId;
- $servers[$server->id]["tenantId"] = $server->tenantId;
- $servers[$server->id]["userId"] = $server->userId;
- $servers[$server->id]["taskState"] = $server->taskState;
- $servers[$server->id]["addresses"] = $server->addresses;
- $servers[$server->id]["links"] = $server->links;
- $servers[$server->id]["metadata"] = $server->metadata;
+ try{
+ $serverList = $this->libClass->listServers(true);
+ $servers = Array();
+ foreach($serverList as $server){
+ $servers[$server->id] = Array();
+ $server->flavor->retrieve();
+ $server->image->retrieve();
+ $server->retrieve();
+ $servers[$server->id]["id"] = $server->id;
+ $servers[$server->id]["name"] = $server->name;
+ $servers[$server->id]["image"] = $server->image;
+ $servers[$server->id]["ram"] = $server->flavor->ram;
+ $servers[$server->id]["disk"] = $server->flavor->disk;
+ $servers[$server->id]["flavor"] = $server->flavor;
+ $servers[$server->id]["status"] = $server->status;
+ $servers[$server->id]["created"] = $server->created;
+ $servers[$server->id]["updated"] = $server->updated;
+ $servers[$server->id]["ipv4"] = $server->ipv4;
+ $servers[$server->id]["ipv6"] = $server->ipv6;
+ $servers[$server->id]["progress"] = $server->progress;
+ $servers[$server->id]["hostId"] = $server->hostId;
+ $servers[$server->id]["tenantId"] = $server->tenantId;
+ $servers[$server->id]["userId"] = $server->userId;
+ $servers[$server->id]["taskState"] = $server->taskState;
+ $servers[$server->id]["addresses"] = $server->addresses;
+ $servers[$server->id]["links"] = $server->links;
+ $servers[$server->id]["metadata"] = $server->metadata;
+ }
+ $this->app->setOutput("Servers", $servers);
}
- $this->app->setOutput("Servers", $servers);
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -70,19 +87,36 @@ class compute
*/
public function listFlavors()
{
- $flavorList = $this->libClass->listFlavors();
- $flavors = Array();
- foreach($flavorList as $flavor){
- $flavors[$flavor->id] = Array();
- $flavor->retrieve();
- $flavors[$flavor->id]["id"] = $flavor->id;
- $flavors[$flavor->id]["name"] = $flavor->name;
- $flavors[$flavor->id]["ram"] = $flavor->ram;
- $flavors[$flavor->id]["disk"] = $flavor->disk;
- $flavors[$flavor->id]["vcpus"] = $flavor->vcpus;
- $flavors[$flavor->id]["links"] = $flavor->links;
+ try{
+ $flavorList = $this->libClass->listFlavors();
+ $flavors = Array();
+ foreach($flavorList as $flavor){
+ $flavors[$flavor->id] = Array();
+ $flavor->retrieve();
+ $flavors[$flavor->id]["id"] = $flavor->id;
+ $flavors[$flavor->id]["name"] = $flavor->name;
+ $flavors[$flavor->id]["ram"] = $flavor->ram;
+ $flavors[$flavor->id]["disk"] = $flavor->disk;
+ $flavors[$flavor->id]["vcpus"] = $flavor->vcpus;
+ $flavors[$flavor->id]["links"] = $flavor->links;
}
$this->app->setOutput("Flavors", $flavors);
+ }
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -91,23 +125,40 @@ class compute
*/
public function listImages()
{
- $imageList = $this->libClass->listImages();
- $images = Array();
- foreach($imageList as $image){
- $images[$image->id] = Array();
- $image->retrieve();
- $images[$image->id]["id"] = $image->id;
- $images[$image->id]["name"] = $image->name;
- $images[$image->id]["status"] = $image->status;
- $images[$image->id]["created"] = $image->created;
- $images[$image->id]["updated"] = $image->updated;
- $images[$image->id]["minDisk"] = $image->minDisk;
- $images[$image->id]["minRam"] = $image->minRam;
- $images[$image->id]["progress"] = $image->progress;
- $images[$image->id]["links"] = $image->links;
- $images[$image->id]["metadata"] = $image->metadata;
+ try{
+ $imageList = $this->libClass->listImages();
+ $images = Array();
+ foreach($imageList as $image){
+ $images[$image->id] = Array();
+ $image->retrieve();
+ $images[$image->id]["id"] = $image->id;
+ $images[$image->id]["name"] = $image->name;
+ $images[$image->id]["status"] = $image->status;
+ $images[$image->id]["created"] = $image->created;
+ $images[$image->id]["updated"] = $image->updated;
+ $images[$image->id]["minDisk"] = $image->minDisk;
+ $images[$image->id]["minRam"] = $image->minRam;
+ $images[$image->id]["progress"] = $image->progress;
+ $images[$image->id]["links"] = $image->links;
+ $images[$image->id]["metadata"] = $image->metadata;
}
$this->app->setOutput("Images", $images);
+ }
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -116,15 +167,32 @@ class compute
*/
public function getServer()
{
- $serverId = $this->app->getPostParam("serverId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Server ID is missing, son!");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Server ID is missing, son!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->retrieve();
+ $this->app->setOutput("MyServer", $server);
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->retrieve();
- $this->app->setOutput("MyServer", $server);
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -133,15 +201,32 @@ class compute
*/
public function getFlavor()
{
- $flavorId = $this->app->getPostParam("flavorId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Flavor ID is missing, son!");
- return;
+ try{
+ $flavorId = $this->app->getPostParam("flavorId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Flavor ID is missing, son!");
+ return;
+ }
+ $opt = array('id' => $flavorId);
+ $flavor = $this->libClass->getFlavor($opt);
+ $flavor->retrieve();
+ $this->app->setOutput("MyFlavor", $flavor);
}
- $opt = array('id' => $flavorId);
- $flavor = $this->libClass->getFlavor($opt);
- $flavor->retrieve();
- $this->app->setOutput("MyFlavor", $flavor);
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -150,15 +235,32 @@ class compute
*/
public function getImage()
{
- $imageId = $this->app->getPostParam("imageId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Image ID is missing, son!");
- return;
+ try{
+ $imageId = $this->app->getPostParam("imageId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Image ID is missing, son!");
+ return;
+ }
+ $opt = array('id' => $imageId);
+ $image = $this->libClass->getImage($opt);
+ $image->retrieve();
+ $this->app->setOutput("MyImage", $image);
}
- $opt = array('id' => $imageId);
- $image = $this->libClass->getImage($opt);
- $image->retrieve();
- $this->app->setOutput("MyImage", $image);
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -167,15 +269,33 @@ class compute
*/
public function createServer()
{
- $name = $this->app->getPostParam("name");
- $imageId = $this->app->getPostParam("imageId");
- $flavorId = $this->app->getPostParam("flavorId");
- if(!isset($name) || !isset($imageId) || !isset($flavorId)){
- $this->app->setOutput("Error", "No, we don't let you create a server without a name OR image ID OR flavor ID.");
- return;
+ try{
+ $name = $this->app->getPostParam("name");
+ $imageId = $this->app->getPostParam("imageId");
+ $flavorId = $this->app->getPostParam("flavorId");
+ if(!isset($name) || !isset($imageId) || !isset($flavorId)){
+ $this->app->setOutput("Error", "No, we don't let you create a server without a name OR image ID OR flavor ID.");
+ return;
+ }
+ $opt = array('name' => $name, 'imageId' => $imageId, 'flavorId' => $flavorId);
+ $server = $this->libClass->createServer($opt);
}
- $opt = array('name' => $name, 'imageId' => $imageId, 'flavorId' => $flavorId);
- $server = $this->libClass->createServer($opt);
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ return;
}
/**
@@ -184,27 +304,44 @@ class compute
*/
public function updateServer()
{
- $serverId = $this->app->getPostParam("serverId");
- $newName = $this->app->getPostParam("newName");
- $newIpv4 = $this->app->getPostParam("newIpv4");
- $newIpv6 = $this->app->getPostParam("newIpv6");
- if(!isset($serverId)|| !(isset($newName) || isset($newIpv4) || isset($newIpv6)) ){
- $this->app->setOutput("Error", "You'll have to provide server ID and the new attribute(IP(v4/v6)/Name) you desire to update!");
- return;
- }
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- if (isset($newName)){
- if(isset($newIpv4)){
- if(isset($newIpv6)){
- $attr = array('name' => $newName, 'accessIPv4' => $newIPv4, 'accessIPv6' => $newIpv6);
- }
- else $attr = array('name' => $newName, 'accessIPv4' => $newIPv4);
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ $newName = $this->app->getPostParam("newName");
+ $newIpv4 = $this->app->getPostParam("newIpv4");
+ $newIpv6 = $this->app->getPostParam("newIpv6");
+ if(!isset($serverId)|| !(isset($newName) || isset($newIpv4) || isset($newIpv6)) ){
+ $this->app->setOutput("Error", "You'll have to provide server ID and the new attribute(IP(v4/v6)/Name) you desire to update!");
+ return;
}
- else $attr = array('name' => $newName);
- }
- $server->update($attr);
- $this->app->setOutput("Success", $serverId." has been updated successfully.");
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ if (isset($newName)){
+ if(isset($newIpv4)){
+ if(isset($newIpv6)){
+ $attr = array('name' => $newName, 'accessIPv4' => $newIPv4, 'accessIPv6' => $newIpv6);
+ }
+ else $attr = array('name' => $newName, 'accessIPv4' => $newIPv4);
+ }
+ else $attr = array('name' => $newName);
+ }
+ $server->update($attr);
+ $this->app->setOutput("Success", $serverId." has been updated successfully.");
+ }
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -213,15 +350,32 @@ class compute
*/
public function deleteServer()
{
- $serverId = $this->app->getPostParam("serverId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Server ID is missing, son!");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Server ID is missing, son!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->delete();
+ $this->app->setOutput("Success", $serverId." has been deleted successfully.");
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->delete();
- $this->app->setOutput("Success", $serverId." has been deleted successfully.");
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -230,16 +384,33 @@ class compute
*/
public function changePassword()
{
- $serverId = $this->app->getPostParam("serverId");
- $password = $this->app->getPostParam("newPassword");
- if(!isset($serverId) || !isset($password)){
- $this->app->setOutput("Error", "Server ID or new password missing.");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ $password = $this->app->getPostParam("newPassword");
+ if(!isset($serverId) || !isset($password)){
+ $this->app->setOutput("Error", "Server ID or new password missing.");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->changePassword($password);
+ $this->app->setOutput("Success", "Password for ".$serverId." has been updated successfully.");
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->changePassword($password);
- $this->app->setOutput("Success", "Password for ".$serverId." has been updated successfully.");
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -248,15 +419,32 @@ class compute
*/
public function reboot()
{
- $serverId = $this->app->getPostParam("serverId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Server ID is missing, son!");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Server ID is missing, son!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->reboot();
+ $this->app->setOutput("Success", $serverId." has been deleted successfully.");
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->reboot();
- $this->app->setOutput("Success", $serverId." has been deleted successfully.");
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -272,12 +460,36 @@ class compute
if(!isset($serverId)|| !isset($imageId) || isset($newName) || isset($adminPass)) {
$this->app->setOutput("Error", "You'll have to provide server ID and the new image, name and admin password!");
return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ $imageId = $this->app->getPostParam("imageId");
+ $newName = $this->app->getPostParam("newName");
+ $adminPass = $this->app->getPostParam("adminPass");
+ if(!isset($serverId)|| !isset($imageId) || isset($newName) || isset($adminPass)){
+ $this->app->setOutput("Error", "You'll have to provide server ID and the new image, name and admin password!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $attr = array('imageId' => $imageId, 'name' => $newName, 'adminPass' => $adminPass);
+ $server->rebuild($attr);
+ $this->app->setOutput("Success", $serverId." has been rebuilt successfully with the new image.");
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $attr = array('imageId' => $imageId, 'name' => $newName, 'adminPass' => $adminPass);
- $server->rebuild($attr);
- $this->app->setOutput("Success", $serverId." has been rebuilt successfully with the new image.");
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -287,15 +499,32 @@ class compute
*/
public function resize()
{
- $serverId = $this->app->getPostParam("serverId");
- $newFlavorId = $this->app->getPostParam("newFlavorId");
- if(!isset($serverId)|| !isset($flavorId)){
- $this->app->setOutput("Error", "You'll have to provide server ID and the new flavor ID!");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ $newFlavorId = $this->app->getPostParam("newFlavorId");
+ if(!isset($serverId)|| !isset($flavorId)){
+ $this->app->setOutput("Error", "You'll have to provide server ID and the new flavor ID!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->resize($newFlavorId);
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->resize($newFlavorId);
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -304,15 +533,32 @@ class compute
*/
public function confirmResize()
{
- $serverId = $this->app->getPostParam("serverId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Server ID is missing!");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Server ID is missing!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->confirmResize();
+ $this->app->setOutput("Success", $serverId." has been resized successfully as the new flavor.");
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->confirmResize();
- $this->app->setOutput("Success", $serverId." has been resized successfully as the new flavor.");
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
/**
@@ -321,46 +567,68 @@ class compute
*/
public function revertResize()
{
- $serverId = $this->app->getPostParam("serverId");
- if(!isset($serverId)){
- $this->app->setOutput("Error", "Server ID is missing!");
- return;
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Server ID is missing!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $server->revertResize();
+ $this->app->setOutput("Success", $serverId." : resize operation has been reverted to the old flavor.");
}
- $opt = array('id' => $serverId);
- $server = $this->libClass->getServer($opt);
- $server->revertResize();
- $this->app->setOutput("Success", $serverId." : resize operation has been reverted to the old flavor.");
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
return;
}
- /*
- public function createImage(array $options)
- {
- //TODO
- }
+ /**
+ * List private and public addresses of a server
+ * @return void
+ */
+
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
+ try{
+ $serverId = $this->app->getPostParam("serverId");
+ if(!isset($serverId)){
+ $this->app->setOutput("Error", "Server ID is missing!");
+ return;
+ }
+ $opt = array('id' => $serverId);
+ $server = $this->libClass->getServer($opt);
+ $addresses = $server->listAddresses();
+ $this->app->setOutput("Addresses", $addresses);
+ }
+ catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }
+ catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }
+ catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }
+ catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ return;
}
-*/
}
diff --git a/server/core/ErrorManagement.php b/server/core/ErrorManagement.php
index 4ba3493..3257dd3 100755
--- a/server/core/ErrorManagement.php
+++ b/server/core/ErrorManagement.php
@@ -32,6 +32,10 @@ Class errorManagement{
public function UserInputHandler($error){
}
+
+ public function OtherException($error){
+ $this->app->setOutput("Error", $error->getMessage());
+ }
}
diff --git a/server/core/Identity.php b/server/core/Identity.php
index 7100c9f..464522a 100755
--- a/server/core/Identity.php
+++ b/server/core/Identity.php
@@ -87,13 +87,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -111,13 +113,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -144,13 +148,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -187,13 +193,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -220,14 +228,17 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
+
}-
/**
@@ -266,13 +277,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -291,13 +304,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -325,13 +340,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -374,13 +391,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -407,13 +426,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -442,13 +463,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -480,13 +503,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -519,13 +544,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -557,13 +584,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -592,13 +621,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -630,13 +661,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -669,13 +702,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -714,13 +749,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -754,13 +791,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -786,13 +825,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -810,13 +851,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -849,13 +892,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -881,13 +926,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -914,13 +961,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -947,13 +996,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -981,13 +1032,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -1022,13 +1075,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1056,13 +1111,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1090,13 +1147,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1125,13 +1184,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1160,13 +1221,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1195,13 +1258,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1228,13 +1293,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -1261,13 +1328,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -1294,13 +1363,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -1328,13 +1399,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -1361,13 +1434,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}*/
}
@@ -1398,13 +1473,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1422,13 +1499,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1455,13 +1534,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1495,13 +1576,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1528,13 +1611,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1563,13 +1648,17 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1602,13 +1691,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1643,13 +1734,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1682,13 +1775,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1718,13 +1813,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1757,13 +1854,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1798,13 +1897,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1837,13 +1938,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1871,13 +1974,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1895,13 +2000,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1919,13 +2026,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1954,13 +2063,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -1978,13 +2089,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2009,13 +2122,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2043,13 +2158,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2081,13 +2198,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2123,13 +2242,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2159,13 +2280,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2201,13 +2324,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2249,13 +2374,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2285,13 +2412,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2317,13 +2446,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2362,13 +2493,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2386,13 +2519,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2419,13 +2554,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2458,13 +2595,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2491,13 +2630,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2525,13 +2666,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
@@ -2559,13 +2702,15 @@ class identity implements Core{
//TODO parse answer
}catch(BadResponseError $e){
- $this->app->getErrorInstance->BadResponseHandler($e);
+ $this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
}
}
diff --git a/server/core/Image.php b/server/core/Image.php
index d37c828..71e19ce 100755
--- a/server/core/Image.php
+++ b/server/core/Image.php
@@ -9,15 +9,13 @@
*
* @todo Complete the functions with errors detection and finish the descriptions
*/
-use OpenStack\Common\Error\BadResponseError;
-use OpenStack\Common\Error\BaseError;
-use OpenStack\Common\Error\NotImplementedError;
-use OpenStack\Common\Error\UserInputError;
-
+use OpenCloud\Common\Error\BadResponseError;
+use OpenCloud\Common\Error\BaseError;
+use OpenCloud\Common\Error\NotImplementedError;
+use OpenCloud\Common\Error\UserInputError;
include("CoreInterface.php");
-
/**
* Image Class of the back-end application
*
@@ -37,13 +35,11 @@ class image implements Core{
*
* @param App $app the main app object
*
- * @throws [Type] [<description>]
- *
* @return Image
*/
public function __construct($app){
if(!isset($app)){
- $this->app->setOutput("Error", "Incorrect parameter");
+ $this->app->setOutput("Error", "Incorrect parameter app");
}
$this->app = $app;
$this->libClass = $app->getLibClass("Image");
@@ -58,47 +54,46 @@ class image implements Core{
* @return void
*/
public function action($action){
-
- $this->{$action.""}();
-
+ $this->{$action.""}();
}
/**
- * Details about an image
+ * Create a new image
*
- * @param array $opt
- * options for the image creation
+ * @param array $opt Options for the image creation (name is required, others are optionals)
*
- **/
+ * @return Image
+ */
private function createImage(){
$opt = $this->app->getPostParam("opt");
-
if(!isset($opt)){
- $this->app->setOutput("Error", "Incorrect parameter");
+ $this->app->setOutput("Error", "Incorrect parameter opt");
}
-
try{
- // VOIR SI MAUVAIS TYPE
$options = Array();
- if(isset($opt['name'])){ // if the image name already exists -> error
+
+ // Check the image name
+ if(isset($opt['name'])){
$imagesList = listImage();
- if(isset($images)){
+ if(isset($imagesList)){
foreach($imagesList as $image){
- if(strcmp($image->name, $opt['name']) == 0){
-
+ if(strcmp($image->name, $opt['name']) == 0){ // if the image name already exists -> error
+ $this->app->setOutput("Error", "Image name already exists");
}
}
}
}
else{
- $this->app->setOutput("Error", "Image name already exists");
+ $this->app->setOutput("Error", "Missing parameter 'name' for the new image");
}
+
+ // Check optionals arguments
if(isset($opt['id'])){ // UUID : nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn
if($this->libClass->getImage($opt['id']) != null){ // if the id already exists -> error
-
+ $this->app->setOutput("Error", "Image id already exists");
}
$options['id'] = $opt['id'];
}
@@ -131,11 +126,13 @@ class image implements Core{
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
$this->app->setOutput("Images", $image);
@@ -144,7 +141,7 @@ class image implements Core{
/**
* List the images of the server
*
- * @return the list with all images on the server
+ * @return List of Image
*/
private function listImage(){
try{
@@ -156,11 +153,13 @@ class image implements Core{
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
}catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
+ $this->app->getErrorInstance()->UserInputHandler($e);
}catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
}catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
}
$this->app->setOutput("Images", $result);
@@ -170,45 +169,49 @@ class image implements Core{
/**
* Details about an image
*
- * @param string $id
- * identifier of the image
- *
- **/
+ * @param String $id Identifier of the image
+ *
+ * @return Image
+ */
private function detailsImage(){
$id = $this->app->getPostParam("id");
+
if(!isset($id)){
$this->app->setOutput("Error", "Incorrect id parameter");
-
}
- try{
- $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
-
- $this->app->setOutput("Images", $image);
-
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ else{
+ try{
+ $service = $this->libClass;
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ else{
+ echo 'toto';
+ $this->app->setOutput("Images", $image);
+ }
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
/**
- * Details about an image
- *
- * @param string $id
- * id of the image
+ * Update informations about an image
*
- * @param array $opt
- * options for the image creation
- **/
+ * @param String $id id of the image
+ * @param array $opt Options for the image creation
+ *
+ * @return Image
+ */
private function updateImage(){
$id = $this->app->getPostParam("id");
@@ -217,58 +220,62 @@ class image implements Core{
if(!isset($id)){
$this->app->setOutput("Error", "Incorrect id parameter");
}
- if(!isset($opt)){
+ else if(!isset($opt)){
$this->app->setOutput("Error", "Incorrect opt parameter");
}
+ else{
+ try{
+ //vérifier existence image
+ $service = $this->libClass;
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
- try{
- //vérifier existence image
- $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
-
- $options = Array();
+ $options = Array();
- // Voir vérification des types
- if(isset($opt['name'])){ //string
- $options['name'] = $opt['name'];
- }
- if(isset($opt['minDisk'])){ //int
- $options['minDisk'] = $opt['minDisk'];
- }
- if(isset($opt['minRam'])){ // int
- $options['minRam'] = $opt['minRam'];
- }
- if(isset($opt['protected'])){ // boolean
- $options['protected'] = $opt['protected'];
- }
- if(isset($opt['visibility'])){ // public, private
- $options['visibility'] = $opt['visibility'];
- }
- if(isset($opt['tags'])){ // list
- $options['tags'] = $opt['tags'];
- }
- $image->update($options);
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
- $this->app->setOutput("Images", $image);
+ // Voir vérification des types
+ if(isset($opt['name'])){ //string
+ $options['name'] = $opt['name'];
+ }
+ if(isset($opt['minDisk'])){ //int
+ $options['minDisk'] = $opt['minDisk'];
+ }
+ if(isset($opt['minRam'])){ // int
+ $options['minRam'] = $opt['minRam'];
+ }
+ if(isset($opt['protected'])){ // boolean
+ $options['protected'] = $opt['protected'];
+ }
+ if(isset($opt['visibility'])){ // public, private
+ $options['visibility'] = $opt['visibility'];
+ }
+ if(isset($opt['tags'])){ // list
+ $options['tags'] = $opt['tags'];
+ }
+ $image->update($options);
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ $this->app->setOutput("Images", $image);
+ }
}
/**
* Delete an image
*
- * @param string $id
- * identifier of the image
- **/
+ * @param String $id Identifier of the image
+ *
+ * @return void
+ */
private function deleteImage(){
// si protected = true, demander de le mettre a false
// vérifier existence image
@@ -276,96 +283,109 @@ class image implements Core{
if(!isset($id)){
$this->app->setOutput("Error", "Image doesn't exist");
}
-
- try{
- $service = $this->libClass;
- $image = $this->libClass->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $image->delete();
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ else{
+ try{
+ $service = $this->libClass;
+ $image = $this->libClass->getImage($id);
+ if($image == null){ // if the image doesn't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $image->delete();
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
/**
* Resactive an image
*
- * @param string $id
- * identifier of the image
- **/
+ * @param String $id Identifier of the image
+ *
+ * @return void
+ */
private function reactivateImage(){
$id = $this->app->getPostParam("id");
if(!isset($id)){
$this->app->setOutput("Error", "Incorrect parameter");
}
- try{
- // vérifier existence image
- $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $image->reactivate();
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ else
+ {
+ try{
+ $service = $this->libClass;
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $image->reactivate();
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
/**
* Desactive an image
*
- * @param string $id
- * identifier of the image
- **/
+ * @param String $id Identifier of the image
+ *
+ * @return void
+ */
private function desactivateImage(){
$id = $this->app->getPostParam("id");
if(!isset($id)){
$this->app->setOutput("Error", "Incorrect parameter");
}
- try{
- // vérifier existence image
- $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $image->deactivate();
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ else
+ {
+ try{
+ // vérifier existence image
+ $service = $this->libClass;
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $image->deactivate();
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
/**
* Upload an image
*
- * @param string $id
- * identifier of the image
- *
- * @param string $file_name
- * path of the image
- **/
+ * @param String $id Identifier of the image
+ * @param String $file_name Path of the image
+ *
+ * @return void
+ */
private function uploadImage(){
$id = $this->app->getPostParam("id");
$file_name = $this->app->getPostParam("file_name");
@@ -374,238 +394,256 @@ class image implements Core{
if(!isset($id)){
$this->app->setOutput("Error", "Incorrect id parameter");
}
- if(!isset($file_name)){
- $this->app->setOutput("Error", "Incorrect file_name parameter");
+ else if(!isset($file_name)){
+ $this->app->setOutput("Error", "Incorrect file name parameter");
}
- try{
- // vérifier existence image
- $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $stream = \GuzzleHttp\Psr7\stream_for(fopen($file_name, 'r'));
- $image->uploadData($stream);
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
+ else{
+ try{
+ // vérifier existence image
+ $service = $this->libClass;
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $stream = \GuzzleHttp\Psr7\stream_for(fopen($file_name, 'r'));
+ $image->uploadData($stream);
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
}
/**
* Download an image
*
- * @param string $id
- * identifier of the image
- **/
+ * @param String $id Identifier of the image
+ *
+ * @return Stream
+ */
private function downloadImage(){
$id = $this->app->getPostParam("id");
if(!isset($id)){
- $this->app->setOutput("Error", "Incorrect parameter");
+ $this->app->setOutput("Error", "Incorrect id parameter");
}
- try{
- // vérifier existence image
- $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $stream = $image->downloadData();
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
- $this->app->setOutput("Images", $stream);
+ else{
+ try{
+ // vérifier existence image
+ $service = $this->libClass;
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $stream = $image->downloadData();
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ $this->app->setOutput("Images", $stream);
+ }
}
/**
* Add a member to image
*
- * @param string $image_id
- * identifier of the image
- *
- * @param string $member_id
- * identifier of the member
- **/
+ * @param String $image_id Identifier of the image
+ * @param String $member_id Identifier of the member
+ *
+ * @return Member
+ */
private function addMemberImage(){
$image_id = $this->app->getPostParam("image_id");
$member_id = $this->app->getPostParam("member_id");
if(!isset($image_id)){
- $this->app->setOutput("Error", "Incorrect parameter image_id");
+ $this->app->setOutput("Error", "Incorrect image id parameter");
}
- if(!isset($member_id)){
- $this->app->setOutput("Error", "Incorrect parameter member_id");
+ else if(!isset($member_id)){
+ $this->app->setOutput("Error", "Incorrect member id parameter");
}
- try{
- $service = $this->libClass;
+ else{
+ try{
+ $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $member_id = $image->addMember($member_id);
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $member_id = $image->addMember($member_id);
+ $this->app->setOutput("Images", $member_id);
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
/**
* List members of an image
*
- * @param string $image_id
- * identifier of the image
- **/
+ * @param String $image_id identifier of the image
+ *
+ * @return List of Member
+ */
private function listMemberImage(){
$image_id = $this->app->getPostParam("image_id");
$member_id = $this->app->getPostParam("member_id");
if(!isset($image_id)){
- $this->app->setOutput("Error", "Incorrect parameter image_id");
+ $this->app->setOutput("Error", "Incorrect image id parameter");
}
- if(!isset($member_id)){
- $this->app->setOutput("Error", "Incorrect parameter member_id");
+ else if(!isset($member_id)){
+ $this->app->setOutput("Error", "Incorrect member id parameter");
+ }
+ else{
+ try{
+ // vérifier existence image
+ $service = $this->libClass;
+ $image = $service->getImage($image_id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $members = $image->listMembers();
+ if($members == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "No member");
+ }
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ $this->app->setOutput("Images", $members);
}
- try{
- // vérifier existence image
- $service = $this->libClass;
- $image = $service->getImage($image_id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $members = $image->listMembers();
- if($member == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "No member");
- }
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
- $this->app->setOutput("Images", $member);
}
/**
* Show details of a member of an image
*
- * @param string $image_id
- * identifier of the image
+ * @param String $image_id Identifier of the image
+ * @param String $member_id Identifier of the member
*
- * @param string $member_id
- * identifier of the member
- **/
+ * @return Member
+ */
private function detailMemberImage(){
$image_id = $this->app->getPostParam("image_id");
$member_id = $this->app->getPostParam("member_id");
if(!isset($image_id)){
- $this->app->setOutput("Error", "Incorrect parameter image_id");
+ $this->app->setOutput("Error", "Incorrect image id parameter");
}
- if(!isset($member_id)){
- $this->app->setOutput("Error", "Incorrect parameter member_id");
+ else if(!isset($member_id)){
+ $this->app->setOutput("Error", "Incorrect member id parameter");
}
- try{
- // vérifier existence image
- // on doit être le proprio de l'image
- // vérifier membre existe
- $service = $this->libClass;
-
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
+ else{
+ try{
+ $service = $this->libClass;
- $member = $image->getMember($member_id);
- if($member == null){ // if the member don't exists -> error
- $this->app->setOutput("Error", "Member doesn't exist");
- }
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
- $this->app->setOutput("Images", $member);
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+
+ $member = $image->getMember($member_id);
+ if($member == null){ // if the member don't exists -> error
+ $this->app->setOutput("Error", "Member doesn't exist");
+ }
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ $this->app->setOutput("Images", $member);
+ }
}
/**
* Remove a member of an image
*
- * @param string $image_id
- * identifier of the image
- *
- * @param string $member_id
- * identifier of the member
- **/
+ * @param String $image_id Identifier of the image
+ * @param String $member_id Identifier of the member
+ *
+ * @return void
+ */
private function removeMemberImage(){
$image_id = $this->app->getPostParam("image_id");
$member_id = $this->app->getPostParam("member_id");
if(!isset($image_id)){
- $this->app->setOutput("Error", "Incorrect parameter image_id");
+ $this->app->setOutput("Error", "Incorrect image id parameter");
}
- if(!isset($member_id)){
- $this->app->setOutput("Error", "Incorrect parameter member_id");
+ else if(!isset($member_id)){
+ $this->app->setOutput("Error", "Incorrect member id parameter");
}
- try{
- $service = $this->libClass;
-
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $member = $image->getMember($member_id);
- if($member == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Member doesn't exist");
- }
- $member->delete();
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ else{
+ try{
+ $service = $this->libClass;
+
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $member = $image->getMember($member_id);
+ if($member == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Member doesn't exist");
+ }
+ $member->delete();
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
/**
* Update a member of an image
*
- * @param string $image_id
- * identifier of the image
+ * @param String $image_id Identifier of the image
+ * @param String $member_id Identifier of the member
+ * @param String $status New status for the member
*
- * @param string $member_id
- * identifier of the member
- *
- * @param string $status
- * new status for the member
+ * @return void
**/
private function updateMemberImage(){
$image_id = $this->app->getPostParam("image_id");
@@ -613,32 +651,36 @@ class image implements Core{
$status = $this->app->getPostParam("status");
if(!isset($image_id)){
- $this->app->setOutput("Error", "Incorrect parameter image_id");
+ $this->app->setOutput("Error", "Incorrect image id parameter");
}
- if(!isset($member_id)){
- $this->app->setOutput("Error", "Incorrect parameter member_id");
+ else if(!isset($member_id)){
+ $this->app->setOutput("Error", "Incorrect member id parameter");
}
- try{
- $service = $this->libClass;
+ else{
+ try{
+ $service = $this->libClass;
- $image = $service->getImage($id);
- if($image == null){ // if the image don't exists -> error
- $this->app->setOutput("Error", "Image doesn't exist");
- }
- $member = $image->getMember($member_id);
- if($member == null){ // if the member don't exists -> error
- $this->app->setOutput("Error", "Member doesn't exist");
- }
- $member->updateStatus($status);
- }catch(BadResponseError $e){
- $this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
- $this->app->getErrorInstance->UserInputHandler($e);
- }catch(BaseError $e){
- $this->app->getErrorInstance->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
- $this->app->getErrorInstance->NotImplementedHandler($e);
- }
+ $image = $service->getImage($id);
+ if($image == null){ // if the image don't exists -> error
+ $this->app->setOutput("Error", "Image doesn't exist");
+ }
+ $member = $image->getMember($member_id);
+ if($member == null){ // if the member don't exists -> error
+ $this->app->setOutput("Error", "Member doesn't exist");
+ }
+ $member->updateStatus($status);
+ }catch(BadResponseError $e){
+ $this->app->getErrorInstance()->BadResponseHandler($e);
+ }catch(UserInputError $e){
+ $this->app->getErrorInstance()->UserInputHandler($e);
+ }catch(BaseError $e){
+ $this->app->getErrorInstance()->BaseErrorHandler($e);
+ }catch(NotImplementedError $e){
+ $this->app->getErrorInstance()->NotImplementedHandler($e);
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
+ }
}
}
diff --git a/server/core/Network.php b/server/core/Network.php
index 8d1c8b6..a4e0939 100644
--- a/server/core/Network.php
+++ b/server/core/Network.php
@@ -1 +1,1213 @@
-
+<?php
+/**
+* File containing the Image Class.
+*
+* @version 1.0 Initialisation of this file
+* @since 1.0 Core application's file
+*
+* @author KABIR Othmane
+*
+* @todo Complete the functions with errors detection and finish the descriptions
+*/
+use OpenCloud\Common\Error\BadResponseError;
+use OpenCloud\Common\Error\BaseError;
+use OpenCloud\Common\Error\NotImplementedError;
+use OpenCloud\Common\Error\UserInputError;
+
+include("CoreInterface.php");
+
+/**
+* Network Class of the back-end application
+*
+* ADD CLASS DESCRIPTION
+*
+*/
+
+class network{
+/** @var App $app protected, contains the main app object */
+ protected $app;
+/** @var OpenStack\Network $libClass protected, contains the library Network object */
+ protected $libClass;
+
+
+ /**
+ * Image constructor
+ *
+ * @param App $app the main app object
+ *
+ * @return Network
+ */
+
+
+
+ public function __construct($app){
+ $this->app = $app;
+ $this->libClass = $app->getLibClass("network");
+
+ }
+
+ /**
+ * Execute an action
+ *
+ * @param String $action name of another function of this class
+ *
+ * @return void
+ */
+ public function action($action){
+
+ $this->{$action.""}();
+
+ }
+
+ /**
+ * Create a new network
+ *
+ * @param String name A human-readable name for the network. This name might not be unique
+ * @param String adminStateUp The administrative state of network. If false (down), the network does not forward packets
+ * @param String shared Specifies whether the network resource can be accessed by any tenant
+ * @param String tenantId Owner of network. Only admin users can specify a tenant ID other than their own
+ *
+ * @return void
+ */
+ public function create_network()
+ {
+ $options = array();
+ // check the name if it is null
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ // check the adminStateUp if it is null
+ if (isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] = $this->app->getPostParam("adminStateUp");
+ }
+ // check the shared if it is null
+ if (isset($this->app->getPostParam("shared")))
+ {
+ $options['shared'] = $this->app->getPostParam("shared");
+ }
+ // check the tenantId if it is null
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ try
+ {
+ $network = $this->libClass->createNetworks($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+
+ }
+
+ /**
+ * Create a new subnet
+ *
+ * @param String networkId A Network this subnet is associated with
+ * @param String ipVersion IP version (4 or 6)
+ * @param String cidr CIDR representing the IP address range for this subnet Exmple X.Y.W.Z/12
+ * @param String tenantId Owner of network. Only admin users can specify a tenant ID other than their own
+ * @param String name A human-readable name for the subnet. This name might not be unique
+ * @param String gatewayIp IP address of the default gateway used by devices on this subnet
+ * @param String dnsNameservers DNS nameservers used by hosts in this subnet
+ * @param String enableDhcp Specifies whether DHCP is enabled for this subnet
+ * @param String hostRoutes Routes that should be used by devices with IP addresses from this subnet (not including the local subnet route)
+ * @param BOOLEAN enableDhcp Specifies whether DHCP is enabled for this subnet
+ * @param String allocationPools Subranges of the CIDR available for dynamic allocation to ports
+ *
+ *
+ *
+ * @return void
+ */
+
+ public function create_subnet()
+ { $options = array();
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $networkId;
+ }
+ if (isset($this->app->getPostParam("ipVersion")))
+ {
+ $options['ipVersion'] = $this->app->getPostParam("ipVersion");
+ }
+ if (isset($this->app->getPostParam("cidr")))
+ {
+ $options['cidr'] = $this->app->getPostParam("cidr");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $$this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("gatewayIp")))
+ {
+ $options['gatewayIp'] = $this->app->getPostParam("gatewayIp");
+ }
+ if (isset($this->app->getPostParam("dnsNameservers")))
+ {
+ $options['dnsNameservers'] = $this->app->getPostParam("dnsNameservers");
+ }
+ if (isset($this->app->getPostParam("allocationPools")))
+ {
+ $options['allocationPools'] = $this->app->getPostParam("allocationPools");
+ }
+ if (isset($this->app->getPostParam("hostRoutes")))
+ {
+ $options['hostRoutes'] = $this->app->getPostParam("hostRoutes");
+ }
+ if (isset($this->app->getPostParam("enableDhcp")))
+ {
+ $options['enableDhcp'] = $this->app->getPostParam("enableDhcp");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+
+ try
+ {
+ $subnet = $this->libClass->createSubnet($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+
+ }
+
+ /**
+ * List the ID of the NETWORKS
+ *
+ * @return List of Networks ID
+ */
+
+ public function list_network_ids()
+ {
+ try
+ {
+ $ln = $this->libClass->listNetworks();
+
+ $list_ids = array();
+
+
+ foreach($ln as $n)
+ {
+
+ $list_ids[] = $n->id;
+
+
+ }
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ $this->app->setOutput("ListNetworkIds", $list_ids);
+ }
+
+ /**
+ * List the name of the NETWORKS
+ *
+ * @return List of Networks name
+ */
+
+ public function list_network_names()
+ {
+ try
+ {
+ $ln = $this->libClass->listNetworks();
+
+ $list_names = array();
+
+
+ foreach($ln as $n)
+ {
+
+ $list_names[] = $n->name;
+
+
+ }
+
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ $this->app->setOutput("ListNetworkNames", $list_names);
+ }
+ /**
+ * List the CIDR of the SUBNETS
+ *
+ * @return List of SUBNETS CIDR
+ */
+ public function list_cidr()
+ {
+ try
+ {
+ $ls = $this->libClass->listSubnets();
+ $list_cidr = array();
+ foreach ($ls as $subnet)
+ {
+
+ $list_cidr[] = $subnet->cidr;
+ }
+
+ $this->app->setOutput("ListCidr", $list_cidr);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+ /**
+ * retrieve a specific network
+ * @param networkId ID of network which we want to get
+ * @return Network
+ */
+ retrieve a specific network
+ public function getNetwork()
+ {
+ $network="";
+
+ try
+ { $newtork = $this->libClass->getNetwork($this->app->getPostParam("networkId"));
+ $network->retrieve();
+
+
+ }
+
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ $this->app->setOutput("Network", $network);
+ }
+
+ /**
+ * internal function
+ * @param String netId ID of network which we want to get
+ * @return Network
+ */
+ private function getNetwork($netId)
+ {
+ $network="";
+
+ try
+ { $newtork = $this->libClass->getNetwork($netId);
+ $network->retrieve();
+
+
+ }
+
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ return $network;
+ }
+
+ /**
+ * retrieve a specific subnet
+ * @param subnetId ID of subnet which we want to get
+ * @return subnet
+ */
+ public function getSubnet()
+ {
+ $sbnet="";
+
+ try
+ { $subnet = $this->libClass->getSubnet($this->app->getPostParam("subnetId"));
+ $subnet->retrieve();
+
+
+ }
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ $this->app->setOutput("Subnet", subnet);
+
+ }
+ /**
+ * internal function
+ * @param String subnetId ID of subnet which we want to get
+ * @return subnet
+ */
+ private function getSubnet($subnetId)
+ {
+ $subnet="";
+
+ try
+ { $subnet = $this->libClass->getSubnet($subnetId);
+ $subnet->retrieve();
+
+
+ }
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ return $subnet;
+
+ }
+
+ /**
+ * Update a network given
+ *
+ * @param String name A human-readable name for the network. This name might not be unique
+ * @param String adminStateUp The administrative state of network. If false (down), the network does not forward packets
+ * @param String shared Specifies whether the network resource can be accessed by any tenant
+ * @param String tenantId Owner of network. Only admin users can specify a tenant ID other than their own
+ *
+ *
+ * @return void
+ **/
+
+ public function updateNetwork()
+ {
+ $options = array();
+ if(isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if(isset($this->app->getPostParam("shared")))
+ {
+ $options['shared'] = $this->app->getPostParam("shared");
+ }
+ if(isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] = $this->app->getPostParam("adminStateUp");
+ }
+ try
+ {
+ $network = getNetwork($this->app->getPostParam("networkId"));
+
+ $network->update($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * Update a subnet given
+ *
+ * @param String networkId A Network this subnet is associated with
+ * @param String ipVersion IP version (4 or 6)
+ * @param String cidr CIDR representing the IP address range for this subnet Exmple X.Y.W.Z/12
+ * @param String tenantId Owner of network. Only admin users can specify a tenant ID other than their own
+ * @param String name A human-readable name for the subnet. This name might not be unique
+ * @param String gatewayIp IP address of the default gateway used by devices on this subnet
+ * @param String dnsNameservers DNS nameservers used by hosts in this subnet
+ * @param String enableDhcp Specifies whether DHCP is enabled for this subnet
+ * @param String hostRoutes Routes that should be used by devices with IP addresses from this subnet (not including the local subnet route)
+ * @param BOOLEAN enableDhcp Specifies whether DHCP is enabled for this subnet
+ * @param String allocationPools Subranges of the CIDR available for dynamic allocation to ports
+ *
+ *
+ * @return void
+ **/
+
+ public function updateSubnet()
+ {
+ $options = array();
+ if(isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if(isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $this->app->getPostParam("networkId");
+ }
+ if(isset($this->app->getPostParam("ipVersion")))
+ {
+ $options['ipVersion'] = $this->app->getPostParam("ipVersion");
+ }
+ if(isset($this->app->getPostParam("cidr")))
+ {
+ $options['cidr'] = $this->app->getPostParam("cidr");
+ }
+ try
+ {
+ $subnet = getSubnet($this->app->getPostParam("networkId"));
+
+ $subnet->update($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * Delete a network given
+ *
+ * @param String networkId ID if network which we want to delete
+
+ *
+ *
+ * @return void
+ **/
+ public function deleteNetwork()
+ {
+ try
+ {
+
+ $network = getNetwork($this->app->getPostParam("networkId"));
+ $network->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * Delete a subnet given
+ *
+ * @param String subnetId ID if network which we want to delete
+
+ *
+ *
+ * @return void
+ **/
+ public function deleteSubnet()
+ {
+ try
+ {
+ $subnet = getNetwork($this->app->getPostParam("subnetId"));
+ $subnet->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * Create a new port
+ *
+ * @param String networkId Network this port is associated with
+ * @param String name A human-readable name for the port. This name might not be unique
+ * @param String adminStateUp The administrative state of port. If false (down), the port does not forward packets
+ * @param String macAddress MAC address to use on this port
+ * @param String fixedIps IP addresses for this port
+ * @param String deviceId Identifies the device (for example, virtual server) using this port
+ * @param String deviceOwner Identifies the entity (for example, DHCP agent) using this port
+ * @param String securityGroups Specifies the IDs of any security groups associated with this port
+ * @param String tenantId Owner of the port. Only admin users can specify a tenant ID other than their own.
+ *
+ * @return void
+ */
+
+ public function createPort()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $this->app->getPostParam("networkId");
+ }
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] = $this->app->getPostParam("adminStateUp");
+ }
+ if (isset($this->app->getPostParam("macAddress")))
+ {
+ $options['macAddress'] = $this->app->getPostParam("macAddress");
+ }
+ if (isset($this->app->getPostParam("fixedIps")))
+ {
+ $options['fixedIps'] = $this->app->getPostParam("fixedIps");
+ }
+ if (isset($this->app->getPostParam("deviceId")))
+ {
+ $options['deviceId'] = $this->app->getPostParam("deviceId");
+ }
+ if (isset($this->app->getPostParam("deviceOwner")))
+ {
+ $options['deviceOwner'] = $this->app->getPostParam("deviceOwner");
+ }
+ if (isset($this->app->getPostParam("securityGroups")))
+ {
+ $options['securityGroups'] = $this->app->getPostParam("securityGroups");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ try
+ {
+ $this->libClass->createPort($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * List the of ports
+ *
+ * @return List of ports
+ */
+
+ public function listPorts()
+ {
+ try
+ {
+ $this->app->setOutput("listPorts", $this->libClass->listPorts());
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * retrieve a specific port given
+ * @param portId ID of port which we want to get
+ * @return port
+ */
+
+ public function getPort()
+ {
+ try
+ {
+ $port = $this->libClass->getport($this->app->getPostParam("portId"));
+ $this->app->setOutput("Port", $port);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ /**
+ * internal function
+ * retrieve a specific port given
+ * @param portId ID of port which we want to get
+ * @return port
+ */
+
+ private function getPort($portId)
+ {
+ try
+ {
+ $port = $this->libClass->getport($portId);
+ return $port;
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+
+ /**
+ * Update port given
+ *
+ * @param String networkId Network this port is associated with
+ * @param String name A human-readable name for the port. This name might not be unique
+ * @param String adminStateUp The administrative state of port. If false (down), the port does not forward packets
+ * @param String macAddress MAC address to use on this port
+ * @param String fixedIps IP addresses for this port
+ * @param String deviceId Identifies the device (for example, virtual server) using this port
+ * @param String deviceOwner Identifies the entity (for example, DHCP agent) using this port
+ * @param String securityGroups Specifies the IDs of any security groups associated with this port
+ * @param String tenantId Owner of the port. Only admin users can specify a tenant ID other than their own.
+ *
+ * @return void
+ */
+ public function updatePort()
+ {
+ $options = array();
+
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $this->app->getPostParam("networkId");
+ }
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] =$this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] =$this->app->getPostParam("adminStateUp");
+ }
+ if (isset($this->app->getPostParam("macAddress")))
+ {
+ $options['macAddress'] = $this->app->getPostParam("macAddress");
+ }
+ if (isset($this->app->getPostParam("fixedIps")))
+ {
+ $options['fixedIps'] = $this->app->getPostParam("fixedIps");
+ }
+ if (isset($this->app->getPostParam("deviceId")))
+ {
+ $options['deviceId'] = $this->app->getPostParam("deviceId");
+ }
+ if (isset($this->app->getPostParam("deviceOwner")))
+ {
+ $options['deviceOwner'] = $this->app->getPostParam("deviceOwner");
+ }
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['securityGroups'] = $this->app->getPostParam("securityGroups");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ try
+ {
+ $port = getPort($this->app->getPostParam("networkId"));
+ $port->update($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+ /**
+ * Delete a port given
+ *
+ * @param String portId id of port which we wante to delete
+
+ * @return void
+ */
+ public function deletePort()
+ {
+
+ try
+ {
+ $port = getPort($this->app->getPostParam("portId"));
+ $port->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * Create a new security groupe
+ *
+ * @param String name A human-readable name for the security group. This name might not be unique
+ * @param String description Description of the security group
+ *
+ * @return void
+ */
+
+ public function createSecurityGroup()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("description")))
+ {
+ $options['description'] = $this->app->getPostParam("description");
+ }
+ try
+ {
+ $this->libClass->createSecurityGroup($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ /**
+ * Create a new security groupe
+ *
+ * @param String securityGroupId The security group ID to associate with this security group rule.
+ * @param String direction The direction in which the security group rule is applied. For a compute instance, an ingress security group * rule is applied to incoming (ingress) traffic for that instance. An egress rule is applied to traffic leaving the instance.
+ * @param String ethertype Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.
+ * @param String portRangeMin The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the portRangeMax attribute. If the protocol is ICMP, this value must be an ICMP type
+ *@param String portRangeMax The maximum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the portRangeMax attribute. If the protocol is ICMP, this value must be an ICMP type.
+ *@param String protocol The protocol that is matched by the security group rule
+ *@param String remoteGroupId The remote group ID to be associated with this security group rule. You can specify either remoteGroupId or remoteGroupPrefix
+ *@param String remoteIpPrefix The remote IP prefix to be associated with this security group rule. You can specify either remoteGroupId or remoteGroupPrefix
+ *
+ * @return void
+ */
+ public function createSecurityGroupRule()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("securityGroupId")))
+ {
+ $options['securityGroupId'] = $this->app->getPostParam("securityGroupId");
+ }
+ if (isset($this->app->getPostParam("direction")))
+ {
+ $options['direction'] = $this->app->getPostParam("direction");
+ }
+ if (isset($this->app->getPostParam("ethertype")))
+ {
+ $options['ethertype'] = $this->app->getPostParam("ethertype");
+ }
+ if (isset($this->app->getPostParam("portRangeMin")))
+ {
+ $options['portRangeMin'] = $this->app->getPostParam("portRangeMin");
+ }
+ if (isset($this->app->getPostParam("portRangeMax")))
+ {
+ $options['portRangeMax'] = $this->app->getPostParam("portRangeMax");
+ }
+ if (isset($this->app->getPostParam("protocol")))
+ {
+ $options['protocol'] = $this->app->getPostParam("protocol");
+ }
+ if (isset($this->app->getPostParam("remoteGroupId")))
+ {
+ $options['remoteGroupId'] = $this->app->getPostParam("remoteGroupId");
+ }
+ if (isset($this->app->getPostParam("remoteIpPrefix")))
+ {
+ $options['remoteIpPrefix'] = $this->app->getPostParam("remoteIpPrefix");
+ }
+ try
+ {
+ $this->libClass->createSecurityGroupRule($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+
+ /**
+ * List of Security Groupes
+ *
+ * @return List of Security Groupes
+ */
+
+ public function listSecurityGroupe()
+ {
+ try
+ {
+ $this->app->setOutput("listSecurityGroups", $this->libClass->listSecurityGroups());
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+
+ /**
+ * List of Security Groupe Rules
+ *
+ * @return List of Security Groupe Rules
+ */
+
+ public function listSecurityGroupeRule()
+ {
+ try
+ {
+
+ $this->app->setOutput("listSecurityGroupeRule", $this->libClass->listSecurityGroupRules());
+
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ /**
+ * retrieve a specific Security Groupe given
+ * @param securityGroupeId ID of security Groupe which we want to get
+ * @return securityGroupe
+ */
+
+ public function getSecurityGroupe()
+ {
+ try
+ {
+ $securityGroupe = $this->libClass->getSecurityGroupe($this->app->getPostParam("securityGroupeId"));
+ $this->app->setOutput("securityGroupe", $securityGroupe);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ /**
+ * internal function
+ * retrieve a specific Security Groupe given
+ * @param securityGroupeId ID of security Groupe which we want to get
+ * @return securityGroupe
+ */
+ private function getSecurityGroupe($securityGroupeId)
+ {
+ try
+ {
+ $securityGroupe = $this->libClass->getSecurityGroupe($securityGroupeId);
+ return $securityGroupe;
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+ /**
+ * Delete a specific Security Groupe given
+ * @param securityGroupeId ID of security Groupe which we want to get
+ * @return void
+ */
+ public function deleteSecurityGroupe()
+ {
+ try
+ {
+
+ $securityGroupe = getSecurityGroupe($this->app->getPostParam("securityGroupeId"));
+ $securityGroupe->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
diff --git a/server/core/Network.php~ b/server/core/Network.php~
new file mode 100644
index 0000000..65de962
--- /dev/null
+++ b/server/core/Network.php~
@@ -0,0 +1,952 @@
+<?php
+
+class network{
+
+ protected $app;
+
+ protected $libClass;
+
+
+
+
+
+
+ public function __construct($app){
+ $this->app = $app;
+ $this->libClass = $app->getLibClass("network");
+
+ }
+
+
+ public function action($action){
+
+ $this->{$action.""}();
+
+ }
+
+
+ public function create_network()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] = $this->app->getPostParam("adminStateUp");
+ }
+ if (isset($this->app->getPostParam("shared")))
+ {
+ $options['shared'] = $this->app->getPostParam("shared");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ try
+ {
+ $network = $this->libClass->createNetworks($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+
+ }
+
+ public function create_subnet()
+ { $options = array();
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $networkId;
+ }
+ if (isset($this->app->getPostParam("ipVersion")))
+ {
+ $options['ipVersion'] = $this->app->getPostParam("ipVersion");
+ }
+ if (isset($this->app->getPostParam("cidr")))
+ {
+ $options['cidr'] = $this->app->getPostParam("cidr");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $$this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("gatewayIp")))
+ {
+ $options['gatewayIp'] = $this->app->getPostParam("gatewayIp");
+ }
+ if (isset($this->app->getPostParam("dnsNameservers")))
+ {
+ $options['dnsNameservers'] = $this->app->getPostParam("dnsNameservers");
+ }
+ if (isset($this->app->getPostParam("allocationPools")))
+ {
+ $options['allocationPools'] = $this->app->getPostParam("allocationPools");
+ }
+ if (isset($this->app->getPostParam("hostRoutes")))
+ {
+ $options['hostRoutes'] = $this->app->getPostParam("hostRoutes");
+ }
+ if (isset($this->app->getPostParam("enableDhcp")))
+ {
+ $options['enableDhcp'] = $this->app->getPostParam("enableDhcp");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+
+ try
+ {
+ $subnet = $this->libClass->createSubnet($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+
+ }
+
+ public function list_network_ids()
+ {
+ try
+ {
+ $ln = $this->libClass->listNetworks();
+
+ $list_ids = array();
+
+
+ foreach($ln as $n)
+ {
+
+ $list_ids[] = $n->id;
+
+
+ }
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ $this->app->setOutput("ListNetworkIds", $list_ids);
+ }
+
+ public function list_network_names()
+ {
+ try
+ {
+ $ln = $this->libClass->listNetworks();
+
+ $list_names = array();
+
+
+ foreach($ln as $n)
+ {
+
+ $list_names[] = $n->name;
+
+
+ }
+
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ $this->app->setOutput("ListNetworkNames", $list_names);
+ }
+
+ public function list_cidr()
+ {
+ try
+ {
+ $ls = $this->libClass->listSubnets();
+ $list_cidr = array();
+ foreach ($ls as $subnet)
+ {
+
+ $list_cidr[] = $subnet->cidr;
+ }
+
+ $this->app->setOutput("ListCidr", $list_cidr);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function getNetwork()
+ {
+ $network="";
+
+ try
+ { $newtork = $this->libClass->getNetwork($this->app->getPostParam("networkId"));
+ $network->retrieve();
+
+
+ }
+
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ $this->app->setOutput("Network", $network);
+ }
+
+ public function getNetwork($netId)
+ {
+ $network="";
+
+ try
+ { $newtork = $this->libClass->getNetwork($netId);
+ $network->retrieve();
+
+
+ }
+
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ return $network;
+ }
+
+ public function getSubnet()
+ {
+ $sbnet="";
+
+ try
+ { $subnet = $this->libClass->getSubnet($this->app->getPostParam("subnetId"));
+ $subnet->retrieve();
+
+
+ }
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ $this->app->setOutput("Subnet", subnet);
+
+ }
+
+ public function getSubnet($subnetId)
+ {
+ $subnet="";
+
+ try
+ { $subnet = $this->libClass->getSubnet($subnetId);
+ $subnet->retrieve();
+
+
+ }
+
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ return $subnet;
+
+ }
+
+ public function updateNetwork()
+ {
+ $options = array();
+ if(isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if(isset($this->app->getPostParam("shared")))
+ {
+ $options['shared'] = $this->app->getPostParam("shared");
+ }
+ if(isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] = $this->app->getPostParam("adminStateUp");
+ }
+ try
+ {
+ $network = getNetwork($this->app->getPostParam("networkId"));
+
+ $network->update($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function updateSubnet()
+ {
+ $options = array();
+ if(isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if(isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $this->app->getPostParam("networkId");
+ }
+ if(isset($this->app->getPostParam("ipVersion")))
+ {
+ $options['ipVersion'] = $this->app->getPostParam("ipVersion");
+ }
+ if(isset($this->app->getPostParam("cidr")))
+ {
+ $options['cidr'] = $this->app->getPostParam("cidr");
+ }
+ try
+ {
+ $subnet = getSubnet($this->app->getPostParam("networkId"));
+
+ $subnet->update($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function deleteNetwork()
+ {
+ try
+ {
+
+ $network = getNetwork($this->app->getPostParam("networkId"));
+ $network->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function deleteSubnet()
+ {
+ try
+ {
+ $subnet = getNetwork($this->app->getPostParam("subnetId"));
+ $subnet->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function createPort()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $this->app->getPostParam("networkId");
+ }
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] = $this->app->getPostParam("adminStateUp");
+ }
+ if (isset($this->app->getPostParam("macAddress")))
+ {
+ $options['macAddress'] = $this->app->getPostParam("macAddress");
+ }
+ if (isset($this->app->getPostParam("fixedIps")))
+ {
+ $options['fixedIps'] = $this->app->getPostParam("fixedIps");
+ }
+ if (isset($this->app->getPostParam("deviceId")))
+ {
+ $options['deviceId'] = $this->app->getPostParam("deviceId");
+ }
+ if (isset($this->app->getPostParam("deviceOwner")))
+ {
+ $options['deviceOwner'] = $this->app->getPostParam("deviceOwner");
+ }
+ if (isset($this->app->getPostParam("securityGroups")))
+ {
+ $options['securityGroups'] = $this->app->getPostParam("securityGroups");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ try
+ {
+ $this->libClass->createPort($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function listPorts()
+ {
+ try
+ {
+ $this->app->setOutput("listPorts", $this->libClass->listPorts());
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function getPort()
+ {
+ try
+ {
+ $port = $this->libClass->getport($this->app->getPostParam("portId"));
+ $this->app->setOutput("Port", $port);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ public function getPort($portId)
+ {
+ try
+ {
+ $port = $this->libClass->getport($portId);
+ return $port;
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ public function updatePort()
+ {
+ $options = array();
+
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['networkId'] = $this->app->getPostParam("networkId");
+ }
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] =$this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("adminStateUp")))
+ {
+ $options['adminStateUp'] =$this->app->getPostParam("adminStateUp");
+ }
+ if (isset($this->app->getPostParam("macAddress")))
+ {
+ $options['macAddress'] = $this->app->getPostParam("macAddress");
+ }
+ if (isset($this->app->getPostParam("fixedIps")))
+ {
+ $options['fixedIps'] = $this->app->getPostParam("fixedIps");
+ }
+ if (isset($this->app->getPostParam("deviceId")))
+ {
+ $options['deviceId'] = $this->app->getPostParam("deviceId");
+ }
+ if (isset($this->app->getPostParam("deviceOwner")))
+ {
+ $options['deviceOwner'] = $this->app->getPostParam("deviceOwner");
+ }
+ if (isset($this->app->getPostParam("networkId")))
+ {
+ $options['securityGroups'] = $this->app->getPostParam("securityGroups");
+ }
+ if (isset($this->app->getPostParam("tenantId")))
+ {
+ $options['tenantId'] = $this->app->getPostParam("tenantId");
+ }
+ try
+ {
+ $port = getPort($this->app->getPostParam("networkId"));
+ $port->update($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function deletePort()
+ {
+
+ try
+ {
+ $port = getPort($this->app->getPostParam("portId"));
+ $port->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function createSecurityGroup()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("name")))
+ {
+ $options['name'] = $this->app->getPostParam("name");
+ }
+ if (isset($this->app->getPostParam("description")))
+ {
+ $options['description'] = $this->app->getPostParam("description");
+ }
+ try
+ {
+ $this->libClass->createSecurityGroup($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ public function createSecurityGroupRule()
+ {
+ $options = array();
+ if (isset($this->app->getPostParam("securityGroupId")))
+ {
+ $options['securityGroupId'] = $this->app->getPostParam("securityGroupId");
+ }
+ if (isset($this->app->getPostParam("direction")))
+ {
+ $options['direction'] = $this->app->getPostParam("direction");
+ }
+ if (isset($this->app->getPostParam("ethertype")))
+ {
+ $options['ethertype'] = $this->app->getPostParam("ethertype");
+ }
+ if (isset($this->app->getPostParam("portRangeMin")))
+ {
+ $options['portRangeMin'] = $this->app->getPostParam("portRangeMin");
+ }
+ if (isset($this->app->getPostParam("portRangeMax")))
+ {
+ $options['portRangeMax'] = $this->app->getPostParam("portRangeMax");
+ }
+ if (isset($this->app->getPostParam("protocol")))
+ {
+ $options['protocol'] = $this->app->getPostParam("protocol");
+ }
+ if (isset($this->app->getPostParam("remoteGroupId")))
+ {
+ $options['remoteGroupId'] = $this->app->getPostParam("remoteGroupId");
+ }
+ if (isset($this->app->getPostParam("remoteIpPrefix")))
+ {
+ $options['remoteIpPrefix'] = $this->app->getPostParam("remoteIpPrefix");
+ }
+ try
+ {
+ $this->libClass->createSecurityGroupRule($options);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+
+ public function listSecurityGroupe()
+ {
+ try
+ {
+ $this->app->setOutput("listSecurityGroups", $this->libClass->listSecurityGroups());
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function listSecurityGroupeRule()
+ {
+ try
+ {
+
+ $this->app->setOutput("listSecurityGroupeRule", $this->libClass->listSecurityGroupRules());
+
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
+
+ public function getSecurityGroupe()
+ {
+ try
+ {
+ $securityGroupe = $this->libClass->getSecurityGroupe($this->app->getPostParam("securityGroupeId"));
+ $this->app->setOutput("securityGroupe", $securityGroupe);
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ public function getSecurityGroupe($securityGroupeId)
+ {
+ try
+ {
+ $securityGroupe = $this->libClass->getSecurityGroupe($securityGroupeId);
+ return $securityGroupe;
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+
+ }
+
+ public function deleteSecurityGroupe()
+ {
+ try
+ {
+
+ $securityGroupe = getSecurityGroupe($this->app->getPostParam("securityGroupeId"));
+ $securityGroupe->delete();
+ }
+ catch(BadResponseError $e)
+ {
+ $this->app->getErrorInstance->BadResponseHandler($e);
+ }
+ catch(UserInputError $e)
+ {
+ $this->app->getErrorInstance->UserInputHandler($e);
+ }
+ catch(BaseError $e)
+ {
+ $this->app->getErrorInstance->BaseErrorHandler($e);
+ }
+ catch(NotImplementedError $e)
+ {
+ $this->app->getErrorInstance->NotImplementedHandler($e);
+ }
+ }
diff --git a/server/vendor/php-opencloud/openstack b/server/vendor/php-opencloud/openstack
-Subproject f2ee77024843659d970817a9e7055bb40a3724f
+Subproject 4ba218fc7ed0e618fd83eaf690b2e4e3bf22cde