Commit Graph

25 Commits

Author SHA1 Message Date
m-hau
9e6cf8d017 Enforce component properties (#3391)
* Disable additional properties for components

It is not a global option, it needs to be set per-definition.
Enabling it produces a lot of validation errors.

* Update json schema

Add missing fields and value constraints. The `rf_role` enum is
currently not included in the `generated_schema.json` from upstream,
so I "faked" it for now by added it manually.

* Rework custom power source marker

While you could technically have a device that does PoE and serial
console on the same port, this is just one very specific scenario.
Rename the custom property from `poe` to `_is_power_source` to be more
general and better reflect its intention, and properly document it in
the json schema.
Remove the property from device types where it is false, and where it's
unneeded because power-ports exist.

* Fix power draw

In NetBox the PSU modules have a power draw, but not the module-bays you
can put them into; so remove it from those. Plus some minor corrections.

* Fix PoE

Basically fix the casing by renaming from the wrong kebab-case to the
correct snake_case.

* Turn invalid comments into description

Only device types can have `comments`, everything else is limited to
`description`. So turn all invalid comments into descriptions.

* Fix mgmt_only

Console port in NetBox don't have a `mgmt_only` property, because they
are by definition management-only.

* Fix position(s)

Device bays don't have a position, because the child devices are
completely separate and don't share any naming/numbering.

* Miscellaneous fixes

Everything that didn't fit into the prior larger error categories.
Validation now passes again.
2025-08-08 22:10:01 +01:00
Harry
531275a772 Requirements update (#3184)
* Update components.json

added 64 character limit to name for interface and console ports
names

* Update components.json

added max length

* Update README.md

* Update README.md

* Update README.md

* Update device_types.py

added checks for POE interfaces

* Added poe_type to interfaces

* Added poe_types

* Added poe type

* added required fields
2025-05-23 10:32:33 -04:00
Harry
2421bbd6f0 Added requirement for position field. (#2803)
* Update components.json

Added position as a required field for modules

* Added positions to module-bays

* Fixed more devices

---------

Co-authored-by: Daniel W. Anner <daniel.anner@danstechsupport.com>
2025-04-05 20:36:33 -04:00
Daniel W. Anner
70a75ec469 updating test code for new jsonschema version. removing old refresolver that is deprecated. updating schemas. (#2038) 2024-03-27 16:53:45 -04:00
Daniel W. Anner
c254f26961 Adding NetBox v3.6.2 generated schema (#1634) 2023-09-26 09:21:43 -04:00
Daniel W. Anner
7fd9b5a423 Updating schemas for autogenerated schema information (#1527) 2023-08-02 15:12:52 -04:00
Daniel W. Anner
5d99d931c1 Adding generated schema in preperation of PR for [NetBox Issue 10030](https://github.com/netbox-community/netbox/issues/10030) (#1525) 2023-08-02 12:38:35 -04:00
Daniel W. Anner
0b3658448a Adding 100gbase-x-dsfp and 100gbase-x-sfpdd (#1510) 2023-07-31 10:01:56 -04:00
Daniel W. Anner
d0cb58d96e Adding Tests: Device Power (#1463)
* broke component validation out to its own function. Adding logic for validating device power input.

* Added console-port poe true for adapters. Updating devices to add proper power sources.

* Adding switches to allow for tests to properly determine POE status.

* Fixing files with missing power definitions.
2023-07-17 15:23:56 -04:00
Daniel Hammett
59b992abd6 add other-wireless to resolve issue 1460 (#1461) 2023-07-15 21:39:30 -04:00
Daniel W. Anner
47d098e34a Adding 200gbase-x-qsfpdd pending adoption in upstream repository (#1371) 2023-06-26 11:22:18 -04:00
Daniel W. Anner
e9c6e86426 As per my conversation with Braden McGrath, type2-ieee802.3az isnt a poe standard, but rather a type of energy efficent ethernet - thus these devices are type2-ieee802.3at based on the poe rating (#1206) 2023-03-15 10:20:23 -04:00
Daniel W. Anner
b63bf2b046 Implementation of IEEE 802.3az (#1165) 2023-03-13 12:40:28 -04:00
Daniel W. Anner
242bddaec0 Weight Import Fix (#1187)
* weight schema configuration changes

* updated weight/weight unit definitions to compy with import expectations.

* updated readme
2023-03-09 10:49:38 -05:00
Martin
12dec8052c Add power type other (#1128) 2023-02-13 08:56:20 -05:00
Jonathan Senecal
1a4447a075 Fix float validation using decimal.Decimal (#1073)
* Fix float validation using decimal.Decimal

* Force string repr of the float when loading yaml

---------

Co-authored-by: Jonathan Senecal <jonathan.senecal@metrooptic.com>
2023-01-31 09:42:16 -05:00
Daniel W. Anner
f16575d8bd fixed multiple of issue on weight by adding multipleOfPrecision (#1069) 2023-01-26 10:52:38 -05:00
Daniel W. Anner
4061057407 Add Schema Interface Types & Correctly Identify Adapters (AT FS Series) (#1024)
* Adding 3 new adapter types. 100base-fx, 100base-lfx, and 100base-t1.
This addition is contingent on [Netbox PR#11377](https://github.com/netbox-community/netbox/pull/11377) being completed first. This will not be merged until that is complete

* Based on the addition of 100base-fx in the upstream netbox repo, this will allow us to correctly identify these ports

* updated 100base-fx interface names
2023-01-20 15:36:28 -05:00
Daniel W. Anner
9f546df7fe Added component definitions to add weight as a valid definition (#1061)
Added the required validation information
Updated the readme
2023-01-19 11:40:40 -05:00
reishoku
d64c90b798 Addition of Ubiquiti Switch Pro Aggregation (#1039)
* add USW-Pro-Aggregation: Ubiquiti Switch Pro Aggregation

Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>

* add ubiquiti-smartpower Power Ports and Power Outlets

Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>

Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>
Co-authored-by: Daniel W. Anner <daniel.anner@danstechsupport.com>
2023-01-07 02:29:13 -05:00
Martin
8575bbeba6 Add PoE (mode/type) to component definition (#912) 2022-09-15 21:05:58 -05:00
David Mc Ken
0126276d20 Update components.json (#889)
* Update components.json

Added DOCSIS and GPON interface types.

* Removed GPON interface types.
2022-09-02 16:18:54 -05:00
Daniel Sheppard
13ec142638 Add pon ports to components.json 2022-09-02 15:16:23 -05:00
jeremystretch
0da9bfbeca Closes #882: Add support for front & rear port color 2022-08-18 09:39:50 -04:00
Jeremy Stretch
8ca95dacef Module types (#659)
* Extend tests to support moule types

* Add Juniper EX9200-32XS module type

* Fix YAML formatting
2022-02-11 16:22:59 -05:00