Skip to main content

Module generic_fk

Module generic_fk 

Source
Expand description

Generic foreign-key fields, derived from the NetBox OpenAPI schema. Auto-generated by scripts/generate.sh - do not edit.

Enums§

GenericFkEncoding
How a generic foreign key is encoded in a NetBox write payload.

Constants§

GENERIC_FK_FIELDS
(app_label.model, field, encoding) for every generic foreign key in the NetBox write API. field is the logical base name; for Split it expands to <field>_type and <field>_id on the wire, otherwise it is the property carrying the (array of) GenericObjectRequest.

Functions§

generic_fk_encoding
Returns the GenericFkEncoding for field on model (keyed as app_label.model, e.g. "dcim.cable") if it is a generic foreign key.
is_generic_fk
Returns true if field on model is a generic foreign key whose value must be encoded as a content-type reference rather than a bare id.