difficulties with automating
This commit is contained in:
parent
19d84e2ae4
commit
804fa322d8
1 changed files with 29 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue