Checkpoint Host#
This class is used to manage Checkpoint Host
- class CheckpointHost#
- add(name, ip_address=None, ipv4_address=None, ipv6_address=None, interfaces=None, nat_settings=None, one_time_password=None, hardware=None, os=None, version=None, management_blades=None, logs_settings=None, save_logs_locally=None, send_alerts_to_server=None, send_logs_to_backup_server=None, send_logs_to_server=None, tags=None, **kw)#
Create new object.
- Parameters
name (str) – Object name. Must be unique in the domain.
ip_address (str, optional) – IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. Mandatory if “ipv4_address” or “ipv6_address” is not set
ipv4_address (str, optional) – IPv4 address. Mandatory if “ipv_address” or “ipv6_address” is not set
ipv6_address (str, optional) – IPv6 address. Mandatory if “ipv_address” or “ipv4_address” is not set
interfaces (Union[dict, List[dict]], optional) – Check Point host interfaces.
nat_settings (dict, optional) – NAT settings.
one_time_password (str, optional) – Secure internal connection one time password.
hardware (str, optional) – Hardware name.
os (str, optional) – Operating system name.
version (str, optional) – Check Point host platform version.
management_blades (dict, optional) – Management blades.
logs_settings (dict, optional) – Logs settings.
save_logs_locally (bool, optional) – Save logs locally on the gateway.
send_alerts_to_server (Union[str, List[str]], optional) – Server(s) to send alerts to.
send_logs_to_backup_server (Union[str, List[str]], optional) – Backup server(s) to send logs to.
send_logs_to_server (Union[str, List[str]], optional) – Server(s) to send logs to.
tags (Union(str,List[str]), optional) – Collection of tag identifiers.
- Keyword Arguments
**set-if-exists (bool, optional) – If another object with the same identifier already exists, it will be updated. The command behaviour will be the same as if originally a set command was called. Pay attention that original object’s fields will be overwritten by the fields provided in the request payload!
**color (Color, optional) – Color of the object. Should be one of existing colors.
**comments (str, optional) – Comments string.
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**groups (Union(str,List[str]), optional) – Collection of group identifiers.
**ignore-warnings (bool, optional) – Apply changes ignoring warnings. Defaults to False
**ignore-errors (bool, optional) – Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Defaults to False
- Returns
The response from the server
- Return type
Box
Examples
>>> firewall.network_objects.checkpoint_host.add(name="secondarylogserver", ... ipv4_address="5.5.5.5",management_blades={"network-policy-management": True,"logging-and-status": True,})
- delete(uid=None, name=None, **kw)#
Delete existing object using object name or uid.
- Parameters
- Keyword Arguments
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**ignore-warnings (bool, optional) – Apply changes ignoring warnings. Defaults to False
**ignore-errors (bool, optional) – Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Defaults to False
- Returns
The response from the server
- Return type
Box
Examples
>>> firewall.network_objects.checkpoint_host.delete(uid="9423d36f-2d66-4754-b9e2-e7f4493756d4")
- set(uid=None, name=None, ip_address=None, ipv4_address=None, ipv6_address=None, interfaces=None, nat_settings=None, new_name=None, one_time_password=None, hardware=None, os=None, version=None, management_blades=None, logs_settings=None, save_logs_locally=None, send_alerts_to_server=None, send_logs_to_backup_server=None, send_logs_to_server=None, tags=None, **kw)#
Edit existing object using object name or uid.
- Parameters
uid (str, optional) – Object unique identifier.
name (str, optional) – Object name. Must be unique in the domain.
ip_address (str, optional) – IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. Mandatory if “ipv4_address” or “ipv6_address” is not set
ipv4_address (str, optional) – IPv4 address. Mandatory if “ipv_address” or “ipv6_address” is not set
ipv6_address (str, optional) – IPv6 address. Mandatory if “ipv_address” or “ipv4_address” is not set
interfaces (Union[dict, List[dict]], optional) – Check Point host interfaces.
nat_settings (dict, optional) – NAT settings.
new_name (str, optional) – New name of the object.
one_time_password (str, optional) – Secure internal connection one time password.
hardware (str, optional) – Hardware name.
os (str, optional) – Operating system name.
version (str, optional) – Check Point host platform version.
management_blades (dict, optional) – Management blades.
logs_settings (dict, optional) – Logs settings.
save_logs_locally (bool, optional) – Save logs locally on the gateway.
send_alerts_to_server (Union[str, List[str]], optional) – Server(s) to send alerts to.
send_logs_to_backup_server (Union[str, List[str]], optional) – Backup server(s) to send logs to.
send_logs_to_server (Union[str, List[str]], optional) – Server(s) to send logs to.
tags (Union(str,List[str]), optional) – Collection of tag identifiers.
- Keyword Arguments
**color (Color, optional) – Color of the object. Should be one of existing colors.
**comments (str, optional) – Comments string.
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
**groups (Union(str,List[str]), optional) – Collection of group identifiers.
**ignore-warnings (bool, optional) – Apply changes ignoring warnings. Defaults to False
**ignore-errors (bool, optional) – Apply changes ignoring errors. You won’t be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. Defaults to False
- Returns
The response from the server
- Return type
Box
Examples
>>> firewall.network_objects.checkpoint_host.set(uid="f50f3810-d16c-4239-88d0-9f37ac581387", ... ip_address="5.5.5.5")
- show(uid=None, name=None, **kw)#
Retrieve existing object using object name or uid.
- Parameters
- Keyword Arguments
**details-level (str, optional) – The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed representation of the object.
- Returns
The response from the server
- Return type
Box
Examples
>>> firewall.network_objects.checkpoint_host.show( uid="9423d36f-2d66-4754-b9e2-e7f4493756d4")
- show_checkpoint_hosts(filter_results=None, limit=50, offset=0, order=None, **kw)#
Retrieve all objects.
- Parameters
filter_results (str, optional) – Search expression to filter objects by. The provided text should be exactly the same as it would be given in SmartConsole Object Explorer. The logical operators in the expression (‘AND’, ‘OR’) should be provided in capital letters. he search involves both a IP search and a textual search in name, comment, tags etc.
limit (int, optional) – The maximal number of returned results. Defaults to 50 (between 1 and 500)
offset (int, optional) – Number of the results to initially skip. Defaults to 0
order (List[dict], optional) – Sorts results by the given field. By default the results are sorted in the descending order by the session publish time.
- Returns
The response from the server
- Return type
Box
Examples
>>> firewall.network_objects.checkpoint_host.show_checkpoint_hosts()