'Configures CHAP credentials for target IQN from backend.'

def set_chap_authentication(self, target_iqn, chap_username, chap_password):

    path = '/storage-systems/{system-id}/iscsi/target-settings/'
    data = {'iqn': target_iqn, 'enableChapAuthentication': True, 'alias': chap_username, 'authMethod': 'chap', 'chapSecret': chap_password}
    return self._invoke('POST', path, data)
