def _settings_check()

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


    def _settings_check(self):
        # Detect if even one index is open.  Save all found to open_index_list.
        open_index_list = []
        open_indices = False
        # This action requires index settings and state to be present
        # Calling these here should not cause undue problems, even if it's a repeat call
        self.index_list.get_index_state()
        self.index_list.get_index_settings()
        for idx in self.index_list.indices:
            if self.index_list.index_info[idx]['state'] == 'open':
                open_index_list.append(idx)
                open_indices = True
        for k in self.body['index']:
            if k in self._static_settings():
                if not self.ignore_unavailable:
                    if open_indices:
                        msg = (
                            f'Static Setting "{k}" detected with open indices: '
                            f'{open_index_list}. Static settings can only be used '
                            f'with closed indices.  Recommend filtering out open '
                            f'indices, or setting ignore_unavailable to True'
                        )
                        raise ActionError(msg)
            elif k in self._dynamic_settings():
                # Dynamic settings should be appliable to open or closed indices
                # Act here if the case is different for some settings.
                pass
            else:
                msg = (
                    f'"{k}" is not a setting Curator recognizes and may or may '
                    f' not work.'
                )
                self.loggit.warning(msg)