Skip to content

Commit 56e7f20

Browse files
committed
Ansible VSNext
1 parent 72ad792 commit 56e7f20

26 files changed

+712
-13
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ Modules
121121
* `cp_gaia_expert_password_facts` – get expert hash password of a Check Point machine over Web Services API.
122122
* `cp_gaia_time_and_date` – manage time and date and timezone of a Check Point machine over Web Services API.
123123
* `cp_gaia_time_and_date_facts` – get time and date and timezone of a Check Point machine over Web Services API.
124+
* `cp_gaia_virtual_systems_facts` – Get virtual-system objects facts on Check Point over Web Services API.
125+
* `cp_gaia_virtual_switch` – Manages virtual switch on Check Point Gateway over Web Services API.
126+
* `cp_gaia_virtual_switch_facts` – Get virtual-switch objects facts on Check Point over Web Services API.
127+
* `cp_gaia_virtual_gateway` – Get virtual-gateway objects facts on Check Point over Web Services API.
128+
* `cp_gaia_virtual_gateway_facts` – Get virtual-gateway objects facts on Check Point over Web Services API.
129+
* `cp_gaia_virtual_vsnext_state_facts` – Show the VSNext state on Check Point over Web Services API.
124130

125131
### Code of Conduct
126132
This collection follows the Ansible project's

plugins/modules/cp_gaia_bond_interface.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
type: str
4242
default: present
4343
choices: [present, absent]
44+
virtual_system_id:
45+
description: Virtual System ID.
46+
required: false
47+
type: int
4448
name:
4549
description:
4650
- Interface name with format C(bond<id>), valid values are bond1, bond2, bond3 .. etc.
@@ -151,6 +155,10 @@
151155
description: Media monitoring interval, Valid values are C(1-5000).
152156
required: false
153157
type: int
158+
virtual_system_id:
159+
description: Virtual System ID.
160+
required: false
161+
type: int
154162
"""
155163

156164
EXAMPLES = """
@@ -203,7 +211,8 @@ def main():
203211
primary=dict(type='str'),
204212
lacp_rate=dict(type='str', choices=['slow', 'fast']),
205213
mode=dict(type='str', choices=['round-robin', 'active-backup', 'xor', '8023AD']),
206-
mii_interval=dict(type='int')
214+
mii_interval=dict(type='int'),
215+
virtual_system_id=dict(type="int", required=False)
207216
)
208217

209218
fields.update(checkpoint_argument_spec_for_all)

plugins/modules/cp_gaia_bond_interface_facts.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
description: Interface name to show. If not specified, all bond interfaces information is returned.
4040
required: false
4141
type: str
42+
virtual_system_id:
43+
description: Virtual System ID.
44+
required: false
45+
type: int
46+
4247
4348
"""
4449

@@ -70,6 +75,10 @@
7075
- Interface name.
7176
returned: always
7277
type: str
78+
virtual_system_id:
79+
description: Virtual System ID.
80+
returned: always
81+
type: int
7382
ipv4_address:
7483
description: Interface IPv4 address.
7584
returned: always
@@ -216,7 +225,8 @@
216225
def main():
217226
# arguments for the module:
218227
fields = dict(
219-
name=dict(required=False, type='str')
228+
name=dict(required=False, type='str'),
229+
virtual_system_id=dict(required=False, type="int")
220230
)
221231
fields.update(checkpoint_argument_spec_for_all)
222232
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)

plugins/modules/cp_gaia_bridge_interface.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@
122122
required: false
123123
type: list
124124
elements: str
125+
virtual_system_id:
126+
description: Virtual System ID.
127+
required: False
128+
type: int
125129
"""
126130

127131
EXAMPLES = """
@@ -167,7 +171,8 @@ def main():
167171
)
168172
),
169173
mtu=dict(type='int'),
170-
members=dict(type='list', elements='str')
174+
members=dict(type='list', elements='str'),
175+
virtual_system_id=dict(type="int", required=False)
171176
)
172177

173178
fields.update(checkpoint_argument_spec_for_all)

plugins/modules/cp_gaia_bridge_interface_facts.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
description: Interface name to show. If not specified, all bridge interfaces information is returned.
4040
required: false
4141
type: str
42+
virtual_system_id:
43+
description: Virtual System ID.
44+
required: false
45+
type: int
4246
4347
"""
4448

@@ -70,6 +74,10 @@
7074
- Interface name.
7175
returned: always
7276
type: str
77+
virtual_system_id:
78+
description: Virtual System ID.
79+
returned: always
80+
type: int
7381
ipv4_address:
7482
description: Interface IPv4 address.
7583
returned: always
@@ -183,7 +191,8 @@
183191
def main():
184192
# arguments for the module:
185193
fields = dict(
186-
name=dict(required=False, type='str')
194+
name=dict(required=False, type='str'),
195+
virtual_system_id=dict(required=False, type="int")
187196
)
188197
fields.update(checkpoint_argument_spec_for_all)
189198
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)

plugins/modules/cp_gaia_dhcp_server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@
9595
description: The IPv4 address of the default gateway for the DHCP clients.
9696
required: False
9797
type: str
98+
virtual_system_id:
99+
description: Virtual System ID.
100+
required: False
101+
type: int
98102
dns:
99103
description: DNS configuration.
100104
required: False
@@ -133,7 +137,7 @@
133137
"default_gateway": "4.5.6.1",
134138
"ip_pools": [{"start": "4.5.6.5", "end": "4.5.6.7", "enabled": True, "include": "include"}],
135139
"dns": {"domain_name": "my_domain_name", "primary": "8.8.8.8", "secondary": "8.8.8.8", "tertiary": "8.8.4.4"},
136-
"enabled": True}
140+
"enabled": True, virtual_system_id: 0}
137141
]
138142
"""
139143

@@ -154,6 +158,7 @@ def main():
154158
# arguments for the module:
155159
fields = dict(
156160
enabled=dict(type='bool'),
161+
virtual_system_id=dict(type='int', required=False),
157162
subnets=dict(
158163
type='list', elements='dict',
159164
options=dict(

plugins/modules/cp_gaia_dhcp_server_facts.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@
107107
description: The IPv4 address of the default gateway for the DHCP clients.
108108
returned: always
109109
type: str
110+
virtual_system_id:
111+
description: Virtual System ID.
112+
returned: always
113+
type: int
110114
dns:
111115
description: DNS configuration.
112116
returned: always
@@ -139,7 +143,9 @@
139143

140144
def main():
141145
# arguments for the module:
142-
fields = dict()
146+
fields = dict(
147+
virtual_system_id=dict(type="int", required=False)
148+
)
143149
fields.update(checkpoint_argument_spec_for_all)
144150
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
145151

plugins/modules/cp_gaia_dns.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def main():
8787
suffix=dict(type="str"),
8888
primary=dict(type="str"),
8989
tertiary=dict(type="str"),
90-
secondary=dict(type="str")
90+
secondary=dict(type="str"),
91+
virtual_system_id=dict(type="int", required=False)
9192
)
9293
fields.update(checkpoint_argument_spec_for_all)
9394
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)

plugins/modules/cp_gaia_dns_facts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@
8282

8383
def main():
8484
# arguments for the module:
85-
fields = dict()
85+
fields = dict(
86+
virtual_system_id=dict(type="int", required=False)
87+
)
8688
fields.update(checkpoint_argument_spec_for_all)
8789
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
8890
api_call_object = 'dns'

plugins/modules/cp_gaia_physical_interface.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@
9999
description: Set transmit buffer size for interfaces.
100100
required: false
101101
type: int
102+
virtual_system_id:
103+
description: Virtual System ID.
104+
required: false
105+
type: int
102106
103107
"""
104108

@@ -140,7 +144,8 @@ def main():
140144
mac_addr=dict(required=False, type="str"),
141145
rx_ringsize=dict(required=False, type="int"),
142146
speed=dict(required=False, type="str"),
143-
ipv6_mask_length=dict(required=False, type="int")
147+
ipv6_mask_length=dict(required=False, type="int"),
148+
virtual_system_id=dict(required=False, type="int")
144149
)
145150
fields.update(checkpoint_argument_spec_for_all)
146151
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)

0 commit comments

Comments
 (0)