self.configuration.sf_allow_tenant_qos = True
self.configuration.san_is_local = True
self.configuration.sf_emulate_512 = True
+ self.configuration.sf_account_prefix = 'cinder'
super(SolidFireVolumeTestCase, self).setUp()
self.stubs.Set(SolidFire, '_issue_api_request',
cfg.BoolOpt('sf_allow_tenant_qos',
default=False,
- help='Allow tenants to specify QOS on create'), ]
+ help='Allow tenants to specify QOS on create'),
+
+ cfg.StrOpt('sf_account_prefix',
+ default=socket.gethostname(),
+ help='Create SolidFire accounts with this prefix'), ]
class SolidFire(SanISCSIDriver):
def _get_sf_account_name(self, project_id):
"""Build the SolidFire account name to use."""
- return ('%s-%s' % (socket.gethostname(), project_id))
+ return '%s%s%s' % (self.configuration.sf_account_prefix,
+ '-' if self.configuration.sf_account_prefix else '',
+ project_id)
def _get_sfaccount(self, project_id):
sf_account_name = self._get_sf_account_name(project_id)