]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use prefix for SolidFire template account
authorJohn Griffith <john.griffith8@gmail.com>
Thu, 30 Jul 2015 17:43:00 +0000 (11:43 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Thu, 30 Jul 2015 17:46:57 +0000 (11:46 -0600)
The SolidFire template account was not using the
account_prefix setting when the account was created.

This means that if a deployment is configured to use
the prefix, that calls to make the actual clone will fail
because the clone routine prepends the prefix from the
config settings on every lookup.

This patch just adds the same account adjustment that
we use in our regular account creation routines.

Change-Id: I4d3c22f96c9ca90192b88f1802997c8680b81483
Closes-Bug: #1479897

cinder/volume/drivers/solidfire.py

index fa32d54ee66fc59926362077b30f437ce5d57eda..1efb6ee9c990e02eaa35a4655a1c2ea76ed528e7 100644 (file)
@@ -166,6 +166,11 @@ class SolidFireDriver(san.SanISCSIDriver):
 
     def _create_template_account(self, account_name):
         # We raise an API exception if the account doesn't exist
+
+        # We need to take account_prefix settings into consideration
+        # This just uses the same method to do template account create
+        # as we use for any other OpenStack account
+        account_name = self._get_sf_account_name(account_name)
         try:
             id = self._issue_api_request(
                 'GetAccountByName',