netbox-community / devicetype-library

A collection of community-sourced DeviceType definitions for import to NetBox
Creative Commons Zero v1.0 Universal
886 stars 878 forks source link

suggestion to make tests for name not be typed #229

Closed syyna closed 3 years ago

syyna commented 3 years ago

Some devices literally have integers for their names. Raritans for example have their power outlets be named 1,2,3 etc instead of Outlet1, Outlet2. Currently, if I submit the template as

power-outlets:
  - name: 1
    type: iec-60320-c13
    power_port: Inlet1
    feed_leg: A

It will fail. Instead I have to submit as:

power-outlets:
  - name: Outlet1
    type: iec-60320-c13
    power_port: Inlet1
    feed_leg: A

This means its giong to be double work to change it back to what it is. Netbox by itself is fine accepting only integers as names, but the devicetype-library isn't.

Thanks.

syyna commented 3 years ago

Sorry, when I mean Fail, it means I get an automated check fail of " 1 is not of type string" error message.

Dzordzu commented 3 years ago

From CONTRIBUTING.md

Use the complete form of interface names where applicable. For example, use TenGigabitEthernet1/2/3 instead of Te1/2/3.

Names should be descriptive. Numeric values are counterintuitive and should be avoided

syyna commented 3 years ago

I understand that but if that's how the interface is named out of the box, we should follow the manufacturers naming convention no? Otherwise when you automate against it you have at the very least, write a filter, if not rename back to what the device recognizes. It'd be the same as saying we should just spell something fully out even if the device cannot accept that.

In any case, I'm fine with living with it, but it does mean extra work for folks importing into netbox

Dzordzu commented 3 years ago

I'm also fed up with this. In netbox there is a field called label where the 'readable' name is present and the real interface name is preserved. But rules are clear. And till maintainers don't change them we shall either fork project and change it, or obey them (rules)