Dns bug fixes related to usernet ip.

This commit is contained in:
Sudarshan Acharya 2012-05-30 15:34:44 -05:00
parent 17c05b7656
commit aace21ae5a
2 changed files with 7 additions and 1 deletions

View File

@ -52,10 +52,12 @@ class DnsManager(object):
"""
entry = self.entry_factory.create_entry(instance_id)
LOG.debug("Creating entry address %s." % str(entry))
if entry:
entry.content = content[0]
LOG.debug("Creating entry address %s." % str(entry))
self.driver.create_entry(entry)
else:
LOG.debug("Entry address not found for instance %s" % instance_id)
def delete_instance_entry(self, instance_id, content=None):
"""Removes a DNS entry associated to an instance.

View File

@ -27,6 +27,10 @@ def get_ip_address(addresses):
addresses.get('private') is not None and \
len(addresses['private']) > 0:
return [addr.get('addr') for addr in addresses['private']]
if addresses is not None and\
addresses.get('usernet') is not None and\
len(addresses['usernet']) > 0:
return [addr.get('addr') for addr in addresses['usernet']]
def get_volumes(volumes):