Lines 1420-1426
def __modify_dhcp_object( self, position, name, ip, mac ):
|
Link Here
|
---|
|
1420 |
results = self.lo.searchDn( base = position, scope = 'domain', filter = '(&(objectClass=univentionDhcpHost)(|(cn=%s)(cn=%s_uv*)))' % ( name, name ), unique = 0 ) |
1420 |
results = self.lo.searchDn( base = position, scope = 'domain', filter = '(&(objectClass=univentionDhcpHost)(|(cn=%s)(cn=%s_uv*)))' % ( name, name ), unique = 0 ) |
1421 |
if not results: |
1421 |
if not results: |
1422 |
self.lo.add( 'cn = %s,%s'% ( name, position ), [ |
1422 |
self.lo.add( 'cn = %s,%s'% ( name, position ), [ |
1423 |
( 'objectClass', [ 'top', 'univentionDhcpHost' ] ),\ |
1423 |
( 'objectClass', [ 'top', 'univentionObject', 'univentionDhcpHost' ] ),\ |
|
|
1424 |
( 'univentionObjectType', [ 'dhcp/host' ]),\ |
1424 |
( 'cn', name ),\ |
1425 |
( 'cn', name ),\ |
1425 |
( 'univentionDhcpFixedAddress', [ ip ] ),\ |
1426 |
( 'univentionDhcpFixedAddress', [ ip ] ),\ |
1426 |
( 'dhcpHWAddress', [ ethernet ] ) ] ) |
1427 |
( 'dhcpHWAddress', [ ethernet ] ) ] ) |
Lines 1439-1445
def __modify_dhcp_object( self, position, name, ip, mac ):
|
Link Here
|
---|
|
1439 |
n = 1 |
1440 |
n = 1 |
1440 |
|
1441 |
|
1441 |
self.lo.add( 'cn = %s_uv%d,%s'% ( name, n, position ), [ |
1442 |
self.lo.add( 'cn = %s_uv%d,%s'% ( name, n, position ), [ |
1442 |
( 'objectClass', [ 'top', 'univentionDhcpHost' ] ),\ |
1443 |
( 'objectClass', [ 'top', 'univentionObject', 'univentionDhcpHost' ] ),\ |
|
|
1444 |
( 'univentionObjectType', [ 'dhcp/host' ]),\ |
1443 |
( 'cn', '%s_uv%d' % ( name,n ) ),\ |
1445 |
( 'cn', '%s_uv%d' % ( name,n ) ),\ |
1444 |
( 'univentionDhcpFixedAddress', [ ip ] ),\ |
1446 |
( 'univentionDhcpFixedAddress', [ ip ] ),\ |
1445 |
( 'dhcpHWAddress', [ ethernet ] ) ] ) |
1447 |
( 'dhcpHWAddress', [ ethernet ] ) ] ) |
Lines 1897-1903
def __add_dns_alias_object( self, name, dnsForwardZone, dnsAliasZoneContainer, a
|
Link Here
|
---|
|
1897 |
results = self.lo.search( base = dnsAliasZoneContainer, scope = 'domain', attr = [ 'cNAMERecord' ], filter = 'relativeDomainName=%s' % ( alias ), unique = 0 ) |
1899 |
results = self.lo.search( base = dnsAliasZoneContainer, scope = 'domain', attr = [ 'cNAMERecord' ], filter = 'relativeDomainName=%s' % ( alias ), unique = 0 ) |
1898 |
if not results: |
1900 |
if not results: |
1899 |
self.lo.add( 'relativeDomainName=%s,%s'% ( alias, dnsAliasZoneContainer ), [\ |
1901 |
self.lo.add( 'relativeDomainName=%s,%s'% ( alias, dnsAliasZoneContainer ), [\ |
1900 |
( 'objectClass', [ 'top', 'dNSZone' ]),\ |
1902 |
( 'objectClass', [ 'top', 'dNSZone', 'univentionObject' ]),\ |
|
|
1903 |
( 'univentionObjectType', [ 'dns/alias' ] ),\ |
1901 |
( 'zoneName', univention.admin.uldap.explodeDn( dnsAliasZoneContainer, 1 )[ 0 ]),\ |
1904 |
( 'zoneName', univention.admin.uldap.explodeDn( dnsAliasZoneContainer, 1 )[ 0 ]),\ |
1902 |
( 'cNAMERecord', [ "%s.%s." % (name, dnsForwardZone) ]),\ |
1905 |
( 'cNAMERecord', [ "%s.%s." % (name, dnsForwardZone) ]),\ |
1903 |
( 'relativeDomainName', [ alias ])]) |
1906 |
( 'relativeDomainName', [ alias ])]) |