python: models: add Container model
authorRob van der Linde <rob@catalyst.net.nz>
Wed, 13 Mar 2024 10:07:52 +0000 (23:07 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Mar 2024 03:49:35 +0000 (03:49 +0000)
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>
python/samba/domain/models/__init__.py
python/samba/domain/models/container.py [new file with mode: 0644]

index 4e100574aaf37190b5ad76d1e3ddccfef1cfe139..fe05bac1482a0860c5004f260e8921ee40642073 100644 (file)
@@ -26,6 +26,7 @@ from .auth_silo import AuthenticationSilo
 from .claim_type import ClaimType
 from .computer import Computer
 from .constants import MODELS
+from .container import Container
 from .gmsa import GroupManagedServiceAccount
 from .group import Group
 from .model import Model
diff --git a/python/samba/domain/models/container.py b/python/samba/domain/models/container.py
new file mode 100644 (file)
index 0000000..5d3a0b2
--- /dev/null
@@ -0,0 +1,32 @@
+# Unix SMB/CIFS implementation.
+#
+# Container model.
+#
+# Copyright (C) Catalyst.Net Ltd. 2024
+#
+# Written by Rob van der Linde <rob@catalyst.net.nz>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+from .fields import DnField
+from .model import Model
+
+
+class Container(Model):
+    object_reference = DnField("msDS-ObjectReference")
+
+    @staticmethod
+    def get_object_class():
+        return "container"