diff --git a/cinder/brick/initiator/connector.py b/cinder/brick/initiator/connector.py index d950575d082..0778f946bba 100644 --- a/cinder/brick/initiator/connector.py +++ b/cinder/brick/initiator/connector.py @@ -79,7 +79,8 @@ def set_driver(self, driver): @staticmethod def factory(protocol, root_helper, driver=None, execute=putils.execute, use_multipath=False, - device_scan_attempts=DEVICE_SCAN_ATTEMPTS_DEFAULT): + device_scan_attempts=DEVICE_SCAN_ATTEMPTS_DEFAULT, + *args, **kwargs): """Build a Connector object based upon protocol.""" LOG.debug("Factory for %s" % protocol) protocol = protocol.upper() @@ -88,30 +89,35 @@ def factory(protocol, root_helper, driver=None, driver=driver, execute=execute, use_multipath=use_multipath, - device_scan_attempts=device_scan_attempts) + device_scan_attempts=device_scan_attempts, + *args, **kwargs) elif protocol == "FIBRE_CHANNEL": return FibreChannelConnector(root_helper=root_helper, driver=driver, execute=execute, use_multipath=use_multipath, device_scan_attempts= - device_scan_attempts) + device_scan_attempts, + *args, **kwargs) elif protocol == "AOE": return AoEConnector(root_helper=root_helper, driver=driver, execute=execute, - device_scan_attempts=device_scan_attempts) + device_scan_attempts=device_scan_attempts, + *args, **kwargs) elif protocol == "NFS" or protocol == "GLUSTERFS": return RemoteFsConnector(mount_type=protocol.lower(), root_helper=root_helper, driver=driver, execute=execute, - device_scan_attempts=device_scan_attempts) + device_scan_attempts=device_scan_attempts, + *args, **kwargs) elif protocol == "LOCAL": return LocalConnector(root_helper=root_helper, driver=driver, execute=execute, - device_scan_attempts=device_scan_attempts) + device_scan_attempts=device_scan_attempts, + *args, **kwargs) else: msg = (_("Invalid InitiatorConnector protocol " "specified %(protocol)s") % @@ -792,7 +798,8 @@ def __init__(self, mount_type, root_helper, driver=None, device_scan_attempts=DEVICE_SCAN_ATTEMPTS_DEFAULT, *args, **kwargs): self._remotefsclient = remotefs.RemoteFsClient(mount_type, root_helper, - execute=execute) + execute=execute, + *args, **kwargs) super(RemoteFsConnector, self).__init__(root_helper, driver=driver, execute=execute, device_scan_attempts=