You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/03/16 01:20:32 UTC
svn commit: r1082010 - in /incubator/libcloud/trunk/libcloud:
compute/drivers/vpsnet.py data/pricing.json
Author: tomaz
Date: Wed Mar 16 00:20:31 2011
New Revision: 1082010
URL: http://svn.apache.org/viewvc?rev=1082010&view=rev
Log:
Update the vps.net driver to be consistent with other drivers (now a returned
price is per day instead of per month).
Modified:
incubator/libcloud/trunk/libcloud/compute/drivers/vpsnet.py
incubator/libcloud/trunk/libcloud/data/pricing.json
Modified: incubator/libcloud/trunk/libcloud/compute/drivers/vpsnet.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/compute/drivers/vpsnet.py?rev=1082010&r1=1082009&r2=1082010&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/compute/drivers/vpsnet.py (original)
+++ incubator/libcloud/trunk/libcloud/compute/drivers/vpsnet.py Wed Mar 16 00:20:31 2011
@@ -118,16 +118,8 @@ class VPSNetNodeDriver(NodeDriver):
return size
def _get_price_per_node(self, num):
- PRICE_PER_NODE = get_pricing(driver_type='compute',
- driver_name=self.api_name)
- keys = sorted(PRICE_PER_NODE.keys())
-
- if num >= max(keys):
- return PRICE_PER_NODE[keys[-1]]
-
- for i in range(0,len(keys)):
- if int(keys[i]) <= num < int(keys[i+1]):
- return PRICE_PER_NODE[keys[i]]
+ single_node_price = self._get_size_price(size_id='1')
+ return num * single_node_price
def create_node(self, name, image, size, **kwargs):
"""Create a new VPS.net node
Modified: incubator/libcloud/trunk/libcloud/data/pricing.json
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/data/pricing.json?rev=1082010&r1=1082009&r2=1082010&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/data/pricing.json (original)
+++ incubator/libcloud/trunk/libcloud/data/pricing.json Wed Mar 16 00:20:31 2011
@@ -109,16 +109,6 @@
},
"vps_net": {
- "1": 20,
- "2": 19,
- "3": 18,
- "4": 17,
- "5": 16,
- "6": 15,
- "7": 14,
- "15": 13,
- "30": 12,
- "60": 11,
- "100": 10
+ "1": 0.416
}
}