You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/05/21 01:52:09 UTC
svn commit: r946829 - in /incubator/libcloud/trunk:
libcloud/drivers/rimuhosting.py test/fixtures/rimuhosting/r_orders.json
test/fixtures/rimuhosting/r_orders_new_vps.json
Author: pquerna
Date: Thu May 20 23:52:09 2010
New Revision: 946829
URL: http://svn.apache.org/viewvc?rev=946829&view=rev
Log:
Fix fetching of billing cost in RimuHosting.
Submitted by: Brad Morgan <morgabra cloudkick.com>
Modified:
incubator/libcloud/trunk/libcloud/drivers/rimuhosting.py
incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders.json
incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders_new_vps.json
Modified: incubator/libcloud/trunk/libcloud/drivers/rimuhosting.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/rimuhosting.py?rev=946829&r1=946828&r2=946829&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/rimuhosting.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/rimuhosting.py Thu May 20 23:52:09 2010
@@ -142,7 +142,7 @@ class RimuHostingNodeDriver(NodeDriver):
private_ip=[],
driver=self.connection.driver,
extra={'order_oid': order['order_oid'],
- 'monthly_recurring_fee': order['billing_info']['monthly_recurring_fee']})
+ 'monthly_recurring_fee': order.get('billing_info').get('monthly_recurring_fee')})
return n
def _to_size(self,plan):
Modified: incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders.json
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders.json?rev=946829&r1=946828&r2=946829&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders.json (original)
+++ incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders.json Thu May 20 23:52:09 2010
@@ -18,7 +18,7 @@
, "server_type" : "VPS"
, "data_transfer_allowance" : { "data_transfer_gb" : 30
, "data_transfer" : "30"}
- , "billing_info" : { }
+ , "billing_info" : { "monthly_recurring_fee": 19.99 }
, "allocated_ips" : { "primary_ip" : "1.2.3.4"
, "secondary_ips" : ["1.2.3.5","1.2.3.6"]}
, "running_state" : "RUNNING"
Modified: incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders_new_vps.json
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders_new_vps.json?rev=946829&r1=946828&r2=946829&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders_new_vps.json (original)
+++ incubator/libcloud/trunk/test/fixtures/rimuhosting/r_orders_new_vps.json Thu May 20 23:52:09 2010
@@ -22,7 +22,7 @@
, "server_type" : "VPS"
, "data_transfer_allowance" :
{ "data_transfer_gb" : 30 , "data_transfer" : "30"}
- , "billing_info" : { }
+ , "billing_info" : { "monthly_recurring_fee" : 19.99 }
, "allocated_ips" :
{ "primary_ip" : "74.50.57.80", "secondary_ips" : []}
, "running_state" : "RUNNING"}