Anuket Project
Collectd Redfish Plugin Executed Tests
Tests covering data provided by Redfish plugin
Test Environment details:
- <actual SUT details regarding hardware type, operating system distribution and kernel>
Repo/branch used:
- <branch name>
Tests precondition:
Install Redfish Interface Emulator and launch multiple instances using different ports: (this step is not required in case of testing on Redfish capable SUT)
git clone https://github.com/DMTF/Redfish-Interface-Emulator && cd Redfish-Interface-Emulator
Make sure all packages required by the emulator are installed with pip. Check requirements.txt for details.
./emulator.py -port 5000
./emulator.py -port 5001
./emulator.py -port 5002
Install ipmitool
Configure Redfish collect plugin in collectd.conf:
<Plugin redfish>
<Query "fans">
Endpoint "/redfish/v1/Chassis/Chassis-1/Thermal"
<Resource "Fans">
<Property "ReadingRPM">
PluginInstance "chassis-1"
Type "rpm"
</Property>
</Resource>
</Query>
<Query "temperatures">
Endpoint "/redfish/v1/Chassis/Chassis-1/Thermal"
<Resource "Temperatures">
<Property "ReadingCelsius">
PluginInstance "chassis-1"
Type "degrees"
</Property>
</Resource>
</Query>
<Query "voltages">
Endpoint "/redfish/v1/Chassis/Chassis-1/Power"
<Resource "Voltages">
<Property "ReadingVolts">
PluginInstance "chassis-1"
Type "volts"
</Property>
</Resource>
</Query>
<Service "local">
Host "127.0.0.1:5000"
User "user"
Passwd "passwd"
Queries "fans" "voltages" "temperatures"
</Service>
<Service "local">
Host "127.0.0.1:5001"
User "user"
Passwd "passwd"
Queries "fans" "voltages" "temperatures"
</Service>
<Service "local">
Host "127.0.0.1:5002"
User "user"
Passwd "passwd"
Queries "fans" "voltages" "temperatures"
</Service>
</Plugin>
Test cases
# | High level scenario description | Steps to be executed | Expected result | Test result | Comments |
1 | Verify that metrics are collected when plugin is enabled. | 1. Enable Redfish plugin in collectd 2. Restart collectd | Collectd Redfish plugin operates correctly after plugin config change. Collectd service exits normally on service stop. |
|
|
2 | Verify that metrics are not collected when plugin is disabled or not configured. | 1. Comment out"LoadPlugin" entry of Redfish ipmi plugin. Keep config section uncommented. Restart collectd. 2. Uncomment "LoadPlugin" section of Redfish plugin. Comment out config section. Restart collectd. 3. Comment out all configs of Redfish plugin. Restart collectd. | Collectd service starts, runs and exits normally. Redfish plugin does not dispatch any data to write plugin. |
|
|
3 | Verify that plugin run occurs according to set Interval value. | 1. Comment out collectd.conf entries setting global and plugin specific Interval parameter. Run collectd. 2. Set up global Interval value to 5 seconds. 3. Keep global Interval set to 5 seconds and set Redfish specific interval parameter to 3 seconds. | 1. Plugin run occurs according to default Interval (10 seconds). 2. Plugin run occurs every 5 seconds, according to new global Interval value. 3. Plugin run occurs every 3 seconds, according to plugin specific Interval value. |
|
|
4 | Validate collected sensor data with 3rd party tool. | 1. Run collectd with enabled Redfish. 2. Collect sensors data for at least two intervals. 3. Use ipmitool to get a list of available sensors on the SUT. Compare this data with sensors list provided by the Redfish plugin. | Data is dispatched from each configured sensor and values match the data received from ipmitool. No data is collected and dispatched from sensors that are not configured in the plugin. |
| Cannot be executed with emulated Redfish interface! |
5 | Verify that error log is written for inaccessible hosts and URLs | 1. Modify the Endpoint in one of the Queries to an invalid structure and restart collectd. 2. Undo the previous change. Modify the port number or IP address of one of the hosts to invalid value and restart collectd. | Errors are visible in collectd log both for invalid host and invalid endpoint. |
|
|
6 | Verify that error log is written for invalid configuration | 1. Add a not existing Query type to one of the hosts 2. Restart collectd | Error about invalid configuration is visible in collectd log |
|
|
|
|
|
|
|
|