resolve_datasource
Resolve which objects a FortiManager config attribute can reference by querying a pm/config table and attribute, so you can validate or build valid references.
Instructions
Resolve the objects a config attribute is allowed to reference.
Generic config-DB introspection built on FortiManager's option: datasrc
mechanism: given a cdb table url and an attribute name attr, FMG
returns every object attr may reference. For example, the objects an
SD-WAN service (steering) rule can point at -- internet-service-names,
address groups, etc. Documented generically in the swagger cdb get-params
(params.cdb.get.table.option.opts -> datasrc, requires attr).
Only pm/config endpoints are accepted -- arbitrary URLs are rejected.
Args: url: A cdb config path, e.g. "pm/config/adom/root/obj/system/sdwan" attr: The attribute whose referenceable objects to resolve, e.g. "internet-service-name" or "service" adom: ADOM name (informational; default: DEFAULT_ADOM env var or "root")
Returns: dict with keys: - url, attr, adom - datasource: raw list/dict of referenceable objects - error / error_code: on failure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| adom | No | ||
| attr | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||