mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
Enable black formatting test SUMMARY Signed-off-by: Abhijeet Kasurde akasurde@redhat.com ISSUE TYPE Bugfix Pull Request COMPONENT NAME plugins/action/k8s_info.py plugins/connection/kubectl.py plugins/doc_fragments/helm_common_options.py plugins/doc_fragments/k8s_auth_options.py plugins/doc_fragments/k8s_delete_options.py plugins/doc_fragments/k8s_name_options.py plugins/doc_fragments/k8s_resource_options.py plugins/doc_fragments/k8s_scale_options.py plugins/doc_fragments/k8s_state_options.py plugins/doc_fragments/k8s_wait_options.py plugins/filter/k8s.py plugins/inventory/k8s.py plugins/lookup/k8s.py plugins/lookup/kustomize.py plugins/module_utils/ansiblemodule.py plugins/module_utils/apply.py plugins/module_utils/args_common.py plugins/module_utils/client/discovery.py plugins/module_utils/client/resource.py plugins/module_utils/common.py plugins/module_utils/exceptions.py plugins/module_utils/hashes.py plugins/module_utils/helm.py plugins/module_utils/k8sdynamicclient.py plugins/module_utils/selector.py plugins/modules/helm.py plugins/modules/helm_info.py plugins/modules/helm_plugin.py plugins/modules/helm_plugin_info.py plugins/modules/helm_repository.py plugins/modules/helm_template.py plugins/modules/k8s.py plugins/modules/k8s_cluster_info.py plugins/modules/k8s_cp.py plugins/modules/k8s_drain.py plugins/modules/k8s_exec.py plugins/modules/k8s_info.py plugins/modules/k8s_json_patch.py plugins/modules/k8s_log.py plugins/modules/k8s_rollback.py plugins/modules/k8s_scale.py plugins/modules/k8s_service.py tests/integration/targets/kubernetes/library/test_tempfile.py tests/unit/module_utils/test_apply.py tests/unit/module_utils/test_common.py tests/unit/module_utils/test_discoverer.py tests/unit/module_utils/test_hashes.py tests/unit/module_utils/test_marshal.py tests/unit/module_utils/test_selector.py tox.ini Reviewed-by: None <None> Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: None <None>
69 lines
2.5 KiB
Python
69 lines
2.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright: (c) 2020, Red Hat | Ansible
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# Options for specifying object wait
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
class ModuleDocFragment(object):
|
|
|
|
DOCUMENTATION = r"""
|
|
options:
|
|
wait:
|
|
description:
|
|
- Whether to wait for certain resource kinds to end up in the desired state.
|
|
- By default the module exits once Kubernetes has received the request.
|
|
- Implemented for C(state=present) for C(Deployment), C(DaemonSet) and C(Pod), and for C(state=absent) for all resource kinds.
|
|
- For resource kinds without an implementation, C(wait) returns immediately unless C(wait_condition) is set.
|
|
default: no
|
|
type: bool
|
|
wait_sleep:
|
|
description:
|
|
- Number of seconds to sleep between checks.
|
|
default: 5
|
|
type: int
|
|
wait_timeout:
|
|
description:
|
|
- How long in seconds to wait for the resource to end up in the desired state.
|
|
- Ignored if C(wait) is not set.
|
|
default: 120
|
|
type: int
|
|
wait_condition:
|
|
description:
|
|
- Specifies a custom condition on the status to wait for.
|
|
- Ignored if C(wait) is not set or is set to False.
|
|
suboptions:
|
|
type:
|
|
type: str
|
|
description:
|
|
- The type of condition to wait for.
|
|
- For example, the C(Pod) resource will set the C(Ready) condition (among others).
|
|
- Required if you are specifying a C(wait_condition).
|
|
- If left empty, the C(wait_condition) field will be ignored.
|
|
- The possible types for a condition are specific to each resource type in Kubernetes.
|
|
- See the API documentation of the status field for a given resource to see possible choices.
|
|
status:
|
|
type: str
|
|
description:
|
|
- The value of the status field in your desired condition.
|
|
- For example, if a C(Deployment) is paused, the C(Progressing) C(type) will have the C(Unknown) status.
|
|
choices:
|
|
- "True"
|
|
- "False"
|
|
- "Unknown"
|
|
default: "True"
|
|
reason:
|
|
type: str
|
|
description:
|
|
- The value of the reason field in your desired condition
|
|
- For example, if a C(Deployment) is paused, The C(Progressing) C(type) will have the C(DeploymentPaused) reason.
|
|
- The possible reasons in a condition are specific to each resource type in Kubernetes.
|
|
- See the API documentation of the status field for a given resource to see possible choices.
|
|
type: dict
|
|
"""
|