incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <>
Subject Re: Reorganize mock driver
Date Tue, 23 Aug 2011 12:22:42 GMT

On Aug 23, 2011, at 6:53 AM, wrote:

> While trying to fix a bug in the mock driver (newly created blobs didn't
> show up in the details of their buckets), I realized that all the file
> munging in the drive made it very hard to see what the driver was actually
> doing, and what was mundane detail about storing hashes in YAML files.
> These patches split the mock driver into a client and a driver, which makes
> it much clearer what the driver is doing. It also removes a few bugs and
> oddities, e.g. that the name of an image was set to its description upon
> load(!) These oddities have been removed, to have a closer correspondence
> between the contents of the YAML files, and the model objects returned from
> the driver.
> Another change is that the YAML files all store the id of the object as an
> explicit hash entry, even though the id also has to be the file name of the
> YAML file. It didn't seem worth the effort to avoid this denormalization -
> just don't move files in the mock driver's storage root around by hand.
> Since this also changed some of the data that is stored on disk, the stock
> YAML data for the mock driver has changed. To test these patches, you need
> to delete the storage directory for the mock driver, by default
> /var/tmp/deltacloud-mock-${USER}/ The driver will recreate and repopulate
> it at the next server start.

ACK! This patch works well. To run tests you need to 'refresh' fixtures:

$ cd server
$ rake mock:fixtures:reset

 -- Michal

Michal Fojtik,
Deltacloud API:

View raw message