libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-982) Packet _to_size() KeyError data['pricing']['hourly']
Date Mon, 09 Apr 2018 08:11:00 GMT


ASF GitHub Bot commented on LIBCLOUD-982:

GitHub user sjain-rvbd opened a pull request:

    [LIBCLOUD-982] Data stored in wrong format for Packet providers
    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 LIBCLOUD-982_Packet_Driver_to_size

Alternatively you can review and apply these changes as the patch at:

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 based providers.


> Packet _to_size() KeyError data['pricing']['hourly']
> ----------------------------------------------------
>                 Key: LIBCLOUD-982
>                 URL:
>             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/",
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/",
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/",
line 233, in _to_size price = data['pricing']['hourly'] KeyError: 'hourly'
> {code}

This message was sent by Atlassian JIRA

View raw message