1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-05 12:22:11 +03:00

python/samba/netcmd/schema.py: add schema show_oc for attribute

Often administrators need to add a specific attribute to an object, but
it may not be possible with the objectClasses present. This tool allows
searching "what objectclasses must or may?" take an attribute to help hint
to an administrator what objectclasses can be added to objects to achieve
the changes they want.

Signed-off-by: William Brown <william@blackhats.net.au>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
William Brown
2018-04-29 13:28:42 +12:00
committed by Andrew Bartlett
parent 74d85d4cc2
commit 2c65184270
3 changed files with 65 additions and 0 deletions

View File

@ -77,6 +77,16 @@ class SchemaCmdTestCase(SambaToolCmdTest):
self.assertCmdSuccess(result, out, err)
def test_show_oc_attribute(self):
"""Tests that we can modify searchFlags of an attribute"""
(result, out, err) = self.runsubcmd("schema", "attribute",
"show_oc", "cn",
"-H", "ldap://%s" % os.environ["DC_SERVER"],
"-U%s%%%s" % (os.environ["DC_USERNAME"],
os.environ["DC_PASSWORD"]))
self.assertCmdSuccess(result, out, err)
def test_display_objectclass(self):
"""Tests that we can display schema objectclasses"""
(result, out, err) = self.runsubcmd("schema", "objectclass",