Skip to main content

Device Module

This schema extension lets you capture module bays on a DcimPhysicalDevice and the modules installed into them (e.g. fan trays, line cards). A device can have any number of module bays, and each bay can optionally hold one module.

It ships a ready-to-use Module and Module Type pair, plus the generic Module and Module Type you can build your own flavours on: see extensions/device_module_psu, or the experimental modules_linecards and modules_routing_engine extensions.

Details

  • Dependencies:

Nodes

ModuleBay

  • Label: Module Bay
  • Description: A physical bay on a device that can receive a module.
  • Namespace: Dcim
  • Icon: mdi:tray
  • Uniqueness Constraints:
    • device, name__value
  • Human Friendly ID: computed_name__value

Attributes

namedescriptionkindoptionaldefault_valuechoices
computed_nameName computed from the device and bay name.TextFalse
nameName of the bay, e.g. 'slot 1' or 'psu 1'.TextFalse
positionPosition of the bay within the device, e.g. '1', 'F3' or 'PSU-2'.TextTrue
bay_labelWhat the bay is for, for example 'Supervisor' or 'Line Card'.TextTrue
descriptionTextTrue
roleThe role of the module bay, indicating the type of module it is intended to receive.DropdownTruesupervisor, line_card, power_supply, fan

Relationships

namepeeroptionalcardinalitykind
deviceDcimPhysicalDeviceFalseoneParent
installed_moduleDcimGenericModuleTrueoneAttribute

Module

  • Label: Module
  • Description: Standard module installed in a device.
  • Namespace: Dcim
  • Icon: mdi:expansion-card
  • Inherit From: DcimGenericModule

Attributes

namedescriptionkindoptionaldefault_valuechoices
computed_nameName computed from the module bay and module type.TextFalse

Relationships

namepeeroptionalcardinalitykind
module_typeDcimModuleTypeFalseoneAttribute

ModuleType

  • Label: Module Type
  • Description: Standard module type, defining common specifications for a Module.
  • Namespace: Dcim
  • Icon: mdi:database-cog
  • Inherit From: DcimGenericModuleType

Generics

GenericModule

  • Label: Module
  • Description: A generic module, such as a Linecard or Routing Engine, installed in a module bay.
  • Namespace: Dcim
  • Icon: mdi:expansion-card
  • Human Friendly ID: computed_name__value

Attributes

namedescriptionkindoptionaldefault_valuechoices
computed_nameName computed from the module bay; concrete module kinds may refine it.TextFalse
serial_numberSerial number of the module, if known.TextTrue
descriptionTextTrue
statusOperational status of the module.DropdownFalseactiveprovisioning, active, maintenance, failed, rma

Relationships

namepeeroptionalcardinalitykind
module_bayDcimModuleBayFalseoneAttribute

GenericModuleType

  • Label: Module Type
  • Description: A generic module type, with common specifications like part number and manufacturer.
  • Namespace: Dcim
  • Icon: mdi:database-cog
  • Uniqueness Constraints:
    • name__value, manufacturer
  • Human Friendly ID: name__value

Attributes

namedescriptionkindoptionaldefault_valuechoices
nameName of the module type.TextFalse
descriptionDescription of the module type.TextTrue
part_numberPart number of the module.TextTrue
weight_gramsWeight of the module in grams.NumberTrue

Relationships

namepeeroptionalcardinalitykind
manufacturerOrganizationManufacturerFalseoneAttribute

Extensions

note

In this context "extensions" refer to modifications or additions to the existing schema, such as adding new attributes, relationships, or other schema elements.

DcimPhysicalDevice

Relationships

namepeeroptionalcardinalitykind
module_baysDcimModuleBayTruemanyComponent

Code

version: '1.0'
generics:
- name: GenericModule
namespace: Dcim
description: A generic module, such as a Linecard or Routing Engine, installed in
a module bay.
label: Module
icon: mdi:expansion-card
include_in_menu: true
human_friendly_id:
- computed_name__value
display_label: computed_name__value
attributes:
- name: computed_name
kind: Text
unique: true
read_only: true
optional: false
allow_override: any
computed_attribute:
kind: Jinja2
jinja2_template: '{{ module_bay__computed_name__value }}'
description: Name computed from the module bay; concrete module kinds may refine
it.
order_weight: 1000
- name: serial_number
kind: Text
optional: true
description: Serial number of the module, if known.
order_weight: 1400
- name: description
kind: Text
optional: true
order_weight: 1100
- name: status
kind: Dropdown
default_value: active
choices:
- name: provisioning
label: Provisioning
description: Module is being installed and provisioned.
color: '#f0ad4e'
- name: active
label: Active
description: Module is installed and operational.
color: '#00d25b'
- name: maintenance
label: Maintenance
description: Module is under maintenance.
color: '#ff9800'
- name: failed
label: Failed
description: Module is still installed but is not operational.
color: '#e04040'
- name: rma
label: RMA
description: Module has failed and is being returned to the manufacturer.
color: '#6c757d'
optional: false
description: Operational status of the module.
order_weight: 1200
relationships:
- name: module_bay
peer: DcimModuleBay
label: Module Bay
kind: Attribute
cardinality: one
optional: false
identifier: module_bay__module
order_weight: 900
- name: GenericModuleType
namespace: Dcim
description: A generic module type, with common specifications like part number
and manufacturer.
label: Module Type
icon: mdi:database-cog
include_in_menu: true
menu_placement: DcimGenericModule
human_friendly_id:
- name__value
order_by:
- manufacturer__name__value
- name__value
display_label: name__value
uniqueness_constraints:
- - name__value
- manufacturer
attributes:
- name: name
kind: Text
unique: true
optional: false
description: Name of the module type.
order_weight: 1000
- name: description
kind: Text
optional: true
description: Description of the module type.
order_weight: 1100
- name: part_number
kind: Text
label: Part Number
optional: true
description: Part number of the module.
order_weight: 1200
- name: weight_grams
label: Weight (g)
kind: Number
optional: true
description: Weight of the module in grams.
order_weight: 1300
relationships:
- name: manufacturer
peer: OrganizationManufacturer
kind: Attribute
cardinality: one
optional: false
identifier: manufacturer__moduletype
description: Manufacturer of the module type.
order_weight: 1250
nodes:
- name: ModuleBay
namespace: Dcim
description: A physical bay on a device that can receive a module.
label: Module Bay
icon: mdi:tray
include_in_menu: true
menu_placement: DcimDevice
human_friendly_id:
- computed_name__value
order_by:
- device__name__value
- name__value
display_label: computed_name__value
uniqueness_constraints:
- - device
- name__value
attributes:
- name: computed_name
kind: Text
unique: true
read_only: true
computed_attribute:
kind: Jinja2
jinja2_template: '{{ device__name__value }} > {{ name__value }}'
optional: false
description: Name computed from the device and bay name.
order_weight: 800
- name: name
kind: Text
optional: false
description: Name of the bay, e.g. 'slot 1' or 'psu 1'.
order_weight: 1000
- name: position
kind: Text
optional: true
description: Position of the bay within the device, e.g. '1', 'F3' or 'PSU-2'.
order_weight: 1050
- name: bay_label
label: Bay Label
kind: Text
optional: true
description: What the bay is for, for example 'Supervisor' or 'Line Card'.
order_weight: 1060
- name: description
kind: Text
optional: true
order_weight: 1100
- name: role
kind: Dropdown
optional: true
description: The role of the module bay, indicating the type of module it is intended
to receive.
order_weight: 1300
choices:
- name: supervisor
label: Supervisor
description: Bay intended for a supervisor / routing engine module.
color: '#A9CCE3'
- name: line_card
label: Line Card
description: Bay intended for a line card module.
color: '#B4E0DC'
- name: power_supply
label: Power Supply
description: Bay intended for a power supply module.
color: '#E3DAC9'
- name: fan
label: Fan
description: Bay intended for a fan module.
color: '#D2B4DE'
relationships:
- name: device
peer: DcimPhysicalDevice
label: Device
kind: Parent
cardinality: one
optional: false
identifier: device__module_bays
order_weight: 900
- name: installed_module
peer: DcimGenericModule
label: Installed Module
kind: Attribute
cardinality: one
optional: true
identifier: module_bay__module
order_weight: 1200
- name: Module
namespace: Dcim
description: Standard module installed in a device.
label: Module
icon: mdi:expansion-card
include_in_menu: false
inherit_from:
- DcimGenericModule
attributes:
- name: computed_name
kind: Text
unique: true
read_only: true
computed_attribute:
kind: Jinja2
jinja2_template: '{{ module_bay__computed_name__value }} ({{ module_type__name__value
}})'
optional: false
description: Name computed from the module bay and module type.
order_weight: 1000
relationships:
- name: module_type
peer: DcimModuleType
kind: Attribute
cardinality: one
optional: false
order_weight: 950
- name: ModuleType
namespace: Dcim
description: Standard module type, defining common specifications for a Module.
label: Module Type
icon: mdi:database-cog
include_in_menu: false
inherit_from:
- DcimGenericModuleType
extensions:
nodes:
- kind: DcimPhysicalDevice
relationships:
- name: module_bays
peer: DcimModuleBay
label: Module Bays
kind: Component
cardinality: many
optional: true
identifier: device__module_bays
description: Module bays available on this device.
order_weight: 1750