@@ -128,18 +128,23 @@ def process_action(client, action_def, dry_run=False):
128128 mykwargs .update (prune_nones (action_def .options ))
129129
130130 # Pop out the search_pattern option, if present.
131- search_pattern = mykwargs .pop ('search_pattern' , '*' )
131+ ptrn = mykwargs .pop ('search_pattern' , '*' )
132+ hidn = mykwargs .pop ('include_hidden' , False )
132133
133134 logger .debug ('Action kwargs: %s' , mykwargs )
134- logger .debug ('Post search_pattern Action kwargs: %s' , mykwargs )
135+ logger .debug ('Post search_pattern & include_hidden Action kwargs: %s' , mykwargs )
135136
136137 # Set up the action
137138 logger .debug ('Running "%s"' , action_def .action .upper ())
138139 if action_def .action == 'alias' :
139140 # Special behavior for this action, as it has 2 index lists
140141 action_def .instantiate ('action_cls' , ** mykwargs )
141- action_def .instantiate ('alias_adds' , client , search_pattern = search_pattern )
142- action_def .instantiate ('alias_removes' , client , search_pattern = search_pattern )
142+ action_def .instantiate (
143+ 'alias_adds' , client , search_pattern = ptrn , include_hidden = hidn
144+ )
145+ action_def .instantiate (
146+ 'alias_removes' , client , search_pattern = ptrn , include_hidden = hidn
147+ )
143148 if 'remove' in action_def .action_dict :
144149 logger .debug ('Removing indices from alias "%s"' , action_def .options ['name' ])
145150 action_def .alias_removes .iterate_filters (action_def .action_dict ['remove' ])
@@ -163,7 +168,9 @@ def process_action(client, action_def, dry_run=False):
163168 'list_obj' , client , repository = action_def .options ['repository' ]
164169 )
165170 else :
166- action_def .instantiate ('list_obj' , client , search_pattern = search_pattern )
171+ action_def .instantiate (
172+ 'list_obj' , client , search_pattern = ptrn , include_hidden = hidn
173+ )
167174 action_def .list_obj .iterate_filters ({'filters' : action_def .filters })
168175 logger .debug ('Pre Instantiation Action kwargs: %s' , mykwargs )
169176 action_def .instantiate ('action_cls' , action_def .list_obj , ** mykwargs )
0 commit comments