Skip to content

Improve some console commands#604

Merged
joergsteffens merged 12 commits intomasterfrom
dev/joergs/master/console-cmds-fixes
Sep 24, 2020
Merged

Improve some console commands#604
joergsteffens merged 12 commits intomasterfrom
dev/joergs/master/console-cmds-fixes

Conversation

@joergsteffens
Copy link
Member

This PR improves some console commands. It prevents some Director crashes and adds output for API mode 2 (JSON).

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.

Good work!
I added some suggestions using extra commits on your branch.

@franku franku force-pushed the dev/joergs/master/console-cmds-fixes branch from 661a217 to 04f7d1a Compare September 23, 2020 10:09
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

Some file-headers still have the wrong date in them.
Maybe we should probably have a tool for that...

joergsteffens and others added 12 commits September 24, 2020 14:51
Devices are no config file resources.
They are only used internally, to represent Storages.
The code to parse a schedule run directive calls the scan_err function
in case of a parse error.
However, it did assume, that scan_err terminates the director.
While this is true when parsing at the start of the director,
it isn't true, when called by the "configure add" command.

This patch improves the error handling, by exiting the parse function
when an error is detected.
This change improves the handling of output from the "delete" command.
The changes are required to access the individual jobids in the list,
instead of having only access to the a string containing the comma seperated list of jobids.

The count() function has been replaced with the standard size() function.
The reset() function has been replaced with the standard clear() function.

cleanup

cleanup
This config type has been introduced recently
and wasn't handled by PropagateResource (Job/JobDefs).
@joergsteffens joergsteffens force-pushed the dev/joergs/master/console-cmds-fixes branch from 04f7d1a to 909948c Compare September 24, 2020 12:54
@joergsteffens joergsteffens merged commit e36c4c0 into master Sep 24, 2020
@joergsteffens joergsteffens deleted the dev/joergs/master/console-cmds-fixes branch September 24, 2020 16:43
alaaeddineelamri pushed a commit to alaaeddineelamri/bareos that referenced this pull request Sep 30, 2020
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.

3 participants