Device-type YAML export is missing mappings #122

Open
opened 2026-04-05 16:21:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @xkilian on 3/18/2026

NetBox Edition

NetBox Community

NetBox Version

v4.5.4

Python Version

3.12

Steps to Reproduce

  1. Create Device-Types with Front-Ports and Rear-Ports
  2. Export the all device Device-Types
  3. Mappings are missing from the export

Example Device-Type:

`manufacturer: Generic
model: 24-port Copper Patch Panel
slug: generic-24-port-copper-patch-panel
u_height: 1
is_full_depth: true
airflow: passive
is_powered: false
front_image: true
front-ports:

  • name: Port 1
    type: 8p8c
  • name: Port 2
    type: 8p8c
  • name: Port 3
    type: 8p8c
  • name: Port 4
    type: 8p8c
  • name: Port 5
    type: 8p8c
  • name: Port 6
    type: 8p8c
  • name: Port 7
    type: 8p8c
  • name: Port 8
    type: 8p8c
  • name: Port 9
    type: 8p8c
  • name: Port 10
    type: 8p8c
  • name: Port 11
    type: 8p8c
  • name: Port 12
    type: 8p8c
  • name: Port 13
    type: 8p8c
  • name: Port 14
    type: 8p8c
  • name: Port 15
    type: 8p8c
  • name: Port 16
    type: 8p8c
  • name: Port 17
    type: 8p8c
  • name: Port 18
    type: 8p8c
  • name: Port 19
    type: 8p8c
  • name: Port 20
    type: 8p8c
  • name: Port 21
    type: 8p8c
  • name: Port 22
    type: 8p8c
  • name: Port 23
    type: 8p8c
  • name: Port 24
    type: 8p8c
    rear-ports:
  • name: Port 1
    type: 8p8c
    positions: 1
  • name: Port 2
    type: 8p8c
    positions: 1
  • name: Port 3
    type: 8p8c
    positions: 1
  • name: Port 4
    type: 8p8c
    positions: 1
  • name: Port 5
    type: 8p8c
    positions: 1
  • name: Port 6
    type: 8p8c
    positions: 1
  • name: Port 7
    type: 8p8c
    positions: 1
  • name: Port 8
    type: 8p8c
    positions: 1
  • name: Port 9
    type: 8p8c
    positions: 1
  • name: Port 10
    type: 8p8c
    positions: 1
  • name: Port 11
    type: 8p8c
    positions: 1
  • name: Port 12
    type: 8p8c
    positions: 1
  • name: Port 13
    type: 8p8c
    positions: 1
  • name: Port 14
    type: 8p8c
    positions: 1
  • name: Port 15
    type: 8p8c
    positions: 1
  • name: Port 16
    type: 8p8c
    positions: 1
  • name: Port 17
    type: 8p8c
    positions: 1
  • name: Port 18
    type: 8p8c
    positions: 1
  • name: Port 19
    type: 8p8c
    positions: 1
  • name: Port 20
    type: 8p8c
    positions: 1
  • name: Port 21
    type: 8p8c
    positions: 1
  • name: Port 22
    type: 8p8c
    positions: 1
  • name: Port 23
    type: 8p8c
    positions: 1
  • name: Port 24
    type: 8p8c
    positions: 1
    port-mappings:
  • front_port: Port 1
    rear_port: Port 1
  • front_port: Port 2
    rear_port: Port 2
  • front_port: Port 3
    rear_port: Port 3
  • front_port: Port 4
    rear_port: Port 4
  • front_port: Port 5
    rear_port: Port 5
  • front_port: Port 6
    rear_port: Port 6
  • front_port: Port 7
    rear_port: Port 7
  • front_port: Port 8
    rear_port: Port 8
  • front_port: Port 9
    rear_port: Port 9
  • front_port: Port 10
    rear_port: Port 10
  • front_port: Port 11
    rear_port: Port 11
  • front_port: Port 12
    rear_port: Port 12
  • front_port: Port 13
    rear_port: Port 13
  • front_port: Port 14
    rear_port: Port 14
  • front_port: Port 15
    rear_port: Port 15
  • front_port: Port 16
    rear_port: Port 16
  • front_port: Port 17
    rear_port: Port 17
  • front_port: Port 18
    rear_port: Port 18
  • front_port: Port 19
    rear_port: Port 19
  • front_port: Port 20
    rear_port: Port 20
  • front_port: Port 21
    rear_port: Port 21
  • front_port: Port 22
    rear_port: Port 22
  • front_port: Port 23
    rear_port: Port 23
  • front_port: Port 24
    rear_port: Port 24`

Expected Behavior

Mappings should show up in the export, as a Front-Ports cannot be created if there is no corresponding Rear-Port.

Observed Behavior

Output YAML does not contain any mappings.

*Originally created by @xkilian on 3/18/2026* ### NetBox Edition NetBox Community ### NetBox Version v4.5.4 ### Python Version 3.12 ### Steps to Reproduce 1. Create Device-Types with Front-Ports and Rear-Ports 2. Export the all device Device-Types 3. Mappings are missing from the export Example Device-Type: `manufacturer: Generic model: 24-port Copper Patch Panel slug: generic-24-port-copper-patch-panel u_height: 1 is_full_depth: true airflow: passive is_powered: false front_image: true front-ports: - name: Port 1 type: 8p8c - name: Port 2 type: 8p8c - name: Port 3 type: 8p8c - name: Port 4 type: 8p8c - name: Port 5 type: 8p8c - name: Port 6 type: 8p8c - name: Port 7 type: 8p8c - name: Port 8 type: 8p8c - name: Port 9 type: 8p8c - name: Port 10 type: 8p8c - name: Port 11 type: 8p8c - name: Port 12 type: 8p8c - name: Port 13 type: 8p8c - name: Port 14 type: 8p8c - name: Port 15 type: 8p8c - name: Port 16 type: 8p8c - name: Port 17 type: 8p8c - name: Port 18 type: 8p8c - name: Port 19 type: 8p8c - name: Port 20 type: 8p8c - name: Port 21 type: 8p8c - name: Port 22 type: 8p8c - name: Port 23 type: 8p8c - name: Port 24 type: 8p8c rear-ports: - name: Port 1 type: 8p8c positions: 1 - name: Port 2 type: 8p8c positions: 1 - name: Port 3 type: 8p8c positions: 1 - name: Port 4 type: 8p8c positions: 1 - name: Port 5 type: 8p8c positions: 1 - name: Port 6 type: 8p8c positions: 1 - name: Port 7 type: 8p8c positions: 1 - name: Port 8 type: 8p8c positions: 1 - name: Port 9 type: 8p8c positions: 1 - name: Port 10 type: 8p8c positions: 1 - name: Port 11 type: 8p8c positions: 1 - name: Port 12 type: 8p8c positions: 1 - name: Port 13 type: 8p8c positions: 1 - name: Port 14 type: 8p8c positions: 1 - name: Port 15 type: 8p8c positions: 1 - name: Port 16 type: 8p8c positions: 1 - name: Port 17 type: 8p8c positions: 1 - name: Port 18 type: 8p8c positions: 1 - name: Port 19 type: 8p8c positions: 1 - name: Port 20 type: 8p8c positions: 1 - name: Port 21 type: 8p8c positions: 1 - name: Port 22 type: 8p8c positions: 1 - name: Port 23 type: 8p8c positions: 1 - name: Port 24 type: 8p8c positions: 1 port-mappings: - front_port: Port 1 rear_port: Port 1 - front_port: Port 2 rear_port: Port 2 - front_port: Port 3 rear_port: Port 3 - front_port: Port 4 rear_port: Port 4 - front_port: Port 5 rear_port: Port 5 - front_port: Port 6 rear_port: Port 6 - front_port: Port 7 rear_port: Port 7 - front_port: Port 8 rear_port: Port 8 - front_port: Port 9 rear_port: Port 9 - front_port: Port 10 rear_port: Port 10 - front_port: Port 11 rear_port: Port 11 - front_port: Port 12 rear_port: Port 12 - front_port: Port 13 rear_port: Port 13 - front_port: Port 14 rear_port: Port 14 - front_port: Port 15 rear_port: Port 15 - front_port: Port 16 rear_port: Port 16 - front_port: Port 17 rear_port: Port 17 - front_port: Port 18 rear_port: Port 18 - front_port: Port 19 rear_port: Port 19 - front_port: Port 20 rear_port: Port 20 - front_port: Port 21 rear_port: Port 21 - front_port: Port 22 rear_port: Port 22 - front_port: Port 23 rear_port: Port 23 - front_port: Port 24 rear_port: Port 24` ### Expected Behavior Mappings should show up in the export, as a Front-Ports cannot be created if there is no corresponding Rear-Port. ### Observed Behavior Output YAML does not contain any mappings.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#122