[discuss] composable object types in lib389

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I’ve been speaking to Anuj Borah about a PR they made, and how we can properly represent nsRole.

because nsRoles are an extra objectClass, rather than a standalone one, we need a way to represent this properly.

It’s probably a good idea to use some of pythons composability here, where we could do something like:

class nsFilteredRole(DSLdapObject):


class User(DSldapObject):

class User_nsFilteredRole(User, nsFilteredRole):

Then to have a way to define and have each subclass called, and asserted for correctness. A question is how we would handle:

user = User.create(…)
# How to convert user to User_nsFilteredRole

We could do something like:

User_nsFilteredRole.from(user)

And have a from that does a valid conversion based on types and adds in the required role parts?

This isn’t a common scenario, so I think having a limited set of well understood types that require this type of conversion would be okay.

Thought? *looking at you Simon* :) 

PS: It’s good to be back

--
Sincerely,

William
_______________________________________________
389-devel mailing list -- 389-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to 389-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-devel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux