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

Document return values #901

Merged
merged 5 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
23 changes: 22 additions & 1 deletion plugins/modules/architecture.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,28 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
architectures:
description: List of architectures.
type: list
elements: dict
contains:
id:
description: Database id of the architecture.
type: int
name:
description: Name of the architecture.
type: str
operatinsystem_ids:
description: Database ids of associated operatingsystems.
type: list
elements: int
'''

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

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
34 changes: 33 additions & 1 deletion plugins/modules/bookmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,39 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
bookmarks:
description: List of bookmarks.
type: list
elements: dict
contains:
id:
description: Database id of the bookmark.
type: int
name:
description: Name of the bookmark.
type: str
controller:
description: Controller, the query is performed on.
type: str
query:
description: Query to be performed on the controller.
type: str
public:
description: Publicity of the bookmark.
type: bool
owner_type:
description: Class of the owner entity.
type: str
owner_id:
description: Database id of the owner entity.
type: int
'''

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

Expand Down
46 changes: 45 additions & 1 deletion plugins/modules/compute_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,51 @@
state: present
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
compute_attributes:
description: List of compute attributes.
type: list
elements: dict
contains:
id:
description: Database id of the compute_attribute.
type: int
compute_profile_id:
description: Database id of the associated compute profile.
type: int
compute_profile_name:
description: Name of the associated compute profile.
type: str
compute_resource_id:
description: Database id of the associated compute resource.
type: int
compute_resource_name:
description: Name of the associated compute resource.
type: str
created_at:
description: Creation date of the compute attribute.
type: str
updated_at:
description: Date of last change to the compute attribute.
type: str
name:
description: Generated friendly name for the compute attribute.
type: str
provider_friendly_name:
description: Name of the provider type of the compute resource.
type: str
attributes:
description: Effective attributes for the given combination of compute profile and resource.
type: dict
vm_attrs:
description: Configured attributes.
type: dict
'''

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

Expand Down
22 changes: 21 additions & 1 deletion plugins/modules/compute_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,27 @@
state: absent
'''

RETURN = ''' # '''
RETURN = '''
entity:
description: Final state of the affected entities grouped by their type.
returned: success
type: dict
contains:
compute_profiles:
description: List of compute profiles.
type: list
elements: dict
contains:
id:
description: Database id of the compute profile.
type: int
name:
description: Name of the compute profile.
type: str
compute_attributes:
description: Attributes for this compute profile.
type: list
'''

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

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
Loading