diff options
| author | Yoggzo <yogg@epsina.com> | 2016-03-27 19:54:38 +0200 |
|---|---|---|
| committer | Yoggzo <yogg@epsina.com> | 2016-03-27 19:54:38 +0200 |
| commit | 804fa322d841d73ee7592885ec500dc94e91b9e6 (patch) | |
| tree | 13b0e9c5789c283599451dfc3eb570983fbd0db0 | |
| parent | 19d84e2ae4c6710aac2236df4f135409ef519fc8 (diff) | |
difficulties with automating
| -rw-r--r-- | server/core/Automating.php | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/server/core/Automating.php b/server/core/Automating.php index 065cf5e..7f2c654 100644 --- a/server/core/Automating.php +++ b/server/core/Automating.php @@ -51,12 +51,14 @@ class automating implements Core{ /** * Create a new image on a new server * - * @param $error the error triggered + * @param $name the name of the new image + * @param $falvor_id the id of the flavor it will be used to create the new server * * @return Image the new image created */ private function createImageOnNewServer(){ try{ + /* POURRI $image = new Image($this->app); $compute = new Compute($this->app); @@ -81,6 +83,32 @@ class automating implements Core{ $this->app->setPostParam("flavorId", $falvor_id); $compute->action("createServer"); + */ + }catch(BadResponseError $e){ + $this->app->getErrorInstance()->BadResponseHandler($e); + }catch(UserInputError $e){ + $this->app->getErrorInstance()->UserInputHandler($e); + }catch(BaseError $e){ + $this->app->getErrorInstance()->BaseErrorHandler($e); + }catch(NotImplementedError $e){ + $this->app->getErrorInstance()->NotImplementedHandler($e); + }catch(Exception $e){ + $this->app->getErrorInstance()->OtherException($e); + } + //$this->app->setOutput("Auto", $res); + } + + + /** + * Create a new image on an existing server + * + * @param $name the name of the new image + * @param $server_id the id of the server + * + * @return Image the new image created + */ + private function createImageOnServer(){ + try{ }catch(BadResponseError $e){ $this->app->getErrorInstance()->BadResponseHandler($e); @@ -93,7 +121,6 @@ class automating implements Core{ }catch(Exception $e){ $this->app->getErrorInstance()->OtherException($e); } - $this->app->setOutput("Auto", $res); } } |
