Skip to content

Commit accfdaa

Browse files
authored
Merge pull request redhat-cne#63 from jzding/hp
Update Redfish schema and add e2e tests
2 parents ee696d3 + 8669ebe commit accfdaa

File tree

7 files changed

+80
-20
lines changed

7 files changed

+80
-20
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@odata.context": "/redfish/v1/$metadata#Event.Event",
3+
"@odata.id": "/redfish/v1/EventService/Events/c8a5433e-de17-11eb-8d4b-f40270e4f7f4",
4+
"@odata.type": "#Event.v1_3_0.Event",
5+
"Context": "any string is valid",
6+
"Events": [
7+
{
8+
"Context": "any string is valid",
9+
"EventId": "2162",
10+
"EventTimestamp": "2021-07-06T01:17:12-0400",
11+
"EventType": "Alert",
12+
"MemberId": "79694",
13+
"Message": "The system inlet temperature is greater than the upper warning threshold.",
14+
"MessageId": "TMP0120",
15+
"OriginOfCondition": {"@odata.id":"/redfish/v1/Systems/System.Embedded.1"},
16+
"Severity": "Warning"
17+
},
18+
{
19+
"Context": "any string is valid",
20+
"EventId": "2163",
21+
"EventTimestamp": "2021-07-06T01:17:12-0400",
22+
"EventType": "Alert",
23+
"MemberId": "79695",
24+
"Message": "The system inlet temperature is greater than the upper warning threshold.",
25+
"MessageId": "TMP0120",
26+
"OriginOfCondition": {"@odata.id":"/redfish/v1/Systems/System.Embedded.1"},
27+
"Severity": "Warning"
28+
}
29+
],
30+
"Id": "c8a5433e-de17-11eb-8d4b-f40270e4f7f4",
31+
"Name": "Event Array"
32+
}

e2e-tests/data/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ The events to be tested are defined in the e2e-tests/data folder with one JSON f
1919

2020
## Power
2121
- PWR1004.json
22+
- iLOEvents.0.9.PowerSupplyRemoved.json (HPE iLO 5)
2223

2324
## Memory
2425
- MEM0004.json
2526

2627
## Misc
2728
- RAC1195.json
2829
- A lifecycle log used to test multiple MessageArgs
29-
30+
- Multiple-EventRecords.json
31+
- A fake event to test multiple EventRecords included in one event
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"@odata.context": "/redfish/v1/$metadata#Event.Event",
3+
"@odata.type": "#Event.v1_0_0.Event",
4+
"Events": [
5+
{
6+
"EventId": "TestEventId",
7+
"EventTimestamp": "2022-01-24T16:00:00Z",
8+
"EventType": "Alert",
9+
"Message": "Test Event",
10+
"MessageArgs": [
11+
"NoAMS",
12+
"Busy",
13+
"Cached"
14+
],
15+
"MessageId": "iLOEvents.0.9.PowerSupplyRemoved",
16+
"OriginOfCondition": "/redfish/v1/Systems/1/",
17+
"Severity": "OK"
18+
}
19+
],
20+
"Name": "Events"
21+
}

hw-event-proxy/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.17
44

55
require (
66
github.com/json-iterator/go v1.1.12
7-
github.com/redhat-cne/sdk-go v0.1.1-0.20220105170230-b17827c91503
7+
github.com/redhat-cne/sdk-go v0.1.1-0.20220127152823-2487c3dd9ce7
88
github.com/sirupsen/logrus v1.8.1
99
github.com/valyala/fasthttp v1.31.0
1010
golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f

hw-event-proxy/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
139139
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
140140
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
141141
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
142-
github.com/redhat-cne/sdk-go v0.1.1-0.20220105170230-b17827c91503 h1:gfwZqJ0xiWF6eDrtQuYhzRblG7LBHYUbskUl0A+IANs=
143-
github.com/redhat-cne/sdk-go v0.1.1-0.20220105170230-b17827c91503/go.mod h1:1FXE/O2PhDnazeCidsAIJJ5lLaaWHBXNP5HxaJ1hf0U=
142+
github.com/redhat-cne/sdk-go v0.1.1-0.20220127152823-2487c3dd9ce7 h1:OQuYNMBxjkn4QdHCls01vQv7GAgJstOpaJMI/7ujxVE=
143+
github.com/redhat-cne/sdk-go v0.1.1-0.20220127152823-2487c3dd9ce7/go.mod h1:1FXE/O2PhDnazeCidsAIJJ5lLaaWHBXNP5HxaJ1hf0U=
144144
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
145145
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
146146
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=

hw-event-proxy/vendor/github.com/redhat-cne/sdk-go/pkg/event/redfish/event_marshal.go

Lines changed: 20 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hw-event-proxy/vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ github.com/modern-go/concurrent
4141
# github.com/modern-go/reflect2 v1.0.2
4242
## explicit; go 1.12
4343
github.com/modern-go/reflect2
44-
# github.com/redhat-cne/sdk-go v0.1.1-0.20220105170230-b17827c91503
44+
# github.com/redhat-cne/sdk-go v0.1.1-0.20220127152823-2487c3dd9ce7
4545
## explicit; go 1.17
4646
github.com/redhat-cne/sdk-go/pkg/channel
4747
github.com/redhat-cne/sdk-go/pkg/event

0 commit comments

Comments
 (0)