[
https://issues.apache.org/jira/browse/LIBCLOUD-982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430238#comment-16430238
]
ASF GitHub Bot commented on LIBCLOUD-982:
-----------------------------------------
GitHub user sjain-rvbd opened a pull request:
https://github.com/apache/libcloud/pull/1199
[LIBCLOUD-982] Data stored in wrong format for Packet providers
https://issues.apache.org/jira/browse/LIBCLOUD-982
A typo in the PacketNodeDriver._to_size() method.
It's looking for data['pricing']['hourly'], when it's actually stored as
data['pricing']['hour'].
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sjain-rvbd/libcloud
LIBCLOUD-982_Packet_Driver_to_size
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/1199.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1199
----
commit f6c19f28dcfd209cb36068277e554e4cb134b91a
Author: Saurabh Jain <saurabh.jain@...>
Date: 2018-04-09T07:51:29Z
[LIBCLOUD-982] Data stored in data['pricing']['hour'] format for Packet.net
based providers.
----
> Packet _to_size() KeyError data['pricing']['hourly']
> ----------------------------------------------------
>
> Key: LIBCLOUD-982
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-982
> Project: Libcloud
> Issue Type: Bug
> Reporter: Nick Allen
> Priority: Major
>
> Looks like a typo in the PacketNodeDriver._to_size() method.
> It's looking for data['pricing']['hourly'], when it's actually stored as
> data['pricing']['hour'].
> {code:java}
> File
> "/Users/nick/.pyenv/versions/2.7.10/envs/bundles-2.7.10/lib/python2.7/site-packages/libcloud/compute/drivers/packet.py",
> line 96, in list_nodes return list(map(self._to_node, data)) File
> "/Users/nick/.pyenv/versions/2.7.10/envs/bundles-2.7.10/lib/python2.7/site-packages/libcloud/compute/drivers/packet.py",
> line 198, in _to_node size = self._to_size(data['plan']) File
> "/Users/nick/.pyenv/versions/2.7.10/envs/bundles-2.7.10/lib/python2.7/site-packages/libcloud/compute/drivers/packet.py",
> line 233, in _to_size price = data['pricing']['hourly'] KeyError: 'hourly'
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)