Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to python-bareos #314

Merged
merged 7 commits into from Dec 6, 2019

Conversation

@joergsteffens
Copy link
Member

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 joergsteffens requested a review from franku Oct 31, 2019
@joergsteffens

This comment has been minimized.

Copy link
Member Author

joergsteffens commented Nov 4, 2019

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

@joergsteffens joergsteffens force-pushed the joergsteffens:dev/joergs/master/python branch 3 times, most recently from b2d9ada to 71a066e Nov 5, 2019
@joergsteffens joergsteffens self-assigned this Nov 7, 2019
@joergsteffens

This comment has been minimized.

Copy link
Member Author

joergsteffens commented Nov 7, 2019

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

@joergsteffens joergsteffens removed their assignment Nov 20, 2019
@joergsteffens joergsteffens force-pushed the joergsteffens:dev/joergs/master/python branch from 71a066e to 97d5f7a Nov 20, 2019
@joergsteffens

This comment has been minimized.

Copy link
Member Author

joergsteffens commented Nov 20, 2019

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

@joergsteffens joergsteffens force-pushed the joergsteffens:dev/joergs/master/python branch from dc2ec34 to 056eeba Nov 23, 2019
Copy link
Member

franku left a comment

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.

python-bareos/bareos/bsock/lowlevel.py Show resolved Hide resolved
python-bareos/bareos/bsock/lowlevel.py Show resolved Hide resolved
python-bareos/bareos/bsock/lowlevel.py Outdated Show resolved Hide resolved
python-bareos/bareos/bsock/lowlevel.py Outdated Show resolved Hide resolved
python-bareos/bareos/bsock/lowlevel.py Outdated Show resolved Hide resolved
python-bareos/debian/control Show resolved Hide resolved
systemtests/scripts/functions Show resolved Hide resolved
@joergsteffens

This comment has been minimized.

Copy link
Member Author

joergsteffens commented Dec 2, 2019

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 joergsteffens:dev/joergs/master/python branch from 6c8ec6d to 6972924 Dec 6, 2019
@joergsteffens

This comment has been minimized.

Copy link
Member Author

joergsteffens commented Dec 6, 2019

Applied discussed changed and rebased on master.

@joergsteffens joergsteffens merged commit 984b60a into bareos:master Dec 6, 2019
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/jenkins/pr-merge This commit is being built
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.