#60 dsrc for dsconf and dsidm
Closed: Fixed 6 years ago Opened 6 years ago by firstyear.

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

6 years ago

Metadata Update from @firstyear:
- Custom field Review Status adjusted to review

6 years ago

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.

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)

6 years ago

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)

6 years ago

Login to comment on this ticket.

Metadata