Skip to content

Extend bconsole show command to support JSON output format (API 2)#574

Merged
joergsteffens merged 6 commits intomasterfrom
dev/joergs/master/show-api2
Aug 28, 2020
Merged

Extend bconsole show command to support JSON output format (API 2)#574
joergsteffens merged 6 commits intomasterfrom
dev/joergs/master/show-api2

Conversation

@joergsteffens
Copy link
Member

No description provided.

@joergsteffens joergsteffens force-pushed the dev/joergs/master/show-api2 branch from f461aad to 6d6df34 Compare August 20, 2020 14:55
Copy link
Contributor

@franku franku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started with review mostly on semantic things with some suggestions and comments.
In my opinion the major work for switching void sendit into bool sendit could habe been avoided because all function-callbacks that are given to this argument always return true.

Copy link
Contributor

@franku franku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments more.

@joergsteffens joergsteffens force-pushed the dev/joergs/master/show-api2 branch 2 times, most recently from 2c30471 to e8b0659 Compare August 27, 2020 14:32
The show command can print the configuration of the Bareos Director.
To extend the functionality to also produce JSON output,
the already existing OutputFormatter class is used.
As the Bareos Daemons can all dump their configuration (in plain, none verbose mode),
changes to all Daemons have been necessary.
Skip the test "test_json_backend_with_invalid_json_output",
as most commands now produce valid JSON output.

Add the test "PythonBareosShowTest.test_fileset" to check,
if a fileset content is written correctly into the catalog.

Add the test PythonBareosJsonConfigTest.test_show_command.
Verifies that the "show" command delivers valid JSON.
This test checks if configuration data is written correctly by the "show" command.
Checks both the modes: normal text, JSON.
@joergsteffens joergsteffens force-pushed the dev/joergs/master/show-api2 branch from e8b0659 to 3351e3b Compare August 27, 2020 14:33
@joergsteffens joergsteffens merged commit be8a1d8 into master Aug 28, 2020
@joergsteffens joergsteffens deleted the dev/joergs/master/show-api2 branch August 28, 2020 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants