'Sets a 3PAR host\'s CHAP credentials.'

def _set_3par_chaps(self, common, hostname, volume, username, password):

    if (not common._client_conf['hpe3par_iscsi_chap_enabled']):
        return
    mod_request = {'chapOperation': common.client.HOST_EDIT_ADD, 'chapOperationMode': common.client.CHAP_INITIATOR, 'chapName': username, 'chapSecret': password}
    common.client.modifyHost(hostname, mod_request)
