Univention Bugzilla – Attachment 9074 Details for
Bug 24601
Mark sambaRID property as required if attribute is required by object class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
find_wrong_attributes.py
find_wrong_attributes.py (text/x-python), 1.10 KB, created by
Florian Best
on 2017-07-28 16:36:59 CEST
(
hide
)
Description:
find_wrong_attributes.py
Filename:
MIME Type:
Creator:
Florian Best
Created:
2017-07-28 16:36:59 CEST
Size:
1.10 KB
patch
obsolete
>import univention.admin >lo,po=univention.admin.uldap.getMachineConnection() >univention.admin.modules.update() >schema = lo.get_schema() >from ldap.schema import (SubSchema, ObjectClass, AttributeType) >#attributes = schema.attribute_types(schema.listall(ObjectClass), ignore_dit_content_rule=True, raise_keyerror=False) >ocs = [schema.get_obj(ObjectClass, x) for x in schema.listall(ObjectClass)] >for module in univention.admin.modules.modules.values(): > if not hasattr(module, 'mapping'): > continue > for prop in module.mapping._map.keys(): > try: > desc = module.property_descriptions[prop] > except KeyError: > print 'Missing property description', module.module, prop > continue > attr = module.mapping.mapName(prop) > used_ocs = [oc for oc in ocs if attr in oc.must or attr in oc.may] > required = [oc for oc in ocs if attr in oc.must] > if prop in ('domain', 'description'): > continue > if required and not desc.required and not desc.base_default: > print len(required), 'Missing required flag', module.module, prop, attr, 'object_classes=', ', '.join(x.names[0] for x in used_ocs)#, 'default=', desc.base_default
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 24601
:
8419
| 9074