Add optional headers to utm modules (#49856)

* removed info declaration from documentation fragment as this is not implemented
* added optional headers for POST and PUT requests
* updated documentation
* added missing headers field decalaration
* removed info choice from state field
* added tests for the new utm_utils function
* fixed class invocation
* added missing required params
* fixed the pytests
This commit is contained in:
Johannes Brunswicker 2019-01-17 14:36:50 +01:00 committed by Abhijeet Kasurde
commit c6d404cbe9
3 changed files with 86 additions and 6 deletions

View file

@ -5,6 +5,11 @@
class ModuleDocFragment(object):
DOCUMENTATION = """
options:
headers:
description:
- A dictionary of additional headers to be sent to POST and PUT requests.
- Is needed for some modules
required: false
utm_host:
description:
- The REST Endpoint of the Sophos UTM.
@ -35,10 +40,8 @@ options:
- The desired state of the object.
- C(present) will create or update an object
- C(absent) will delete an object if it was present
- C(info) will return the object details
choices:
- present
- absent
- info
default: present
"""