'Provides NetApp host\'s CHAP credentials to the backend.'

def set_iscsi_chap_authentication(self, iqn, username, password):

    command = ('iscsi    security    add    -i    %(iqn)s    -s    CHAP    -p    %(password)s    -n    %(username)s' % {'iqn': iqn, 'password': password, 'username': username})
    LOG.debug('Updating    CHAP    authentication    for    %(iqn)s.', {'iqn': iqn})
    try:
        ssh_pool = self.ssh_client.ssh_pool
        with ssh_pool.item() as ssh:
            self.ssh_client.execute_command(ssh, command)
    except Exception as e:
        msg = (_('Failed    to    set    CHAP    authentication    for    target    IQN    %(iqn)s.    Details:    %(ex)s') % {'iqn': iqn, 'ex': e})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
