Currently in dsconf and dsidm, we support only LDAPURL to connect to an instance.
We should allow people to define instances in .dsrc, and we should use this as names. IE
dsidm instance .....
where instance is in .dsrc as:
[instance] url = ldap://..... basedn = ..... cacert = ..... binddn = ..... userkey = .... usercrt = .....
etc.
Metadata Update from @firstyear: - Issue assigned to firstyear
<img alt="0001-Ticket-60-add-dsrc-to-dsconf-and-dsidm.patch" src="/lib389/issue/raw/b6fa6930685f1b8016e845bffa7e33c788fe5c1ec25e67c68d85be7bedd80dcf-0001-Ticket-60-add-dsrc-to-dsconf-and-dsidm.patch" />
Metadata Update from @firstyear: - Custom field Review Status adjusted to review
Hi William, after a brief test, I've found two Python2/3 issues.
In the lib389/tests/cli/dsrc_test.py, you import configparser and there is no such module in Python 2. After fixing it (with the code you have in lib389/cli_base/dsrc.py), I have faced an error in lib389/cli_base/dsrc.py:
> dsrc_inst['basedn'] = config.get(instance_name, 'basedn', fallback=None) E TypeError: get() got an unexpected keyword argument 'fallback'
Once again, it is with Python 2.
Yes, I wrote this for python 3 only.
It's becoming clearer, that some of our new developments are too hard to support across both. So I have made these cli tools python3 only, and these tests as a result, are also python 3 only.
I think perhaps there needs to be a pytest mark to say "only run on python3"?
I've updated the patch to reflect this.
<img alt="0001-Ticket-60-add-dsrc-to-dsconf-and-dsidm.patch" src="/lib389/issue/raw/1fe1032e3f91f6a210b9128a4100efc99240e9ba528b0ccfa29366436dc66a5d-0001-Ticket-60-add-dsrc-to-dsconf-and-dsidm.patch" />
sudo py.test -s lib389/lib389/tests/cli/dsrc_test.py lib389/lib389/tests/cli/dsrc_test.py ssss ====== 4 skipped in 0.02 seconds sudo py.test-3 -s lib389/lib389/tests/cli/dsrc_test.py lib389/lib389/tests/cli/dsrc_test.py .... ==== 4 passed in 0.21 seconds
Ok. :) The code looks good to me.
Metadata Update from @spichugi: - Custom field Review Status adjusted to ack (was: review)
commit be2de10 To ssh://git@pagure.io/lib389.git 3a7802d..934741a master -> master
Metadata Update from @firstyear: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.