You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Nick Allen (JIRA)" <ji...@apache.org> on 2018/02/05 23:48:00 UTC
[jira] [Created] (LIBCLOUD-982) Packet _to_size() KeyError
data['pricing']['hourly']
Nick Allen created LIBCLOUD-982:
-----------------------------------
Summary: 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
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)