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

Add size slug to the NodeSizes returned by DigitalOceanDriver.list_sizes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Compute

    Description

      The DigitalOcean v1 (and v2) API returns a "slug" for each size.

      This is a short, human readable, code for each size which is stable and suitable for use in eg configuration files.

      It'd be useful if ``list_sizes`` made this information available.

      {u'sizes': [{u'cost_per_hour': 0.00744,
         u'cost_per_month': u'5.0',
         u'cpu': 1,
         u'disk': 20,
         u'id': 66,
         u'memory': 512,
         u'name': u'512MB',
         u'slug': u'512mb'},
      ...
        {u'cost_per_hour': 0.95238,
         u'cost_per_month': u'640.0',
         u'cpu': 20,
         u'disk': 640,
         u'id': 69,
         u'memory': 65536,
         u'name': u'64GB',
         u'slug': u'64gb'}],
       u'status': u'OK'}
      
      

      See https://github.com/ClusterHQ/flocker/commit/b1d2bcfa7bb42c663baef75efa14e9a56ab92352 for an example of how this might be used.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rwall Richard Wall
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: