Debian Codegraph @

ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_reset_sic.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_reset_sic
33 short_description: Reset Secure Internal Communication (SIC). To complete the reset operation need also to reset the device in the Check Point Configuration
34 Tool (by running cpconfig in Clish or Expert mode). Communication will not be possible until you reset and re-initialize the device properly.
35 description:
36 - Reset Secure Internal Communication (SIC). To complete the reset operation need also to reset the device in the Check Point Configuration Tool (by
37 running cpconfig in Clish or Expert mode). Communication will not be possible until you reset and re-initialize the device properly.
38 - All operations are performed over Web Services API.
39 - Available from R81.20 management version.
40 version_added: "3.0.0"
41 author: "Eden Brillant (@chkp-edenbr)"
42 options:
43 name:
44 description:
45 - Gateway, cluster member or Check Point host name.
46 type: str
47 auto_publish_session:
48 description:
49 - Publish the current session if changes have been performed after task completes.
50 type: bool
51 extends_documentation_fragment: check_point.mgmt.checkpoint_commands
52 """
53
54 EXAMPLES = """
55 - name: reset-sic
56 cp_mgmt_reset_sic:
57 name: gw1
58 """
59
60 RETURN = """
61 cp_mgmt_reset_sic:
62 description: The checkpoint reset-sic output.
63 returned: always.
64 type: dict
65 """
66
67 from ansible.module_utils.basic import AnsibleModule
68 from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import (
69 checkpoint_argument_spec_for_commands,
70 api_command,
71 )
72
73
74 def main():
75 argument_spec = dict(
76 name=dict(type="str"), auto_publish_session=dict(type="bool")
77 )
78 argument_spec.update(checkpoint_argument_spec_for_commands)
79
80 module = AnsibleModule(argument_spec=argument_spec)
81
82 command = "reset-sic"
83
84 result = api_command(module, command)
85 module.exit_json(**result)
86
87
88 if __name__ == "__main__":
89 main()