~gnuoy/charms/trusty/nova-compute/ice-meta

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/network/ip.py

  • Committer: james.page at ubuntu
  • Date: 2015-09-02 15:03:16 UTC
  • mfrom: (153.1.1 nova-compute)
  • Revision ID: james.page@ubuntu.com-20150902150316-2ymvirc4vej899sh
[bbaqar,r=james-page] Add support for PLUMgrid SDN.

Show diffs side-by-side

added added

removed removed

Lines of Context:
435
435
 
436
436
        rev = dns.reversename.from_address(address)
437
437
        result = ns_query(rev)
 
438
 
438
439
        if not result:
439
 
            return None
 
440
            try:
 
441
                result = socket.gethostbyaddr(address)[0]
 
442
            except:
 
443
                return None
440
444
    else:
441
445
        result = address
442
446