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

CloudSigma provider ex_list_subscriptions() fails if your subscription includes free tier resources

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.4.0
    • None
    • Compute
    • CentOS 6.10

      python 3.5.2

       

    Description

      When using driver.ex_list_subscriptions(status='all', resources=None) to list your resources, you'll receive the error:

        File "/sw/libcloud/2.4.0/lib/python3.5/site-packages/libcloud/utils/iso8601.py", line 117, in parse_date
          m = ISO8601_REGEX.match(datestring)
      TypeError: expected string or bytes-like object

      CloudSigma gave some free resources to their customers a few years ago.

      <CloudSigmaSubscription id=free_mem, resource=mem, amount=1073741824, period=None, object_uuid=None>
      <CloudSigmaSubscription id=free_dssd, resource=dssd, amount=53687091200, period=None, object_uuid=None>

      I suspect these are the problem resources with no end time.

      I've added to iso8601.py on lines 117 and 118:

          if datestring is None:
              datestring = "9999-01-01T12:00:00+00:00"

      Not sure if this is an appropriate fix but seems to fix it.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            akik Aki Ketolainen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: