|
1499 |
|
1502 |
|
1500 |
if object.get('attributes'): |
1503 |
if object.get('attributes'): |
1501 |
oc = object['attributes'].get('objectClass') |
1504 |
oc = object['attributes'].get('objectClass') |
1502 |
dc = object['attributes'].get('dc') |
1505 |
try: |
|
|
1506 |
dc_vals = [value for key, value in object['attributes'].iteritems() if 'dc' == key.lower()][0] |
1507 |
except IndexError: |
1508 |
dc = None |
1509 |
else: |
1510 |
dc = dc_vals[0] |
1511 |
|
1503 |
if oc and 'dnsZone' in oc: |
1512 |
if oc and 'dnsZone' in oc: |
1504 |
# forward or reverse zone |
1513 |
# forward or reverse zone |
1505 |
if dc and dc[0].endswith('in-addr.arpa'): |
1514 |
if dc and dc[0].endswith('in-addr.arpa'): |