[services] ipHostNumber est optionnel
This commit is contained in:
parent
ac19266cbf
commit
4a85f0e4e8
1 changed files with 2 additions and 2 deletions
|
@ -26,10 +26,10 @@ services_to_attrs['mail_modif'] = []
|
|||
|
||||
# génération des arguments du service à redémarrer (par defaut [])
|
||||
services_to_args={}
|
||||
services_to_args['macip']=lambda x: issubclass(type(x.parent), lc_ldap.machine) and ([str(x)] if isinstance(x, attributs.ipHostNumber) else [ str(ip) for ip in x.parent['ipHostNumber'] ]) or [ str(ip) for m in x.parent.machines() for ip in m['ipHostNumber']]
|
||||
services_to_args['macip']=lambda x: issubclass(type(x.parent), lc_ldap.machine) and ([str(x)] if isinstance(x, attributs.ipHostNumber) else [ str(ip) for ip in x.parent.get('ipHostNumber',[]) ]) or ([ str(ip) for m in x.parent.machines() for ip in m.get('ipHostNumber',[])] if issubclass(type(x.parent), lc_ldap.proprio) else [])
|
||||
## Inutile pour blackliste pour le moment
|
||||
#services_to_args['blacklist']=lambda x: issubclass(type(x.parent), lc_ldap.machine) and [ str(ip) for m in x.parent.proprio().machines() for ip in m['ipHostNumber'] ] or [ str(ip) for m in x.parent.machines() for ip in m['ipHostNumber'] ]
|
||||
services_to_args['port']=lambda x: [str(x)] if isinstance(x, attributs.ipHostNumber) or isinstance(x, attributs.ip6HostNumber) else [ str(ip) for ip in x.parent['ipHostNumber'] ]
|
||||
services_to_args['port']=lambda x: [str(x)] if isinstance(x, attributs.ipHostNumber) or isinstance(x, attributs.ip6HostNumber) else [ str(ip) for ip in x.parent.get('ipHostNumber',[]) ]
|
||||
services_to_args['home']=lambda x: u'cransAccount' in [ str(o) for o in x.parent['objectClass']] and [ "%s,%s,%s" % (x.parent['homeDirectory'][0],x.parent['uidNumber'][0],x.parent['uid'][0]) ] or [ "%s,%s,%s,%s" % (x.parent['homeDirectory'][0],x.parent['uidNumber'][0],x.parent['uid'][0],x.parent['mail'][0]) ]
|
||||
services_to_args['mail_ajout_droits'] = lambda x: "%s:%s" % (x.parent['uid'][0], x)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue