I was poking around at the base classes today and I'm wondering if we need to change the parent of crud.Delete().

The use case is host-del. We store the short and the fqdn name of hosts. I think that for deleting we want enforce using the fqdn to be sure bad things never happen. If we use the short name then we'll need to make some fixes in the delete pre_callback() because right now you can delete with a short name and the services for that host won't be deleted. This is the bug that got me looking into this.

So lets assume we want to require fqdn. This should be easy since the fqdn Param has a validator for this. Unfortunately for things based on the PKQuery class validators aren't executed.

I had a couple ideas how to address this, throwing it out there for discussion:

1. Make the query argument a class attribute that can be overridden.
2. Base crud.Delete on crud.Method instead
3. Add a get_args() implementation to baseldap.LDAPDelete
4. Do nothing with the class inheritance and handle this in host_del pre_callback().


Freeipa-devel mailing list

Reply via email to