From: Marcin Haba Date: Mon, 13 Mar 2023 12:10:12 +0000 (+0100) Subject: Add checking errors in output from vsphere plugin servers, hosts and datastores commands X-Git-Tag: Release-13.0.3~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4731d74c3003200f80898c2b0c45f3ee95745fc0;p=thirdparty%2Fbacula.git Add checking errors in output from vsphere plugin servers, hosts and datastores commands --- diff --git a/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php b/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php index 9c0fd505a..def1538bc 100644 --- a/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php +++ b/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php @@ -116,6 +116,8 @@ class PluginVSphereListDatastores extends ConsoleOutputQueryPage { 'Wrong output from vSphere RAW datastore list: ' . implode(PHP_EOL, $ret->output) ); $ret->output = []; // don't provide errors to output, only in logs + } elseif ($this->isError($ret->output)) { + $ret->exitcode = PluginVSphereError::ERROR_EXECUTING_PLUGIN_QUERY_COMMAND; } return $ret; } diff --git a/gui/baculum/protected/API/Pages/API/PluginVSphereListHosts.php b/gui/baculum/protected/API/Pages/API/PluginVSphereListHosts.php index a57ee5028..8205e1553 100644 --- a/gui/baculum/protected/API/Pages/API/PluginVSphereListHosts.php +++ b/gui/baculum/protected/API/Pages/API/PluginVSphereListHosts.php @@ -116,6 +116,8 @@ class PluginVSphereListHosts extends ConsoleOutputQueryPage { 'Wrong output from vSphere RAW host list: ' . implode(PHP_EOL, $ret->output) ); $ret->output = []; // don't provide errors to output, only in logs + } elseif ($this->isError($ret->output)) { + $ret->exitcode = PluginVSphereError::ERROR_EXECUTING_PLUGIN_QUERY_COMMAND; } return $ret; } diff --git a/gui/baculum/protected/API/Pages/API/PluginVSphereListServers.php b/gui/baculum/protected/API/Pages/API/PluginVSphereListServers.php index f62398c46..9cc1f8676 100644 --- a/gui/baculum/protected/API/Pages/API/PluginVSphereListServers.php +++ b/gui/baculum/protected/API/Pages/API/PluginVSphereListServers.php @@ -111,6 +111,8 @@ class PluginVSphereListServers extends ConsoleOutputQueryPage { 'Wrong output from vSphere RAW server list: ' . implode(PHP_EOL, $ret->output) ); $ret->output = []; // don't provide errors to output, only in logs + } elseif ($this->isError($ret->output)) { + $ret->exitcode = PluginVSphereError::ERROR_EXECUTING_PLUGIN_QUERY_COMMAND; } return $ret; }