You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2011/05/25 23:31:47 UTC

[dev] [jira] [Created] (LIBCLOUD-87) Figure out how to easily update and distribute pricing data

Figure out  how to easily update and distribute pricing data
------------------------------------------------------------

                 Key: LIBCLOUD-87
                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-87
             Project: Libcloud
          Issue Type: New Feature
          Components: Compute, Core
            Reporter: Tomaz Muraus


Now that all the compute pricing data is contained in a single JSON file (data/pricing.json), updating it will in 95% cases only mean updating this file. This is a lot easier and requires a lot less work then changing variables in each driver file separately.

We should figure out the best way to distribute this JSON file and implement some kind of auto-update functionality in the library.

There are some problems which we need to think about:

- where to host this file? It should probably be hosted on a SSL enabled apache.org server
- where should the file be saved locally? We should probably default to some temporary folder, but user should be able to specify a custom one
- how often to check for updates? We should default to some sane period, like every 12-86 hours users but, user should also be able to override this setting
- should "auto-update" functionality be enabled by default?

The whole API for this functionality could look something like this:

import libcloud.pricing

libcloud.pricing.AUTO_UPDATE = True
libcloud.pricing.DATA_PATH = "/home/my/some/path/"
libcloud.pricing.UPDATE_INTERVAL = 86 * 60 * 60

bool pricing.check_for_update() // <- this would manually force the library to check if there is new pricing data available
bool pricing.force_update() // check if there is new pricing data available and if it is, download it

We should also use some sane default values which would mean user would only need to enable it if it would be disabled by default.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira