diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py index e81cbba4c15..e3564a4295b 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py @@ -136,6 +136,8 @@ class CiscoFCSanLookupService(fc_service.FCSanLookupService): LOG.debug("show fcns database for vsan %s", zoning_vsan) nsinfo = self.get_nameserver_info(zoning_vsan) + self.cleanup() + LOG.debug("Lookup service:fcnsdatabase-%s", nsinfo) LOG.debug("Lookup service:initiator list from caller-%s", formatted_initiator_list) diff --git a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py index 7c7ca1a459c..2ee43983ce8 100644 --- a/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py +++ b/cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py @@ -75,9 +75,6 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): # ThirdPartySystems wiki name CI_WIKI_NAME = "Cisco_ZM_CI" - # TODO(jsbryant) Remove driver in Rocky if CI is not fixed - SUPPORTED = False - def __init__(self, **kwargs): super(CiscoFCZoneDriver, self).__init__(**kwargs) self.configuration = kwargs.get('configuration', None) @@ -152,6 +149,11 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): 'cisco_zoning_policy') if zoning_policy_fab: zoning_policy = zoning_policy_fab + zone_name_prefix = self.fabric_configs[fabric].safe_get( + 'cisco_zone_name_prefix') + + if not zone_name_prefix: + zone_name_prefix = self.configuration.cisco_zone_name_prefix zoning_vsan = self.fabric_configs[fabric].safe_get('cisco_zoning_vsan') @@ -187,7 +189,7 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): target, host_name, storage_system, - self.configuration.cisco_zone_name_prefix, + zone_name_prefix, SUPPORTED_CHARS)) if (len(cfgmap_from_fabric) == 0 or ( zone_name not in zone_names)): @@ -211,7 +213,7 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): target, host_name, storage_system, - self.configuration.cisco_zone_name_prefix, + zone_name_prefix, SUPPORTED_CHARS)) # If zone exists, then perform an update_zone and add @@ -299,6 +301,11 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): zoning_policy = self.configuration.zoning_policy zoning_policy_fab = self.fabric_configs[fabric].safe_get( 'cisco_zoning_policy') + zone_name_prefix = self.fabric_configs[fabric].safe_get( + 'cisco_zone_name_prefix') + + if not zone_name_prefix: + zone_name_prefix = self.configuration.cisco_zone_name_prefix if zoning_policy_fab: zoning_policy = zoning_policy_fab @@ -341,7 +348,7 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): target, host_name, storage_system, - self.configuration.cisco_zone_name_prefix, + zone_name_prefix, SUPPORTED_CHARS)) LOG.debug("Zone name to del: %s", zone_name) if (len(zone_names) > 0 and (zone_name in zone_names)): @@ -363,7 +370,7 @@ class CiscoFCZoneDriver(fc_zone_driver.FCZoneDriver): target, host_name, storage_system, - self.configuration.cisco_zone_name_prefix, + zone_name_prefix, SUPPORTED_CHARS) # Check if there are zone members leftover after removal if (zone_names and (zone_name in zone_names)):