Add SolidFire svip to config options

The SolidFire driver uses a simple method of gathering
the Storage Virtual IP, it just queries the Cluster and
asks for the SVIP. This is great almost all the time,
BUT it doesn't take into consideration that the deployer
may be using VLAN's and accessing the cluster from multiple
clouds, or multiple networks.

This patch just adds a config option to specify an SVIP
if the admin has configured VLANs in their environment and
on their cluster.  The default behavior is to still use the
global SVIP.

Change-Id: I10b784f903cd8d16580110f01d338a3ad867eada
Closes-Bug: #1487194
This commit is contained in:
John Griffith
2015-08-20 15:49:59 -06:00
parent 0cb046ebd0
commit c11c7004ff
2 changed files with 40 additions and 1 deletions

View File

@@ -68,6 +68,13 @@ sf_opts = [
'a bootable volume is created to eliminate fetch from '
'glance and qemu-conversion on subsequent calls.'),
cfg.StrOpt('sf_svip',
default=None,
help='Overrides default cluster SVIP with the one specified. '
'This is required or deployments that have implemented '
'the use of VLANs for iSCSI networks in their cloud.'),
cfg.IntOpt('sf_api_port',
default=443,
min=1, max=65535,
@@ -320,7 +327,10 @@ class SolidFireDriver(san.SanISCSIDriver):
def _get_model_info(self, sfaccount, sf_volume_id):
"""Gets the connection info for specified account and volume."""
cluster_info = self._get_cluster_info()
iscsi_portal = cluster_info['clusterInfo']['svip'] + ':3260'
if self.configuration.sf_svip is None:
iscsi_portal = cluster_info['clusterInfo']['svip'] + ':3260'
else:
iscsi_portal = self.configuration.sf_svip
chap_secret = sfaccount['targetSecret']
found_volume = False