Fix Brocade FC driver's use of the fc_fabric_names
The Brocade Fibre Channel Zone Manager driver wasn't stripping out whitespace in the fc_fabric_names prior to using them. This would cause breakage later on in the driver. Change-Id: I6d16a35026fdd2f30a92f9dff16435a6c39b699a Closes-Bug: 1328681
This commit is contained in:
parent
7e57a36a3d
commit
280cb03149
|
@ -51,7 +51,7 @@ class BrcdFCSanLookupService(FCSanLookupService):
|
|||
"""Configuration specific to SAN context values."""
|
||||
config = self.configuration
|
||||
|
||||
fabric_names = config.fc_fabric_names.split(',')
|
||||
fabric_names = [x.strip() for x in config.fc_fabric_names.split(',')]
|
||||
LOG.debug(_('Fabric Names: %s'), fabric_names)
|
||||
|
||||
# There can be more than one SAN in the network and we need to
|
||||
|
@ -105,7 +105,7 @@ class BrcdFCSanLookupService(FCSanLookupService):
|
|||
err=_("Missing Fibre Channel SAN configuration "
|
||||
"param - fc_fabric_names"))
|
||||
|
||||
fabrics = fabric_names.split(',')
|
||||
fabrics = [x.strip() for x in fabric_names.split(',')]
|
||||
LOG.debug(_("FC Fabric List: %s"), fabrics)
|
||||
if fabrics:
|
||||
for t in target_wwn_list:
|
||||
|
|
|
@ -98,7 +98,9 @@ class BrcdFCZoneDriver(FCZoneDriver):
|
|||
if len(base_san_opts) > 0:
|
||||
CONF.register_opts(base_san_opts)
|
||||
self.configuration.append_config_values(base_san_opts)
|
||||
fabric_names = self.configuration.fc_fabric_names.split(',')
|
||||
|
||||
fc_fabric_names = self.configuration.fc_fabric_names
|
||||
fabric_names = [x.strip() for x in fc_fabric_names.split(',')]
|
||||
|
||||
# There can be more than one SAN in the network and we need to
|
||||
# get credentials for each SAN.
|
||||
|
@ -373,7 +375,8 @@ class BrcdFCZoneDriver(FCZoneDriver):
|
|||
# TODO(Santhosh Kolathur): consider refactoring to use lookup service.
|
||||
formatted_target_list = []
|
||||
fabric_map = {}
|
||||
fabrics = self.configuration.fc_fabric_names.split(',')
|
||||
fc_fabric_names = self.configuration.fc_fabric_names
|
||||
fabrics = [x.strip() for x in fc_fabric_names.split(',')]
|
||||
LOG.debug(_("Fabric List: %s"), fabrics)
|
||||
LOG.debug(_("Target wwn List: %s"), target_wwn_list)
|
||||
if len(fabrics) > 0:
|
||||
|
|
Loading…
Reference in New Issue