|
@@ -121,13 +121,13 @@ EOT
|
|
|
if ($hostJSON = $ws->makeGetRequest($url, HttpRequestInterface::METHOD_GET, [], $this->credentials)) {
|
|
|
$host = current(json_decode($hostJSON, true));
|
|
|
}
|
|
|
+ if (!isset($hostId)) {
|
|
|
+ $this->io->error("No existe el hostType {$type} en DHCP");
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (!isset($hostId)) {
|
|
|
- $this->io->error("No existe el hostType {$type} en DHCP");
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
// Creo, edito o elimino dependiendo los parámetros
|
|
|
$method = HttpRequestInterface::METHOD_POST;
|