End of comments
This commit is contained in:
parent
5263cf00a2
commit
1d42345e07
13 changed files with 491 additions and 264 deletions
|
@ -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)){
|
||||
|
@ -51,7 +51,7 @@ class networkLayer3 {
|
|||
*
|
||||
* @param String $action name of another function of this class
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
public function action($action){
|
||||
$this->{$action.""}();
|
||||
|
@ -61,7 +61,7 @@ class networkLayer3 {
|
|||
/**
|
||||
* List floatingip
|
||||
*
|
||||
* @return list of the floatingip
|
||||
* @return void
|
||||
*/
|
||||
private function listFloatingIp(){
|
||||
try{
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -175,7 +175,7 @@ class networkLayer3 {
|
|||
*
|
||||
* @param id the id of the floatingip to update
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
private function updateFloatingIp(){
|
||||
$id = $this->app->getPostParam("id");
|
||||
|
@ -224,7 +224,7 @@ class networkLayer3 {
|
|||
*
|
||||
* @param string floatingip_id the floating-ip id to delete
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
private function deleteFloatingIp(){
|
||||
$id = $this->app->getPostParam("id");
|
||||
|
@ -273,7 +273,7 @@ class networkLayer3 {
|
|||
*
|
||||
* @param string floatingip_id the floating-ip id to retrieve
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
private function retrieveFloatingIp(){
|
||||
$id = $this->app->getPostParam("id");
|
||||
|
@ -326,7 +326,7 @@ class networkLayer3 {
|
|||
* adminStateUp (optionnal)
|
||||
* name (optionnal)
|
||||
*
|
||||
* @return router
|
||||
* @return void
|
||||
*/
|
||||
private function createRouter(){
|
||||
$opt = $this->app->getPostParam("opt");
|
||||
|
@ -359,7 +359,7 @@ class networkLayer3 {
|
|||
/**
|
||||
* List routers
|
||||
*
|
||||
* @return list of the routers
|
||||
* @return void
|
||||
*/
|
||||
private function listRouters(){
|
||||
try{
|
||||
|
@ -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");
|
||||
|
@ -437,7 +437,7 @@ class networkLayer3 {
|
|||
*
|
||||
* @param string router the router to delete
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
private function deleteRouter(){
|
||||
$id = $this->app->getPostParam("id");
|
||||
|
@ -485,7 +485,7 @@ class networkLayer3 {
|
|||
*
|
||||
* @param id the id of the floatingip to update
|
||||
*
|
||||
* @return NULL
|
||||
* @return void
|
||||
*/
|
||||
private function updateRouter(){
|
||||
$id = $this->app->getPostParam("id");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue