Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-87

Figure out how to easily update and distribute pricing data

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Compute, Core
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kami Tomaz Muraus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: