]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add checking errors in output from vsphere plugin servers, hosts and datastores commands
authorMarcin Haba <marcin.haba@bacula.pl>
Mon, 13 Mar 2023 12:10:12 +0000 (13:10 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Thu, 20 Apr 2023 10:00:25 +0000 (12:00 +0200)
gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php
gui/baculum/protected/API/Pages/API/PluginVSphereListHosts.php
gui/baculum/protected/API/Pages/API/PluginVSphereListServers.php

index 9c0fd505adbf5af099ed76e5e7c8bd56f45ec7e3..def1538bc3cbdb4c565f4713bc6b61e9f2c75f55 100644 (file)
@@ -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;
        }
index a57ee50282b109645310446051c84274e149a16c..8205e1553d4a7d9cb8b0cb73730f58ae04d21602 100644 (file)
@@ -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;
        }
index f62398c4633b53bf1058f8284a8730ba3c06a5b0..9cc1f867629702bb9989adfc4436f55fc5807abf 100644 (file)
@@ -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;
        }