Revisión 207
Añadido por Manu Mora Gordillo hace más de 13 años
controlies/trunk/applications/controlies/modules/Hosts.py | ||
---|---|---|
|
||
self.ldap.add("cn="+self.name +",cn="+self.group+",cn=THINCLIENTS,cn=DHCP Config", attr)
|
||
else:
|
||
"""attr = [
|
||
# Hosts
|
||
attr = [
|
||
('objectclass', ['top','organizationalRole','domainRelatedObject','ipHost','ieee802Device']),
|
||
('associatedDomain', ['santaeulalia']),
|
||
('cn', [self.name]),
|
||
... | ... | |
]
|
||
self.ldap.add("cn="+self.name+",ou=Hosts", attr)
|
||
|
||
# Hosts->domain
|
||
attr = [
|
||
('objectclass', ['dNSDomain2','domainRelatedObject']),
|
||
('associatedDomain', [self.name+'.santaeulalia']),
|
||
... | ... | |
]
|
||
self.ldap.add("dc="+self.name+",dc=santaeulalia,ou=Hosts", attr)
|
||
|
||
# DHCP Config
|
||
attr = [
|
||
('objectclass', ['top','dhcpHost']),
|
||
('dhcpStatements', ['fixed-address '+self.name]),
|
||
('cn', [self.name]),
|
||
('dhcpHWAddress', ['ethernet '+self.mac])
|
||
]
|
||
self.ldap.add("cn="+self.name+",cn=group1,cn=INTERNAL,cn=DHCP Config", attr)"""
|
||
self.ldap.add("cn="+self.name+",cn=group1,cn=INTERNAL,cn=DHCP Config", attr)
|
||
|
||
# Netgroup
|
||
triplets = self.ldap.search("ou=Netgroup","cn=ltsp-server-hosts",["nisNetgroupTriple"])
|
||
triplets = triplets [0][0][1]["nisNetgroupTriple"]
|
||
triplets.append('('+self.name+',-,-)')
|
||
triplets.sort()
|
||
|
||
attr = [
|
||
(ldap.MOD_ADD, 'nisNetgroupTriple', ['('+self.name+',-,-)'] )
|
||
(ldap.MOD_REPLACE, 'nisNetgroupTriple', triplets )
|
||
]
|
||
self.ldap.modify("cn=ltsp-server-hosts,ou=Netgroup", attr)
|
||
|
Exportar a: Unified diff
Ya inserta LTSP