diff --git a/REFERENCE.md b/REFERENCE.md index fa462a44..b64bd5dc 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::Command]` 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, diff --git a/types/command.pp b/types/command.pp new file mode 100644 index 00000000..e116834f --- /dev/null +++ b/types/command.pp @@ -0,0 +1,104 @@ +# A Bacula console command +# +# @see https://www.bacula.org/15.0.x-manuals/en/console/Bacula_Enterprise_Console.html +type Bacula::Command = Enum[ + # Console Commands + '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', + # Special dot Commands + '.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', +]