'Allocate a floating IP for the current tenant.'

def handle_create(self):

    ips = None
    ext_net = internet_gateway.InternetGateway.get_external_network_id(self.neutron())
    props = {'floating_network_id': ext_net}
    ips = self.neutron().create_floatingip({'floatingip': props})['floatingip']
    self.ipaddress = ips['floating_ip_address']
    self.resource_id_set(ips['id'])
    LOG.info('ElasticIp    create    %s', str(ips))
    instance_id = self.properties[self.INSTANCE_ID]
    if instance_id:
        server = self.client().servers.get(instance_id)
        server.add_floating_ip(self._ipaddress())
