Skip to content

Enhancements to python-bareos#314

Merged
joergsteffens merged 7 commits intobareos:masterfrom
joergsteffens:dev/joergs/master/python
Dec 6, 2019
Merged

Enhancements to python-bareos#314
joergsteffens merged 7 commits intobareos:masterfrom
joergsteffens:dev/joergs/master/python

Conversation

@joergsteffens
Copy link
Member

@joergsteffens joergsteffens commented Oct 31, 2019

Enhancements to python-bareos:

  • Improve error handling.
  • Implement Console Protocol of Bareos >= 18.2.4. Before connection did use the Bareos Director compat mode.
  • Implement PAM authentication.
  • build python-bareos for Python 2 and Python3 (DEB and RPM)
  • Test with Python 2.6 (RHEL/Centos 6).
  • Add a lot of systemtests of the different console connections.

Tested:

  • Local systemtests succeed.

@joergsteffens
Copy link
Member Author

Verified that for Debian based distribution python-bareos and python3-bareos are build.

@joergsteffens joergsteffens force-pushed the dev/joergs/master/python branch 3 times, most recently from b2d9ada to 71a066e Compare November 7, 2019 11:08
@joergsteffens joergsteffens self-assigned this Nov 7, 2019
@joergsteffens
Copy link
Member Author

As discussed with @franku, integrate the fix commits into the original ones.

@joergsteffens
Copy link
Member Author

Added commit for Python 2 and Python 3 RPMs. Rebased on current master.

@joergsteffens joergsteffens force-pushed the dev/joergs/master/python branch from dc2ec34 to 056eeba Compare November 23, 2019 17:05
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.

Wow, lot of work. I mentioned some things about tls-require and tls-enable. Many of the function names could be chosen to better reflect their purpose, rather than writing comments that describe what they do.

I did code review, not ran any tests.

@joergsteffens
Copy link
Member Author

Added a commit introducing the test class PythonBareosJsonRunScriptTest.
This class checks if RunScripts are executed in the correct context.
Some of these tests will fail, until #358 gets merged.

Also:
  * Implement PAM authentication.
  * Reduce warnings by closing socket, when they are no longer required.
  * Prepare python-bareos version number. Fallback to 18.2.5, as this is the first version that uses the new protocol.
  * Handle end of data in interactive mode.
  * Adapted for connections to the Filedaemon.
Adapt code to be usable with Python 2.6 (RHEL/Centos 6).
The Director Console Protocol >= 18.2.4 offers a lot more connection parameters.
Add util functions to the classes to help providing the same set of parameters to all command line tools.

Allow password as string parameter. It will be converted to Bareos.Util.Password during initialization.

Also added a fallback to old Director Console protocol (12.4),
if authentication to Director fails.
If protocolversion is set exclipietly, there will be no automatic fallback.
…versions (18.2 and 12.4)

Make usage of TLS-PSK optional in most cases.
This is necessary to successfully run the test without the python module sslpsk.

Add Filedaemon connection tests.

Added test for client ACLs at the restore command.
@joergsteffens joergsteffens force-pushed the dev/joergs/master/python branch from 6c8ec6d to 6972924 Compare December 6, 2019 10:25
@joergsteffens
Copy link
Member Author

Applied discussed changed and rebased on master.

@joergsteffens joergsteffens merged commit 984b60a into bareos:master Dec 6, 2019
@joergsteffens joergsteffens deleted the dev/joergs/master/python branch May 11, 2020 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants