'Releases an Elastic IP address using the IP (EC2-Classic) or
using the allocation ID (VPC).
:param      elastic_ip: Elastic IP instance
:type       elastic_ip: :class:`ElasticIP`
:param      domain: The domain where the IP resides (vpc only)
:type       domain: ``str``
:return:    True on success, False otherwise.
:rtype:     ``bool``'

def ex_release_address(self, elastic_ip, domain=None):

    params = {'Action': 'ReleaseAddress'}
    if ((domain is not None) and (domain != 'vpc')):
        raise AttributeError('Domain    can    only    be    set    to    vpc')
    if (domain is None):
        params['PublicIp'] = elastic_ip.ip
    else:
        params['AllocationId'] = elastic_ip.extra['allocation_id']
    response = self.connection.request(self.path, params=params).object
    return self._get_boolean(response)
