platform.manufacturer and device_type.manufacturer must be the same #11555

Closed
opened 2025-12-29 21:46:42 +01:00 by adam · 2 comments
Owner

Originally created by @stefan-mikuszeit-syzygy on GitHub (Sep 2, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.3.6

Python Version

3.10

Steps to Reproduce

We are still running in an Bug, because we want to import over the API multiple Servers to NetBox, after same investigations we found out, that the problem comes from this lines:

File: /opt/netbox/netbox/dcim/models/devices.py

        # Validate manufacturer/platform
        if hasattr(self, 'device_type') and self.platform:
            if self.platform.manufacturer and self.platform.manufacturer != self.device_type.manufacturer:
                raise ValidationError({
                    'platform': _(
                        "The assigned platform is limited to {platform_manufacturer} device types, but this device's "
                        "type belongs to {devicetype_manufacturer}."
                    ).format(
                        platform_manufacturer=self.platform.manufacturer,
                        devicetype_manufacturer=self.device_type.manufacturer
                    )
                })

We want to Import a HPE Server with following datas:

{'custom_fields': {},
 'do_not_update_keys': [],
 'fields': {'device_type': {'value': 'ESXi'},
            'device_type.manufacturer': {'value': 'Hewlett Packard Enterprise'},
            'platform': {'value': 'ESXi'},
            'platform.manufacturer': {'value': 'Unknown'},
            'role': {'value': 'Physical Server'},
            'serial': {'value': 'xxxxxxxxx'},
            'site': {'value': 'Unknown'}},
 'sub_fields': {}}

On this HPE Server runs an ESXi VMWare Server Software Stack

So our configuration is following:

device_type.manufacturer: Hewlett Packard Enterprise
platform.manufacturer: VMWare Inc.
platform: ESXi

But your check in the code, checks that the platform.manufacturer and the device_type.manufacturer must be the same.

Expected Behavior

No Error, import the Device with these datas without any issue and error message.

Disable/Remove this check.
This Check makes only on Appliances or Switches sense, where the device_type.manufacturer and the Software manufacturer are the same.

Like on Cisco Switches, Sonicwall Firewalls, NetApp and so on, but not on Physical Servers, where the Admin can install any type of Software.

Observed Behavior

The Error was following:

The request failed with code 400 Bad Request: {'platform': ["The assigned platform is limited to Unknown device types, but this device's type belongs to Hewlett Packard Enterprise."]}
Originally created by @stefan-mikuszeit-syzygy on GitHub (Sep 2, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.3.6 ### Python Version 3.10 ### Steps to Reproduce We are still running in an Bug, because we want to import over the API multiple Servers to NetBox, after same investigations we found out, that the problem comes from this lines: File: /opt/netbox/netbox/dcim/models/devices.py ``` # Validate manufacturer/platform if hasattr(self, 'device_type') and self.platform: if self.platform.manufacturer and self.platform.manufacturer != self.device_type.manufacturer: raise ValidationError({ 'platform': _( "The assigned platform is limited to {platform_manufacturer} device types, but this device's " "type belongs to {devicetype_manufacturer}." ).format( platform_manufacturer=self.platform.manufacturer, devicetype_manufacturer=self.device_type.manufacturer ) }) ``` We want to Import a HPE Server with following datas: ``` {'custom_fields': {}, 'do_not_update_keys': [], 'fields': {'device_type': {'value': 'ESXi'}, 'device_type.manufacturer': {'value': 'Hewlett Packard Enterprise'}, 'platform': {'value': 'ESXi'}, 'platform.manufacturer': {'value': 'Unknown'}, 'role': {'value': 'Physical Server'}, 'serial': {'value': 'xxxxxxxxx'}, 'site': {'value': 'Unknown'}}, 'sub_fields': {}} ``` On this HPE Server runs an ESXi VMWare Server Software Stack So our configuration is following: device_type.manufacturer: Hewlett Packard Enterprise platform.manufacturer: VMWare Inc. platform: ESXi But your check in the code, checks that the platform.manufacturer and the device_type.manufacturer must be the same. ### Expected Behavior No Error, import the Device with these datas without any issue and error message. Disable/Remove this check. This Check makes only on Appliances or Switches sense, where the device_type.manufacturer and the Software manufacturer are the same. Like on Cisco Switches, Sonicwall Firewalls, NetApp and so on, but not on Physical Servers, where the Admin can install any type of Software. ### Observed Behavior The Error was following: ``` The request failed with code 400 Bad Request: {'platform': ["The assigned platform is limited to Unknown device types, but this device's type belongs to Hewlett Packard Enterprise."]} ```
adam added the type: bugstatus: revisions needed labels 2025-12-29 21:46:42 +01:00
adam closed this issue 2025-12-29 21:46:42 +01:00
Author
Owner
@ghost commented on GitHub (Sep 2, 2025): You didn't search. This has been brought up many times, with Jeremy stating this won't be changed. https://github.com/netbox-community/netbox/issues/18817 https://github.com/netbox-community/netbox/issues/18678 https://github.com/netbox-community/netbox/issues/17231 https://github.com/netbox-community/netbox/issues/16097 https://github.com/netbox-community/netbox/issues/9550 https://github.com/netbox-community/netbox/issues/8024
Author
Owner

@bctiemann commented on GitHub (Sep 2, 2025):

@stefan-mikuszeit-syzygy Closing as per above comments noting previous discussion of this topic.

@bctiemann commented on GitHub (Sep 2, 2025): @stefan-mikuszeit-syzygy Closing as per above comments noting previous discussion of this topic.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11555