389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
210 stars 89 forks source link

Add Monitors object to lib389 #4559

Open droideck opened 3 years ago

droideck commented 3 years ago

Is your feature request related to a problem? Please describe. It's impossible to get the set of all monitors using lib389 so instead we call DSLdaoObjects directly and it's confusing

Describe the solution you'd like Monitors(DSLdapObjects) should get all of the monitor objects.

mreynolds389 commented 3 years ago

Are you sure? The CLI tools can get all the monitors via:

from lib389.monitor import (Monitor, MonitorLDBM, MonitorSNMP, MonitorDiskSpace)

droideck commented 3 years ago

What I mean is that we can't call like this:

monitors = Monitors()
monitors.list()
monitors.filter()  # with different scopes and filters

It is not commonly useful but it still can be used in tests or even administration scripts. To have 'Plural(DSLdapObjects)' and 'Singular(DSLdapObject)' is the consistent approach we have across all lib389. And the consistency is broken here...

mreynolds389 commented 3 years ago

What I mean is that we can't call like this:

monitors = Monitors()
monitors.list()
monitors.filter()  # with different scopes and filters

It is not commonly useful but it still can be used in tests or even administration scripts. To have 'Plural(DSLdapObjects)' and 'Singular(DSLdapObject)' is the consistent approach we have across all lib389. And the consistency is broken here...

Gotcha, sounds good!