Consumables Tracking API Package¶
nautobot_consumables.models
¶
Models for Nautobot Consumables Tracking.
CheckedOutConsumable
¶
Bases: PrimaryModel
ConsumablePool items that have been checked out for use on a device.
Source code in nautobot_consumables/models.py
Meta
¶
CheckedOutConsumable model options.
Source code in nautobot_consumables/models.py
__str__()
¶
Default string representation of the CheckedOutConsumable.
Source code in nautobot_consumables/models.py
clean()
¶
Validate a CheckedOutConsumable instance.
Source code in nautobot_consumables/models.py
Consumable
¶
Bases: JSONModel
A Consumable is a discrete version of a ConsumableType.
For example, for a ConsumableType of cable
, a Consumable might be 3ft Cat6 Ethernet, Red
.
Source code in nautobot_consumables/models.py
Meta
¶
Consumable model options.
Source code in nautobot_consumables/models.py
__str__()
¶
clean()
¶
Validate a Consumable instance.
Source code in nautobot_consumables/models.py
save(*args, **kwargs)
¶
Save the Consumable instance to the database.
Source code in nautobot_consumables/models.py
ConsumablePool
¶
Bases: PrimaryModel
A pool of Consumable items available for use at a Location.
Source code in nautobot_consumables/models.py
available_quantity: int
property
¶
Calculate how many Consumable in the pool are available to be checked out.
used_quantity: int
property
¶
Calculate how many Consumable in the pool have been checked out.
Meta
¶
ConsumablePool model options.
Source code in nautobot_consumables/models.py
__str__()
¶
clean()
¶
Validate a ConsumablePool instance.
Source code in nautobot_consumables/models.py
ConsumableType
¶
Bases: JSONModel
A ConsumableType defines a type of consumable that can be used, e.g. a cable.
The ConsumableType model allows users to define custom product types using a JSON schema to define the characteristics and options for the consumable items.
Source code in nautobot_consumables/models.py
Meta
¶
JSONModel
¶
Bases: PrimaryModel
JSON data model for objects that can be validated against a schema.
Source code in nautobot_consumables/models.py
template_details: list[tuple[str, Any]]
property
¶
Merge the details and schema for nice output in templates.
Meta
¶
clean()
¶
Validate the data.
Source code in nautobot_consumables/models.py
get_key_detail(key, value, schema)
¶
Get details for model keys.