add_device
Register a new device with FortiManager for centralized management, supporting both real devices (with IP) and model devices (with serial number) for offline provisioning.
Instructions
Add a new device to FortiManager.
Registers a device with FortiManager for central management. Can add either a real device (with IP) or a model device (with serial number).
Args: adom: ADOM name where device will be added name: Device display name ip: Device IP address (for real device connection) serial_number: Device serial number (for model device or validation) admin_user: Admin username for device connection admin_pass: Admin password for device connection description: Device description platform: Platform type (default: "FortiGate-VM64") mgmt_mode: Management mode - "fmg" (FortiManager only), or "fmgfaz" (both) flags: Additional flags like ["create_task"]
Returns: dict: Add result with keys: - status: "success" or "error" - device: Added device information - task_id: Task ID if run as background task - message: Error message if failed
Example: >>> # Add a FortiGate with IP >>> result = await add_device( ... adom="root", ... name="FGT-Branch1", ... ip="192.168.1.1", ... admin_user="admin", ... admin_pass="password123" ... )
>>> # Add a model device (offline provisioning)
>>> result = await add_device(
... adom="root",
... name="FGT-Lab",
... serial_number="FGVM020000123456"
... )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| name | Yes | ||
| ip | No | ||
| serial_number | No | ||
| admin_user | No | ||
| admin_pass | No | ||
| description | No | ||
| platform | No | FortiGate-VM64 | |
| mgmt_mode | No | fmg | |
| flags | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||