summaryrefslogtreecommitdiff
path: root/server/core/NetworkLayer3.php
diff options
context:
space:
mode:
Diffstat (limited to 'server/core/NetworkLayer3.php')
-rwxr-xr-xserver/core/NetworkLayer3.php174
1 files changed, 87 insertions, 87 deletions
diff --git a/server/core/NetworkLayer3.php b/server/core/NetworkLayer3.php
index 30e8a78..35bf707 100755
--- a/server/core/NetworkLayer3.php
+++ b/server/core/NetworkLayer3.php
@@ -1,41 +1,41 @@
<?php
/**
-* File containing the FloatingIp Class.
+* File containing the networkLayer3 Class.
*
* @version 1.0 Initialisation of this file
* @since 1.0 Core application's file
*
* @author Evan Pisani 'yogg at epsina . com'
*
-* @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");
+include("CoreInterface.php");
/**
-* Image Class of the back-end application
+* networkLayer3 Class of the back-end application
*
-* Management of images
+* Management of networkLayer3
*
*/
-class networkLayer3 {
+class networkLayer3 implements Core{
/** @var App $app protected, contains the main app object */
protected $app;
- /** @var OpenStack\Identity $libClass protected, contains the library Identity object */
+ /** @var OpenStack\NetworkLayer3 $libClass protected, contains the library NetworkLayer3 object */
protected $libClass;
/**
- * floatingip constructor
+ * networkLayer3 constructor
*
* @param App $app the main app object
*
- * @return networkLayer3
+ * @return networkLayer3 Object
*/
public function __construct($app){
if(!isset($app)){
@@ -54,14 +54,14 @@ class networkLayer3 {
* @return void
*/
public function action($action){
- $this->{$action.""}();
+ $this->{$action.""}();
}
/**
* List floatingip
*
- * @return list of the floatingip
+ * @return void
*/
private function listFloatingIp(){
try{
@@ -75,15 +75,15 @@ class networkLayer3 {
$this->app->setOutput("NetworkLayer3", $result);
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
/**
@@ -91,7 +91,7 @@ class networkLayer3 {
*
* @param array $opt Options for the floating ip creation (floatingNetworkId is required)
*
- * @return floatingip
+ * @return void
*/
private function createFloatingIp(){
$opt = $this->app->getPostParam("opt");
@@ -109,15 +109,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
@@ -126,7 +126,7 @@ class networkLayer3 {
*
* @param String id the id of the floatingip
*
- * @return floatingip details
+ * @return void
*/
private function getFloatingIp(){
$id = $this->app->getPostParam("id");
@@ -147,7 +147,7 @@ class networkLayer3 {
foreach ($res as $f) {
if(strcmp($f->id, $id)){
$result = $f;
-
+
}
}
@@ -159,15 +159,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
/**
@@ -197,7 +197,7 @@ class networkLayer3 {
foreach ($res as $f) {
if(strcmp($f->id, $id)){
$result = $f;
-
+
}
}
@@ -208,15 +208,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
/**
@@ -245,7 +245,7 @@ class networkLayer3 {
foreach ($res as $f) {
if(strcmp($f->id, $id)){
$result = $f;
-
+
}
}
@@ -256,15 +256,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
@@ -294,7 +294,7 @@ class networkLayer3 {
foreach ($res as $f) {
if(strcmp($f->id, $id)){
$result = $f;
-
+
}
}
@@ -305,15 +305,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
@@ -326,7 +326,7 @@ class networkLayer3 {
* adminStateUp (optionnal)
* name (optionnal)
*
- * @return router
+ * @return void
*/
private function createRouter(){
$opt = $this->app->getPostParam("opt");
@@ -344,22 +344,22 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
/**
* List routers
*
- * @return list of the routers
+ * @return void
*/
private function listRouters(){
try{
@@ -372,15 +372,15 @@ class networkLayer3 {
$this->app->setOutput("NetworkLayer3", $result);
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
@@ -389,7 +389,7 @@ class networkLayer3 {
*
* @param String id the id of the router
*
- * @return router details
+ * @return void
*/
private function getRouter(){
$id = $this->app->getPostParam("id");
@@ -420,15 +420,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
@@ -468,15 +468,15 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
@@ -507,7 +507,7 @@ class networkLayer3 {
foreach ($res as $f) {
if(strcmp($f->id, $id)){
$result = $f;
-
+
}
}
@@ -518,14 +518,14 @@ class networkLayer3 {
}
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);
- }catch(UserInputError $e){
+ }catch(UserInputError $e){
$this->app->getErrorInstance()->UserInputHandler($e);
- }catch(BaseError $e){
+ }catch(BaseError $e){
$this->app->getErrorInstance()->BaseErrorHandler($e);
- }catch(NotImplementedError $e){
+ }catch(NotImplementedError $e){
$this->app->getErrorInstance()->NotImplementedHandler($e);
- }catch(Exception $e){
- $this->app->getErrorInstance()->OtherException($e);
- }
+ }catch(Exception $e){
+ $this->app->getErrorInstance()->OtherException($e);
+ }
}
}