diff options
Diffstat (limited to 'server/Test/AppTestClass.php')
| -rwxr-xr-x | server/Test/AppTestClass.php | 31 |
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){
|
