Debian Codegraph @

ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_distribute_cloud_licenses.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_distribute_cloud_licenses
31 short_description: Distribute licenses to target CloudGuard gateways.
32 description:
33 - Distribute licenses to target CloudGuard gateways. For more information, see the <A HREF =
34 "https://sc1.checkpoint.com/documents/IaaS/WebAdminGuides/EN/CP_CloudGuard_Central_License_Tool_Admin_Guide/Content/Topics-Central-License-Tool/Overview.h
35 m?tocpath=Overview%7C_____0#Overview"><b>Central License Administration Guide</b></A>.
36 - All operations are performed over Web Services API.
37 - Available from R81.20 JHF management version.
38 version_added: "5.2.0"
39 author: "Eden Brillant (@chkp-edenbr)"
40 options:
41 targets:
42 description:
43 - Targets are uid or name of the security gateway(s). In case no target specified, the license will be distributed to all CloudGuard security gateways.
44 type: list
45 elements: str
46 extends_documentation_fragment: check_point.mgmt.checkpoint_commands
47 """
48
49 EXAMPLES = """
50 - name: distribute-cloud-licenses
51 cp_mgmt_distribute_cloud_licenses:
52 targets:
53 - GW1
54 - GW2
55 """
56
57 RETURN = """
58 cp_mgmt_distribute_cloud_licenses:
59 description: The checkpoint distribute-cloud-licenses output.
60 returned: always.
61 type: dict
62 """
63
64 from ansible.module_utils.basic import AnsibleModule
65 from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import checkpoint_argument_spec_for_commands, api_command
66
67
68 def main():
69 argument_spec = dict(
70 targets=dict(type='list', elements='str')
71 )
72 argument_spec.update(checkpoint_argument_spec_for_commands)
73
74 module = AnsibleModule(argument_spec=argument_spec)
75
76 command = "distribute-cloud-licenses"
77
78 result = api_command(module, command)
79 module.exit_json(**result)
80
81
82 if __name__ == '__main__':
83 main()