{
"Resources": [
{
"Uri": "/redfish/v1/EventService",
"Interfaces": [
{
"Type": "GET",
"RspBody": {
"@odata.context": "/redfish/v1/$metadata#EventService.EventService",
"@odata.id": "/redfish/v1/EventService",
"@odata.type": "#EventService.v1_0_2.EventService",
"Id": "EventService",
"Name": "Event Service",
"Status": {
"State": "Enabled",
"Oem": {
"{{OemIdentifier}}": {
"Severity": "Informational"
}
},
"Health": "OK"
},
"ServiceEnabled": "${ProcessingFlow[1]/Destination/ServiceEnabled}",
"DeliveryRetryAttempts": "${ProcessingFlow[1]/Destination/DeliveryRetryAttempts}",
"DeliveryRetryIntervalSeconds": "${ProcessingFlow[1]/Destination/DeliveryRetryIntervalSeconds}",
"EventTypesForSubscription": [
"StatusChange",
"ResourceUpdated",
"ResourceAdded",
"ResourceRemoved",
"Alert",
"MetricReport"
],
"Subscriptions": {
"@odata.id": "/redfish/v1/EventService/Subscriptions"
},
"Actions": {
"#EventService.SubmitTestEvent": {
"target": "/redfish/v1/EventService/Actions/EventService.SubmitTestEvent",
"@Redfish.ActionInfo": "/redfish/v1/EventService/SubmitTestEventActionInfo"
},
"Oem": {
"{{OemIdentifier}}": {
"#EventService.Rearm": {
"target": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.Rearm",
"@Redfish.ActionInfo": "/redfish/v1/EventService/RearmActionInfo"
},
"#EventService.MockPreciseAlarm": {
"target": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.MockPreciseAlarm",
"@Redfish.ActionInfo": "/redfish/v1/EventService/MockPreciseAlarmActionInfo"
},
"#EventService.ShieldSystemAlert": {
"target": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.ShieldSystemAlert",
"@Redfish.ActionInfo": "/redfish/v1/EventService/ShieldSystemAlertActionInfo"
},
"#EventService.SetEventSeverityLevel": {
"target": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.SetEventSeverityLevel",
"@Redfish.ActionInfo": "/redfish/v1/EventService/SetEventSeverityLevelActionInfo"
}
}
}
},
"Oem": {
"{{OemIdentifier}}": {
"ServerIdentitySource": "${ProcessingFlow[1]/Destination/ServerIdentitySource}",
"ShieldResourcesForSubscriptions": "${Statements/GetShieldResources()}",
"ShieldSystemAlert": "${Statements/GetShieldSystemAlert()}",
"AlertLanguage": "${ProcessingFlow[3]/Destination/AlertLanguage}",
"ReportType": "${Statements/GetReportType()}",
"SnmpReportType": "${Statements/GetSnmpReportType()}",
"HeartbeatSupported": true
}
}
},
"Statements": {
"GetShieldResources": {
"Steps": [
{
"Type": "Script",
"Formula": "local res = ProcessingFlow[1].Destination.ShieldResources return res == '' and cjson.json_object_new_array() or cjson.json_object_ordered_decode(res)"
}
]
},
"GetShieldSystemAlert": {
"Steps": [
{
"Type": "Script",
"Formula": "local events = ProcessingFlow[2].Destination.MaskedEventList return events == '' and cjson.json_object_new_array() or cjson.json_object_from_table(events)"
}
]
},
"GetReportType": {
"Input": "${ProcessingFlow[3]/Destination/ReportType}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "Event",
"To": "OemEvent"
}
]
}
]
},
"GetSnmpReportType": {
"Input": "${ProcessingFlow[4]/Destination/ReportType}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "Event",
"To": "OemEvent"
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService",
"Interface": "bmc.kepler.EventService",
"Destination": {
"ServiceEnabled": "ServiceEnabled",
"DeliveryRetryAttempts": "DeliveryRetryAttempts",
"DeliveryRetryIntervalSeconds": "DeliveryRetryIntervalSeconds",
"ServerIdentitySource": "ServerIdentitySource",
"ShieldResources": "ShieldResources"
}
},
{
"Type": "Method",
"Path": "/bmc/kepler/Systems/1/Events",
"Interface": "bmc.kepler.Systems.Events",
"Name": "GetMaskedEventList",
"Destination": {
"MaskedEventList": "MaskedEventList"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Redfish",
"Interface": "bmc.kepler.EventService.Subscriptions.Redfish",
"Destination": {
"AlertLanguage": "AlertLanguage",
"EventType": "ReportType"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp",
"Destination": {
"EventType": "ReportType"
}
}
]
},
{
"Type": "PATCH",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"ServiceEnabled": {
"Type": "boolean"
},
"DeliveryRetryAttempts": {
"Type": "integer",
"Validator": [
{
"Type": "Range",
"Formula": [3, 10]
}
]
},
"DeliveryRetryIntervalSeconds": {
"Type": "integer",
"Validator": [
{
"Type": "Range",
"Formula": [60, 600]
}
]
},
"Oem": {
"Type": "object",
"Properties": {
"{{OemIdentifier}}": {
"Type": "object",
"Properties": {
"ServerIdentitySource": {
"Type": "string",
"Validator": [
{
"Type": "Enum",
"Formula": [
"BoardSN",
"ProductAssetTag",
"HostName",
"ChassisName",
"ChassisLocation",
"ChassisSerialNumber"
]
}
]
},
"ShieldResourcesForSubscriptions": {
"Type": "array",
"Items": {
"Type": "object",
"Properties": {
"Resource": {
"Type": "string",
"Required": true
},
"Attributes": {
"Type": "array",
"Items": {
"Type": "string"
}
}
}
}
},
"AlertLanguage": {
"Type": "string",
"Validator": [
{
"Type": "Enum",
"Formula": [
"en",
"zh"
]
}
]
},
"SnmpReportType": {
"Type": "string",
"Validator": [
{
"Type": "Enum",
"Formula": [
"OemEvent",
"SEL"
]
}
]
}
}
}
}
}
}
},
"Statements": {
"GetShieldResources": {
"Steps": [
{
"Type": "Script",
"Formula": "EventService/get_shield_resources.lua"
}
]
},
"GetSnmpReportType": {
"Input": "${ReqBody/Oem/{{OemIdentifier}}/SnmpReportType}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "OemEvent",
"To": "Event"
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService",
"Interface": "bmc.kepler.EventService",
"Source": {
"ServiceEnabled": "${ReqBody/ServiceEnabled}",
"ServerIdentitySource": "${ReqBody/Oem/{{OemIdentifier}}/ServerIdentitySource}",
"ShieldResources": "${Statements/GetShieldResources()}"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Redfish",
"Interface": "bmc.kepler.EventService.Subscriptions.Redfish",
"Source": {
"AlertLanguage": "${ReqBody/Oem/{{OemIdentifier}}/AlertLanguage}"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService",
"Interface": "bmc.kepler.EventService",
"Source": {
"DeliveryRetryAttempts": "${ReqBody/DeliveryRetryAttempts}"
},
"CallIf": {
"${ReqBody/DeliveryRetryAttempts}": "#WITH"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService",
"Interface": "bmc.kepler.EventService",
"Source": {
"DeliveryRetryIntervalSeconds": "${ReqBody/DeliveryRetryIntervalSeconds}"
},
"CallIf": {
"${ReqBody/DeliveryRetryIntervalSeconds}": "#WITH"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp",
"Source": {
"EventType": "${Statements/GetSnmpReportType()}"
},
"CallIf": {
"${ReqBody/Oem/{{OemIdentifier}}/SnmpReportType}": "#WITH"
}
}
]
}
]
},
{
"Uri": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.MockPreciseAlarm",
"Interfaces": [
{
"Type": "POST",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"Type": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Enum",
"Formula": [
"Assert",
"Deassert",
"StopAll"
]
},
{
"Type": "Script",
"Formula": "EventService/mock_precise_alarm_validator.lua"
}
]
},
"EventCode": {
"Type": "string"
},
"SubjectIndex": {
"Type": "integer",
"Validator": [
{
"Type": "Range",
"Formula": [
1,
65535
]
}
]
}
}
},
"Statements": {
"GetType": {
"Input": "${ReqBody/Type}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "Deassert",
"To": 0
},
{
"Case": "Assert",
"To": 1
},
{
"Case": "StopAll",
"To": 2
}
]
}
]
},
"GetTypeState": {
"Input": "${ReqBody/Type}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "StopAll",
"To": 0
},
{
"To": 1
}
]
}
]
},
"GetSubjectIndex": {
"Input": "${ReqBody/SubjectIndex}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": null,
"To": 0
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/Systems/1/Events",
"Interface": "bmc.kepler.Systems.Events",
"Name": "MockEvent",
"Params": [
"0xFFFFFFFF",
0,
0,
0
],
"CallIf": {
"${Statements/GetTypeState()}": 0
}
},
{
"Type": "Method",
"Path": "/bmc/kepler/Systems/1/Events",
"Interface": "bmc.kepler.Systems.Events",
"Name": "MockEvent",
"Params": [
"${ReqBody/EventCode}",
1,
"${Statements/GetSubjectIndex()}",
"${Statements/GetType()}"
],
"CallIf": {
"${Statements/GetTypeState()}": 1
}
}
]
}
]
},
{
"Uri": "/redfish/v1/EventService/MockPreciseAlarmActionInfo",
"Interfaces": [
{
"Type": "GET",
"RspBody": {
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/EventService/MockPreciseAlarmActionInfo",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Id": "MockPreciseAlarmActionInfo",
"Name": "Mock Precise Alarm Action Info",
"Parameters": [
{
"Name": "EventCode",
"Required": false,
"DataType": "String"
},
{
"Name": "SubjectIndex",
"Required": false,
"DataType": "number",
"Minimum": 1,
"Maximum": 65535
},
{
"Name": "Type",
"Required": true,
"DataType": "String",
"AllowableValues": [
"Assert",
"Deassert",
"StopAll"
]
}
],
"Oem": {}
}
}
]
},
{
"Uri": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.Rearm",
"Interfaces": [
{
"Type": "POST",
"LockdownAllow": true,
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/EventService",
"Interface": "bmc.kepler.EventService",
"Name": "Rearm"
}
]
}
]
},
{
"Uri": "/redfish/v1/EventService/RearmActionInfo",
"Interfaces": [
{
"Type": "GET",
"RspBody": {
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/EventService/RearmActionInfo",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Id": "RearmActionInfo",
"Name": "Rearm Action Info",
"Parameters": [],
"Oem": {}
}
}
]
},
{
"Uri": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.SetEventSeverityLevel",
"Interfaces": [
{
"Type": "POST",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"EventId": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^0x[0-9A-Fa-f]{8}$"
}
]
},
"Level": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Enum",
"Formula": [
"Normal",
"Minor",
"Major",
"Critical"
]
}
]
}
}
},
"Statements": {
"GetLevel": {
"Input": "${ReqBody/Level}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": "Normal",
"To": 0
},
{
"Case": "Minor",
"To": 1
},
{
"Case": "Major",
"To": 2
},
{
"Case": "Critical",
"To": 3
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/Systems/1/Events",
"Interface": "bmc.kepler.Systems.Events",
"Name": "SetEventSeverity",
"Params": [
"${ReqBody/EventId}",
"${Statements/GetLevel()}"
]
}
]
}
]
},
{
"Uri": "/redfish/v1/EventService/SetEventSeverityLevelActionInfo",
"Interfaces": [
{
"Type": "GET",
"RspBody": {
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/EventService/SetEventSeverityLevelActionInfo",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Id": "SetEventSeverityLevelActionInfo",
"Name": "Set Event Severity Level Action Info",
"Parameters": [
{
"Name": "EventId",
"Required": true,
"DataType": "String"
},
{
"Name": "Level",
"Required": true,
"DataType": "String"
}
],
"Oem": {}
}
}
]
},
{
"Uri": "/redfish/v1/EventService/Actions/Oem/{{OemIdentifier}}/EventService.ShieldSystemAlert",
"Interfaces": [
{
"Type": "POST",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"EventCode": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^0x[0-9A-Fa-f]{8}$"
}
]
},
"Enabled": {
"Type": "boolean",
"Required": true
}
}
},
"Statements": {
"MaskState": {
"Input": "${ReqBody/Enabled}",
"Steps": [
{
"Type": "Switch",
"Formula": [
{
"Case": true,
"To": 0
},
{
"Case": false,
"To": 1
}
]
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/Systems/1/Events",
"Interface": "bmc.kepler.Systems.Events",
"Name": "MaskEvent",
"Params": [
"${ReqBody/EventCode}",
"${Statements/MaskState()}",
3
]
}
]
}
]
},
{
"Uri": "/redfish/v1/EventService/ShieldSystemAlertActionInfo",
"Interfaces": [
{
"Type": "GET",
"RspBody": {
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/EventService/ShieldSystemAlertActionInfo",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Id": "ShieldSystemAlertActionInfo",
"Name": "Shield System Alert Action Info",
"Parameters": [
{
"Name": "EventCode",
"Required": true,
"DataType": "String"
},
{
"Name": "Enabled",
"Required": true,
"DataType": "Boolean"
}
],
"Oem": {}
}
}
]
},
{
"Uri": "/redfish/v1/EventService/Actions/EventService.SubmitTestEvent",
"Interfaces": [
{
"Type": "POST",
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"EventType": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Enum",
"Formula": [
"StatusChange",
"ResourceUpdated",
"ResourceAdded",
"ResourceRemoved",
"Alert"
]
}
]
},
"EventId": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^[0-9a-zA-Z_ \\-\\.]{1,255}$"
}
]
},
"EventTimestamp": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "(\\d{4})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-9])))T(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z|(([-+])([0][0-9]|[1][0-2]):([0-5][0-9])))?"
}
]
},
"Severity": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Enum",
"Formula": [
"OK",
"Warning",
"Critical"
]
}
]
},
"Message": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^[0-9a-zA-Z_ \\-\\.]{1,255}$"
}
]
},
"MessageId": {
"Type": "string",
"Required": true,
"Validator": [
{
"Type": "Regex",
"Formula": "^[A-Za-z0-9]{1,40}\\.\\d{1,4}\\.\\d{1,4}\\.[A-Za-z0-9.]{1,205}$"
}
]
},
"MessageArgs": {
"Type": "array",
"Required": true,
"Items": {
"Type": "string"
}
},
"OriginOfCondition": {
"Type": "object",
"Required": true,
"Properties": {
"@odata.id": {
"Type": "string",
"Required": true
}
}
}
}
},
"Statements": {
"GetOriginOfCondition": {
"Steps": [
{
"Type": "Script",
"Formula": "return ReqBody['OriginOfCondition']['@odata.id']"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Method",
"Path": "/bmc/kepler/EventService",
"Interface": "bmc.kepler.EventService",
"Name": "SubmitTestEvent",
"Params": [
"${ReqBody/EventType}",
"${ReqBody/EventId}",
"${ReqBody/EventTimestamp}",
"${ReqBody/Severity}",
"${ReqBody/Message}",
"${ReqBody/MessageId}",
"${ReqBody/MessageArgs}",
"${Statements/GetOriginOfCondition()}"
]
}
]
}
]
},
{
"Uri": "/redfish/v1/EventService/SubmitTestEventActionInfo",
"Interfaces": [
{
"Type": "GET",
"RspBody": {
"@odata.context": "/redfish/v1/$metadata#ActionInfo.ActionInfo",
"@odata.id": "/redfish/v1/EventService/SubmitTestEventActionInfo",
"@odata.type": "#ActionInfo.v1_0_1.ActionInfo",
"Id": "SubmitTestEventActionInfo",
"Name": "Submit Test Event Action Info",
"Parameters": [
{
"Name": "EventType",
"Required": true,
"DataType": "String",
"AllowableValues": [
"StatusChange",
"ResourceUpdated",
"ResourceAdded",
"ResourceRemoved",
"Alert"
]
},
{
"Name": "EventId",
"Required": true,
"DataType": "String"
},
{
"Name": "EventTimestamp",
"Required": true,
"DataType": "String"
},
{
"Name": "Severity",
"Required": true,
"DataType": "String",
"AllowableValues": [
"OK",
"Warning",
"Critical"
]
},
{
"Name": "Message",
"Required": true,
"DataType": "String"
},
{
"Name": "MessageId",
"Required": true,
"DataType": "String"
},
{
"Name": "MessageArgs",
"Required": true,
"DataType": "StringArray"
},
{
"Name": "OriginOfCondition",
"Required": true,
"DataType": "Object"
}
],
"Oem": {}
}
}
]
}
]
}