Debian Codegraph @

ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_test_sic_status.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 = {
25 "metadata_version": "1.1",
26 "status": ["preview"],
27 "supported_by": "community",
28 }
29
30 DOCUMENTATION = """
31 ---
32 module: cp_mgmt_test_sic_status
33 short_description: Test SIC Status reflects the state of the gateway after it has received the certificate issued by the
34 ICA. If the SIC status is Unknown then there is no connection between the gateway and the Security
35 Management Server. If the SIC status is No Communication, an error message will appear. It may
36 contain specific instructions on how to fix the situation.
37 description:
38 - Test SIC Status reflects the state of the gateway after it has received the certificate issued by the ICA. If the SIC status is Unknown then there is
39 no connection between the gateway and the Security Management Server. If the SIC status is No Communication, an error message will appear. It may contain
40 specific instructions on how to fix the situation.
41 - All operations are performed over Web Services API.
42 - Available from R81.20 management version.
43 version_added: "3.0.0"
44 author: "Eden Brillant (@chkp-edenbr)"
45 options:
46 name:
47 description:
48 - Gateway, cluster member or Check Point host name.
49 type: str
50 extends_documentation_fragment: check_point.mgmt.checkpoint_commands
51 """
52
53 EXAMPLES = """
54 - name: test-sic-status
55 cp_mgmt_test_sic_status:
56 name: gw1
57 """
58
59 RETURN = """
60 cp_mgmt_test_sic_status:
61 description: The checkpoint test-sic-status output.
62 returned: always.
63 type: dict
64 """
65
66 from ansible.module_utils.basic import AnsibleModule
67 from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import (
68 checkpoint_argument_spec_for_commands,
69 api_command,
70 )
71
72
73 def main():
74 argument_spec = dict(name=dict(type="str"))
75 argument_spec.update(checkpoint_argument_spec_for_commands)
76
77 module = AnsibleModule(argument_spec=argument_spec)
78
79 command = "test-sic-status"
80
81 result = api_command(module, command)
82 module.exit_json(**result)
83
84
85 if __name__ == "__main__":
86 main()