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

Support RegisterIso call in CloudStack compute driver

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: 0.10.1
    • Component/s: Compute
    • Labels:

      Description

      Patch adds support for RegisterIso call to pass a downloadable URL to CloudStack.

      Known concerns:

      • Inner 'exhaust_redirects' method may merit inclusion as utility method elsewhere.
      • Defaulting to bootable=False may not accurately represent typical use case.

        Activity

        Hide
        kami Tomaz Muraus added a comment -

        Everything besides the "exhaust_redirects" part looks fine.

        I think this should be removed from the patch and just require user to pass in a URL which doesn't return a redirect. Supporting following redirects adds additional complexity and in Libcloud we prefer to do a single HTTP request in a single method call (if that's is possible), because it makes handling exceptions and retrying easier.

        Show
        kami Tomaz Muraus added a comment - Everything besides the "exhaust_redirects" part looks fine. I think this should be removed from the patch and just require user to pass in a URL which doesn't return a redirect. Supporting following redirects adds additional complexity and in Libcloud we prefer to do a single HTTP request in a single method call (if that's is possible), because it makes handling exceptions and retrying easier.
        Hide
        daemianmack Daemian Mack added a comment - - edited

        Makes sense to leave that out of the libcloud driver.

        In a perfect world, CloudStack would handle this itself – I think that's in line with the general expectation of URL-handling.

        Since CloudStack leaves this wrinkle as a surprise to the developer, might we want to document this responsibility on the part of the developer? I'm just not sure where the best place for that might be.

        Show
        daemianmack Daemian Mack added a comment - - edited Makes sense to leave that out of the libcloud driver. In a perfect world, CloudStack would handle this itself – I think that's in line with the general expectation of URL-handling. Since CloudStack leaves this wrinkle as a surprise to the developer, might we want to document this responsibility on the part of the developer? I'm just not sure where the best place for that might be.
        Hide
        kami Tomaz Muraus added a comment - - edited

        Thanks for your patch. I've committed it to trunk with some changes:

        • Remove exhaust_redirects functionality - it should be a responsibility of a developer to pass in a correct URL
        • Use LibcloudError instead od CloudStackException
        • Remove unecessary except KeyError - dict.get doesn't throw a KeyError
        • Remove trailing white-space
        Show
        kami Tomaz Muraus added a comment - - edited Thanks for your patch. I've committed it to trunk with some changes: Remove exhaust_redirects functionality - it should be a responsibility of a developer to pass in a correct URL Use LibcloudError instead od CloudStackException Remove unecessary except KeyError - dict.get doesn't throw a KeyError Remove trailing white-space

          People

          • Assignee:
            kami Tomaz Muraus
            Reporter:
            daemianmack Daemian Mack
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development