'Create a floating IP and associates to a server on Nova'

def create_floating_ip(self, thing, pool_name=None):

    if (not pool_name):
        pool_name = CONF.network.floating_network_name
    floating_ip = self.compute_floating_ips_client.create_floating_ip(pool=pool_name)['floating_ip']
    self.addCleanup(test_utils.call_and_ignore_notfound_exc, self.compute_floating_ips_client.delete_floating_ip, floating_ip['id'])
    self.compute_floating_ips_client.associate_floating_ip_to_server(floating_ip['ip'], thing['id'])
    return floating_ip
