Merge "Support fabric specific Cisco FC Zone Name"
This commit is contained in:
commit
ed72c11fe0
@ -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)
|
||||
|
@ -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)):
|
||||
|
Loading…
Reference in New Issue
Block a user