{
"Resources": [
{
"Uri": "/cli/v1/trap",
"Interfaces": [
{
"Type": "Get",
"Description": "Get SNMP trap status"
}
]
},
{
"Uri": "/cli/v1/trap/severity",
"Interfaces": [
{
"Type": "Get",
"Description": "Get trap send severity",
"Usage": "ipmcget -t trap -d severity",
"RspBody": {
"Severity": "${Statements/Severity()}"
},
"Statements": {
"Severity": {
"Steps": [
{
"Type": "Plugin",
"Formula": "orchestrator.trap.get_severity(ProcessingFlow[1].Destination.SeverityFilter)"
}
]
}
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp",
"Destination": {
"SeverityFilter": "SeverityFilter"
}
}
],
"Echoes": [
"ipmcget/trap_severity",
""
]
}
]
},
{
"Uri": "/cli/v1/trap/state",
"Interfaces": [
{
"Type": "Get",
"Description": "Get trap enable status",
"Usage": "ipmcget -t trap -d state [-v destination]",
"Brief": "To obtain the trap settings of a trap server, you must specify the destination parameter. The value range of destination is 1 to 4.\nTo obtain the status of trap function, leave destination unspecified.",
"Example": [
"ipmcget -t trap -d state",
"ipmcget -t trap -d state -v 4"
],
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"destination": {
"Required": false,
"Validator": [
{
"Type": "Enum",
"Formula": [
"1",
"2",
"3",
"4"
]
}
]
}
}
},
"RspBody": {
"destination": "${ReqBody/destination}",
"Enabled_trap": "${ProcessingFlow[1]/Destination/Enabled}",
"Enabled_dest": "${ProcessingFlow[2]/Destination/Enabled}"
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp",
"Destination": {
"Enabled": "Enabled"
},
"CallIf": {
"${ReqBody/destination}": "#WITHOUT"
}
},
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp/Nmses/${ReqBody/destination}",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp.Nms",
"Destination": {
"Enabled": "Enabled"
},
"CallIf": {
"${ReqBody/destination}": "#WITH"
}
}
],
"Echoes": [
"ipmcget/trap_state",
""
]
}
]
},
{
"Uri": "/cli/v1/trap/trapiteminfo",
"Interfaces": [
{
"Type": "Get",
"Description": "Get trapitem information",
"Usage": "ipmcget -t trap -d trapiteminfo",
"Example": [
"ipmcget -t trap -d trapiteminfo"
],
"RspBody": {
"ResData": "${Statements/path_list()}"
},
"Statements": {
"path_list": {
"Input": "${ProcessingFlow[1]/Destination/path_list}",
"Steps": [
{
"Type": "Expand"
}
]
}
},
"ProcessingFlow": [
{
"Type": "List",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp/Nmses",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp.Nms",
"Destination": {
"Members": "path_list"
}
}
],
"Echoes": [
"ipmcget/trap_trapiteminfo",
""
]
}
]
},
{
"Uri": "/bmc/kepler/EventService/Subscriptions/Snmp/Nmses/:id",
"Interfaces": [
{
"Type": "Get",
"RspBody": {
"Id": "${Uri/id}",
"Enabled": "${ProcessingFlow[1]/Destination/Enabled}",
"Address": "${ProcessingFlow[1]/Destination/Address}",
"Port": "${ProcessingFlow[1]/Destination/Port}"
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp/Nmses/${Uri/id}",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp.Nms",
"Destination": {
"Enabled": "Enabled",
"Address": "Address",
"Port": "Port"
}
}
]
}
]
},
{
"Uri": "/cli/v1/trap/user",
"Interfaces": [
{
"Type": "Get",
"Description": "Get SNMP trap user",
"Usage": "ipmcget -t trap -d user",
"Example": [
"ipmcget -t trap -d user"
],
"RspBody": {
"SNMPv3User": "${ProcessingFlow[3]/Destination/UserName}"
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/AccountService",
"Interface": "bmc.kepler.AccountService",
"Destination": {
"SNMPv3TrapAccountId": "SNMPv3TrapAccountId"
}
},
{
"Type": "Method",
"Path": "/bmc/kepler/MdbService",
"Interface": "bmc.kepler.Mdb",
"Name": "GetPath",
"Params": [
"bmc.kepler.AccountService.ManagerAccount",
{
"Id": "${ProcessingFlow[1]/Destination/SNMPv3TrapAccountId}"
},
false
],
"Destination": {
"Path": "Path"
}
},
{
"Type": "Property",
"Path": "${ProcessingFlow[2]/Destination/Path}",
"Interface": "bmc.kepler.AccountService.ManagerAccount",
"Destination": {
"UserName": "UserName"
}
}
],
"Echoes": [
"ipmcget/trap_user",
""
]
}
]
},
{
"Uri": "/cli/v1/trap/version",
"Interfaces": [
{
"Type": "Get",
"Description": "Get SNMP trap version",
"Usage": "ipmcget -t trap -d version",
"Example": [
"ipmcget -t trap -d version"
],
"RspBody": {
"Version": "${ProcessingFlow[1]/Destination/Version}"
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp",
"Destination": {
"Version": "Version"
}
}
],
"Echoes": [
"ipmcget/trap_version",
""
]
}
]
},
{
"Uri": "/cli/v1/trap/mode",
"Interfaces": [
{
"Type": "Get",
"Description": "Get SNMP trap mode",
"Usage": "ipmcget -t trap -d mode",
"Example": [
"ipmcget -t trap -d mode"
],
"RspBody": {
"Mode": "${ProcessingFlow[1]/Destination/TrapMode}"
},
"ProcessingFlow": [
{
"Type": "Property",
"Path": "/bmc/kepler/EventService/Subscriptions/Snmp",
"Interface": "bmc.kepler.EventService.Subscriptions.Snmp",
"Destination": {
"TrapMode": "TrapMode"
}
}
],
"Echoes": [
"ipmcget/trap_mode",
""
]
}
]
}
]
}