Abstract Objects#
- class NetworkObject#
This class is used to create a common shape for any network object
- delete_object(endpoint, 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.<OBJECT_TYPE>.delete(uid="196e93a9-b90b-4ab1-baa6-124e7289aa20")
- show_all_objects(endpoint, filter_results=None, limit=50, order=None, show_as_ranges=None, extra_secondary_parameters=None, **kw)#
Retrieve all objects
- Parameters
endpoint (str) – _description_
filter_results (str, optional) – _description_ Defaults to None
limit (int, optional) – _description_ Defaults to 50
order (List[dict], optional) – _description_ Defaults to None
show_as_ranges (bool, optional) – _description_ Defaults to None
extra_secondary_parameters (dict, optional) – _description_ Defaults to None
**kw (dict, optional) – Arbitrary keyword arguments for secondary 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.
**domains_to_process (List[str], optional) – Indicates which domains to process the commands on. It cannot be used with the details_level full, must be run from the System Domain only and with ignore_warnings true. Valid values are: CURRENT_DOMAIN, ALL_DOMAINS_ON_THIS_SERVER.
- Returns
Box: The response from the server
- Return type
obj
Examples
>>> firewall.network_objects.<OBJECT_TYPE>.show_all_<OBJECT_TYPE>s()
- show_object(endpoint, uid=None, name=None, extra_secondary_parameters=None, **kw)#
Retrieve existing object using object name or uid.
- Parameters
endpoint (str) – Endpoint to reach to show the objects
uid (str, optional) – Object unique identifier. Defaults to None
name (str, optional) – Object name. Defaults to None
extra_secondary_parameters (dict) – Any additional secondary parameter need to be add in the request
**kw (dict, optional) – Arbitrary keyword arguments for secondary 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.<OBJECT_TYPE>.show(uid="196e93a9-b90b-4ab1-baa6-124e7289aa20")
- show_objects(endpoint, show_all=False, filter_results=None, limit=50, offset=0, order=None, show_as_ranges=None, extra_secondary_parameters=None, **kw)#
Retrieve objects.
- Parameters
endpoint (str) – Endpoint to reach to show the objects
show_all (bool, optional) – Indicates if you want to shown all objects or not. If yes, offset will be ignored. Defaults to False
filter_results (str, optional) – Search expression to filter objects by. Defaults to None 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. Defaults to None
extra_secondary_parameters (dict, optional) – Any additional secondary parameter need to be add in the request Defaults to None
**kw (dict, optional) – Arbitrary keyword arguments for secondary 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.
**domains_to_process (List[str], optional) – Indicates which domains to process the commands on. It cannot be used with the details_level full, must be run from the System Domain only and with ignore_warnings true. Valid values are: CURRENT_DOMAIN, ALL_DOMAINS_ON_THIS_SERVER.
- Returns
The response from the server
- Return type
Box
Examples
>>> firewall.network_objects.<OBJECT_TYPE>.show_<OBJECT_TYPE>s()
- show_partial_objects(endpoint, filter_results=None, limit=50, offset=0, order=None, show_as_ranges=None, extra_secondary_parameters=None, **kw)#
Retrieve partially objects
- Parameters
endpoint (str) – Endpoint to reach to show the objects
filter_results (str, optional) – Search expression to filter objects by. Defaults to None 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. Defaults to None
extra_secondary_parameters (dict, optional) – Any additional secondary parameter need to be add in the request Defaults to None
**kw (dict, optional) – Arbitrary keyword arguments for secondary 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.
**domains_to_process (List[str], optional) – Indicates which domains to process the commands on. It cannot be used with the details_level full, must be run from the System Domain only and with ignore_warnings true. Valid values are: CURRENT_DOMAIN, ALL_DOMAINS_ON_THIS_SERVER.
- Returns
Box: The response from the server
- Return type
obj
Examples
>>> firewall.network_objects.<OBJECT_TYPE>.show_partial_<OBJECT_TYPE>s()