[
https://issues.apache.org/jira/browse/LIBCLOUD-653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387708#comment-14387708
]
Andrew Starr-Bochicchio commented on LIBCLOUD-653:
--------------------------------------------------
APIv2 support was recently added in https://github.com/apache/libcloud/pull/443
With APIv2, there is no more {{id}}. The slug is now used as the main
identifier.
https://developers.digitalocean.com/documentation/v2/#regions
So this it now used as the {{NodeLocation.id}}
{code}
>>> region = driver.list_locations()
>>> region[0].id
'nyc1'
{code}
> Add location slug to the NodeLocations returned by
> DigitalOceanDriver.list_locations
> ------------------------------------------------------------------------------------
>
> Key: LIBCLOUD-653
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-653
> Project: Libcloud
> Issue Type: Improvement
> Components: Compute
> Reporter: Richard Wall
> Labels: digitalocean
>
> The DigitalOcean v1 (and v2) API returns a "slug" for each location.
> This is a short, human readable, code for each location which is stable and
> suitable for use in eg configuration files.
> It'd be useful if ``list_locations`` made this information available.
> {code}
> {u'regions': [{u'id': 3, u'name': u'San Francisco 1', u'slug': u'sfo1'},
> {u'id': 4, u'name': u'New York 2', u'slug': u'nyc2'},
> {u'id': 5, u'name': u'Amsterdam 2', u'slug': u'ams2'},
> {u'id': 6, u'name': u'Singapore 1', u'slug': u'sgp1'},
> {u'id': 7, u'name': u'London 1', u'slug': u'lon1'},
> {u'id': 8, u'name': u'New York 3', u'slug': u'nyc3'},
> {u'id': 9, u'name': u'Amsterdam 3', u'slug': u'ams3'}],
> u'status': u'OK'}
> {code}
> See
> https://github.com/ClusterHQ/flocker/commit/1d25c290e770451026cd7b72a2c1838f18e2ecf0
> for an example of how this might be used.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)