Skip to content

Commit

Permalink
Merge pull request #1040 from untergeek/docs/add_missing520_1
Browse files Browse the repository at this point in the history
Doc fixes for asciidoc and rST
  • Loading branch information
untergeek committed Aug 25, 2017
2 parents 296846e + d7c6dd8 commit 5c782a6
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ Contributors:
* (dtrv)
* Christopher "Chief" Najewicz (chiefy)
* Filipe Gonçalves (basex)
* Sönke Liebau (soenkeliebau)
* Timothy Schroder (tschroeder-zendesk)
* Jared Carey (jpcarey)
* Juraj Seffer (jurajseffer)
2 changes: 1 addition & 1 deletion curator/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '5.2.0dev0'
__version__ = '5.2.0.rc1'

5 changes: 2 additions & 3 deletions curator/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1772,9 +1772,9 @@ def __init__(self, ilo, shrink_node='DETERMINISTIC', node_filters={},
`value` will be applied to the shrunk index to re-route it.
:type post_allocation: dict, with keys `allocation_type`, `key`, and `value`
:arg wait_for_active_shards: The number of shards expected to be active before returning.
:arg extra_settings: Permitted root keys are `settings` and `alias`.
:arg extra_settings: Permitted root keys are `settings` and `aliases`.
See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html
:type extra_settings: dict, with permitted root keys of `settings` and `alias`.
:type extra_settings: dict
:arg wait_for_active_shards: Wait for active shards before returning.
:arg wait_for_completion: Wait (or not) for the operation
to complete before returning. You should not normally change this,
Expand All @@ -1783,7 +1783,6 @@ def __init__(self, ilo, shrink_node='DETERMINISTIC', node_filters={},
completion.
:arg max_wait: Maximum number of seconds to `wait_for_completion`
:type wait_for_completion: bool
name
"""
self.loggit = logging.getLogger('curator.actions.shrink')
verify_index_list(ilo)
Expand Down
8 changes: 4 additions & 4 deletions curator/indexlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,22 +454,22 @@ def filter_by_age(self, source='name', direction=None, timestring=None,
# Because time adds to epoch, smaller numbers are actually older
# timestamps.
if unit_count_pattern:
self.loggit.debug("unit_count_pattern is set, trying to match pattern to index " + index)
self.loggit.debug('Unit_count_pattern is set, trying to match pattern to index "{0}"'.format(index))
unit_count_from_index = get_unit_count_from_name(index, unit_count_matcher)
if unit_count_from_index:
self.loggit.debug("pattern matched, applying unit_count of " + str(unit_count_from_index))
self.loggit.debug('Pattern matched, applying unit_count of "{0}"'.format(unit_count_from_index))
adjustedPoR = get_point_of_reference(unit, unit_count_from_index, epoch)
test = 0
elif unit_count == -1:
# Unable to match pattern and unit_count is -1, meaning no fallback, so this
# index is removed from the list
self.loggit.debug("Unable to match pattern and no fallback value set. Removing index " + index + " from actionable list")
self.loggit.debug('Unable to match pattern and no fallback value set. Removing index "{0}" from actionable list'.format(index))
exclude = True
adjustedPoR = PoR # necessary to avoid exception if the first index is excluded
else:
# Unable to match the pattern and unit_count is set, so fall back to using unit_count
# for determining whether to keep this index in the list
self.loggit.debug("unable to match pattern using fallback value of " + str(unit_count))
self.loggit.debug('Unable to match pattern using fallback value of "{0}"'.format(unit_count))
adjustedPoR = PoR
else:
adjustedPoR = PoR
Expand Down
4 changes: 4 additions & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Changelog
and action file as arguments. Requested in #1031 (untergeek)
* Allow use of time/date string interpolation for Rollover index naming.
Added in #1010 (tschroeder-zendesk)
* New ``unit_count_pattern`` allows you to derive the ``unit_count`` from
the index name itself. This involves regular expressions, so be sure to
do lots of testing in ``--dry-run`` mode before deploying to production.
Added by (soenkeliebau) in #997

**Bug Fixes**

Expand Down
31 changes: 26 additions & 5 deletions docs/actionclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ Action Classes
* `Allocation`_
* `Close`_
* `ClusterRouting`_
* `CreateIndex`_
* `DeleteIndices`_
* `DeleteSnapshots`_
* `ForceMerge`_
* `IndexSettings`_
* `Open`_
* `Reindex`_
* `Replicas`_
* `Restore`_
* `Rollover`_
* `Shrink`_
* `Snapshot`_


Expand All @@ -39,6 +45,11 @@ ClusterRouting
.. autoclass:: curator.actions.ClusterRouting
:members:

CreateIndex
--------------
.. autoclass:: curator.actions.CreateIndex
:members:

DeleteIndices
-------------
.. autoclass:: curator.actions.DeleteIndices
Expand All @@ -54,6 +65,11 @@ ForceMerge
.. autoclass:: curator.actions.ForceMerge
:members:

IndexSettings
--------------
.. autoclass:: curator.actions.IndexSettings
:members:

Open
----
.. autoclass:: curator.actions.Open
Expand All @@ -69,17 +85,22 @@ Replicas
.. autoclass:: curator.actions.Replicas
:members:

Restore
--------
.. autoclass:: curator.actions.Restore
:members:

Rollover
--------
.. autoclass:: curator.actions.Rollover
:members:

Snapshot
Shrink
--------
.. autoclass:: curator.actions.Snapshot
.. autoclass:: curator.actions.Shrink
:members:

Restore
-------
.. autoclass:: curator.actions.Restore
Snapshot
--------
.. autoclass:: curator.actions.Snapshot
:members:
1 change: 1 addition & 0 deletions docs/asciidoc/filters.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ include::inc_sources.asciidoc[]

=== Optional settings

* <<fe_unit_count_pattern,unit_count_pattern>>
* <<fe_epoch,epoch>>
* <<fe_exclude,exclude>> (default is `False`)

Expand Down
2 changes: 1 addition & 1 deletion docs/asciidoc/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:curator_version: 5.2.0dev0
:curator_version: 5.2.0.rc1
:curator_major: 5
:curator_doc_tree: 5.2
:es_py_version: 5.4.0
Expand Down

0 comments on commit 5c782a6

Please sign in to comment.