View Issue Details

IDProjectCategoryView StatusLast Update
0000190bareos-coreGeneralpublic2015-03-25 16:51
Reporterjoergs Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Fixed in Version14.4.0 
Summary0000190: Bareos director should be able to provide information about possible configuration options
DescriptionThere are some approaches to extract the configuration data structure and possible commands from Bareos.
This have been used to generate the configuration management tools or automatic documentation.

Instead of extracting the information by regexes from the source code, it would be better, if the bareos director would be able to deliver this kind of informations.
Additional InformationThe existing project is available at http://trac.dass-it.de/pub/browser/dassmodus/trunk/dassmodus/nosferatu/ and especially http://trac.dass-it.de/pub/browser/dassmodus/trunk/dassmodus/nosferatu/nosferatu/tools/bacsource2configrules.py
but would need further adjustment to Bareos.

It produces python structures, that represent Bacula/Bareos configuration options. A resulting file can be seen at http://trac.dass-it.de/pub/browser/dassmodus/trunk/dassmodus/nosferatu/nosferatu/auto_configrules.py

The format delivert from the Director could be quite similiar, but more flexible and in a standard format as for example JSON..

The source code looks like this:
static RES_ITEM cat_items[] = {
   { "name", store_name, ITEM(res_cat.hdr.name), 0, ITEM_REQUIRED, NULL },
   { "description", store_str, ITEM(res_cat.hdr.desc), 0, 0, NULL },
   { "address", store_str, ITEM(res_cat.db_address), 0, 0, NULL },
...

This should get translated to something similar like

director.catalog.items=[
'name' = [
type=BareosName,
required=True,
multivalue=False,
defaultvalue=None,
deprecatedSince=None,
],
"description" = [
type=String,
required=False,
multivalue=False,
defaultvalue=None,
deprecatedSince=None,
],
"address" = [
type=String,
required=False,
multivalue=False,
defaultvalue=None,
deprecatedSince=None,
],
...


A deprecated option should be displayed like this:
"outdatedoption" = [
type=String,
required=False,
multivalue=False,
defaultvalue="test",
deprecatedSince="13.4.0",
],

I would also appreciate, if the structure contains fields like:
'includedSinceVersion' = "12.4.1",
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

Relationships

child of 0000202 closed Config engine redesign 

Activities

There are no notes attached to this issue.

Related Changesets

bareos: master d39a5b26

2014-09-29 17:06

joergs


Committer: mvwieringen

Ported: N/A

Details Diff
Dump bareos-dir configuration options

Add command line option -x to let bareos-dir dump his configuration
options in JSON format.

This output will get used to autogenerated documentation for Bareos.

Issues 0000190: Bareos director should be able to provide information
about possible configuration options
Affected Issues
0000190
mod - src/dird/dird.c Diff File
mod - src/dird/dird_conf.h Diff File
mod - src/filed/filed_conf.h Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/lib/res.c Diff File
mod - src/stored/stored_conf.h Diff File

bareos: bareos-14.2 14be365e

2014-09-29 17:06

Joerg Steffens


Committer: Marco van Wieringen

Ported: N/A

Details Diff
Dump bareos-dir configuration options

Add command line option -x to let bareos-dir dump his configuration
options in JSON format.

This output will get used to autogenerated documentation for Bareos.

Issues 0000190: Bareos director should be able to provide information
about possible configuration options
Affected Issues
0000190
mod - src/dird/dird.c Diff File
mod - src/dird/dird_conf.h Diff File
mod - src/filed/filed_conf.h Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/lib/res.c Diff File
mod - src/stored/stored_conf.h Diff File

bareos2015: bareos-14.2 769affd3

2014-09-29 19:06

joergs


Committer: mvwieringen

Ported: N/A

Details Diff
Dump bareos-dir configuration options

Add command line option -x to let bareos-dir dump his configuration
options in JSON format.

This output will get used to autogenerated documentation for Bareos.

Issues 0000190: Bareos director should be able to provide information
about possible configuration options
Affected Issues
0000190
mod - src/dird/dird.c Diff File
mod - src/dird/dird_conf.h Diff File
mod - src/filed/filed_conf.h Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/lib/res.c Diff File
mod - src/stored/stored_conf.h Diff File

bareos: master 9ffd1ac4

2014-12-05 18:10

Joerg Steffens


Committer: Marco van Wieringen

Ported: N/A

Details Diff
daemons: dumping configuration and schema

json schema export (-xs):
This has already been implemented for bareos-dir.
This patch adds exporting the configuration schema
by calling the program with the "-xs" option
also for bareos-fd, bareos-sd, bconsole and tray-monitor.

json schema export by using option "-xs", instead of option "-x".

Add schema export schema of datatypes.

extend RES_ITEM with versions and description
Configuration directives can now contain information about
when they have been added and a short description.
This helps creating an update-to-date documentation.

beautfied JSON output

Daemons dumps current configuration when called with option "-xc"

Issues: 0000190: Bareos should be able to provide information about possible configuration options
Affected Issues
0000190
mod - src/console/console.c Diff File
mod - src/console/console_conf.c Diff File
mod - src/console/console_conf.h Diff File
mod - src/dird/dird.c Diff File
mod - src/dird/dird_conf.c Diff File
mod - src/dird/dird_conf.h Diff File
mod - src/dird/inc_conf.c Diff File
mod - src/dird/protos.h Diff File
mod - src/dird/run_conf.c Diff File
mod - src/filed/filed.c Diff File
mod - src/filed/filed.h Diff File
mod - src/filed/filed_conf.c Diff File
mod - src/filed/filed_conf.h Diff File
mod - src/lib/msg_res.h Diff File
mod - src/lib/parse_conf.c Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/lib/res.c Diff File
mod - src/qt-console/bat_conf.cpp Diff File
mod - src/qt-tray-monitor/tray-monitor.cpp Diff File
mod - src/qt-tray-monitor/tray-monitor.h Diff File
mod - src/qt-tray-monitor/tray_conf.cpp Diff File
mod - src/qt-tray-monitor/tray_conf.h Diff File
mod - src/stored/stored.c Diff File
mod - src/stored/stored_conf.c Diff File
mod - src/stored/stored_conf.h Diff File

bareos-docs: master 2b46f62d

2015-01-23 16:36

joergs

Ported: N/A

Details Diff
use autodoc for all Bareos programs

also adapted to json schema export format-version=2
and a lot of cleanups.
Affected Issues
0000190
mod - Makefile Diff File
mod - manuals/en/main/Makefile Diff File
mod - manuals/en/main/ansi-labels.tex Diff File
mod - manuals/en/main/autochangers.tex Diff File
add - manuals/en/main/bareos-fd-resource-client-definitions.tex Diff File
add - manuals/en/main/bareos-fd-resource-director-definitions.tex Diff File
mod - manuals/en/main/bareos-manual-main-reference.tex Diff File
add - manuals/en/main/bareos-sd-resource-autochanger-definitions.tex Diff File
add - manuals/en/main/bareos-sd-resource-device-definitions.tex Diff File
add - manuals/en/main/bareos-sd-resource-director-definitions.tex Diff File
add - manuals/en/main/bareos-sd-resource-messages-definitions.tex Diff File
add - manuals/en/main/bareos-sd-resource-ndmp-definitions.tex Diff File
add - manuals/en/main/bareos-sd-resource-storage-definitions.tex Diff File
add - manuals/en/main/bareos-tray-monitor-resource-client-definitions.tex Diff File
add - manuals/en/main/bareos-tray-monitor-resource-director-definitions.tex Diff File
add - manuals/en/main/bareos-tray-monitor-resource-monitor-definitions.tex Diff File
add - manuals/en/main/bareos-tray-monitor-resource-storage-definitions.tex Diff File
mod - manuals/en/main/bareos.sty Diff File
add - manuals/en/main/bconsole-resource-console-definitions.tex Diff File
add - manuals/en/main/bconsole-resource-director-definitions.tex Diff File
mod - manuals/en/main/config/DirConsoleJobACL1.conf Diff File
add - manuals/en/main/config/FdClientFDAddresses1.conf Diff File
add - manuals/en/main/config/SdDeviceAlertCommand1.conf Diff File
add - manuals/en/main/config/SdDeviceAlertCommand2.conf Diff File
add - manuals/en/main/config/SdDeviceArchiveDevice1.conf Diff File
add - manuals/en/main/config/SdDeviceArchiveDevice2.conf Diff File
add - manuals/en/main/config/SdDeviceArchiveDevice3.conf Diff File
add - manuals/en/main/config/SdDeviceChangerCommand1.conf Diff File
add - manuals/en/main/config/SdDeviceMinimumBlockSize1.conf Diff File
add - manuals/en/main/config/SdDeviceMinimumBlockSize2.conf Diff File
add - manuals/en/main/config/SdDeviceUnmountCommand1.conf Diff File
mod - manuals/en/main/consoleconf.tex Diff File
mod - manuals/en/main/dirdconf-fileset.tex Diff File
mod - manuals/en/main/dirdconf.tex Diff File
mod - manuals/en/main/director-resource-director-definitions.tex Diff File
mod - manuals/en/main/director-resource-pool-definitions.tex Diff File
mod - manuals/en/main/director-resource-storage-definitions.tex Diff File
mod - manuals/en/main/filedconf.tex Diff File
mod - manuals/en/main/general.tex Diff File
mod - manuals/en/main/messagesres.tex Diff File
mod - manuals/en/main/monitorconf.tex Diff File
mod - manuals/en/main/plugins.tex Diff File
mod - manuals/en/main/storedconf-autochangerres.tex Diff File
mod - manuals/en/main/storedconf.tex Diff File
mod - manuals/scripts/generate-resoure-descriptions.py Diff File
mod - packaging/bareos-docs.spec Diff File

Issue History

Date Modified Username Field Change
2013-06-14 13:05 joergs New Issue
2013-06-14 13:05 joergs Status new => assigned
2013-06-14 13:05 joergs Assigned To => pstorz
2013-06-14 13:16 joergs Additional Information Updated
2013-07-05 16:51 maik Relationship added child of 0000202
2014-09-29 22:50 joergs Assigned To pstorz => joergs
2014-09-30 09:12 mvwieringen Changeset attached => bareos master d39a5b26
2015-01-23 16:24 joergs Changeset attached => bareos master 9ffd1ac4
2015-01-23 16:25 joergs Changeset attached => bareos bareos-14.2 14be365e
2015-01-23 16:26 joergs Changeset attached => bareos-docs master 2b46f62d
2015-01-23 16:28 joergs Status assigned => resolved
2015-01-23 16:28 joergs Fixed in Version => 14.4.0
2015-01-23 16:28 joergs Resolution open => fixed
2015-01-23 16:28 joergs Status resolved => closed
2015-01-23 16:28 joergs Assigned To joergs =>
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-14.2 769affd3