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
PR - Issue 50545 - Port dbgen.pl to dsctl #4075
Comments
Comment from firstyear (@Firstyear) at 2020-04-14 07:55:40 maybe for the cli we call it ldifgen not dbgen? |
Comment from firstyear (@Firstyear) at 2020-04-14 07:56:10 Besides that one naming comment, it otherwise looks good to me. :) Great to see this nearly done! |
Comment from spichugi (@droideck) at 2020-04-14 11:06:09 Could you please take a look at the tests that use
|
Comment from spichugi (@droideck) at 2020-04-14 11:16:15 Why not get the props from |
Comment from spichugi (@droideck) at 2020-04-14 11:23:05 It gives |
Comment from spichugi (@droideck) at 2020-04-14 11:27:29 Another a bit odd behaviour that I found is when we specify optional arguments like
then It may be intended but then we shouldn't do that silently, in my opinion... |
Comment from mreynolds (@mreynolds389) at 2020-04-14 14:17:49
Hahaha, my tool I ported most of this from is call "ldif-gen.py", so yes I will gladly make that change :-) |
Comment from mreynolds (@mreynolds389) at 2020-04-14 15:35:51
Not sure how I feel about this request. You should not have to specify 10 options if you just want to quickly create a basic group with commonly used attributes. I'm trying to make the tool really easy/simple and fast. So, if you want to tweak the default LDIF you can use the other options. Or, if you want that fine grained control you could use the interactive mode which asks for everything. |
Comment from spichugi (@droideck) at 2020-04-14 16:12:44
Maybe we can print the defaults that were used? Just one simple line. And if the user doesn't like the options he can regenerate the thing right away (basically, in the end, it is for speeding up the process) |
Comment from mreynolds (@mreynolds389) at 2020-04-14 16:44:15
Isn't that what "--help" is for? :-)
Again isn't this what the interactive mode is for? The non-interactive mode should just run and assume you know what you want to do. I do not want to make the non-interactive mode interactive. So... I'm not rejecting what you are saying, but I don't think I am visualizing what you want it to look like. Maybe you could write up some mock terminal output, or something, and show me how you think it should it behave? Thanks!! |
Comment from mreynolds (@mreynolds389) at 2020-04-14 17:45:51 rebased onto dfd34337bdff1889fb4bb3a031107fb37ff7147b |
Comment from mreynolds (@mreynolds389) at 2020-04-14 17:47:05 Fixed all of other issues in the meantime:
|
Comment from spichugi (@droideck) at 2020-04-15 01:27:00
Okay:) I was thinking more and I think it's okay but we should make sure that the
But the
Also, I am a bit confused here:
Because
I thought about something like this:
|
Comment from spichugi (@droideck) at 2020-04-15 01:40:43 If I understand correctly, |
Comment from firstyear (@Firstyear) at 2020-04-15 02:09:59
Simple option here, why not write to the ldif dir of the related instance? If we plan to import it to that instance, then this would make the most sense because it then isolates between instances, and means the instance can actually read the ldif dir (a common issue with the import from say /root or /tmp is the dirsrv user of the instance can't read the directory the ldif is in ...) |
Comment from firstyear (@Firstyear) at 2020-04-15 02:10:56 Sorry to follow up, imagine this case: instanceA = dbgen The second dbgen would clobber the first. So if we had parallel tests or anything else it could destroy evidence or import the wrong data .... |
Comment from mreynolds (@mreynolds389) at 2020-04-15 15:36:59
Well not all of these LDIFs are designed to be imported. Groups, COS, Roles and modification ldifs are design to be used by ldapmodify, not ldif2db. And smaller user LDIF's could also be added using ldapmodify. Now I did think about using the server's LDIF directory since that information is available, but I also want all LDIF options to be consistent and forcing all LDIFs into the server's LDIF directory is not something I want to do, especially since this is all for testing and not for production, and most of the LDIF options are not meant for ldif2db. Now in the interactive mode I added checks to see if the file can be written, if it can't it keeps prompting for a valid path/name. So permission issues and invalid paths are covered in the interactive mode. Anyway let me work on all of this and I'll try and come up with something that works for all the cases. :-) |
Comment from mreynolds (@mreynolds389) at 2020-04-23 19:22:19 rebased onto 2d9263020be4b14953bd26419293ac750b35a892 |
Comment from mreynolds (@mreynolds389) at 2020-04-23 19:23:24 All changes applied @droideck and @Firstyear, please review... |
Comment from spichugi (@droideck) at 2020-04-24 00:51:14 Looks really good! You have my ack, at least. :) |
Comment from firstyear (@Firstyear) at 2020-04-24 02:56:57 It's a yay from me. |
Comment from mreynolds (@mreynolds389) at 2020-04-24 16:13:32 rebased onto 326be2c |
Comment from mreynolds (@mreynolds389) at 2020-04-24 16:14:38 Pull-Request has been merged by mreynolds389 |
Patch |
Cloned from Pagure Pull-Request: https://pagure.io/389-ds-base/pull-request/51022
Description: Ported the main features to lib389 and added some other useful features:
Design Doc: https://www.port389.org/docs/389ds/design/dbgen-design.html
fixes: Resolves: #3601
The text was updated successfully, but these errors were encountered: