summaryrefslogtreecommitdiff
path: root/server/Test/AppTestClass.php
diff options
context:
space:
mode:
authorEole <EoleDev@outlook.fr>2016-04-27 16:42:28 +0200
committerEole <EoleDev@outlook.fr>2016-04-27 16:42:28 +0200
commit49f416dc5061032e0514ea0cfeceaca37d13e432 (patch)
tree1202ac2a6fa860b8929afdc886c94fc50bd0a1de /server/Test/AppTestClass.php
parentc7edd70b5e5b0f5159c78ce3d924d4e7f60db816 (diff)
parentc9202d9113210981ae47df40511645da2ee140df (diff)
Merge branch 'develop' into Eole_Graph
Conflicts: client/index.html client/js/controllers/home/home.js client/partials/home/home.html
Diffstat (limited to 'server/Test/AppTestClass.php')
-rwxr-xr-xserver/Test/AppTestClass.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/server/Test/AppTestClass.php b/server/Test/AppTestClass.php
index b398088..972d9b4 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{
@@ -34,7 +22,7 @@ class AppTest{
$this->tokenPost = NULL;
$this->tokenClass = new genTokenOptions($args);
- $this->openstack = new OpenStack\OpenStack([]);
+ $this->openstack = new OpenStack\OpenStack(['authUrl' => $args["authUrl"]]);
$this->pluginsApi = plugin_api::getInstance();
$this->errorClass = new errorManagement($this);
$this->output = array();
@@ -75,6 +63,11 @@ class AppTest{
$opt = $this->tokenClass->getOptions($service);
return $this->openstack->networkingV2($opt);
break;
+ case "NetworkLayer3":
+ if($this->tokenPost == NULL) $this->tokenClass->genNetworkToken();
+ $opt = $this->tokenClass->getOptions('Network');
+ return $this->openstack->networkingV2ExtLayer3($opt);
+ break;
}
}
@@ -101,9 +94,17 @@ class AppTest{
}
public function getPostParam($name){
+ if(isset($this->postParams[$name])){
+ return $this->postParams[$name];
+ }else{
+ $this->setOutput("Error", "Missing parameter ".$name);
+ }
+ }
+
+ public function setPostParam($name, $value){
- return $this->postParams[$name];
-
+ $this->postParams[$name] = $value;
+
}
public function setOutput($key, $out){