find_duplicate_objects
Scans a FortiManager ADOM for objects of a given type that share identical content under different names, comparing specified fields to reveal duplicates.
Instructions
Find objects with identical content configured under different names.
Runs FortiManager's "find duplicates" option against every object of the given type in the ADOM. FortiManager compares the requested fields across all objects of that type and adds a "duplicate entries" list to each object that shares its content with at least one other object -- the field itself, not something computed client-side.
Args: adom: ADOM name object_type: One of "address", "address_group", "service", "service_group" (default: "address") fields: Object fields to compare for duplication (e.g. ["name", "type", "subnet"] for addresses). Omit to let FortiManager use its default field set for the type.
Returns: dict: Duplicate scan result with keys: - status: "success" or "error" - object_type: The object type scanned - objects: Full per-object list FortiManager returned (each entry has a "duplicate entries" list when it has a match) - duplicate_count: Number of objects that have at least one duplicate entry - message: Error message if failed
Example: >>> result = await find_duplicate_objects("root", object_type="address") >>> for obj in result["objects"]: ... if obj.get("duplicate entries"): ... print(obj["name"], "duplicates:", obj["duplicate entries"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| fields | No | ||
| object_type | No | address |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||