From: Marcin Haba Date: Tue, 30 May 2023 13:46:13 +0000 (+0200) Subject: baculum: Add server parameter to list vsphere datastores endpoint X-Git-Tag: Release-13.0.4~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe60df8f0cd49ea6a0292c7e323addb5841042bc;p=thirdparty%2Fbacula.git baculum: Add server parameter to list vsphere datastores endpoint --- diff --git a/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php b/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php index 3b3fd4856..6a237b5a9 100644 --- a/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php +++ b/gui/baculum/protected/API/Pages/API/PluginVSphereListDatastores.php @@ -65,12 +65,17 @@ class PluginVSphereListDatastores extends ConsoleOutputQueryPage { if ($this->Request->contains('output') && $this->isOutputFormatValid($this->Request['output'])) { $out_format = $this->Request['output']; } - $restore_host = $this->Request->contains('restore_host') && $misc->isValidName($this->Request['restore_host'])? $this->Request['restore_host'] : ''; $plugin = 'vsphere:'; + $server = $this->Request->contains('server') && $misc->isValidName($this->Request['server'])? $this->Request['server'] : ''; + if (!empty($server)) { + $plugin .= ' server="' . $server . '"'; + } + $restore_host = $this->Request->contains('restore_host') && $misc->isValidName($this->Request['restore_host'])? $this->Request['restore_host'] : ''; if (!empty($restore_host)) { $plugin .= ' restore_host="' . $restore_host . '"'; } + $out = new \StdClass; $out->output = []; $params = ['client' => $client, 'plugin' => $plugin]; diff --git a/gui/baculum/protected/API/openapi_baculum.json b/gui/baculum/protected/API/openapi_baculum.json index e7408dd7b..986b77eda 100644 --- a/gui/baculum/protected/API/openapi_baculum.json +++ b/gui/baculum/protected/API/openapi_baculum.json @@ -10046,6 +10046,15 @@ "schema": { "type": "string" } + }, + { + "name": "server", + "in": "query", + "required": false, + "description": "VMware server name", + "schema": { + "type": "string" + } } ] }