* Added build_url() utility that returns an endpoint URL based on config parameters
* Updated storm.conf
* Added more properties to Nova config object
* Fixed pep8 and the 'set' typo that came from a vi editor 'set list' fumble
Change-Id: I67a9b7a8708cd64eb26eb9ec15c40b18eb8895de
diff --git a/storm/openstack.py b/storm/openstack.py
index ff68fce..97c5b7d 100644
--- a/storm/openstack.py
+++ b/storm/openstack.py
@@ -1,6 +1,7 @@
from storm.services.nova.json.images_client import ImagesClient
from storm.services.nova.json.flavors_client import FlavorsClient
from storm.services.nova.json.servers_client import ServersClient
+from storm.common.utils import data_utils
import storm.config
@@ -12,27 +13,32 @@
"""
self.config = storm.config.StormConfig()
+ self.auth_url = data_utils.build_url(self.config.nova.host,
+ self.config.nova.port,
+ self.config.nova.apiVer,
+ self.config.nova.path)
+
if self.config.env.authentication == 'keystone_v2':
self.servers_client = ServersClient(self.config.nova.username,
self.config.nova.api_key,
- self.config.nova.auth_url,
+ self.auth_url,
self.config.nova.tenant_name)
self.flavors_client = FlavorsClient(self.config.nova.username,
self.config.nova.api_key,
- self.config.nova.auth_url,
+ self.auth_url,
self.config.nova.tenant_name)
self.images_client = ImagesClient(self.config.nova.username,
self.config.nova.api_key,
- self.config.nova.auth_url,
+ self.auth_url,
self.config.nova.tenant_name)
else:
#Assuming basic/native authentication
self.servers_client = ServersClient(self.config.nova.username,
self.config.nova.api_key,
- self.config.nova.auth_url)
+ self.auth_url)
self.flavors_client = FlavorsClient(self.config.nova.username,
self.config.nova.api_key,
- self.config.nova.auth_url)
+ self.auth_url)
self.images_client = ImagesClient(self.config.nova.username,
self.config.nova.api_key,
- self.config.nova.auth_url)
+ self.auth_url)