mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
kubevirt: cleanup module docs (#54119)
This commit is contained in:
committed by
René Moser
parent
5d32dbd532
commit
53b56825cd
@@ -51,7 +51,6 @@ options:
|
||||
|
||||
extends_documentation_fragment:
|
||||
- k8s_auth_options
|
||||
- k8s_resource_options
|
||||
- kubevirt_vm_options
|
||||
- kubevirt_common_options
|
||||
|
||||
@@ -93,7 +92,7 @@ import copy
|
||||
import traceback
|
||||
|
||||
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC, COMMON_ARG_SPEC
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC
|
||||
|
||||
from ansible.module_utils.kubevirt import (
|
||||
virtdict,
|
||||
@@ -113,8 +112,7 @@ class KubeVirtVMPreset(KubeVirtRawModule):
|
||||
@property
|
||||
def argspec(self):
|
||||
""" argspec property builder """
|
||||
argument_spec = copy.deepcopy(COMMON_ARG_SPEC)
|
||||
argument_spec.update(copy.deepcopy(AUTH_ARG_SPEC))
|
||||
argument_spec = copy.deepcopy(AUTH_ARG_SPEC)
|
||||
argument_spec.update(VM_COMMON_ARG_SPEC)
|
||||
argument_spec.update(VMP_ARG_SPEC)
|
||||
return argument_spec
|
||||
|
||||
@@ -57,7 +57,6 @@ options:
|
||||
|
||||
extends_documentation_fragment:
|
||||
- k8s_auth_options
|
||||
- k8s_resource_options
|
||||
- kubevirt_vm_options
|
||||
- kubevirt_common_options
|
||||
|
||||
@@ -112,7 +111,7 @@ import copy
|
||||
import traceback
|
||||
|
||||
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC, COMMON_ARG_SPEC
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC
|
||||
|
||||
try:
|
||||
from openshift.dynamic.client import ResourceInstance
|
||||
@@ -139,8 +138,7 @@ class KubeVirtVMIRS(KubeVirtRawModule):
|
||||
@property
|
||||
def argspec(self):
|
||||
""" argspec property builder """
|
||||
argument_spec = copy.deepcopy(COMMON_ARG_SPEC)
|
||||
argument_spec.update(copy.deepcopy(AUTH_ARG_SPEC))
|
||||
argument_spec = copy.deepcopy(AUTH_ARG_SPEC)
|
||||
argument_spec.update(copy.deepcopy(VM_COMMON_ARG_SPEC))
|
||||
argument_spec.update(copy.deepcopy(VMIR_ARG_SPEC))
|
||||
return argument_spec
|
||||
|
||||
@@ -26,6 +26,16 @@ version_added: "2.8"
|
||||
author: KubeVirt Team (@kubevirt)
|
||||
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
- Name of the Template object.
|
||||
required: true
|
||||
type: str
|
||||
namespace:
|
||||
description:
|
||||
- Namespace where the Template object exists.
|
||||
required: true
|
||||
type: str
|
||||
objects:
|
||||
description:
|
||||
- List of any valid API objects, such as a I(DeploymentConfig), I(Service), etc. The object
|
||||
@@ -129,9 +139,7 @@ options:
|
||||
|
||||
extends_documentation_fragment:
|
||||
- k8s_auth_options
|
||||
- k8s_resource_options
|
||||
- k8s_state_options
|
||||
- k8s_name_options
|
||||
|
||||
requirements:
|
||||
- python >= 2.7
|
||||
@@ -197,7 +205,7 @@ kubevirt_template:
|
||||
import copy
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC, COMMON_ARG_SPEC
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC
|
||||
|
||||
from ansible.module_utils.kubevirt import (
|
||||
virtdict,
|
||||
@@ -207,12 +215,15 @@ from ansible.module_utils.kubevirt import (
|
||||
|
||||
|
||||
TEMPLATE_ARG_SPEC = {
|
||||
'name': {'required': True},
|
||||
'namespace': {'required': True},
|
||||
'state': {
|
||||
'type': 'str',
|
||||
'choices': [
|
||||
'present', 'absent'
|
||||
],
|
||||
'default': 'present'
|
||||
'default': 'present',
|
||||
'choices': ['present', 'absent'],
|
||||
},
|
||||
'force': {
|
||||
'type': 'bool',
|
||||
'default': False,
|
||||
},
|
||||
'merge_type': {
|
||||
'type': 'list',
|
||||
@@ -271,8 +282,7 @@ class KubeVirtVMTemplate(KubeVirtRawModule):
|
||||
@property
|
||||
def argspec(self):
|
||||
""" argspec property builder """
|
||||
argument_spec = copy.deepcopy(COMMON_ARG_SPEC)
|
||||
argument_spec.update(copy.deepcopy(AUTH_ARG_SPEC))
|
||||
argument_spec = copy.deepcopy(AUTH_ARG_SPEC)
|
||||
argument_spec.update(TEMPLATE_ARG_SPEC)
|
||||
return argument_spec
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ options:
|
||||
|
||||
extends_documentation_fragment:
|
||||
- k8s_auth_options
|
||||
- k8s_resource_options
|
||||
- kubevirt_vm_options
|
||||
- kubevirt_common_options
|
||||
|
||||
@@ -210,7 +209,7 @@ kubevirt_vm:
|
||||
import copy
|
||||
import traceback
|
||||
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC, COMMON_ARG_SPEC
|
||||
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC
|
||||
|
||||
try:
|
||||
from openshift.dynamic.client import ResourceInstance
|
||||
@@ -243,8 +242,7 @@ class KubeVirtVM(KubeVirtRawModule):
|
||||
@property
|
||||
def argspec(self):
|
||||
""" argspec property builder """
|
||||
argument_spec = copy.deepcopy(COMMON_ARG_SPEC)
|
||||
argument_spec.update(copy.deepcopy(AUTH_ARG_SPEC))
|
||||
argument_spec = copy.deepcopy(AUTH_ARG_SPEC)
|
||||
argument_spec.update(VM_COMMON_ARG_SPEC)
|
||||
argument_spec.update(VM_ARG_SPEC)
|
||||
return argument_spec
|
||||
|
||||
Reference in New Issue
Block a user