correct syntaxt on Network, add tests for automating
This commit is contained in:
parent
71794b98c5
commit
2d260aa6f5
3 changed files with 58 additions and 9 deletions
|
@ -105,7 +105,16 @@ class floatingIp implements Core{
|
|||
$this->app->setOutput("Error", "Incorrect parameter opt");
|
||||
}
|
||||
try{
|
||||
$floatingip = null; //obtenir ip
|
||||
$floatingips = listFloatingIps();
|
||||
$floatingIp = null;
|
||||
foreach ($floatingips as $f) {
|
||||
if($f['id'] == $id){
|
||||
$floatingIp = $f;
|
||||
}
|
||||
}
|
||||
if(!isset($floatingIp)){
|
||||
$this->app->setOutput("Error", "Unknowing floatingip id");
|
||||
}
|
||||
|
||||
$floatingip->update();
|
||||
|
||||
|
@ -139,7 +148,16 @@ class floatingIp implements Core{
|
|||
$this->app->setOutput("Error", "Incorrect parameter opt");
|
||||
}
|
||||
try{
|
||||
$floatingip = null; //obtenir ip
|
||||
$floatingips = listFloatingIps();
|
||||
$floatingIp = null;
|
||||
foreach ($floatingips as $f) {
|
||||
if($f['id'] == $id){
|
||||
$floatingIp = $f;
|
||||
}
|
||||
}
|
||||
if(!isset($floatingIp)){
|
||||
$this->app->setOutput("Error", "Unknowing floatingip id");
|
||||
}
|
||||
|
||||
$floatingip->delete();
|
||||
|
||||
|
@ -173,7 +191,16 @@ class floatingIp implements Core{
|
|||
$this->app->setOutput("Error", "Incorrect parameter opt");
|
||||
}
|
||||
try{
|
||||
$floatingip = null; //obtenir ip
|
||||
$floatingips = listFloatingIps();
|
||||
$floatingIp = null;
|
||||
foreach ($floatingips as $f) {
|
||||
if($f['id'] == $id){
|
||||
$floatingIp = $f;
|
||||
}
|
||||
}
|
||||
if(!isset($floatingIp)){
|
||||
$this->app->setOutput("Error", "Unknowing floatingip id");
|
||||
}
|
||||
|
||||
$floatingip->retrieve();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue