Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible VSNext #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ Modules
* `cp_gaia_expert_password_facts` – get expert hash password of a Check Point machine over Web Services API.
* `cp_gaia_time_and_date` – manage time and date and timezone of a Check Point machine over Web Services API.
* `cp_gaia_time_and_date_facts` – get time and date and timezone of a Check Point machine over Web Services API.
* `cp_gaia_virtual_systems_facts` – Get virtual-system objects facts on Check Point over Web Services API.
* `cp_gaia_virtual_switch` – Manages virtual switch on Check Point Gateway over Web Services API.
* `cp_gaia_virtual_switch_facts` – Get virtual-switch objects facts on Check Point over Web Services API.
* `cp_gaia_virtual_gateway` – Get virtual-gateway objects facts on Check Point over Web Services API.
* `cp_gaia_virtual_gateway_facts` – Get virtual-gateway objects facts on Check Point over Web Services API.
* `cp_gaia_virtual_vsnext_state_facts` – Show the VSNext state on Check Point over Web Services API.

### Code of Conduct
This collection follows the Ansible project's
Expand Down
11 changes: 10 additions & 1 deletion plugins/modules/cp_gaia_bond_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
type: str
default: present
choices: [present, absent]
virtual_system_id:
description: Virtual System ID.
required: false
type: int
name:
description:
- Interface name with format C(bond<id>), valid values are bond1, bond2, bond3 .. etc.
Expand Down Expand Up @@ -151,6 +155,10 @@
description: Media monitoring interval, Valid values are C(1-5000).
required: false
type: int
virtual_system_id:
description: Virtual System ID.
required: false
type: int
"""

EXAMPLES = """
Expand Down Expand Up @@ -203,7 +211,8 @@ def main():
primary=dict(type='str'),
lacp_rate=dict(type='str', choices=['slow', 'fast']),
mode=dict(type='str', choices=['round-robin', 'active-backup', 'xor', '8023AD']),
mii_interval=dict(type='int')
mii_interval=dict(type='int'),
virtual_system_id=dict(type="int", required=False)
)

fields.update(checkpoint_argument_spec_for_all)
Expand Down
12 changes: 11 additions & 1 deletion plugins/modules/cp_gaia_bond_interface_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
description: Interface name to show. If not specified, all bond interfaces information is returned.
required: false
type: str
virtual_system_id:
description: Virtual System ID.
required: false
type: int


"""

Expand Down Expand Up @@ -70,6 +75,10 @@
- Interface name.
returned: always
type: str
virtual_system_id:
description: Virtual System ID.
returned: always
type: int
ipv4_address:
description: Interface IPv4 address.
returned: always
Expand Down Expand Up @@ -216,7 +225,8 @@
def main():
# arguments for the module:
fields = dict(
name=dict(required=False, type='str')
name=dict(required=False, type='str'),
virtual_system_id=dict(required=False, type="int")
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
7 changes: 6 additions & 1 deletion plugins/modules/cp_gaia_bridge_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@
required: false
type: list
elements: str
virtual_system_id:
description: Virtual System ID.
required: False
type: int
"""

EXAMPLES = """
Expand Down Expand Up @@ -167,7 +171,8 @@ def main():
)
),
mtu=dict(type='int'),
members=dict(type='list', elements='str')
members=dict(type='list', elements='str'),
virtual_system_id=dict(type="int", required=False)
)

fields.update(checkpoint_argument_spec_for_all)
Expand Down
11 changes: 10 additions & 1 deletion plugins/modules/cp_gaia_bridge_interface_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
description: Interface name to show. If not specified, all bridge interfaces information is returned.
required: false
type: str
virtual_system_id:
description: Virtual System ID.
required: false
type: int

"""

Expand Down Expand Up @@ -70,6 +74,10 @@
- Interface name.
returned: always
type: str
virtual_system_id:
description: Virtual System ID.
returned: always
type: int
ipv4_address:
description: Interface IPv4 address.
returned: always
Expand Down Expand Up @@ -183,7 +191,8 @@
def main():
# arguments for the module:
fields = dict(
name=dict(required=False, type='str')
name=dict(required=False, type='str'),
virtual_system_id=dict(required=False, type="int")
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
7 changes: 6 additions & 1 deletion plugins/modules/cp_gaia_dhcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
description: The IPv4 address of the default gateway for the DHCP clients.
required: False
type: str
virtual_system_id:
description: Virtual System ID.
required: False
type: int
dns:
description: DNS configuration.
required: False
Expand Down Expand Up @@ -133,7 +137,7 @@
"default_gateway": "4.5.6.1",
"ip_pools": [{"start": "4.5.6.5", "end": "4.5.6.7", "enabled": True, "include": "include"}],
"dns": {"domain_name": "my_domain_name", "primary": "8.8.8.8", "secondary": "8.8.8.8", "tertiary": "8.8.4.4"},
"enabled": True}
"enabled": True, virtual_system_id: 0}
]
"""

Expand All @@ -154,6 +158,7 @@ def main():
# arguments for the module:
fields = dict(
enabled=dict(type='bool'),
virtual_system_id=dict(type='int', required=False),
subnets=dict(
type='list', elements='dict',
options=dict(
Expand Down
8 changes: 7 additions & 1 deletion plugins/modules/cp_gaia_dhcp_server_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
description: The IPv4 address of the default gateway for the DHCP clients.
returned: always
type: str
virtual_system_id:
description: Virtual System ID.
returned: always
type: int
dns:
description: DNS configuration.
returned: always
Expand Down Expand Up @@ -139,7 +143,9 @@

def main():
# arguments for the module:
fields = dict()
fields = dict(
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)

Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/cp_gaia_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def main():
suffix=dict(type="str"),
primary=dict(type="str"),
tertiary=dict(type="str"),
secondary=dict(type="str")
secondary=dict(type="str"),
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
4 changes: 3 additions & 1 deletion plugins/modules/cp_gaia_dns_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@

def main():
# arguments for the module:
fields = dict()
fields = dict(
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
api_call_object = 'dns'
Expand Down
4 changes: 3 additions & 1 deletion plugins/modules/cp_gaia_initial_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ def main():
options=dict(
dynamically_assigned_ip=dict(type='bool', required=False, default=False),
cluster_member=dict(type='bool', required=False, default=False),
activation_key=dict(type='str', required=False, no_log=True)
activation_key=dict(type='str', required=False, no_log=True),
vsnext=dict(type='bool', required=False, default=False),
elastic_xl=dict(type='bool', required=False, default=False)
)
)
)
Expand Down
7 changes: 6 additions & 1 deletion plugins/modules/cp_gaia_physical_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
description: Set transmit buffer size for interfaces.
required: false
type: int
virtual_system_id:
description: Virtual System ID.
required: false
type: int

"""

Expand Down Expand Up @@ -140,7 +144,8 @@ def main():
mac_addr=dict(required=False, type="str"),
rx_ringsize=dict(required=False, type="int"),
speed=dict(required=False, type="str"),
ipv6_mask_length=dict(required=False, type="int")
ipv6_mask_length=dict(required=False, type="int"),
virtual_system_id=dict(required=False, type="int")
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
11 changes: 10 additions & 1 deletion plugins/modules/cp_gaia_physical_interfaces_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
description: Interface name to show. If not specified, all physical interfaces information is returned.
required: false
type: str
virtual_system_id:
description: Virtual System ID.
required: false
type: int

"""

Expand Down Expand Up @@ -194,6 +198,10 @@
description: Interface tx ringsize.
returned: always
type: int
virtual_system_id:
description: Virtual System ID.
returned: always
type: int
"""

from ansible.module_utils.basic import AnsibleModule
Expand All @@ -203,7 +211,8 @@
def main():
# arguments for the module:
fields = dict(
name=dict(required=False, type="str")
name=dict(required=False, type="str"),
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
9 changes: 9 additions & 0 deletions plugins/modules/cp_gaia_routes_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
description: Gaia API version for example 1.6.
required: False
type: str
virtual_system_id:
description: Virtual System ID.
required: False
type: int
limit:
description: The maximum number of returned results.
required: False
Expand Down Expand Up @@ -86,6 +90,10 @@
returned: always
type: list
elements: dict
virtual_system_id:
description: Virtual System ID.
returned: always
type: int
"""


Expand All @@ -99,6 +107,7 @@ def main():
limit=dict(type="int", required=False, default=50),
offset=dict(type="int", required=False, default=0),
order=dict(type="str", required=False, choices=['ASC', 'DESC'], default="ASC"),
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
5 changes: 5 additions & 0 deletions plugins/modules/cp_gaia_routes_kernel_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
type: str
choices: ['ASC', 'DESC']
default: 'ASC'
virtual_system_id:
description: Virtual System ID.
required: False
type: int
"""


Expand Down Expand Up @@ -81,6 +85,7 @@ def main():
limit=dict(type="int", required=False, default=50),
offset=dict(type="int", required=False, default=0),
order=dict(type="str", required=False, choices=['ASC', 'DESC'], default="ASC"),
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
9 changes: 9 additions & 0 deletions plugins/modules/cp_gaia_routes_ospf_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
type: str
choices: ['ASC', 'DESC']
default: 'ASC'
virtual_system_id:
description: Virtual System ID.
required: False
type: int
"""


Expand Down Expand Up @@ -86,6 +90,10 @@
returned: always
type: list
elements: dict
virtual_systems_id:
description: Virtual System ID.
returned: always
type: int
"""


Expand All @@ -99,6 +107,7 @@ def main():
limit=dict(type="int", required=False, default=50),
offset=dict(type="int", required=False, default=0),
order=dict(type="str", required=False, choices=['ASC', 'DESC'], default="ASC"),
virtual_system_id=dict(type="int", required=False),
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
9 changes: 9 additions & 0 deletions plugins/modules/cp_gaia_routes_rip_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
type: str
choices: ['ASC', 'DESC']
default: 'ASC'
virtual_system_id:
description: Virtual System ID.
required: False
type: int
"""


Expand Down Expand Up @@ -86,6 +90,10 @@
returned: always
type: list
elements: dict
virtual_systems_id:
description: Virtual System ID.
returned: always
type: int
"""


Expand All @@ -99,6 +107,7 @@ def main():
limit=dict(type="int", required=False, default=50),
offset=dict(type="int", required=False, default=0),
order=dict(type="str", required=False, choices=['ASC', 'DESC'], default="ASC"),
virtual_system_id=dict(type="int", required=False),
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cp_gaia_routes_static_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def main():
limit=dict(type="int", required=False, default=50),
offset=dict(type="int", required=False, default=0),
order=dict(type="str", required=False, choices=['ASC', 'DESC'], default="ASC"),
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(argument_spec=fields, supports_check_mode=True)
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cp_gaia_static_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def main():
rank=dict(type='int'),
ping=dict(type='bool', default=False),
scope_local=dict(type='bool', default=False),
virtual_system_id=dict(type="int", required=False)
)
fields.update(checkpoint_argument_spec_for_all)
module = AnsibleModule(
Expand Down
Loading