Rename AddFCZone and RemoveFCZone according to PEP 8
The project adheres to PEP 8, so decorators should be named with underscores (like functions) and not with upper camel case (like classes) Change-Id: Ifa38e5d327c2b1a2cdd77ceb2cbc2a9be468bce8
This commit is contained in:
parent
7502e1fed3
commit
e01f24fe3b
|
@ -163,7 +163,7 @@ class FakeISERDriver(FakeLoggingVolumeDriver):
|
||||||
|
|
||||||
class FakeFibreChannelDriver(driver.FibreChannelDriver):
|
class FakeFibreChannelDriver(driver.FibreChannelDriver):
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
return {
|
return {
|
||||||
'driver_volume_type': 'fibre_channel',
|
'driver_volume_type': 'fibre_channel',
|
||||||
|
@ -171,7 +171,7 @@ class FakeFibreChannelDriver(driver.FibreChannelDriver):
|
||||||
'initiator_target_map': {'fake_wwn': ['fake_wwn2']},
|
'initiator_target_map': {'fake_wwn': ['fake_wwn2']},
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def no_zone_initialize_connection(self, volume, connector):
|
def no_zone_initialize_connection(self, volume, connector):
|
||||||
"""This shouldn't call the ZM."""
|
"""This shouldn't call the ZM."""
|
||||||
return {
|
return {
|
||||||
|
@ -180,7 +180,7 @@ class FakeFibreChannelDriver(driver.FibreChannelDriver):
|
||||||
'initiator_target_map': {'fake_wwn': ['fake_wwn2']},
|
'initiator_target_map': {'fake_wwn': ['fake_wwn2']},
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
return {
|
return {
|
||||||
'driver_volume_type': 'fibre_channel',
|
'driver_volume_type': 'fibre_channel',
|
||||||
|
@ -188,7 +188,7 @@ class FakeFibreChannelDriver(driver.FibreChannelDriver):
|
||||||
'initiator_target_map': {'fake_wwn': ['fake_wwn2']},
|
'initiator_target_map': {'fake_wwn': ['fake_wwn2']},
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def no_zone_terminate_connection(self, volume, connector, **kwargs):
|
def no_zone_terminate_connection(self, volume, connector, **kwargs):
|
||||||
return {
|
return {
|
||||||
'driver_volume_type': 'bogus',
|
'driver_volume_type': 'bogus',
|
||||||
|
|
|
@ -118,7 +118,7 @@ class EMCCoprHDFCDriver(driver.FibreChannelDriver):
|
||||||
"""Make sure volume is exported."""
|
"""Make sure volume is exported."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection info."""
|
"""Initializes the connection and returns connection info."""
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class EMCCoprHDFCDriver(driver.FibreChannelDriver):
|
||||||
'data': properties,
|
'data': properties,
|
||||||
}
|
}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Driver entry point to detach a volume from an instance."""
|
"""Driver entry point to detach a volume from an instance."""
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ class DellStorageCenterFCDriver(dell_storagecenter_common.DellCommonDriver,
|
||||||
self.configuration.safe_get('volume_backend_name') or 'Dell-FC'
|
self.configuration.safe_get('volume_backend_name') or 'Dell-FC'
|
||||||
self.storage_protocol = 'FC'
|
self.storage_protocol = 'FC'
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection info.
|
"""Initializes the connection and returns connection info.
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ class DellStorageCenterFCDriver(dell_storagecenter_common.DellCommonDriver,
|
||||||
'wwns': wwns})
|
'wwns': wwns})
|
||||||
return None, [], {}
|
return None, [], {}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, force=False, **kwargs):
|
def terminate_connection(self, volume, connector, force=False, **kwargs):
|
||||||
# Get our volume name
|
# Get our volume name
|
||||||
volume_name = volume.get('id')
|
volume_name = volume.get('id')
|
||||||
|
|
|
@ -117,7 +117,7 @@ class UnityDriver(driver.TransferVD,
|
||||||
"""Make sure volume is exported."""
|
"""Make sure volume is exported."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@zm_utils.AddFCZone
|
@zm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection info.
|
"""Initializes the connection and returns connection info.
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ class UnityDriver(driver.TransferVD,
|
||||||
{'conn_info': conn_info})
|
{'conn_info': conn_info})
|
||||||
return conn_info
|
return conn_info
|
||||||
|
|
||||||
@zm_utils.RemoveFCZone
|
@zm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Disallow connection from connector."""
|
"""Disallow connection from connector."""
|
||||||
LOG.debug("Entering terminate_connection"
|
LOG.debug("Entering terminate_connection"
|
||||||
|
|
|
@ -152,7 +152,7 @@ class VNXDriver(driver.TransferVD,
|
||||||
"""Make sure volume is exported."""
|
"""Make sure volume is exported."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@zm_utils.AddFCZone
|
@zm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection info.
|
"""Initializes the connection and returns connection info.
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ class VNXDriver(driver.TransferVD,
|
||||||
{'conn_info': conn_info})
|
{'conn_info': conn_info})
|
||||||
return conn_info
|
return conn_info
|
||||||
|
|
||||||
@zm_utils.RemoveFCZone
|
@zm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Disallow connection from connector."""
|
"""Disallow connection from connector."""
|
||||||
LOG.debug("Entering terminate_connection"
|
LOG.debug("Entering terminate_connection"
|
||||||
|
|
|
@ -987,7 +987,7 @@ class XtremIOFCDriver(XtremIOVolumeDriver,
|
||||||
seq = range(len(uniq_luns) + 1)
|
seq = range(len(uniq_luns) + 1)
|
||||||
return min(set(seq) - uniq_luns)
|
return min(set(seq) - uniq_luns)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
wwpns = self._get_initiator_names(connector)
|
wwpns = self._get_initiator_names(connector)
|
||||||
ig_name = self._get_ig_name(connector)
|
ig_name = self._get_ig_name(connector)
|
||||||
|
@ -1028,7 +1028,7 @@ class XtremIOFCDriver(XtremIOVolumeDriver,
|
||||||
'target_wwn': self.get_targets(),
|
'target_wwn': self.get_targets(),
|
||||||
'initiator_target_map': i_t_map}}
|
'initiator_target_map': i_t_map}}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
(super(XtremIOFCDriver, self)
|
(super(XtremIOFCDriver, self)
|
||||||
.terminate_connection(volume, connector, **kwargs))
|
.terminate_connection(volume, connector, **kwargs))
|
||||||
|
|
|
@ -82,7 +82,7 @@ class DotHillFCDriver(cinder.volume.driver.FibreChannelDriver):
|
||||||
def delete_volume(self, volume):
|
def delete_volume(self, volume):
|
||||||
self.common.delete_volume(volume)
|
self.common.delete_volume(volume)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
self.common.client_login()
|
self.common.client_login()
|
||||||
try:
|
try:
|
||||||
|
@ -101,7 +101,7 @@ class DotHillFCDriver(cinder.volume.driver.FibreChannelDriver):
|
||||||
finally:
|
finally:
|
||||||
self.common.client_logout()
|
self.common.client_logout()
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
self.common.unmap_volume(volume, connector, 'wwpns')
|
self.common.unmap_volume(volume, connector, 'wwpns')
|
||||||
info = {'driver_volume_type': 'fibre_channel', 'data': {}}
|
info = {'driver_volume_type': 'fibre_channel', 'data': {}}
|
||||||
|
|
|
@ -155,7 +155,7 @@ class EMCVMAXFCDriver(driver.FibreChannelDriver):
|
||||||
"""Make sure volume is exported."""
|
"""Make sure volume is exported."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection info.
|
"""Initializes the connection and returns connection info.
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ class EMCVMAXFCDriver(driver.FibreChannelDriver):
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Disallow connection from connector.
|
"""Disallow connection from connector.
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ class FSSFCDriver(fss_common.FalconstorBaseDriver,
|
||||||
'information.'))
|
'information.'))
|
||||||
raise exception.InvalidConnectorException(missing='wwpns')
|
raise exception.InvalidConnectorException(missing='wwpns')
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
fss_hosts = []
|
fss_hosts = []
|
||||||
fss_hosts.append(self.configuration.san_ip)
|
fss_hosts.append(self.configuration.san_ip)
|
||||||
|
@ -99,7 +99,7 @@ class FSSFCDriver(fss_common.FalconstorBaseDriver,
|
||||||
init_targ_map = dict.fromkeys(initiator_wwns, self.gateway_fc_wwns)
|
init_targ_map = dict.fromkeys(initiator_wwns, self.gateway_fc_wwns)
|
||||||
return init_targ_map
|
return init_targ_map
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
host_id = self.proxy.fc_terminate_connection(volume, connector)
|
host_id = self.proxy.fc_terminate_connection(volume, connector)
|
||||||
fc_info = {"driver_volume_type": "fibre_channel", "data": {}}
|
fc_info = {"driver_volume_type": "fibre_channel", "data": {}}
|
||||||
|
|
|
@ -142,7 +142,7 @@ class FJDXFCDriver(driver.FibreChannelDriver):
|
||||||
"""Driver entry point to remove an export for a volume."""
|
"""Driver entry point to remove an export for a volume."""
|
||||||
return
|
return
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Allow connection to connector and return connection info."""
|
"""Allow connection to connector and return connection info."""
|
||||||
LOG.debug('initialize_connection, volume id: %(vid)s, '
|
LOG.debug('initialize_connection, volume id: %(vid)s, '
|
||||||
|
@ -161,7 +161,7 @@ class FJDXFCDriver(driver.FibreChannelDriver):
|
||||||
'info: %s, exit method.', info)
|
'info: %s, exit method.', info)
|
||||||
return info
|
return info
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Disallow connection from connector."""
|
"""Disallow connection from connector."""
|
||||||
LOG.debug('terminate_connection, volume id: %(vid)s, '
|
LOG.debug('terminate_connection, volume id: %(vid)s, '
|
||||||
|
|
|
@ -409,7 +409,7 @@ class HBSDFCDriver(cinder.volume.driver.FibreChannelDriver):
|
||||||
|
|
||||||
return hostgroups
|
return hostgroups
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
self.do_setup_status.wait()
|
self.do_setup_status.wait()
|
||||||
ldev = self.common.get_ldev(volume)
|
ldev = self.common.get_ldev(volume)
|
||||||
|
@ -437,7 +437,7 @@ class HBSDFCDriver(cinder.volume.driver.FibreChannelDriver):
|
||||||
self._delete_lun(hostgroups, ldev)
|
self._delete_lun(hostgroups, ldev)
|
||||||
LOG.debug("*** _terminate_ ***")
|
LOG.debug("*** _terminate_ ***")
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
self.do_setup_status.wait()
|
self.do_setup_status.wait()
|
||||||
ldev = self.common.get_ldev(volume)
|
ldev = self.common.get_ldev(volume)
|
||||||
|
|
|
@ -163,7 +163,7 @@ class VSPHORCMFC(horcm.VSPHORCM):
|
||||||
|
|
||||||
return nr_not_found
|
return nr_not_found
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initialize connection between the server and the volume."""
|
"""Initialize connection between the server and the volume."""
|
||||||
conn_info = super(VSPHORCMFC, self).initialize_connection(
|
conn_info = super(VSPHORCMFC, self).initialize_connection(
|
||||||
|
@ -172,7 +172,7 @@ class VSPHORCMFC(horcm.VSPHORCM):
|
||||||
utils.update_conn_info(conn_info, connector, self._lookup_service)
|
utils.update_conn_info(conn_info, connector, self._lookup_service)
|
||||||
return conn_info
|
return conn_info
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector):
|
def terminate_connection(self, volume, connector):
|
||||||
"""Terminate connection between the server and the volume."""
|
"""Terminate connection between the server and the volume."""
|
||||||
conn_info = super(VSPHORCMFC, self).terminate_connection(
|
conn_info = super(VSPHORCMFC, self).terminate_connection(
|
||||||
|
|
|
@ -243,7 +243,7 @@ class HPE3PARFCDriver(driver.TransferVD,
|
||||||
self._logout(common)
|
self._logout(common)
|
||||||
|
|
||||||
@utils.trace
|
@utils.trace
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Assigns the volume to a server.
|
"""Assigns the volume to a server.
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ class HPE3PARFCDriver(driver.TransferVD,
|
||||||
self._logout(common)
|
self._logout(common)
|
||||||
|
|
||||||
@utils.trace
|
@utils.trace
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Driver entry point to unattach a volume from an instance."""
|
"""Driver entry point to unattach a volume from an instance."""
|
||||||
common = self._login()
|
common = self._login()
|
||||||
|
|
|
@ -162,13 +162,13 @@ class HPEXPFCDriver(driver.FibreChannelDriver):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@utils.trace
|
@utils.trace
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Attach the volume to an instance."""
|
"""Attach the volume to an instance."""
|
||||||
return self.common.initialize_connection(volume, connector)
|
return self.common.initialize_connection(volume, connector)
|
||||||
|
|
||||||
@utils.trace
|
@utils.trace
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Detach a volume from an instance."""
|
"""Detach a volume from an instance."""
|
||||||
return self.common.terminate_connection(volume, connector, **kwargs)
|
return self.common.terminate_connection(volume, connector, **kwargs)
|
||||||
|
|
|
@ -2111,7 +2111,7 @@ class HuaweiFCDriver(HuaweiBaseDriver, driver.FibreChannelDriver):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@utils.synchronized('huawei', external=True)
|
@utils.synchronized('huawei', external=True)
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
lun_id, lun_type = self.get_lun_id_and_type(volume)
|
lun_id, lun_type = self.get_lun_id_and_type(volume)
|
||||||
wwns = connector['wwpns']
|
wwns = connector['wwpns']
|
||||||
|
@ -2252,7 +2252,7 @@ class HuaweiFCDriver(HuaweiBaseDriver, driver.FibreChannelDriver):
|
||||||
return same_host_id
|
return same_host_id
|
||||||
|
|
||||||
@utils.synchronized('huawei', external=True)
|
@utils.synchronized('huawei', external=True)
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Delete map between a volume and a host."""
|
"""Delete map between a volume and a host."""
|
||||||
lun_id, lun_type = self.get_lun_id_and_type(volume)
|
lun_id, lun_type = self.get_lun_id_and_type(volume)
|
||||||
|
|
|
@ -258,7 +258,7 @@ class FlashSystemFCDriver(fscommon.FlashSystemDriver):
|
||||||
|
|
||||||
return {'driver_volume_type': type_str, 'data': properties}
|
return {'driver_volume_type': type_str, 'data': properties}
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
@utils.synchronized('flashsystem-init-conn', external=True)
|
@utils.synchronized('flashsystem-init-conn', external=True)
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Perform work so that an FC connection can be made.
|
"""Perform work so that an FC connection can be made.
|
||||||
|
@ -317,7 +317,7 @@ class FlashSystemFCDriver(fscommon.FlashSystemDriver):
|
||||||
|
|
||||||
return properties
|
return properties
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
@utils.synchronized('flashsystem-term-conn', external=True)
|
@utils.synchronized('flashsystem-term-conn', external=True)
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Cleanup after connection has been terminated.
|
"""Cleanup after connection has been terminated.
|
||||||
|
|
|
@ -137,13 +137,13 @@ class IBMStorageDriver(san.SanDriver,
|
||||||
|
|
||||||
return self.proxy.remove_export(context, volume)
|
return self.proxy.remove_export(context, volume)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Map the created volume."""
|
"""Map the created volume."""
|
||||||
|
|
||||||
return self.proxy.initialize_connection(volume, connector)
|
return self.proxy.initialize_connection(volume, connector)
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Terminate a connection to a volume."""
|
"""Terminate a connection to a volume."""
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ class StorwizeSVCFCDriver(storwize_common.StorwizeSVCCommonDriver):
|
||||||
raise exception.InvalidConnectorException(
|
raise exception.InvalidConnectorException(
|
||||||
missing='wwpns')
|
missing='wwpns')
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Perform necessary work to make a FC connection."""
|
"""Perform necessary work to make a FC connection."""
|
||||||
@utils.synchronized('storwize-host' + self._state['system_id'] +
|
@utils.synchronized('storwize-host' + self._state['system_id'] +
|
||||||
|
@ -233,7 +233,7 @@ class StorwizeSVCFCDriver(storwize_common.StorwizeSVCCommonDriver):
|
||||||
|
|
||||||
return i_t_map
|
return i_t_map
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Cleanup after an FC connection has been terminated."""
|
"""Cleanup after an FC connection has been terminated."""
|
||||||
# If a fake connector is generated by nova when the host
|
# If a fake connector is generated by nova when the host
|
||||||
|
|
|
@ -199,7 +199,7 @@ class InfiniboxVolumeDriver(san.SanDriver,
|
||||||
and port['state'] == 'OK'):
|
and port['state'] == 'OK'):
|
||||||
yield self._cleanup_wwpn(port['wwpn'])
|
yield self._cleanup_wwpn(port['wwpn'])
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Map an InfiniBox volume to the host"""
|
"""Map an InfiniBox volume to the host"""
|
||||||
volume_name = self._make_volume_name(volume)
|
volume_name = self._make_volume_name(volume)
|
||||||
|
@ -220,7 +220,7 @@ class InfiniboxVolumeDriver(san.SanDriver,
|
||||||
target_lun=lun,
|
target_lun=lun,
|
||||||
initiator_target_map=init_target_map))
|
initiator_target_map=init_target_map))
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Unmap an InfiniBox volume from the host"""
|
"""Unmap an InfiniBox volume from the host"""
|
||||||
volume_id = self._get_infinidat_volume_id(volume)
|
volume_id = self._get_infinidat_volume_id(volume)
|
||||||
|
|
|
@ -145,7 +145,7 @@ class InfortrendCLIFCDriver(driver.FibreChannelDriver):
|
||||||
"""Removes an export for a volume."""
|
"""Removes an export for a volume."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection information.
|
"""Initializes the connection and returns connection information.
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ class InfortrendCLIFCDriver(driver.FibreChannelDriver):
|
||||||
'initiator': connector['initiator']})
|
'initiator': connector['initiator']})
|
||||||
return self.common.initialize_connection(volume, connector)
|
return self.common.initialize_connection(volume, connector)
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Disallow connection from connector."""
|
"""Disallow connection from connector."""
|
||||||
LOG.debug('terminate_connection volume id=%(volume_id)s', {
|
LOG.debug('terminate_connection volume id=%(volume_id)s', {
|
||||||
|
|
|
@ -51,7 +51,7 @@ class KaminarioFCDriver(common.KaminarioCinderDriver):
|
||||||
self._protocol = 'FC'
|
self._protocol = 'FC'
|
||||||
self.lookup_service = fczm_utils.create_lookup_service()
|
self.lookup_service = fczm_utils.create_lookup_service()
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
@kaminario_logger
|
@kaminario_logger
|
||||||
@coordination.synchronized('{self.k2_lock_name}')
|
@coordination.synchronized('{self.k2_lock_name}')
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
|
@ -84,7 +84,7 @@ class KaminarioFCDriver(common.KaminarioCinderDriver):
|
||||||
"target_wwn": target_wwpns,
|
"target_wwn": target_wwpns,
|
||||||
"initiator_target_map": init_target_map}}
|
"initiator_target_map": init_target_map}}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
@kaminario_logger
|
@kaminario_logger
|
||||||
@coordination.synchronized('{self.k2_lock_name}')
|
@coordination.synchronized('{self.k2_lock_name}')
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
|
|
|
@ -67,10 +67,10 @@ class MStorageFCDriver(volume_helper.MStorageDSVDriver,
|
||||||
def get_volume_stats(self, refresh=False):
|
def get_volume_stats(self, refresh=False):
|
||||||
return self.fc_get_volume_stats(refresh)
|
return self.fc_get_volume_stats(refresh)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
return self.fc_initialize_connection(volume, connector)
|
return self.fc_initialize_connection(volume, connector)
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
return self.fc_terminate_connection(volume, connector)
|
return self.fc_terminate_connection(volume, connector)
|
||||||
|
|
|
@ -98,11 +98,11 @@ class NetApp7modeFibreChannelDriver(driver.BaseVD,
|
||||||
def unmanage(self, volume):
|
def unmanage(self, volume):
|
||||||
return self.library.unmanage(volume)
|
return self.library.unmanage(volume)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
return self.library.initialize_connection_fc(volume, connector)
|
return self.library.initialize_connection_fc(volume, connector)
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
return self.library.terminate_connection_fc(volume, connector,
|
return self.library.terminate_connection_fc(volume, connector,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
|
@ -98,11 +98,11 @@ class NetAppCmodeFibreChannelDriver(driver.BaseVD,
|
||||||
def unmanage(self, volume):
|
def unmanage(self, volume):
|
||||||
return self.library.unmanage(volume)
|
return self.library.unmanage(volume)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
return self.library.initialize_connection_fc(volume, connector)
|
return self.library.initialize_connection_fc(volume, connector)
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
return self.library.terminate_connection_fc(volume, connector,
|
return self.library.terminate_connection_fc(volume, connector,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
|
@ -92,11 +92,11 @@ class NetAppEseriesFibreChannelDriver(driver.BaseVD,
|
||||||
def unmanage(self, volume):
|
def unmanage(self, volume):
|
||||||
return self.library.unmanage(volume)
|
return self.library.unmanage(volume)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector, **kwargs):
|
def initialize_connection(self, volume, connector, **kwargs):
|
||||||
return self.library.initialize_connection_fc(volume, connector)
|
return self.library.initialize_connection_fc(volume, connector)
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
return self.library.terminate_connection_fc(volume, connector,
|
return self.library.terminate_connection_fc(volume, connector,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
|
@ -836,7 +836,7 @@ class NimbleFCDriver(NimbleBaseVolumeDriver, driver.FibreChannelDriver):
|
||||||
|
|
||||||
return init_targ_map
|
return init_targ_map
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Driver entry point to attach a volume to an instance."""
|
"""Driver entry point to attach a volume to an instance."""
|
||||||
LOG.info(_LI('Entering initialize_connection volume=%(vol)s'
|
LOG.info(_LI('Entering initialize_connection volume=%(vol)s'
|
||||||
|
@ -878,7 +878,7 @@ class NimbleFCDriver(NimbleBaseVolumeDriver, driver.FibreChannelDriver):
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Driver entry point to unattach a volume from an instance."""
|
"""Driver entry point to unattach a volume from an instance."""
|
||||||
LOG.info(_LI('Entering terminate_connection volume=%(vol)s'
|
LOG.info(_LI('Entering terminate_connection volume=%(vol)s'
|
||||||
|
|
|
@ -218,7 +218,7 @@ class DPLFCDriver(dplcommon.DPLCOMMONDriver,
|
||||||
|
|
||||||
return init_targ_map
|
return init_targ_map
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Allow connection to connector and return connection info."""
|
"""Allow connection to connector and return connection info."""
|
||||||
"""
|
"""
|
||||||
|
@ -339,7 +339,7 @@ class DPLFCDriver(dplcommon.DPLCOMMONDriver,
|
||||||
return {'driver_volume_type': 'fibre_channel',
|
return {'driver_volume_type': 'fibre_channel',
|
||||||
'data': properties}
|
'data': properties}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Disallow connection from connector."""
|
"""Disallow connection from connector."""
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1774,7 +1774,7 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver):
|
||||||
ports = array.list_ports()
|
ports = array.list_ports()
|
||||||
return [port["wwn"] for port in ports if port["wwn"]]
|
return [port["wwn"] for port in ports if port["wwn"]]
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
@pure_driver_debug_trace
|
@pure_driver_debug_trace
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Allow connection to connector and return connection info."""
|
"""Allow connection to connector and return connection info."""
|
||||||
|
@ -1851,7 +1851,7 @@ class PureFCDriver(PureBaseVolumeDriver, driver.FibreChannelDriver):
|
||||||
|
|
||||||
return init_targ_map
|
return init_targ_map
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
@pure_driver_debug_trace
|
@pure_driver_debug_trace
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Terminate connection."""
|
"""Terminate connection."""
|
||||||
|
|
|
@ -598,7 +598,7 @@ class TegileFCDriver(TegileIntelliFlashVolumeDriver,
|
||||||
def do_setup(self, context):
|
def do_setup(self, context):
|
||||||
super(TegileFCDriver, self).do_setup(context)
|
super(TegileFCDriver, self).do_setup(context)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
@debugger
|
@debugger
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Initializes the connection and returns connection info."""
|
"""Initializes the connection and returns connection info."""
|
||||||
|
@ -631,7 +631,7 @@ class TegileFCDriver(TegileIntelliFlashVolumeDriver,
|
||||||
|
|
||||||
return connection_data
|
return connection_data
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
@debugger
|
@debugger
|
||||||
def terminate_connection(self, volume, connector, force=False, **kwargs):
|
def terminate_connection(self, volume, connector, force=False, **kwargs):
|
||||||
|
|
||||||
|
|
|
@ -135,7 +135,7 @@ class V7000FCPDriver(driver.FibreChannelDriver):
|
||||||
"""Removes an export for a logical volume."""
|
"""Removes an export for a logical volume."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
"""Allow connection to connector and return connection info."""
|
"""Allow connection to connector and return connection info."""
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ class V7000FCPDriver(driver.FibreChannelDriver):
|
||||||
|
|
||||||
return {'driver_volume_type': 'fibre_channel', 'data': properties}
|
return {'driver_volume_type': 'fibre_channel', 'data': properties}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
"""Terminates the connection (target<-->initiator)."""
|
"""Terminates the connection (target<-->initiator)."""
|
||||||
|
|
||||||
|
|
|
@ -1571,7 +1571,7 @@ class XIOISEFCDriver(driver.FibreChannelDriver):
|
||||||
def unmanage(self, volume):
|
def unmanage(self, volume):
|
||||||
return self.driver.unmanage(volume)
|
return self.driver.unmanage(volume)
|
||||||
|
|
||||||
@fczm_utils.AddFCZone
|
@fczm_utils.add_fc_zone
|
||||||
def initialize_connection(self, volume, connector):
|
def initialize_connection(self, volume, connector):
|
||||||
hostname = ''
|
hostname = ''
|
||||||
if 'host' in connector:
|
if 'host' in connector:
|
||||||
|
@ -1589,7 +1589,7 @@ class XIOISEFCDriver(driver.FibreChannelDriver):
|
||||||
return {'driver_volume_type': 'fibre_channel',
|
return {'driver_volume_type': 'fibre_channel',
|
||||||
'data': data}
|
'data': data}
|
||||||
|
|
||||||
@fczm_utils.RemoveFCZone
|
@fczm_utils.remove_fc_zone
|
||||||
def terminate_connection(self, volume, connector, **kwargs):
|
def terminate_connection(self, volume, connector, **kwargs):
|
||||||
# now we are ready to tell ISE to delete presentations
|
# now we are ready to tell ISE to delete presentations
|
||||||
hostname = self.driver.ise_unpresent(volume, connector['wwpns'])
|
hostname = self.driver.ise_unpresent(volume, connector['wwpns'])
|
||||||
|
|
|
@ -74,7 +74,7 @@ def get_formatted_wwn(wwn_str):
|
||||||
for i in range(0, len(wwn_str), 2)])).lower()
|
for i in range(0, len(wwn_str), 2)])).lower()
|
||||||
|
|
||||||
|
|
||||||
def AddFCZone(initialize_connection):
|
def add_fc_zone(initialize_connection):
|
||||||
"""Decorator to add a FC Zone."""
|
"""Decorator to add a FC Zone."""
|
||||||
|
|
||||||
def decorator(self, *args, **kwargs):
|
def decorator(self, *args, **kwargs):
|
||||||
|
@ -89,7 +89,7 @@ def AddFCZone(initialize_connection):
|
||||||
if 'initiator_target_map' in conn_info['data']:
|
if 'initiator_target_map' in conn_info['data']:
|
||||||
zm = create_zone_manager()
|
zm = create_zone_manager()
|
||||||
if zm:
|
if zm:
|
||||||
LOG.debug("AddFCZone connection info: %(conninfo)s.",
|
LOG.debug("add_fc_zone connection info: %(conninfo)s.",
|
||||||
{'conninfo': conn_info})
|
{'conninfo': conn_info})
|
||||||
zm.add_connection(conn_info)
|
zm.add_connection(conn_info)
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ def AddFCZone(initialize_connection):
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
def RemoveFCZone(terminate_connection):
|
def remove_fc_zone(terminate_connection):
|
||||||
"""Decorator for FC drivers to remove zone."""
|
"""Decorator for FC drivers to remove zone."""
|
||||||
|
|
||||||
def decorator(self, *args, **kwargs):
|
def decorator(self, *args, **kwargs):
|
||||||
|
@ -113,7 +113,7 @@ def RemoveFCZone(terminate_connection):
|
||||||
if 'initiator_target_map' in conn_info['data']:
|
if 'initiator_target_map' in conn_info['data']:
|
||||||
zm = create_zone_manager()
|
zm = create_zone_manager()
|
||||||
if zm:
|
if zm:
|
||||||
LOG.debug("RemoveFCZone connection info: %(conninfo)s.",
|
LOG.debug("remove_fc_zone connection info: %(conninfo)s.",
|
||||||
{'conninfo': conn_info})
|
{'conninfo': conn_info})
|
||||||
zm.delete_connection(conn_info)
|
zm.delete_connection(conn_info)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue