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

KeyError on conn.list_images in CloudStack compute

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: Compute
    • Labels:

      Description

      When conn.list_images() is called on a CloudStack connection, a KeyError is thrown when parsing the response due to a lack of any template information in the response.

      For example:

      >>> conn = Driver(key=CS_API_KEY, secret=CS_SECRET_KEY, ...)
      >>> conn.list_images()
      Traceback (most recent call last):
      File "cloudstack.py", line 24, in <module>
      images = conn.list_images()
      File "/usr/local/lib/python2.6/dist-packages/libcloud/compute/drivers/cloudstack.py", line 127, in list_images
      for img in imgs['template']:
      KeyError: 'template'

        Activity

        Hide
        gabriel.reid Gabriel Reid added a comment -

        Patch (with unit tests) which fixes the KeyError issue

        Show
        gabriel.reid Gabriel Reid added a comment - Patch (with unit tests) which fixes the KeyError issue
        Hide
        kami Tomaz Muraus added a comment -

        Patch merged into trunk, thanks.

        Show
        kami Tomaz Muraus added a comment - Patch merged into trunk, thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            gabriel.reid Gabriel Reid
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development