Skip to content

Commit b26678c

Browse files
committed
Fix checkers failures
1 parent d66b89a commit b26678c

13 files changed

+871
-0
lines changed

tests/bmc_base_test.py

Lines changed: 391 additions & 0 deletions
Large diffs are not rendered by default.

tests/mock_data/__init__.py

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
3+
"@odata.type": "#Task.v1_4_3.Task",
4+
"Id": "0",
5+
"TaskState": "Running",
6+
"TaskStatus": "OK"
7+
}
8+
HTTP Status Code: 200
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
HTTP Status Code: 200
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
HTTP/1.1 401 Unauthorized
3+
Content-Type: application/json
4+
WWW-Authenticate: Basic realm="BMC"
5+
Content-Length: 0
6+
7+
HTTP Status Code: 401
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
HTTP/1.1 201 Created
2+
Allow: GET, HEAD, POST
3+
OData-Version: 4.0
4+
X-Auth-Token: TVZI0pf8VCGbYAhw9cIF
5+
Location: /redfish/v1/SessionService/Sessions/abc123xyz
6+
Strict-Transport-Security: max-age=31536000; includeSubdomains
7+
Pragma: no-cache
8+
Cache-Control: no-store, max-age=0
9+
X-Content-Type-Options: nosniff
10+
Content-Type: application/json
11+
Date: Tue, 02 Apr 2024 10:14:08 GMT
12+
Content-Length: 289
13+
14+
{
15+
"@odata.id": "/redfish/v1/SessionService/Sessions/abc123xyz",
16+
"@odata.type": "#Session.v1_7_0.Session",
17+
"ClientOriginIPAddress": "169.254.0.2",
18+
"Description": "Manager User Session",
19+
"Id": "abc123xyz",
20+
"Name": "User Session",
21+
"Roles": [ "" ],
22+
"UserName": "testuser"
23+
}
24+
HTTP Status Code: 201
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@Message.ExtendedInfo": [
3+
{
4+
"@odata.type": "#Message.v1_1_1.Message",
5+
"Message": "The request completed successfully.",
6+
"MessageArgs": [],
7+
"MessageId": "Base.1.18.1.Success",
8+
"MessageSeverity": "OK",
9+
"Resolution": "None."
10+
}
11+
]
12+
}
13+
HTTP Status Code: 200
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
3+
"@odata.type": "#Task.v1_4_3.Task",
4+
"EndTime": "2024-03-25T11:56:11+00:00",
5+
"HidePayload": false,
6+
"Id": "0",
7+
"Messages": [
8+
{
9+
"@odata.type": "#Message.v1_1_1.Message",
10+
"Message": "The task with Id '0' has started.",
11+
"MessageArgs": [
12+
"0"
13+
],
14+
"MessageId": "TaskEvent.1.0.3.TaskStarted",
15+
"MessageSeverity": "OK",
16+
"Resolution": "None."
17+
},
18+
{
19+
"@odata.type": "#Message.v1_1_1.Message",
20+
"Message": "The request completed successfully.",
21+
"MessageArgs": [],
22+
"MessageId": "Base.1.16.0.Success",
23+
"MessageSeverity": "OK",
24+
"Resolution": "None"
25+
}
26+
],
27+
"Name": "Task 0",
28+
"Payload": {
29+
"HttpHeaders": [
30+
"Host: 10.0.1.1",
31+
"User-Agent: curl/7.88.1",
32+
"Accept: */*",
33+
"Content-Length: 33",
34+
"Location: /redfish/v1/Managers/BMC_0/LogServices/Dump/Entries/113"
35+
],
36+
"HttpOperation": "POST",
37+
"JsonBody": "{\n \"DiagnosticDataType\": \"Manager\"\n}",
38+
"TargetUri": "/redfish/v1/Managers/BMC_0/LogServices/Dump/Actions/LogService.CollectDiagnosticData"
39+
},
40+
"PercentComplete": 100,
41+
"StartTime": "2024-03-25T11:44:30+00:00",
42+
"TaskMonitor": "/redfish/v1/TaskService/Tasks/0/Monitor",
43+
"TaskState": "Completed",
44+
"TaskStatus": "OK"
45+
}
46+
HTTP Status Code: 200
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"@Message.ExtendedInfo": [
3+
{
4+
"@odata.type": "#Message.v1_1_1.Message",
5+
"Message": "The request completed successfully.",
6+
"MessageArgs": [],
7+
"MessageId": "Base.1.16.0.Success",
8+
"MessageSeverity": "OK",
9+
"Resolution": "None"
10+
}
11+
]
12+
}
13+
HTTP Status Code: 200
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom",
3+
"@odata.type": "#Chassis.v1_22_0.Chassis",
4+
"Assembly": {
5+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/Assembly"
6+
},
7+
"ChassisType": "Module",
8+
"Controls": {
9+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/Controls"
10+
},
11+
"EnvironmentMetrics": {
12+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/EnvironmentMetrics"
13+
},
14+
"Id": "BMC_eeprom",
15+
"Links": {
16+
"ComputerSystems": [
17+
{
18+
"@odata.id": "/redfish/v1/Systems/System_0"
19+
}
20+
],
21+
"ManagedBy": [
22+
{
23+
"@odata.id": "/redfish/v1/Managers/BMC_0"
24+
}
25+
]
26+
},
27+
"Location": {
28+
"PartLocation": {
29+
"LocationType": "Embedded"
30+
}
31+
},
32+
"LogServices": {
33+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/LogServices"
34+
},
35+
"Manufacturer": "TestVendor",
36+
"Model": "BMC1000",
37+
"Name": "BMC_eeprom",
38+
"Oem": {
39+
"TestVendor": {
40+
"@odata.type": "#GenericChassis.v1_1_0.GenericChassis"
41+
}
42+
},
43+
"PCIeDevices": {
44+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/PCIeDevices"
45+
},
46+
"PCIeSlots": {
47+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/PCIeSlots"
48+
},
49+
"PartNumber": "BMC-PN-12345-001",
50+
"PowerState": "On",
51+
"PowerSubsystem": {
52+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/PowerSubsystem"
53+
},
54+
"Sensors": {
55+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/Sensors"
56+
},
57+
"SerialNumber": "BMC-SN-987654321",
58+
"Status": {
59+
"Conditions": [],
60+
"Health": "OK",
61+
"HealthRollup": "OK",
62+
"State": "Enabled"
63+
},
64+
"ThermalSubsystem": {
65+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/ThermalSubsystem"
66+
},
67+
"TrustedComponents": {
68+
"@odata.id": "/redfish/v1/Chassis/BMC_eeprom/TrustedComponents"
69+
}
70+
}
71+
HTTP Status Code: 200

0 commit comments

Comments
 (0)