Cristina Guerra created LIBCLOUD-926:
----------------------------------------

             Summary: [BUG Azure_ARM] in ex_create_public_ip function among 
other
                 Key: LIBCLOUD-926
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-926
             Project: Libcloud
          Issue Type: Bug
          Components: Compute
            Reporter: Cristina Guerra


In the file libcloud/compute/drivers/azure_arm.py.

There are some functions as ex_create_public_ip function that it needs a 
location parameter, when this parameter is send, a error happen:  "Location is 
required".
Looking at the code I found with the following:


{code:python}
       if location is None and self.default_location:
            location = self.default_location
        else:
            raise ValueError("location is required.")
{code}

This does not evaluate a possible parameter, only if the value is None.

I propose:

{code:python}
        if location is None and self.default_location:
            location = self.default_location
        elif location is not None:
            location = location
        else:
            raise ValueError("location is required.")
{code}





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to