'Creates a public IP
:param type: Type of IP IPV4 or IPV6]
:rtype: ``str``
:param reverse_dns: Reverse DNS
:rtype: ``str``
:param datacenter_id: Datacenter ID where IP address will be crated
:rtype: ``str``
:return: Instance of Public IP
:rtype: ``dict``'

def ex_create_public_ip(self, type, reverse_dns=None, datacenter_id=None):

    body = {'type': type}
    if (reverse_dns is not None):
        body['reverse_dns'] = reverse_dns
    if (datacenter_id is not None):
        body['datacenter_id'] = datacenter_id
    response = self.connection.request(action='public_ips', data=body, method='POST')
    return response.object
