Policy#

This class is used to manage Policy

class Policy#
install_policy(policy_package, targets, access=None, desktop_security=None, qos=None, threat_prevention=None, install_on_all_cluster_members_or_fail=True, prepare_only=False, revision=None)#

Executes the install-policy on a given list of targets.

Parameters
  • policy_package (str) – The name of the Policy Package to be installed.

  • targets (Union[str, List[str]]) – On what targets to execute this command. Targets may be identified by their name, or object unique identifier.

  • access (bool, optional) – Set to be true in order to install the Access Control policy. By default, the value is true if Access Control policy is enabled on the input policy package, otherwise false.. Defaults to None

  • desktop_security (bool, optional) – Set to be true in order to install the Desktop Security policy. By default, the value is true if desktop security policy is enabled on the input policy package, otherwise false. Defaults to None

  • qos (bool, optional) – Set to be true in order to install the QoS policy. By default, the value is true if Quality-of-Service policy is enabled on the input policy package, otherwise false. Defaults to None

  • threat_prevention (bool, optional) – Set to be true in order to install the Threat Prevention policy. By default, the value is true if Threat Prevention policy is enabled on the input policy package, otherwise false.Defaults to None

  • install_on_all_cluster_members_or_fail (bool, optional) – Relevant for the gateway clusters. If true, the policy is installed on all the cluster members. If the installation on a cluster member fails, don’t install on that cluster. Defaults to True

  • prepare_only (bool, optional) – If true, prepares the policy for the installation, but doesn’t install it on an installation target. Defaults to False

  • revision (str, optional) – The UID of the revision of the policy to install. Defaults to None

Returns

The response from the server

Return type

Box

Examples

>>> firewallManagement.policy.install_policy(
... policy_package="standard",
... access=True,
... threat_prevention=True,
... targets=["corporate-gateway"])
property package#

The interface object for the Policy Package Management.

Returns

a Policy Package instance

Return type

PolicyPackage

Examples

>>> firewall.policy.package
verify_policy(policy_package)#

Verifies the policy of the selected package. Note: Verify Policy command can verify only access policy.

Parameters

policy_package (str) – Policy package identified by the name or UID.

Returns

The response from the server

Return type

Box

Examples

>>> firewallManagement.policy.verify_policy(
... policy_package="standard")