Commit Graph

42 Commits

Author SHA1 Message Date
Marcin Zieba
8af496076a fix: Detect duplicates between front<->rear ports mapping (#3821)
* fix: extend front/rear port check to modules

* fix: detect duplicates between front<->rear ports mapping

---------

Co-authored-by: Harry <Harry@cadby.co.uk>
2025-12-30 09:19:17 +00:00
m-hau
c390a41d82 Optimize pre-commit download (#3674)
* Fix non-local rack pickle path

Looks like a copy&paste error from/in 57742dbb.

* Optimize download

Use a partial clone, which is supported in Git since 2.18 (released
2018). The amount of actually downloaded data is roughly equal to the
size of the required files, the compression offsets the git overhead.

* Fallback for old git versions

---------

Co-authored-by: Harry <Harry@cadby.co.uk>
2025-12-28 16:48:10 +00:00
Marcin Zieba
efa692f1fe fix: extend front/rear port check to modules (#3820) 2025-12-27 22:14:24 +00:00
Juniper46
981cacd782 Improved front and rear port validation (#3798)
* Update definitions_test.py

Improved Front and rear port validation

* Fixed device

---------

Co-authored-by: Harry <harry@cadby.co.uk>
2025-12-15 13:04:24 +00:00
Juniper46
bed77b1bed Improve Validation and fixed issues based on Issue (#3768)
* Update devicetype.json

* Update moduletype.json

* Update definitions_test.py

* Update device_types.py

* Update devicetype.json

* Update moduletype.json

* Update devicetype.json

* Update HWG-STE.yml

* Update 701BA8PP.yml

* Update WS-C2960C-12PC-L.yaml

* Update snr-ups-onrt-1000-s24-element-ii.yaml

* Update EP-R6.yaml

* Update moduletype.json

* Fixed issues

* Added description limit

---------

Co-authored-by: Harry <harry@cadby.co.uk>
2025-11-27 10:46:51 +00:00
Bastian Leicht
57742dbb2c Add rack-types (#3026)
* feat: add front image

* feat: startech 4post rack

* feat: add digitus DN-19 07U-I-OD

* feat: add digitus DN-19 07U-I-OD

* Revert "feat: add front image"

This reverts commit bdd27607f821fa942d40fb01774cab6053f83ada.

* fix: change form_factor

* feat: add racktype schema

* feat: add racktype schema

* feat: upload generated known-racks.pickle

* fix: change filename

* feat: add rack type

* refactor: change tests to work with racks

* refactor: use the correct device class

* fix: rename file correctly

* Update racktype.json

* fix: add missing desc_units schema property

* fix: add missing desc_units value

* chore: update readme with rack-types documentation

---------

Co-authored-by: Harry <Harry@cadby.co.uk>
2025-08-11 13:07:27 +01:00
raven
4092cea07c Improve image tests (#2500)
* Fix rear_imge test and description

* replace '/' by os.path.sep

* Extend error messages to include expected filenames

* fix image path (use elevation-images as base dir)

* add quotes around expected path

* Improve failure message

* remove redundant image description

---------

Co-authored-by: Giotta Simon <simon.giotta@ruag.ch>
Co-authored-by: Daniel W. Anner <daniel.anner@danstechsupport.com>
2024-12-26 12:31:24 -05:00
Daniel W. Anner
8584df2007 Correction - ASCII and Tests (#2588)
* fixing spacing

* fixing non-ascii characters
2024-12-26 12:14:51 -05:00
kaio Guilherme
165a26546d Fix: Prevent non ascii characters in yaml files issue #2461 (#2508)
* fix yaml to x150-series

* Fix: Prevent non-ASCII characters in YAML files (#2461)

This commit addresses the issue #2461 by updating the test case to detect non-ASCII characters in YAML files. The new check ensures that if any non-ASCII characters are found, the test will fail and provide a clear message listing the problematic characters.
	•	Added a check to identify non-ASCII characters in the content of the YAML files.
	•	If non-ASCII characters are found, the test will now fail with a detailed error message, including the list of non-ASCII characters.

This update helps ensure that YAML files are strictly ASCII-encoded, avoiding potential encoding issues in different environments.
2024-11-15 21:51:42 +00:00
Daniel W. Anner
4607c0d486 Test Cases: Added VGA denial test case (#2065)
* Adding first revision of the VGA test cases

* Second revision with less repetative code

* Handling case where vga has a number in the naming

* the great VGA purge!
2024-04-03 21:02:47 -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 Sheppard
6efd71e4ce Revert submodule test 2024-03-22 15:36:57 -05:00
Daniel Sheppard
edd8fb1b63 Remove Tests 2024-03-22 14:57:13 -05:00
Daniel W. Anner
09e59d10d8 fixing rename file (#1710) 2023-10-23 16:34:23 -04:00
Daniel W. Anner
6aae04ac3b Pytest Test Case - Renamed File w/o Slug/PN Change (#1708)
* Updating tests to solve the issue in PR#1667 which fails on a renamed file (with a valid slug)

* preseving old functionality
2023-10-23 16:11:49 -04:00
Daniel W. Anner
5345715d2f Adding Panduit images from issue #1601 (#1606) 2023-09-06 10:29:33 -04:00
Daniel W. Anner
b25e45e1b7 Adding code to check if the all switch is called (#1603) 2023-09-05 15:39:21 -04:00
Daniel W. Anner
cfbc3ec223 Jpsu fix (#1520)
* Added test functionality to use original all files testing. Fixed JPSU-920-AC-AFO issue from Issue#1514

* Fixed JPSU issue

* Fixing file format issue

* fixing file we altered by accident
2023-08-01 12:02:16 -04:00
Daniel W. Anner
8eb68d6a19 Adding module file name checks as well (#1519) 2023-08-01 11:46:04 -04:00
Daniel W. Anner
1defb11182 Revert "Adding failure condition for pickle file (#1497)" (#1498)
This reverts commit 8da45ff037.
2023-07-27 12:17:34 -04:00
Daniel W. Anner
8da45ff037 Adding failure condition for pickle file (#1497) 2023-07-27 11:54:18 -04:00
Daniel W. Anner
a5050ebe41 Update definitions_test.py 2023-07-20 11:14:30 -04:00
Daniel W. Anner
7b527f51ba Update definitions_test.py
Fixed mistake - left testing code in
2023-07-20 11:03:34 -04:00
Daniel W. Anner
1868743431 Update definitions_test.py
Resolved issue with renamed files
2023-07-20 11:01:08 -04:00
Daniel W. Anner
1a9b233d3d Update definitions_test.py
Correcting schema mapping issue
2023-07-19 12:11:11 -04:00
Daniel W. Anner
2e2bb3cf4e Update definitions_test.py 2023-07-19 11:53:37 -04:00
Daniel W. Anner
30cf68a804 Update definitions_test.py 2023-07-19 11:04:51 -04:00
Daniel W. Anner
b55d20c4bf Update definitions_test.py 2023-07-19 10:45:01 -04:00
Daniel W. Anner
15a3e7a9d1 Restore master (#1473)
* Pytest Optimizations (#1465)

* Adding function to determin file changes from upstream via git

* updated test env function to properly skip when files are empty

* updating to use generated slug list

* fixing if statement

* added known slugs functionality to improve runtime

* updating slugs for using git repo

* adding final changes

* updating library url to be correct

* Update master-slugs.yml

* commit to force pr merge (#1466)

* Pytest pr (#1467)

* commit to force pr merge

* commit to force pr merge

* Update master-slugs.yml

* Regenerate master slug list after successful PR merge

* Update master-slugs.yml

* fianl changes to new master slug workflow (#1468)

* Final pr test (#1469)

* fianl changes to new master slug workflow

* trying new branch push

* changing to myself (#1470)

* testing permission on github_token

* testing permission on github_token

* testing permission on github_token

---------

Co-authored-by: NetBox Bot <info@netboxlabs.com>
2023-07-19 10:32:32 -04:00
Daniel W. Anner
e42a14b180 Revert "PR CI Testing (#1472)" (#1474)
This reverts commit 3d0803957d.
2023-07-19 10:32:03 -04:00
Daniel W. Anner
3d0803957d PR CI Testing (#1472)
* Pytest Optimizations (#1465)

* Adding function to determin file changes from upstream via git

* updated test env function to properly skip when files are empty

* updating to use generated slug list

* fixing if statement

* added known slugs functionality to improve runtime

* updating slugs for using git repo

* adding final changes

* updating library url to be correct

* Update master-slugs.yml

* commit to force pr merge (#1466)

* Pytest pr (#1467)

* commit to force pr merge

* commit to force pr merge

* Update master-slugs.yml

* Regenerate master slug list after successful PR merge

* Update master-slugs.yml

* fianl changes to new master slug workflow (#1468)

* Final pr test (#1469)

* fianl changes to new master slug workflow

* trying new branch push

* changing to myself (#1470)

* testing permission on github_token

* testing permission on github_token

---------

Co-authored-by: NetBox Bot <info@netboxlabs.com>
2023-07-19 10:24:20 -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
4ac4c79ab1 Updating comments and error messages for better readability and validation (#1457) 2023-07-14 15:38:14 -04:00
Daniel W. Anner
c95b166139 Implementing Test Updates (Slugs & File Names) (#1454)
* breaking out tests for easier usage

* refactoring codebase

* Added verification for properly formatted slug and fixed definitions that were incorrect

* Adding new test case to ensure the file name matches either the slug or the part_number

* fixed file names to match proper formatting
2023-07-12 20:00:44 -04:00
aurelienbyi
ad8ad1589e directory separator appropriate for exec env (#1250)
Co-authored-by: aurelien.bailly <aurelien.bailly@destiny.eu>
2023-04-01 15:44:41 -04:00
J vanBemmel
3bf511ece6 Nokia add images new location (#1233)
* Re-add front/rear images following new location & filename conventions

* Renamed following exact match slug convention

* Debug test failing

* Different log msg

* More debug

* Filter on startswith(slug)

* Debug

* Quotes

* Updated filter

* Match on string part
2023-03-27 15:06:48 -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
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
Michael Klose
d8ce2765c4 Extend tests to check for null/empty values (#687)
Fixes #686
2022-02-25 10:23:46 -05:00
jeremystretch
c1f6cecb21 Combine validation and duplication tests for efficiency 2022-02-18 14:47:13 -05: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
Ryan Merolle
7b303a5ace YAML Formatting & Validation (#347)
* leverage yamllint in GitHub actions 

* add pre-commits

* validation updates

* Update README.md

* Update CONTRIBUTING.md
2021-02-27 07:25:47 -05:00