Commit Graph

15 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
1b5060f7c7 Full depth requirement (#3011)
* Update devicetype.json

Make Full_depth property a requirement

* Added is_full_depth

* Fixed issues

* Fixed issues

* Added new files

* Added full_depth property

---------

Co-authored-by: Daniel W. Anner <daniel.anner@danstechsupport.com>
2025-05-19 10:25:33 -04:00
Harry
c1780e3486 Added U height requirement (#2713)
added U height requirement

* Added U_height

Added U height to all devices that were missing it and removed some drive bays from qnap devices

* Fixed a few issues
2025-02-16 08:54:53 +00: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
Boian Berberov
89854b7451 Updated JSON schema to allow description (#1857) 2024-01-23 10:14:03 -05: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
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 W. Anner
1ddaab3951 Tests: Remove uppercase from slug (#1227)
* Removed uppercase from devicetype schema slug definition. Fixed incorrect device slugs

* Update CISCO2951_K9.yaml

* Rename CISCO2951_K9.yaml to 2951-K9.yaml
2023-03-25 11:45:15 -04:00
Daniel W. Anner
f78c90d38b Adding elevation images folder and test logic (#1225)
* Added new test code for elevation images. Added elevation folder.

* Also adding first file with image definitions
2023-03-24 16:50:47 -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
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
jeremystretch
6f1fa04a74 Closes #881: Add support for 0.5U heights 2022-08-18 09:23:52 -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