difficulties with automating

This commit is contained in:
Yoggzo 2016-03-27 19:54:38 +02:00
parent 19d84e2ae4
commit 804fa322d8

View file

@ -51,12 +51,14 @@ class automating implements Core{
/** /**
* Create a new image on a new server * 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 * @return Image the new image created
*/ */
private function createImageOnNewServer(){ private function createImageOnNewServer(){
try{ try{
/* POURRI
$image = new Image($this->app); $image = new Image($this->app);
$compute = new Compute($this->app); $compute = new Compute($this->app);
@ -81,6 +83,32 @@ class automating implements Core{
$this->app->setPostParam("flavorId", $falvor_id); $this->app->setPostParam("flavorId", $falvor_id);
$compute->action("createServer"); $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){ }catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e); $this->app->getErrorInstance()->BadResponseHandler($e);
@ -93,7 +121,6 @@ class automating implements Core{
}catch(Exception $e){ }catch(Exception $e){
$this->app->getErrorInstance()->OtherException($e); $this->app->getErrorInstance()->OtherException($e);
} }
$this->app->setOutput("Auto", $res);
} }
} }