From 79c4bd7d105234c5cb6a70c40216268871c395eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Wed, 19 Jun 2024 13:54:37 -1000 Subject: [PATCH] Move console commands in their own data type --- REFERENCE.md | 28 +++++++++++----------------- manifests/director/console.pp | 32 ++++++++++---------------------- 2 files changed, 21 insertions(+), 39 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index fa462a44..b0f6564a 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -35,6 +35,7 @@ ### Data types +* [`Bacula::Command`](#Bacula--Command): A Bacula console command * [`Bacula::JobType`](#Bacula--JobType): The type of job * [`Bacula::Message`](#Bacula--Message): A Bacula message specification * [`Bacula::Runscript`](#Bacula--Runscript): A Bacula Runscript specification @@ -1115,23 +1116,7 @@ Default value: `'*all*'` ##### `commandacl` -Data type: - -```puppet -Array[Enum[ - ['add'], ['autodisplay'], ['automount'], ['cancel'], ['cloud'], ['create'], ['delete'], ['disable'], ['enable'], ['estimate'], - ['exit'], ['gui'], ['help'], ['label'], ['list'], ['llist'], ['messages'], ['memory'], ['mount'], ['prune'], ['purge'], ['query'], - ['quit'], ['relabel'], ['release'], ['reload'], ['restart'], ['resume'], ['restore'], ['run'], ['setbandwidth'], ['setdebug'], - ['setip'], ['show'], ['sqlquery'], ['status'], ['tag'], ['time'], ['trace'], ['umount'], ['unmount'], ['update'], ['use'], ['var'], - ['version'], ['wait'], ['.api'], ['.backups'], ['.clients'], ['.catalogs'], ['.defaults'], ['.die'], ['.dir'], ['.dump'], ['.exit'], - ['.events'], ['.filesets'], ['.help'], ['.jobs'], ['.estimate'], ['.jlist'], ['.levels'], ['.messages'], ['.msgs'], ['.pools'], - ['.quit'], ['.putfile'], ['.schedule'], ['.sql'], ['.status'], ['.storage'], ['.volstatus'], ['.media'], ['.mediatypes'], - ['.locations'], ['.actiononpurge'], ['.bvfs_lsdirs'], ['.bvfs_lsfiles'], ['.bvfs_get_volumes'], ['.bvfs_update'], - ['.bvfs_get_jobids'], ['.bvfs_get_jobs'], ['.bvfs_get_bootstrap'], ['.bvfs_get_fileindex'], ['.bvfs_versions'], ['.bvfs_get_delta'], - ['.bvfs_restore'], ['.bvfs_cleanup'], ['.bvfs_decode_lstat'], ['.bvfs_clear_cache'], ['.bvfs_update_fv'], ['.bvfs_delete_fileid'], - ['.setuid'], ['.ls'], ['.types'], ['.query'], ['.tags'], - ]] -``` +Data type: `Array[Bacula::Console]` A list of of console commands that can be executed by the console. @@ -2302,6 +2287,15 @@ A boolean value ## Data types +### `Bacula::Command` + +A Bacula console command + +* **See also** + * https://www.bacula.org/15.0.x-manuals/en/console/Bacula_Enterprise_Console.html + +Alias of `Enum['add', 'autodisplay', 'automount', 'cancel', 'cloud', 'create', 'delete', 'disable', 'enable', 'estimate', 'exit', 'gui', 'help', 'label', 'list', 'llist', 'messages', 'memory', 'mount', 'prune', 'purge', 'query', 'quit', 'relabel', 'release', 'reload', 'restart', 'resume', 'restore', 'run', 'setbandwidth', 'setdebug', 'setip', 'show', 'sqlquery', 'status', 'tag', 'time', 'trace', 'umount', 'unmount', 'update', 'use', 'var', 'version', 'wait', '.api', '.backups', '.clients', '.catalogs', '.defaults', '.die', '.dir', '.dump', '.exit', '.events', '.filesets', '.help', '.jobs', '.estimate', '.jlist', '.levels', '.messages', '.msgs', '.pools', '.quit', '.putfile', '.schedule', '.sql', '.status', '.storage', '.volstatus', '.media', '.mediatypes', '.locations', '.actiononpurge', '.bvfs_lsdirs', '.bvfs_lsfiles', '.bvfs_get_volumes', '.bvfs_update', '.bvfs_get_jobids', '.bvfs_get_jobs', '.bvfs_get_bootstrap', '.bvfs_get_fileindex', '.bvfs_versions', '.bvfs_get_delta', '.bvfs_restore', '.bvfs_cleanup', '.bvfs_decode_lstat', '.bvfs_clear_cache', '.bvfs_update_fv', '.bvfs_delete_fileid', '.setuid', '.ls', '.types', '.query', '.tags']` + ### `Bacula::JobType` The type of job diff --git a/manifests/director/console.pp b/manifests/director/console.pp index 8dd90e67..6bc939f5 100644 --- a/manifests/director/console.pp +++ b/manifests/director/console.pp @@ -26,28 +26,16 @@ # define bacula::director::console ( String[1] $password, - String $conf_dir = $bacula::conf_dir, - String[1] $catalogacl = '*all*', - Array[Enum[ - ['add'], ['autodisplay'], ['automount'], ['cancel'], ['cloud'], ['create'], ['delete'], ['disable'], ['enable'], ['estimate'], - ['exit'], ['gui'], ['help'], ['label'], ['list'], ['llist'], ['messages'], ['memory'], ['mount'], ['prune'], ['purge'], ['query'], - ['quit'], ['relabel'], ['release'], ['reload'], ['restart'], ['resume'], ['restore'], ['run'], ['setbandwidth'], ['setdebug'], - ['setip'], ['show'], ['sqlquery'], ['status'], ['tag'], ['time'], ['trace'], ['umount'], ['unmount'], ['update'], ['use'], ['var'], - ['version'], ['wait'], ['.api'], ['.backups'], ['.clients'], ['.catalogs'], ['.defaults'], ['.die'], ['.dir'], ['.dump'], ['.exit'], - ['.events'], ['.filesets'], ['.help'], ['.jobs'], ['.estimate'], ['.jlist'], ['.levels'], ['.messages'], ['.msgs'], ['.pools'], - ['.quit'], ['.putfile'], ['.schedule'], ['.sql'], ['.status'], ['.storage'], ['.volstatus'], ['.media'], ['.mediatypes'], - ['.locations'], ['.actiononpurge'], ['.bvfs_lsdirs'], ['.bvfs_lsfiles'], ['.bvfs_get_volumes'], ['.bvfs_update'], - ['.bvfs_get_jobids'], ['.bvfs_get_jobs'], ['.bvfs_get_bootstrap'], ['.bvfs_get_fileindex'], ['.bvfs_versions'], ['.bvfs_get_delta'], - ['.bvfs_restore'], ['.bvfs_cleanup'], ['.bvfs_decode_lstat'], ['.bvfs_clear_cache'], ['.bvfs_update_fv'], ['.bvfs_delete_fileid'], - ['.setuid'], ['.ls'], ['.types'], ['.query'], ['.tags'], - ]] $commandacl = ['list'], - Optional[String[1]] $jobacl = undef, - Optional[String[1]] $clientacl = undef, - Optional[String[1]] $storageacl = undef, - Optional[String[1]] $scheduleacl = undef, - Optional[String[1]] $poolacl = undef, - Optional[String[1]] $filesetacl = undef, - Optional[String[1]] $whereacl = undef, + String $conf_dir = $bacula::conf_dir, + String[1] $catalogacl = '*all*', + Array[Bacula::Command] $commandacl = ['list'], + Optional[String[1]] $jobacl = undef, + Optional[String[1]] $clientacl = undef, + Optional[String[1]] $storageacl = undef, + Optional[String[1]] $scheduleacl = undef, + Optional[String[1]] $poolacl = undef, + Optional[String[1]] $filesetacl = undef, + Optional[String[1]] $whereacl = undef, ) { $epp_console_variables = { name => $name,