'Attach volume to initiator/host.
Creates a profile for the initiator, and adds the new profile to the
target ACL.'

def initialize_connection(self, volume, connector, **kwargs):

    export_params = {'chap_user': kwargs.get('user', volume_utils.generate_username(16)), 'chap_secret': kwargs.get('password', volume_utils.generate_password(32))}
    LOG.debug('Configuring    export    for    %(initiator)s', connector, resource=volume)
    rsp = self._create_export(volume['id'], connector['initiator'], export_params, user_id=volume['user_id'], project_id=volume['project_id'])
    target_portal = ('%s:%s' % (rsp['target_ip'], rsp['target_port']))
    properties = {'target_discovered': False, 'target_portal': target_portal, 'target_iqn': rsp['target_iqn'], 'target_lun': rsp['target_lun'], 'volume_id': volume['id'], 'auth_method': 'CHAP', 'auth_username': rsp['initiator_login'], 'auth_password': export_params['chap_secret']}
    LOG.debug('Attach    properties:    %(properties)s', {'properties': properties})
    return {'driver_volume_type': 'iscsi', 'data': properties}
