Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pulp_timeout #164

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions plugins/doc_fragments/pulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class ModuleDocFragment(object):
- It is recommended to use this once with the M(pulp.squeezer.status) module at the beginning of the playbook.
type: bool
default: false
timeout:
description:
- Time in seconds to wait for tasks.
type: int
default: 10
"""

GLUE = r"""
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def __init__(
password=None,
validate_certs=True,
refresh_cache=False,
timeout=10,
):
self.doc_path = doc_path

Expand All @@ -60,6 +61,7 @@ def __init__(
headers=headers,
validate_certs=validate_certs,
force_basic_auth=True,
timeout=timeout,
)

self.load_api(refresh_cache=refresh_cache)
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/pulp.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(self, **kwargs):
fallback=(env_fallback, ["SQUEEZER_VALIDATE_CERTS"]),
),
refresh_api_cache=dict(type="bool", default=False),
timeout=dict(type=int, required=False, default=10),
)
argument_spec.update(kwargs.pop("argument_spec", {}))
supports_check_mode = kwargs.pop("supports_check_mode", True)
Expand All @@ -76,6 +77,7 @@ def __enter__(self):
password=self.params["password"],
validate_certs=self.params["validate_certs"],
refresh_cache=self.params["refresh_api_cache"],
timeout=self.params["timeout"],
)

return self
Expand Down
Loading