Closes #22999: Add a default module profile for transceivers

This commit is contained in:
Jason Novinger 2026-09-11 03:56:59 -05:00
parent 6385c09837
commit a92a945aaa
3 changed files with 44 additions and 5 deletions

View File

@ -21,14 +21,14 @@ flowchart BT
modulebay1 & modulebay2 & modulebay3 --> device[Device]
```
### 1. Create an SFP Module Type Profile
### 1. Select an SFP Module Type Profile
If one has not already been defined, create a [module type profile](../models/dcim/moduletypeprofile.md) for SFPs. This profile will be assigned for all module types which represent a pluggable transceiver. Typically, you will need only one profile for all pluggable transceivers.
New NetBox installations include a "Transceiver" [module type profile](../models/dcim/moduletypeprofile.md), which you can select for all module types which represent a pluggable transceiver. Typically, you will need only one profile for all pluggable transceivers. If this profile is not present, or if you prefer a different set of attributes, create your own profile for SFPs instead.
You might opt to define custom attributes for the profile by defining a custom [JSON schema](https://json-schema.org/). Profile attributes might be used to define characteristics unique to transceivers, such as optical wavelength and power ranges. Adding profile attributes is optional, and can be done at a later point.
The default profile defines attributes for form factor, media, PHY, data rate, reach, and connector type. You might opt to add or replace these by editing the profile's [JSON schema](https://json-schema.org/). Profile attributes might be used to define characteristics unique to transceivers, such as optical wavelength and power ranges. Adding profile attributes is optional, and can be done at a later point.
!!! note
Creating a module type profile is optional, but recommended as it allows for defining custom module attributes.
Assigning a module type profile is optional, but recommended as it allows for defining custom module attributes.
### 2. Create a Module Type for Each SFP Model in Inventory

View File

@ -20,7 +20,8 @@ def load_initial_data(apps, schema_editor):
'hard_disk',
'memory',
'power_supply',
'expansion_card'
'expansion_card',
'transceiver'
)
profile_objects = []

View File

@ -0,0 +1,38 @@
{
"name": "Transceiver",
"schema": {
"properties": {
"form_factor": {
"type": "string",
"title": "Form factor",
"description": "Physical form factor e.g. SFP+, QSFP28, OSFP"
},
"media": {
"type": "string",
"title": "Media",
"description": "Physical media e.g. single-mode fiber, multimode fiber, DAC"
},
"phy": {
"type": "string",
"title": "PHY",
"description": "Physical layer standard e.g. 10GBASE-LR, 400ZR"
},
"data_rate": {
"type": "string",
"title": "Data rate",
"description": "Nominal line rate e.g. 10G, 400G"
},
"reach": {
"type": "number",
"title": "Maximum reach (m)",
"description": "Maximum supported cable or fiber run",
"minimum": 1
},
"connector_type": {
"type": "string",
"title": "Connector type",
"description": "Connector type e.g. LC/UPC, MPO-12, 8P8C"
}
}
}
}