From 21770a4fe278b0f59cf74ec22c34d105b339acf0 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Thu, 30 Jan 2020 16:35:24 -0600 Subject: [PATCH] Issue #2: Get the rest of the documentation errors fixed. --- plugins/doc_fragments/k8s_scale_options.py | 1 + plugins/modules/k8s.py | 4 +++- plugins/modules/k8s_scale.py | 3 +++ plugins/modules/k8s_service.py | 3 +++ tests/sanity/ignore-2.10.txt | 2 ++ 5 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/sanity/ignore-2.10.txt diff --git a/plugins/doc_fragments/k8s_scale_options.py b/plugins/doc_fragments/k8s_scale_options.py index d570990a..0c01439a 100644 --- a/plugins/doc_fragments/k8s_scale_options.py +++ b/plugins/doc_fragments/k8s_scale_options.py @@ -17,6 +17,7 @@ options: description: - The desired number of replicas. type: int + required: True current_replicas: description: - For Deployment, ReplicaSet, Replication Controller, only scale, if the number of existing replicas diff --git a/plugins/modules/k8s.py b/plugins/modules/k8s.py index aece55e3..123b2bab 100644 --- a/plugins/modules/k8s.py +++ b/plugins/modules/k8s.py @@ -125,7 +125,6 @@ options: suboptions: fail_on_error: description: whether to fail on validation errors. - required: yes type: bool version: description: version of Kubernetes to validate against. defaults to Kubernetes server version @@ -258,14 +257,17 @@ result: description: Standard object metadata. Includes name, namespace, annotations, labels, etc. returned: success type: complex + contains: Object metadata spec: description: Specific attributes of the object. Will vary based on the I(api_version) and I(kind). returned: success type: complex + contains: Specific object attributes status: description: Current status details for the object. returned: success type: complex + contains: Status details items: description: Returned only when multiple yaml documents are passed to src or resource_definition returned: when resource_definition or src contains list of objects diff --git a/plugins/modules/k8s_scale.py b/plugins/modules/k8s_scale.py index 81dca908..6b10953e 100644 --- a/plugins/modules/k8s_scale.py +++ b/plugins/modules/k8s_scale.py @@ -108,14 +108,17 @@ result: description: Standard object metadata. Includes name, namespace, annotations, labels, etc. returned: success type: complex + contains: Object metadata spec: description: Specific attributes of the object. Will vary based on the I(api_version) and I(kind). returned: success type: complex + contains: Specific object attributes status: description: Current status details for the object. returned: success type: complex + contains: Status details ''' from ansible_collections.community.kubernetes.plugins.module_utils.scale import KubernetesAnsibleScaleModule diff --git a/plugins/modules/k8s_service.py b/plugins/modules/k8s_service.py index dc580019..8bea40f4 100644 --- a/plugins/modules/k8s_service.py +++ b/plugins/modules/k8s_service.py @@ -154,14 +154,17 @@ result: description: Standard object metadata. Includes name, namespace, annotations, labels, etc. returned: success type: complex + contains: Object metadata spec: description: Specific attributes of the object. Will vary based on the I(api_version) and I(kind). returned: success type: complex + contains: Specific object attributes status: description: Current status details for the object. returned: success type: complex + contains: Status details ''' import copy diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt new file mode 100644 index 00000000..bbd327f7 --- /dev/null +++ b/tests/sanity/ignore-2.10.txt @@ -0,0 +1,2 @@ +plugins/modules/k8s.py validate-modules:parameter-type-not-in-doc +plugins/modules/k8s_scale.py validate-modules:parameter-type-not-in-doc