Fixes LP Bug#899383 - Cleanup config file search
Cleans up a bunch of configuration-related errors
when trying to run tempest out of the box with a
simple call to:
$> nosetests storm
* Raises a sensible error if the config file cannot be found
* Makes it possible to set the config file directory and
config file name via environment variables
* Removes unnecessary calls to create storm.config.StormConfig()
and share a configuration object by passing the openstack.Manager's
config object with the various rest client objects
* Updates the README to show how to make a config file and run
the tests in tempest
Change-Id: I60e33595b88df596cc9585bcaf18d37ae77d6f2b
diff --git a/storm/services/nova/json/images_client.py b/storm/services/nova/json/images_client.py
index e8a1326..59e9269 100644
--- a/storm/services/nova/json/images_client.py
+++ b/storm/services/nova/json/images_client.py
@@ -6,10 +6,10 @@
class ImagesClient(object):
- def __init__(self, username, key, auth_url, tenant_name=None):
- self.client = rest_client.RestClient(username, key,
+ def __init__(self, config, username, key, auth_url, tenant_name=None):
+ self.config = config
+ self.client = rest_client.RestClient(config, username, key,
auth_url, tenant_name)
- self.config = storm.config.StormConfig()
self.build_interval = self.config.nova.build_interval
self.build_timeout = self.config.nova.build_timeout
self.headers = {'Content-Type': 'application/json',