'Create a default public IP address <name>01 to associate with a network interface.
If a PIP address matching <vm name>01 exists, return it. Otherwise, create one.
:param resource_group: name of an existing resource group
:param location: a valid azure location
:param name: base name to assign the public IP address
:param allocation_method: one of \'Static\' or \'Dynamic\'
:return: PIP object'

def create_default_pip(self, resource_group, location, name, allocation_method='Dynamic'):

    public_ip_name = (name + '01')
    pip = None
    self.log('Starting    create_default_pip    {0}'.format(public_ip_name))
    self.log('Check    to    see    if    public    IP    {0}    exists'.format(public_ip_name))
    try:
        pip = self.network_client.public_ip_addresses.get(resource_group, public_ip_name)
    except CloudError:
        pass
    if pip:
        self.log('Public    ip    {0}    found.'.format(public_ip_name))
        self.check_provisioning_state(pip)
        return pip
    params = PublicIPAddress(location=location, public_ip_allocation_method=allocation_method)
    self.log('Creating    default    public    IP    {0}'.format(public_ip_name))
    try:
        poller = self.network_client.public_ip_addresses.create_or_update(resource_group, public_ip_name, params)
    except Exception as exc:
        self.fail('Error    creating    {0}    -    {1}'.format(public_ip_name, str(exc)))
    return self.get_poller_result(poller)
