Skip to content

Commit 584351e

Browse files
committed
Updated modules batch 3
1 parent d4405a7 commit 584351e

40 files changed

+165
-110
lines changed

plugins/modules/cp_mgmt_multicast_address_range.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
description:
3333
- Manages multicast-address-range objects on Check Point devices including creating, updating and removing objects.
3434
- All operations are performed over Web Services API.
35-
version_added: "2.9"
35+
version_added: "1.0.0"
3636
author: "Or Soffer (@chkp-orso)"
3737
options:
3838
name:
@@ -80,6 +80,7 @@
8080
description:
8181
- Collection of tag identifiers.
8282
type: list
83+
elements: str
8384
color:
8485
description:
8586
- Color of the object. Should be one of existing colors.
@@ -101,6 +102,7 @@
101102
description:
102103
- Collection of group identifiers.
103104
type: list
105+
elements: str
104106
ignore_warnings:
105107
description:
106108
- Apply changes ignoring warnings.
@@ -156,15 +158,15 @@ def main():
156158
ip_address_last=dict(type='str'),
157159
ipv4_address_last=dict(type='str'),
158160
ipv6_address_last=dict(type='str'),
159-
tags=dict(type='list'),
161+
tags=dict(type='list', elements='str'),
160162
color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
161163
'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown',
162164
'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', 'coral', 'sea green',
163165
'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna',
164166
'yellow']),
165167
comments=dict(type='str'),
166168
details_level=dict(type='str', choices=['uid', 'standard', 'full']),
167-
groups=dict(type='list'),
169+
groups=dict(type='list', elements='str'),
168170
ignore_warnings=dict(type='bool'),
169171
ignore_errors=dict(type='bool')
170172
)

plugins/modules/cp_mgmt_multicast_address_range_facts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- All operations are performed over Web Services API.
3535
- This module handles both operations, get a specific object and get several objects,
3636
For getting a specific object use the parameter 'name'.
37-
version_added: "2.9"
37+
version_added: "1.0.0"
3838
author: "Or Soffer (@chkp-orso)"
3939
options:
4040
name:
@@ -63,6 +63,7 @@
6363
- Sorts results by the given field. By default the results are sorted in the ascending order by name.
6464
This parameter is relevant only for getting few objects.
6565
type: list
66+
elements: dict
6667
suboptions:
6768
ASC:
6869
description:
@@ -108,15 +109,15 @@ def main():
108109
details_level=dict(type='str', choices=['uid', 'standard', 'full']),
109110
limit=dict(type='int'),
110111
offset=dict(type='int'),
111-
order=dict(type='list', options=dict(
112+
order=dict(type='list', elements='dict', options=dict(
112113
ASC=dict(type='str', choices=['name']),
113114
DESC=dict(type='str', choices=['name'])
114115
)),
115116
show_membership=dict(type='bool')
116117
)
117118
argument_spec.update(checkpoint_argument_spec_for_facts)
118119

119-
module = AnsibleModule(argument_spec=argument_spec)
120+
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
120121

121122
api_call_object = "multicast-address-range"
122123
api_call_object_plural_version = "multicast-address-ranges"

plugins/modules/cp_mgmt_nat_rule_facts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- All operations are performed over Web Services API.
3535
- This module handles both operations, get a specific object and get several objects,
3636
For getting a specific object use the parameter 'name'.
37-
version_added: "2.9"
37+
version_added: "2.0.0"
3838
author: "Or Soffer (@chkp-orso)"
3939
options:
4040
rule_number:
@@ -110,6 +110,7 @@
110110
- Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order.
111111
This parameter is relevant only for getting few objects.
112112
type: list
113+
elements: dict
113114
suboptions:
114115
ASC:
115116
description:
@@ -179,7 +180,7 @@ def main():
179180
)),
180181
limit=dict(type='int'),
181182
offset=dict(type='int'),
182-
order=dict(type='list', options=dict(
183+
order=dict(type='list', elements='dict', options=dict(
183184
ASC=dict(type='str', choices=['name']),
184185
DESC=dict(type='str', choices=['name'])
185186
)),
@@ -189,7 +190,7 @@ def main():
189190
)
190191
argument_spec.update(checkpoint_argument_spec_for_facts)
191192

192-
module = AnsibleModule(argument_spec=argument_spec)
193+
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
193194

194195
api_call_object = "nat-rule"
195196
api_call_object_plural_version = "nat-rulebase"

plugins/modules/cp_mgmt_nat_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
description:
3333
- Manages nat-section objects on Checkpoint devices including creating, updating and removing objects.
3434
- All operations are performed over Web Services API.
35-
version_added: "2.9"
35+
version_added: "2.0.0"
3636
author: "Or Soffer (@chkp-orso)"
3737
options:
3838
package:

plugins/modules/cp_mgmt_network.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
description:
3333
- Manages network objects on Check Point devices including creating, updating and removing objects.
3434
- All operations are performed over Web Services API.
35-
version_added: "2.9"
35+
version_added: "1.0.0"
3636
author: "Or Soffer (@chkp-orso)"
3737
options:
3838
name:
@@ -109,6 +109,7 @@
109109
description:
110110
- Collection of tag identifiers.
111111
type: list
112+
elements: str
112113
broadcast:
113114
description:
114115
- Allow broadcast address inclusion.
@@ -135,6 +136,7 @@
135136
description:
136137
- Collection of group identifiers.
137138
type: list
139+
elements: str
138140
ignore_warnings:
139141
description:
140142
- Apply changes ignoring warnings.
@@ -199,7 +201,7 @@ def main():
199201
install_on=dict(type='str'),
200202
method=dict(type='str', choices=['hide', 'static'])
201203
)),
202-
tags=dict(type='list'),
204+
tags=dict(type='list', elements='str'),
203205
broadcast=dict(type='str', choices=['disallow', 'allow']),
204206
color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
205207
'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown',
@@ -208,7 +210,7 @@ def main():
208210
'yellow']),
209211
comments=dict(type='str'),
210212
details_level=dict(type='str', choices=['uid', 'standard', 'full']),
211-
groups=dict(type='list'),
213+
groups=dict(type='list', elements='str'),
212214
ignore_warnings=dict(type='bool'),
213215
ignore_errors=dict(type='bool')
214216
)

plugins/modules/cp_mgmt_network_facts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- All operations are performed over Web Services API.
3535
- This module handles both operations, get a specific object and get several objects,
3636
For getting a specific object use the parameter 'name'.
37-
version_added: "2.9"
37+
version_added: "1.0.0"
3838
author: "Or Soffer (@chkp-orso)"
3939
options:
4040
name:
@@ -63,6 +63,7 @@
6363
- Sorts results by the given field. By default the results are sorted in the ascending order by name.
6464
This parameter is relevant only for getting few objects.
6565
type: list
66+
elements: dict
6667
suboptions:
6768
ASC:
6869
description:
@@ -110,15 +111,15 @@ def main():
110111
details_level=dict(type='str', choices=['uid', 'standard', 'full']),
111112
limit=dict(type='int'),
112113
offset=dict(type='int'),
113-
order=dict(type='list', options=dict(
114+
order=dict(type='list', elements='dict', options=dict(
114115
ASC=dict(type='str', choices=['name']),
115116
DESC=dict(type='str', choices=['name'])
116117
)),
117118
show_membership=dict(type='bool')
118119
)
119120
argument_spec.update(checkpoint_argument_spec_for_facts)
120121

121-
module = AnsibleModule(argument_spec=argument_spec)
122+
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
122123

123124
api_call_object = "network"
124125
api_call_object_plural_version = "networks"

plugins/modules/cp_mgmt_package.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
description:
3333
- Manages package objects on Check Point devices including creating, updating and removing objects.
3434
- All operations are performed over Web Services API.
35-
version_added: "2.9"
35+
version_added: "1.0.0"
3636
author: "Or Soffer (@chkp-orso)"
3737
options:
3838
name:
@@ -52,6 +52,7 @@
5252
description:
5353
- Which Gateways identified by the name or UID to install the policy on.
5454
type: list
55+
elements: str
5556
qos:
5657
description:
5758
- True - enables, False - disables QoS policy, empty - nothing is changed.
@@ -65,6 +66,7 @@
6566
description:
6667
- Collection of tag identifiers.
6768
type: list
69+
elements: str
6870
threat_prevention:
6971
description:
7072
- True - enables, False - disables Threat policy, empty - nothing is changed.
@@ -107,6 +109,7 @@
107109
description:
108110
- Collection of Access layer objects to be added identified by the name or UID.
109111
type: list
112+
elements: dict
110113
suboptions:
111114
name:
112115
description:
@@ -120,10 +123,12 @@
120123
description:
121124
- Collection of Access layer objects to be removed identified by the name or UID.
122125
type: list
126+
elements: str
123127
value:
124128
description:
125129
- Collection of Access layer objects to be set identified by the name or UID. Replaces existing Access layers.
126130
type: list
131+
elements: str
127132
threat_layers:
128133
description:
129134
- Threat policy layers.
@@ -133,6 +138,7 @@
133138
description:
134139
- Collection of Threat layer objects to be added identified by the name or UID.
135140
type: list
141+
elements: dict
136142
suboptions:
137143
name:
138144
description:
@@ -146,10 +152,12 @@
146152
description:
147153
- Collection of Threat layer objects to be removed identified by the name or UID.
148154
type: list
155+
elements: str
149156
value:
150157
description:
151158
- Collection of Threat layer objects to be set identified by the name or UID. Replaces existing Threat layers.
152159
type: list
160+
elements: str
153161
extends_documentation_fragment: check_point.mgmt.checkpoint_objects
154162
"""
155163

@@ -198,10 +206,10 @@ def main():
198206
name=dict(type='str', required=True),
199207
access=dict(type='bool'),
200208
desktop_security=dict(type='bool'),
201-
installation_targets=dict(type='list'),
209+
installation_targets=dict(type='list', elements='str'),
202210
qos=dict(type='bool'),
203211
qos_policy_type=dict(type='str', choices=['recommended', 'express']),
204-
tags=dict(type='list'),
212+
tags=dict(type='list', elements='str'),
205213
threat_prevention=dict(type='bool'),
206214
vpn_traditional_mode=dict(type='bool'),
207215
color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green',
@@ -214,20 +222,20 @@ def main():
214222
ignore_warnings=dict(type='bool'),
215223
ignore_errors=dict(type='bool'),
216224
access_layers=dict(type='dict', options=dict(
217-
add=dict(type='list', options=dict(
225+
add=dict(type='list', elements='dict', options=dict(
218226
name=dict(type='str'),
219227
position=dict(type='int')
220228
)),
221-
remove=dict(type='list'),
222-
value=dict(type='list')
229+
remove=dict(type='list', elements='str'),
230+
value=dict(type='list', elements='str')
223231
)),
224232
threat_layers=dict(type='dict', options=dict(
225-
add=dict(type='list', options=dict(
233+
add=dict(type='list', elements='dict', options=dict(
226234
name=dict(type='str'),
227235
position=dict(type='int')
228236
)),
229-
remove=dict(type='list'),
230-
value=dict(type='list')
237+
remove=dict(type='list', elements='str'),
238+
value=dict(type='list', elements='str')
231239
))
232240
)
233241
argument_spec.update(checkpoint_argument_spec_for_objects)

plugins/modules/cp_mgmt_package_facts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
- All operations are performed over Web Services API.
3535
- This module handles both operations, get a specific object and get several objects,
3636
For getting a specific object use the parameter 'name'.
37-
version_added: "2.9"
37+
version_added: "1.0.0"
3838
author: "Or Soffer (@chkp-orso)"
3939
options:
4040
name:
@@ -63,6 +63,7 @@
6363
- Sorts results by the given field. By default the results are sorted in the ascending order by name.
6464
This parameter is relevant only for getting few objects.
6565
type: list
66+
elements: dict
6667
suboptions:
6768
ASC:
6869
description:
@@ -106,14 +107,14 @@ def main():
106107
details_level=dict(type='str', choices=['uid', 'standard', 'full']),
107108
limit=dict(type='int'),
108109
offset=dict(type='int'),
109-
order=dict(type='list', options=dict(
110+
order=dict(type='list', elements='dict', options=dict(
110111
ASC=dict(type='str', choices=['name']),
111112
DESC=dict(type='str', choices=['name'])
112113
))
113114
)
114115
argument_spec.update(checkpoint_argument_spec_for_facts)
115116

116-
module = AnsibleModule(argument_spec=argument_spec)
117+
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
117118

118119
api_call_object = "package"
119120
api_call_object_plural_version = "packages"

plugins/modules/cp_mgmt_publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
description:
3333
- All the changes done by this user will be seen by all users only after publish is called.
3434
- All operations are performed over Web Services API.
35-
version_added: "2.9"
35+
version_added: "1.0.0"
3636
author: "Or Soffer (@chkp-orso)"
3737
options:
3838
uid:

plugins/modules/cp_mgmt_put_file.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@
3232
description:
3333
- put file on Check Point over Web Services API
3434
- All operations are performed over Web Services API.
35-
version_added: "2.9"
35+
version_added: "1.0.0"
3636
author: "Or Soffer (@chkp-orso)"
3737
options:
3838
targets:
3939
description:
4040
- On what targets to execute this command. Targets may be identified by their name, or object unique identifier.
4141
type: list
42+
elements: str
4243
file_content:
4344
description:
4445
- N/A
@@ -81,7 +82,7 @@
8182

8283
def main():
8384
argument_spec = dict(
84-
targets=dict(type='list'),
85+
targets=dict(type='list', elements='str'),
8586
file_content=dict(type='str'),
8687
file_name=dict(type='str'),
8788
file_path=dict(type='str'),

0 commit comments

Comments
 (0)