Module type import does not assign profile #11335

Closed
opened 2025-12-29 21:43:49 +01:00 by adam · 1 comment
Owner

Originally created by @fzs on GitHub (Jul 1, 2025).

Originally assigned to: @jnovinger on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.1

Python Version

3.10

Steps to Reproduce

When importing a model type that defines a profile, the profile is not assigned after the import succeeded.
This can be reproduced with the following test data:

---
manufacturer: Generic
model: Fan1
part_number: JF1H
description: Front to Back Fan Tray
airflow: front-to-rear
profile: Fan

The Fan module type profile exists in a default installation.

  1. On the Module Types page click "Import".
  2. Stay on the "Direct import" tab, which opens by default.
  3. Paste the test data above into the "Data" field.
  4. Click Submit

Expected Behavior

The created module type should have the specified profile assigned. The import page lists profile as a field option. The import does check if the specified profile exists and complains when a non-existing profile was given in the YAML data.

Observed Behavior

The module type is created from the import data, but the profile specified in the import is not assigned to the created module type.

Either this is expected behaviour because the import doesn't allow for specifying the profiles attribute data. Or, the profile shouldn't be a field option, since it does nothing.

Originally created by @fzs on GitHub (Jul 1, 2025). Originally assigned to: @jnovinger on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.1 ### Python Version 3.10 ### Steps to Reproduce When importing a model type that defines a profile, the profile is not assigned after the import succeeded. This can be reproduced with the following test data: ```yaml --- manufacturer: Generic model: Fan1 part_number: JF1H description: Front to Back Fan Tray airflow: front-to-rear profile: Fan ``` The `Fan` module type profile exists in a default installation. 1. On the Module Types page click "Import". 2. Stay on the "Direct import" tab, which opens by default. 3. Paste the test data above into the "Data" field. 4. Click Submit ### Expected Behavior The created module type should have the specified profile assigned. The import page lists `profile` as a field option. The import does check if the specified profile exists and complains when a non-existing profile was given in the YAML data. ### Observed Behavior The module type is created from the import data, but the profile specified in the import is not assigned to the created module type. Either this is expected behaviour because the import doesn't allow for specifying the profiles attribute data. Or, the profile shouldn't be a field option, since it does nothing.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:43:49 +01:00
adam closed this issue 2025-12-29 21:43:49 +01:00
Author
Owner

@jnovinger commented on GitHub (Jul 1, 2025):

The same behaviors appears to happen regardless of data format (CSV version of the provided data also failed as described).

@jnovinger commented on GitHub (Jul 1, 2025): The same behaviors appears to happen regardless of data format (CSV version of the provided data also failed as described).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11335