def do_action()

in curator/actions/allocation.py [0:0]


    def do_action(self):
        """
        :py:meth:`~.elasticsearch.client.IndicesClient.put_settings` to indices in
        :py:attr:`index_list` with :py:attr:`settings`.
        """
        self.loggit.debug(
            'Cannot get change shard routing allocation of closed indices.  '
            'Omitting any closed indices.'
        )
        self.index_list.filter_closed()
        self.index_list.empty_list_check()
        self.loggit.info(
            'Updating %s selected indices: %s',
            len(self.index_list.indices),
            self.index_list.indices,
        )
        self.loggit.info('Updating index setting %s', self.settings)
        try:
            index_lists = chunk_index_list(self.index_list.indices)
            for lst in index_lists:
                self.client.indices.put_settings(
                    index=to_csv(lst), settings=self.settings
                )
                if self.wfc:
                    self.loggit.debug(
                        'Waiting for shards to complete relocation for indices: %s',
                        to_csv(lst),
                    )
                    wait_for_it(
                        self.client,
                        'allocation',
                        wait_interval=self.wait_interval,
                        max_wait=self.max_wait,
                    )
        # pylint: disable=broad-except
        except Exception as err:
            report_failure(err)