Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
danner26 authored Dec 26, 2024
2 parents 52efe0b + 4f044cb commit 84be574
Show file tree
Hide file tree
Showing 11 changed files with 130 additions and 30 deletions.
41 changes: 41 additions & 0 deletions device-types/Fortinet/FG-70F.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
manufacturer: Fortinet
model: FortiGate 70F
slug: fortinet-fg-70f
part_number: FG-70F
u_height: 1
weight: 1.01
weight_unit: kg
is_full_depth: false
front_image: false
rear_image: false
comments: '[FortiGate 70F Series Datasheet](https://www.fortinet.com/content/dam/fortinet/assets/data-sheets/fortigate-70f-series.pdf)'
console-ports:
- name: Console
type: rj-45
power-ports:
- name: PS1
type: dc-terminal
maximum_draw: 16
allocated_draw: 13
interfaces:
- name: internal1
type: 1000base-t
- name: internal2
type: 1000base-t
- name: internal3
type: 1000base-t
- name: internal4
type: 1000base-t
- name: internal5
type: 1000base-t
- name: A
type: 1000base-t
- name: B
type: 1000base-t
- name: dmz
type: 1000base-t
- name: wan1
type: 1000base-t
- name: wan2
type: 1000base-t
22 changes: 13 additions & 9 deletions device-types/Juniper/EX9204.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ model: EX9204
slug: juniper-ex9204
u_height: 5
is_full_depth: true
subdevice_role: parent
comments: '[Juniper EX9204 Data Sheet](https://www.juniper.net/us/en/local/pdf/datasheets/1000432-en.pdf)'
console-ports:
- name: Console-RE0
type: rj-45
power-ports:
module-bays:
- name: SF0
position: '0'
- name: SF1/LC0
position: 1|0
- name: LC1
position: '1'
- name: LC2
position: '2'
- name: PSU0
type: iec-60320-c20
position: '0'
- name: PSU1
type: iec-60320-c20
position: '1'
- name: PSU2
type: iec-60320-c20
position: '2'
- name: PSU3
type: iec-60320-c20
positions: '3'
35 changes: 35 additions & 0 deletions device-types/Juniper/EX9208.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
manufacturer: Juniper
model: EX9208
slug: juniper-ex9208
u_height: 8
weight: 30
weight_unit: kg
airflow: right-to-left
is_full_depth: true
comments: '[Juniper EX9208 System Overview](https://www.juniper.net/documentation/us/en/hardware/ex9208/topics/topic-map/ex9208-system-overview.html)'
module-bays:
- name: SF0
position: '0'
- name: SF1
position: '1'
- name: LC0
position: '0'
- name: LC1
position: '1'
- name: LC2
position: '2'
- name: LC3
position: '3'
- name: LC4
position: '4'
- name: LC5
position: '5'
- name: PSU0
position: '0'
- name: PSU1
position: '1'
- name: PSU2
position: '2'
- name: PSU3
positions: '3'
47 changes: 36 additions & 11 deletions device-types/Juniper/EX9214.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,45 @@ manufacturer: Juniper
model: EX9214
slug: juniper-ex9214
u_height: 16
weight: 68.04
weight_unit: kg
airflow: front-to-rear
is_full_depth: true
subdevice_role: parent
comments: '[Juniper EX9214 Data Sheet](https://www.juniper.net/us/en/local/pdf/datasheets/1000432-en.pdf)'
console-ports:
- name: Console-RE0
type: rj-45
- name: Console-RE1
type: rj-45
power-ports:
module-bays:
- name: SF0
position: '0'
- name: SF1
position: '1'
- name: LC0
position: '0'
- name: LC1
position: '1'
- name: LC2
position: '2'
- name: LC3
position: '3'
- name: LC4
position: '4'
- name: LC5
position: '5'
- name: SF2/LC6
position: 2/6
- name: LC7
position: '7'
- name: LC8
position: '8'
- name: LC9
position: '9'
- name: LC10
position: '10'
- name: LC11
position: '11'
- name: PSU0
type: iec-60320-c20
position: '0'
- name: PSU1
type: iec-60320-c20
position: '1'
- name: PSU2
type: iec-60320-c20
position: '2'
- name: PSU3
type: iec-60320-c20
positions: '3'
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ manufacturer: Schweitzer Engineering Laboratories
model: SEL-2243 Power Coupler
description: Every SEL Axion node requires at least one SEL-2243 Power Coupler module. The SEL-2243 serves two purposes in an Axion system. It is the power
supply for all modules installed in the node, and; It provides two dedicated EtherCAT ports so that mutiple Axion nodes can operate together.

interfaces:
- name: Eth01
type: 100base-tx
- name: Eth02
type: 100base-tx

power-ports:
- name: dc power terminal
type: dc-terminal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ manufacturer: Schweitzer Engineering Laboratories
model: SEL-2244-5 Fast High-Current Digital Output Module
description: The SEL-2244-5 module includes ten control outputs with LED indication that have high current tripping capacity (10 A) and fast output rise
time (<16 at 125 V). Up to nine modules may be used in a node

interfaces:
- name: Digital-output terminal
type: other
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ manufacturer: Schweitzer Engineering Laboratories
model: SEL-2245-2 DC Analog Input Module
description: The SEL-2245-2 module includes 16 inputs that are software-selectable for input ranges of 20 mA, 2 mA, or +10 V. Up to 9 modules may be used
in a node, and a maximum of 16 analog modules may be used in one Axion system.

interfaces:
- name: Analog-input terminal
type: other
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jsonschema==4.23.0
jsondiff==2.2.1
pre-commit==4.0.1
pytest==8.3.3
pytest==8.3.4
PyYAML==6.0.2
yamllint==1.35.1
gitpython==3.1.43
Expand Down
9 changes: 4 additions & 5 deletions tests/definitions_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def iterlist(var):
# Check for images if front_image or rear_image is True
if (definition.get('front_image') or definition.get('rear_image')):
# Find images for given manufacturer, with matching device slug (exact match including case)
manufacturer_images = [image[1] for image in image_files if image[0] == file_path.split('/')[1] and os.path.basename(image[1]).split('.')[0] == this_device.get_slug()]
manufacturer_images = [image[1] for image in image_files if image[0] == file_path.split(os.path.sep)[1] and os.path.basename(image[1]).split('.')[0] == this_device.get_slug()]
if not manufacturer_images:
pytest.fail(f'{file_path} has Front or Rear Image set to True but no images found for manufacturer/device (slug={this_device.get_slug()})', False)
elif len(manufacturer_images)>2:
Expand All @@ -232,13 +232,12 @@ def iterlist(var):
front_image = [image_path.split('/')[2] for image_path in manufacturer_images if os.path.basename(image_path).split('.')[1] == 'front']

if not front_image:
pytest.fail(f'{file_path} has front_image set to True but no matching image found for device ({manufacturer_images})', False)
pytest.fail(f'{file_path} has front_image set to True but no matching image found (looking for \'elevation-images{os.path.sep}{file_path.split(os.path.sep)[1]}{os.path.sep}{this_device.get_slug()}.front.ext\' but only found {manufacturer_images})', False)

# If rear_image is True, verify that a front image exists
# If rear_image is True, verify that a rear image exists
if(definition.get('rear_image')):
rear_image = [image_path.split('/')[2] for image_path in manufacturer_images if os.path.basename(image_path).split('.')[1] == 'rear']

if not rear_image:
pytest.fail(f'{file_path} has rear_image set to True but no images found for device', False)

pytest.fail(f'{file_path} has rear_image set to True but no matching image found (looking for \'elevation-images{os.path.sep}{file_path.split(os.path.sep)[1]}{os.path.sep}{this_device.get_slug()}.rear.ext\' but only found {manufacturer_images})', False)
iterdict(definition)
Binary file modified tests/known-modules.pickle
Binary file not shown.
Binary file modified tests/known-slugs.pickle
Binary file not shown.

0 comments on commit 84be574

Please sign in to comment.