Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-926

[BUG Azure_ARM] in ex_create_public_ip function among other

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compute

      Description

      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:

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

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

      I propose:

              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.")
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              crissty Cristina Guerra
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified