1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

python: domain: models: add OrganizationalUnit container model

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Rob van der Linde 2024-03-22 11:54:39 +13:00 committed by Andrew Bartlett
parent 5ac4b6969b
commit 828420b4f0
2 changed files with 13 additions and 1 deletions

View File

@ -29,7 +29,7 @@ from .container import Container
from .gmsa import GroupManagedServiceAccount
from .group import Group
from .model import Model
from .org import OrganizationalPerson
from .org import OrganizationalPerson, OrganizationalUnit
from .person import Person
from .registry import MODELS
from .schema import AttributeSchema, ClassSchema

View File

@ -21,6 +21,7 @@
#
from .fields import IntegerField, StringField
from .model import Model
from .person import Person
@ -31,3 +32,14 @@ class OrganizationalPerson(Person):
@staticmethod
def get_object_class():
return "organizationalPerson"
class OrganizationalUnit(Model):
ou = StringField("ou")
def __str__(self):
return str(self.ou)
@staticmethod
def get_object_class():
return "organizationalUnit"