Skip to content

Commit

Permalink
Add boilerplate return documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellweg committed Jul 25, 2020
1 parent 89c7147 commit 387c724
Show file tree
Hide file tree
Showing 42 changed files with 484 additions and 42 deletions.
12 changes: 11 additions & 1 deletion plugins/modules/activation_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,17 @@
service_level: Standard
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
activation_keys:
description: List of activation keys.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule

Expand Down
13 changes: 12 additions & 1 deletion plugins/modules/auth_source_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,18 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
auth_source_ldaps:
description: List of auth sources for LDAP.
type: list
elements: dict
'''


from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanTaxonomicEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/compute_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,17 @@
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
compute_resources:
description: List of compute resources.
type: list
elements: dict
'''


from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanTaxonomicEntityAnsibleModule
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/config_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
config_groups:
description: List of config groups.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/content_credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@
content: "{{ lookup('file', 'RPM-GPG-KEY-my-repo') }}"
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
content_credentials:
description: List of content credentials.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/content_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,17 @@
latest: true
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
content_views:
description: List of content views.
type: list
elements: dict
'''

import copy
from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/content_view_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,17 @@
inclusion: True
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
content_view_filters:
description: List of content view filters.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloMixin, ForemanStatelessEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/content_view_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,17 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
content_view_versions:
description: List of content view versions.
type: list
elements: dict
'''


from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
domains:
description: List of domains.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanTaxonomicEntityAnsibleModule, NestedParametersMixin

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/external_usergroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
external_usergroups:
description: List of external usergroups.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/global_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,17 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
global_parameters:
description: List of global parameters.
type: list
elements: dict
'''


from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanEntityAnsibleModule, parameter_value_to_str
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/hardware_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
hardware_models:
description: List of hardware models.
type: list
elements: dict
'''


from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanEntityAnsibleModule
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,17 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
hosts:
description: List of hosts.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import (
ensure_puppetclasses,
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/host_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
host_collections:
description: List of host collections.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/hostgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,17 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
hostgroups:
description: List of hostgroups.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import (
ensure_puppetclasses,
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
http_proxies:
description: List of HTTP proxies.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanTaxonomicEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@
architecture: "x86_64"
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
images:
description: List of images.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanEntityAnsibleModule

Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/installation_medium.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,17 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
media:
description: List of installation media.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import ForemanTaxonomicEntityAnsibleModule, OS_LIST

Expand Down
16 changes: 15 additions & 1 deletion plugins/modules/job_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,21 @@
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
job_templates:
description: List of job templates.
type: list
elements: dict
template_inputs:
description: List of template inputs associated with the job template.
type: list
elements: dict
'''

import os
from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import (
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/lifecycle_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,17 @@
state: "present"
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
lifecycle_environments:
description: List of lifecycle environments.
type: list
elements: dict
'''

from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule

Expand Down
Loading

0 comments on commit 387c724

Please sign in to comment.