Skip to content

Commit

Permalink
common/_wait_for: ensure label_selectors is optional (ansible-collect…
Browse files Browse the repository at this point in the history
…ions#239)

common/_wait_for: ensure label_selectors is optional

Depends-On: ansible/ansible-zuul-jobs#1125
The label_selectors is a new parameter for _wait_for that was
introduced in ansible-collections#158.
The value is new and it can be set to None to make it optional. It should
not be mandatory a non optional parameter.

Reviewed-by: None <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: None <None>
(cherry picked from commit 938f7e1)
  • Loading branch information
goneri authored and gravesm committed Oct 7, 2021
1 parent a27c701 commit 3c51c6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelogs/fragments/_wait_for_label_selector_optional.yaml
@@ -0,0 +1,3 @@
---
bugfixes:
- common - Ensure the label_selectors parameter of _wait_for method is optional.
2 changes: 1 addition & 1 deletion plugins/module_utils/common.py
Expand Up @@ -365,7 +365,7 @@ def diff_objects(self, existing, new):
def fail(self, msg=None):
self.fail_json(msg=msg)

def _wait_for(self, resource, name, namespace, predicate, sleep, timeout, state, label_selectors):
def _wait_for(self, resource, name, namespace, predicate, sleep, timeout, state, label_selectors=None):
start = datetime.now()

def _wait_for_elapsed():
Expand Down

0 comments on commit 3c51c6f

Please sign in to comment.