Skip to content

Commit

Permalink
Move console commands in their own data type
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Jun 19, 2024
1 parent e29c622 commit 79c4bd7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 39 deletions.
28 changes: 11 additions & 17 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1115,23 +1116,7 @@ Default value: `'*all*'`

##### <a name="-bacula--director--console--commandacl"></a>`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.

Expand Down Expand Up @@ -2302,6 +2287,15 @@ A boolean value

## Data types

### <a name="Bacula--Command"></a>`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']`

### <a name="Bacula--JobType"></a>`Bacula::JobType`

The type of job
Expand Down
32 changes: 10 additions & 22 deletions manifests/director/console.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 79c4bd7

Please sign in to comment.