Skip to content

Module Creation Fails due to non-unique manufacturer/model set #181

@lylecameron-vault

Description

@lylecameron-vault

Getting the following error when importing the HPE Module Types:

Error '{"non_field_errors":["The fields manufacturer, model must make a unique set."]}' creating module type: {'manufacturer': {'name': 'HPE', 'slug': 'hpe'}, 'model': 'HPE 1200W Common Slot Platinum Hot Plug Power Supply', 'part_number': '578322-B21', 'description': 'Platinum Common Slot PSU with support for HPE Power Discovery Services on various HPE Proliant G6, G7 and Gen8 servers', 'comments': 'See:\r\n\r\n- [QuickSpecs](https://support.hpe.com/hpesc/public/docDisplay?docId=c04111541)', 'weight': 1.13, 'weight_unit': 'kg', 'power-ports': [{'name': '{module}', 'type': 'iec-60320-c14', 'maximum_draw': 1200}], 'src': '/app/repo/module-types/HPE/578322-B21.yaml'}

The modules are:
https://github.com/netbox-community/devicetype-library/blob/master/module-types/HPE/578322-B21.yaml
and
https://github.com/netbox-community/devicetype-library/blob/master/module-types/HPE/748287-B21.yaml

Because the manufacturer and model description are they same they are appearing as non-unique. Should the part_number attribute be included in the unique key for a module? It's pretty common for vendors to have 2 separate part numbers with identical attributes. Good example is when an old part number is deprecated in favour of a new one even though functionally the 2 parts do exactly the same thing.

NetBox 4.0.7
Master branch of Device Type Library
Device Type Library Import container current master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions