summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bogott <abogott@wikimedia.org>2012-01-24 17:53:01 +0000
committerAndrew Bogott <abogott@wikimedia.org>2012-01-24 18:15:46 +0000
commitadf82fc42e3b04d9a9cf9624b2a53983b569ef19 (patch)
tree7d6950260fba2dec584b73ba017bcc08cecd5d2c
parent3ad3292efd7fcba7b58bc9c8b1cb84e8b00a10fa (diff)
Make a bunch of dcs into single-entry lists.
I was seeing dcs where ['e','v','e','r','y'] character was a list item, so clearly ldap is going to interpret this field as a list whether it is one or not. For blueprint public-and-private-dns. Change-Id: I9f383b322e85d99783f9ce93bdfc4e0d3d94e2ed
-rw-r--r--nova/network/ldapdns.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/network/ldapdns.py b/nova/network/ldapdns.py
index 59405e47b..c46c09cb1 100644
--- a/nova/network/ldapdns.py
+++ b/nova/network/ldapdns.py
@@ -157,7 +157,7 @@ class DomainEntry(DNSEntry):
'domain', 'dcobject', 'top'],
'sOARecord': [cls._soa()],
'associatedDomain': [domain],
- 'dc': domain}
+ 'dc': [domain]}
lobj.add_s(newdn, create_modlist(attrs))
return DomainEntry(lobj, domain)
@@ -224,7 +224,7 @@ class DomainEntry(DNSEntry):
'domain', 'dcobject', 'top'],
'aRecord': [address],
'associatedDomain': [self._qualify(name)],
- 'dc': name}
+ 'dc': [name]}
self.lobj.add_s(newdn, create_modlist(attrs))
return self.subentry_with_name(name)
self.update_soa()
@@ -257,7 +257,7 @@ class HostEntry(DNSEntry):
# We just removed the rdn, so we need to move this entry.
names.remove(self._qualify(name))
newrdn = "dc=%s" % self._dequalify(names[0])
- self.lobj.modrdn_s(self.dn, newrdn)
+ self.lobj.modrdn_s(self.dn, [newrdn])
else:
# We should delete the entire record.
self.lobj.delete_s(self.dn)
@@ -360,5 +360,5 @@ class FakeLdapDNS(LdapDNS):
attrs = {'objectClass': ['domainrelatedobject', 'dnsdomain',
'domain', 'dcobject', 'top'],
'associateddomain': ['root'],
- 'dc': 'root'}
+ 'dc': ['root']}
self.lobj.add_s(flags.FLAGS.ldap_dns_base_dn, create_modlist(attrs))