Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions docs/device_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Overall device result FAIL
|---|---|---|---|---|---|
|Required|1|0|0|0|0|
|Recommended|1|0|0|0|1|
|Other|6|2|22|1|2|
|Other|6|2|20|1|2|

|Result|Test|Category|Expectation|Notes|
|---|---|---|---|---|
Expand All @@ -75,9 +75,7 @@ Overall device result FAIL
|skip|connection.port_link|Other|Other|No local IP has been set, check system config|
|skip|connection.port_speed|Other|Other|No local IP has been set, check system config|
|pass|manual.test.name|Security|Recommended|Manual test - for testing|
|skip|poe.negotiation|Other|Other|No local IP has been set, check system config|
|skip|poe.power|Other|Other|No local IP has been set, check system config|
|skip|poe.support|Other|Other|No local IP has been set, check system config|
|skip|poe.switch.power|Other|Other|No local IP has been set, check system config|
|fail|protocol.bacnet.pic|Other|Other|PICS file defined however a BACnet device was not found.|
|skip|protocol.bacnet.version|Other|Other|Bacnet device not found.|
|skip|security.firmware|Other|Other|Could not retrieve a firmware version with nmap. Check bacnet port.|
Expand Down Expand Up @@ -251,31 +249,13 @@ LOCAL_IP not configured, assuming no network switch.
RESULT skip connection.port_duplex No local IP has been set, check system config

--------------------
poe.power
poe.switch.power
--------------------
Verify that the device draws less than the maximum power allocated by the port. This is 15.4W for 802.3af and 30W for 802.3at
--------------------
LOCAL_IP not configured, assuming no network switch.
--------------------
RESULT skip poe.power No local IP has been set, check system config

--------------------
poe.negotiation
--------------------
Verify the device autonegotiates power requirements
--------------------
LOCAL_IP not configured, assuming no network switch.
--------------------
RESULT skip poe.negotiation No local IP has been set, check system config

--------------------
poe.support
--------------------
Verify if the device supports PoE
--------------------
LOCAL_IP not configured, assuming no network switch.
--------------------
RESULT skip poe.support No local IP has been set, check system config
RESULT skip poe.switch.power No local IP has been set, check system config

```

Expand Down
9 changes: 2 additions & 7 deletions subset/switches/module_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@
"connection.port_duplex" : {
"description" : "Verify the device supports full duplex"
},
"poe.power" : {
"poe.switch.power" : {
"description" : "Verify that the device draws less than the maximum power allocated by the port. This is 15.4W for 802.3af and 30W for 802.3at"
},
"poe.negotiation" : {
"description" : "Verify the device autonegotiates power requirements"
},
"poe.support" : {
"description" : "Verify if the device supports PoE"
}
}

9 changes: 0 additions & 9 deletions subset/switches/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,8 @@ Example of all necessary parameters in the system.conf related to physical switc
- pass -> If the speed of the port is auto-negotiated and determiend to be higher than 10 MBPS
- fail ->If the speed of the port is determined to be <= 10MBPS

## Conditions for poe.negotiation
- pass -> If the PoE is able to be auto-negotiated with the device and PoE is enabled for the device.
- fail ->If the PoE fails to be auto-negotiated with the device and is enabled for the device. This can also fail if associated power data fails to resolve correctly during switch interrogation.
- skip -> If the PoE option is disabled in the device module_config.json or if the switch reports no PoE support.

## Conditions for poe.power
- pass -> If the a PoE device is connected and power has been detected and supplied to the device.
- fail -> If the a PoE device is connected and *NO* power has been detected and supplied to the device. Failure also occurs if the switch reports either a faulty PoE state or is denying power to the device. This can also fail if associated power data fails to resolve correctly during switch interrogation.
- skip -> If the PoE option is disabled in the device module_config.json or if the switch reports no PoE support.

## Conditions for poe.support
- pass -> If the port the device is connected to supports PoE and it is enabled on that port.
- fail -> If the a PoE device is connected to does not support PoE or it is disabled on that port.
- skip -> If the PoE option is disabled in the device module_config.json or if the switch reports no PoE support.
30 changes: 7 additions & 23 deletions subset/switches/src/main/java/switchtest/SwitchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,45 +92,28 @@ protected void testDuplex(InterfaceResponse interfaceResponse) {

protected void testPower(PowerResponse powerResponse) {
if (!deviceConfigPoeEnabled) {
captureResult("poe.power", Result.SKIP, "This test is disabled");
captureResult("poe.negotiation", Result.SKIP, "This test is disabled");
captureResult("poe.support", Result.SKIP, "This test is disabled");
captureResult("poe.switch.power", Result.SKIP, "This test is disabled");
return;
}

POEStatus.State poeStatus = powerResponse.getPoeStatus();
// Determine PoE power test result
if (poeStatus == POEStatus.State.ON) {
if (powerResponse.getMaxPowerConsumption() >= powerResponse.getCurrentPowerConsumption()) {
captureResult("poe.power", Result.PASS, "PoE is applied to device");
captureResult("poe.switch.power", Result.PASS, "PoE is applied to device");
} else {
captureResult("poe.power", Result.FAIL, "device wattage exceeds the max wattage");
captureResult("poe.switch.power", Result.FAIL, "device wattage exceeds the max wattage");
}
} else if (poeStatus == POEStatus.State.OFF) {
captureResult("poe.power", Result.FAIL, "No poE is applied");
captureResult("poe.switch.power", Result.FAIL, "No PoE is applied");
} else if (poeStatus == POEStatus.State.FAULT) {
captureResult("poe.power", Result.FAIL,
captureResult("poe.switch.power", Result.FAIL,
"Device detection or a powered device is in a faulty state");
} else {
captureResult("poe.power", Result.FAIL, "A powered device is detected, "
captureResult("poe.switch.power", Result.FAIL, "A powered device is detected, "
+ "but no PoE is available, or the maximum wattage exceeds the "
+ "detected powered-device maximum.");
}

// Determine PoE auto negotiation result
if (powerResponse.getPoeNegotiation() == POENegotiation.State.ENABLED) {
captureResult("poe.negotiation", Result.PASS, "PoE auto-negotiated successfully");
} else {
captureResult("poe.negotiation", Result.FAIL, "Incorrect privilege for negotiation");
}

// Determine PoE support result
if (powerResponse.getPoeSupport() == POESupport.State.ENABLED) {
captureResult("poe.support", Result.PASS, "PoE is supported and enabled");
} else {
captureResult("poe.support", Result.FAIL,
"The switch does not support PoE or it is disabled");
}
}

protected void writeReport() {
Expand Down Expand Up @@ -169,3 +152,4 @@ public void test(SwitchInfo switchInfo) {
writeReport();
}
}

18 changes: 3 additions & 15 deletions subset/switches/test_switch
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,9 @@ else
"RESULT $RESULT connection.port_duplex $SUMMARY"

write_out_result $REPORT \
"poe.power" \
"$(jq -r '.["poe.power"].description' $MANIFEST)" \
"poe.switch.power" \
"$(jq -r '.["poe.switch.power"].description' $MANIFEST)" \
"$SKIP_REASON" \
"RESULT $RESULT poe.power $SUMMARY"

write_out_result $REPORT \
"poe.negotiation" \
"$(jq -r '.["poe.negotiation"].description' $MANIFEST)" \
"$SKIP_REASON" \
"RESULT $RESULT poe.negotiation $SUMMARY"

write_out_result $REPORT \
"poe.support" \
"$(jq -r '.["poe.support"].description' $MANIFEST)" \
"$SKIP_REASON" \
"RESULT $RESULT poe.support $SUMMARY"
"RESULT $RESULT poe.switch.power $SUMMARY"

fi