Debian Codegraph @

ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_show_gateway_capabilities.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 #
4 # Ansible module to manage CheckPoint Firewall (c) 2019
5 #
6 # Ansible is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # Ansible is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 from __future__ import (absolute_import, division, print_function)
21
22 __metaclass__ = type
23
24 ANSIBLE_METADATA = {'metadata_version': '1.1',
25 'status': ['preview'],
26 'supported_by': 'community'}
27
28 DOCUMENTATION = """
29 ---
30 module: cp_mgmt_show_gateway_capabilities
31 short_description: Show supported Check Point Gateway capabilities such as versions, hardwares, platforms and blades.
32 description:
33 - Show supported Check Point Gateway capabilities such as versions, hardwares, platforms and blades.
34 - All operations are performed over Web Services API.
35 - Available from R82 management version.
36 version_added: "6.0.0"
37 author: "Eden Brillant (@chkp-edenbr)"
38 options:
39 hardware:
40 description:
41 - Check Point hardware.
42 type: str
43 platform:
44 description:
45 - Check Point gateway platform.
46 type: str
47 choices: ['smb', 'quantum', 'maestro', 'elasticxl', 'vsnext', 'open server', 'other']
48 version:
49 description:
50 - Gateway platform version.
51 type: str
52 extends_documentation_fragment: check_point.mgmt.checkpoint_commands
53 """
54
55 EXAMPLES = """
56 - name: show-gateway-capabilities
57 cp_mgmt_show_gateway_capabilities:
58 platform: smb
59 """
60
61 RETURN = """
62 cp_mgmt_show_gateway_capabilities:
63 description: The checkpoint show-gateway-capabilities output.
64 returned: always.
65 type: dict
66 """
67
68 from ansible.module_utils.basic import AnsibleModule
69 from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import checkpoint_argument_spec_for_commands, api_command
70
71
72 def main():
73 argument_spec = dict(
74 hardware=dict(type='str'),
75 platform=dict(type='str', choices=['smb', 'quantum', 'maestro', 'elasticxl', 'vsnext', 'open server', 'other']),
76 version=dict(type='str')
77 )
78 argument_spec.update(checkpoint_argument_spec_for_commands)
79
80 module = AnsibleModule(argument_spec=argument_spec)
81
82 command = "show-gateway-capabilities"
83
84 result = api_command(module, command)
85 module.exit_json(**result)
86
87
88 if __name__ == '__main__':
89 main()