9 lines
No EOL
3.5 KiB
Python
9 lines
No EOL
3.5 KiB
Python
|
|
from ops.data import OpsClass, OpsField, DszObject, DszCommandObject, cmd_definitions
|
|
import dsz
|
|
if ('activedirectory' not in cmd_definitions):
|
|
dszadmode = OpsClass('admode', {'domainname': OpsField('domainname', dsz.TYPE_STRING), 'mixed': OpsField('mixed', dsz.TYPE_BOOL)}, DszObject)
|
|
dszglobalcatalogentry = OpsClass('globalcatalogentry', {'distinguishedname': OpsField('distinguishedname', dsz.TYPE_STRING), 'category': OpsField('category', dsz.TYPE_STRING), 'name': OpsField('name', dsz.TYPE_STRING)}, DszObject, single=False)
|
|
dszaduser = OpsClass('aduser', {'require_unique_password': OpsField('require_unique_password', dsz.TYPE_BOOL), 'require_password': OpsField('require_password', dsz.TYPE_BOOL), 'account_disabled': OpsField('account_disabled', dsz.TYPE_BOOL), 'account_locked': OpsField('account_locked', dsz.TYPE_BOOL), 'bad_login_count': OpsField('bad_login_count', dsz.TYPE_INT), 'password_min_length': OpsField('password_min_length', dsz.TYPE_INT), 'max_storage': OpsField('max_storage', dsz.TYPE_INT), 'pager': OpsField('pager', dsz.TYPE_STRING), 'manager': OpsField('manager', dsz.TYPE_STRING), 'fax': OpsField('fax', dsz.TYPE_STRING), 'department': OpsField('department', dsz.TYPE_STRING), 'office_locations': OpsField('office_locations', dsz.TYPE_STRING), 'login_script': OpsField('login_script', dsz.TYPE_STRING), 'first_name': OpsField('first_name', dsz.TYPE_STRING), 'display_name': OpsField('display_name', dsz.TYPE_STRING), 'mobile_phone': OpsField('mobile_phone', dsz.TYPE_STRING), 'description': OpsField('description', dsz.TYPE_STRING), 'last_name': OpsField('last_name', dsz.TYPE_STRING), 'home_phone': OpsField('home_phone', dsz.TYPE_STRING), 'home_directory': OpsField('home_directory', dsz.TYPE_STRING), 'home_page': OpsField('home_page', dsz.TYPE_STRING), 'email_address': OpsField('email_address', dsz.TYPE_STRING), 'office_phone': OpsField('office_phone', dsz.TYPE_STRING), 'accountexpiration': OpsClass('accountexpiration', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'time': OpsField('time', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'date': OpsField('date', dsz.TYPE_STRING)}, DszObject), 'expirationdate': OpsClass('expirationdate', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'time': OpsField('time', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'date': OpsField('date', dsz.TYPE_STRING)}, DszObject), 'lastchanged': OpsClass('lastchanged', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'time': OpsField('time', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'date': OpsField('date', dsz.TYPE_STRING)}, DszObject), 'lastlogin': OpsClass('lastlogin', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'time': OpsField('time', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'date': OpsField('date', dsz.TYPE_STRING)}, DszObject), 'lastfailedlogin': OpsClass('lastfailedlogin', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'time': OpsField('time', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'date': OpsField('date', dsz.TYPE_STRING)}, DszObject), 'lastlogoff': OpsClass('lastlogoff', {'typevalue': OpsField('typevalue', dsz.TYPE_INT), 'time': OpsField('time', dsz.TYPE_STRING), 'type': OpsField('type', dsz.TYPE_STRING), 'date': OpsField('date', dsz.TYPE_STRING)}, DszObject)}, DszObject, single=False)
|
|
activedirectorycommand = OpsClass('activedirectory', {'admode': dszadmode, 'globalcatalogentry': dszglobalcatalogentry, 'aduser': dszaduser}, DszCommandObject)
|
|
cmd_definitions['activedirectory'] = activedirectorycommand |