From 1d42345e07b2ef557de3c5049864e6885632b9e9 Mon Sep 17 00:00:00 2001 From: EoleDev Date: Wed, 27 Apr 2016 14:22:59 +0200 Subject: End of comments --- server/core/Compute.php | 141 ++++++++++++++++++++++++++++++------------------ 1 file changed, 89 insertions(+), 52 deletions(-) (limited to 'server/core/Compute.php') diff --git a/server/core/Compute.php b/server/core/Compute.php index e466b52..7e27d00 100755 --- a/server/core/Compute.php +++ b/server/core/Compute.php @@ -1,37 +1,62 @@ app = $app; $this->libClass = $app->getLibClass("Compute"); } + /** * Execute an action * * @param String $action name of another function of this class * - * @return NULL + * @return void */ public function action($action){ $this->{$action.""}(); } + /** - * List servers. - * @return array - */ + * List servers. + * + * @return void + */ public function listServers() { try{ @@ -79,12 +104,13 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** - * List flavors. - * @return array - */ + * List flavors. + * + * @return void + */ public function listFlavors() { try{ @@ -117,12 +143,13 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** - * List images. - * @return array - */ + * List images. + * + * @return void + */ public function listImages() { try{ @@ -159,12 +186,13 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** - * Get server details. - * @return array - */ + * Get server details. + * + * @return void + */ public function getServer() { try{ @@ -193,12 +221,13 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** - * Get flavor details. - * @return array - */ + * Get flavor details. + * + * @return void + */ public function getFlavor() { try{ @@ -227,12 +256,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** - * Get image details. - * @return array - */ + * Get image details. + * @return array + */ public function getImage() { try{ @@ -261,12 +290,13 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** - * Create server. - * @return array - */ + * Create server. + * + * @return void + */ public function createServer() { try{ @@ -295,12 +325,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } /** * update a server - * @return NULL + * + * @return void */ public function updateServer() { @@ -342,11 +372,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * Delete a server - * @return NULL + * + * @return void */ public function deleteServer() { @@ -376,11 +407,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * Change the password of a server - * @return NULL + * + * @return void */ public function changePassword() { @@ -411,11 +443,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * Reboot a server - * @return NULL + * + * @return void */ public function reboot() { @@ -445,11 +478,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * Rebuild a server - * @return NULL + * + * @return void */ public function rebuild() { @@ -490,13 +524,15 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } } + /** * Resize a server + * * A call to this method has to be followed by either confirmResize or revertResize - * @return NULL + * + * @return void */ public function resize() { @@ -526,11 +562,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * Confirm resize operation on a server - * @return NULL + * + * @return void */ public function confirmResize() { @@ -560,11 +597,12 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * Revert resize operation on a server - * @return NULL + * + * @return void */ public function revertResize() { @@ -594,14 +632,14 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } + /** * List private and public addresses of a server - * @return NULL + * + * @return void */ - - public function listAddresses(array $options = []) + public function listAddresses() { try{ $serverId = $this->app->getPostParam("serverId"); @@ -629,7 +667,6 @@ class compute catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - return; } } -- cgit v1.2.3