def create_configuration(username, password, management_url, san_iscsi_ip, poolname, thin_provision=True):
 configuration = mock.Mock()
 configuration.san_login = username
 configuration.san_password = password
 configuration.qnap_management_url = management_url
 configuration.san_thin_provision = thin_provision
 configuration.san_iscsi_ip = san_iscsi_ip
 configuration.qnap_poolname = poolname
 configuration.safe_get.return_value = 'QNAP'
 configuration.iscsi_ip_address = '1.2.3.4'
 configuration.qnap_storage_protocol = 'iscsi'
 configuration.reserved_percentage = 0
 return configuration

def create_configuration ( username , password , management_url , san_iscsi_ip , poolname , thin_provision = True ) : configuration = mock . Mock ( ) configuration . san_login = username configuration . san_password = password configuration . qnap_management_url = management_url configuration . san_thin_provision = thin_provision configuration . san_iscsi_ip = san_iscsi_ip configuration . qnap_poolname = poolname configuration . safe_get . return_value = 'QNAP' configuration . iscsi_ip_address = '1.2.3.4' configuration . qnap_storage_protocol = 'iscsi' configuration . reserved_percentage = 0 return configuration
create configuration .