return_common: Clean up parameter types (#52524)

This PR includes:
- Parameter types added
- Copyright format fixes
- Short license statement
pull/52605/head
Dag Wieers 5 years ago committed by Sandra McCann
parent 1d3eb0bafd
commit 2cb9d9da14

@ -1,53 +1,40 @@
# Copyright (c) 2016 Ansible, Inc # -*- coding: utf-8 -*-
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Copyright: (c) 2016, Ansible, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
class ModuleDocFragment(object):
# Standard documentation fragment # Standard documentation fragment
RETURN = ''' RETURN = r'''
changed: changed:
description: Whether the module affected changes on the target. description: Whether the module affected changes on the target.
returned: always returned: always
type: bool type: bool
sample: False sample: false
failed: failed:
description: Whether the module failed to execute. description: Whether the module failed to execute.
returned: always returned: always
type: bool type: bool
sample: True sample: true
msg: msg:
description: Human-readable message. description: Human-readable message.
returned: as needed returned: as needed
type: string type: str
sample: "all ok" sample: all ok
skipped: skipped:
description: Whether the module was skipped. description: Whether the module was skipped.
returned: always returned: always
type: bool type: bool
sample: False sample: false
results: results:
description: List of module results, description: List of module results,
returned: when using a loop. returned: when using a loop.
type: list type: list
sample: [{changed: True, msg: 'first item changed'}, {changed: False, msg: 'second item ok'}] sample: [{changed: True, msg: 'first item changed'}, {changed: False, msg: 'second item ok'}]
exception: exception:
description: Optional information from a handled error. description: Optional information from a handled error.
returned: on some errors returned: on some errors
type: string type: str
sample: 'Unknown error' sample: Unknown error
''' '''

Loading…
Cancel
Save