install_package
Deploy firewall policies and configurations by installing a policy package to managed devices. Preview changes before applying to verify without commitment.
Instructions
Install a policy package to managed devices.
Deploys firewall policies and configurations from a policy package to the specified devices. This is an asynchronous operation - use wait_for_task() to monitor completion.
By default (FMG_INSTALL_SAFETY=strict) a real install requires a verified preview first: run preview_install for the same ADOM, package, and devices, wait for its task to finish, then install. Each preview authorizes one install, and only while the package is unchanged — if the package was edited after the preview, the install is refused (preview_stale) and a fresh preview is required.
Args: adom: ADOM name package: Policy package name devices: Target devices [{"name": "FGT1", "vdom": "root"}, ...] preview: If True, only preview changes without applying (default: False)
Returns: dict: Installation result with keys: - status: "success" or "error" - task_id: Task ID for monitoring (if successful) - message: Status or error message
Example: >>> # Install to single device >>> result = await install_package( ... adom="root", ... package="default", ... devices=[{"name": "FGT-HQ", "vdom": "root"}] ... ) >>> if result["status"] == "success": ... await wait_for_task(result["task_id"])
>>> # Preview installation first
>>> result = await install_package(
... adom="root",
... package="default",
... devices=[{"name": "FGT-HQ", "vdom": "root"}],
... preview=True
... )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| package | Yes | ||
| devices | Yes | ||
| preview | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||