Skip to content

Instantly share code, notes, and snippets.

@trajeswaran
Created May 5, 2020 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trajeswaran/fec230abd36181f85d2f20d09164ec05 to your computer and use it in GitHub Desktop.
Save trajeswaran/fec230abd36181f85d2f20d09164ec05 to your computer and use it in GitHub Desktop.
D-Bus to Redfish resource mapping using a json file
{
"resources": {
"LogEntry": [{
"path": "/xyz/openbmc_project/logging",
"interface": "xyz.openbmc_project.Logging.Entry",
"signals": ["interfacesAdded", "interfacesRemoved", "PropertiesChanged"]
}],
"ComputerSystem": [{
"path": "/xyz/openbmc_project/led/groups/enclosure_identifydblink",
"interface": "xyz.openbmc_project.Led.Group",
"signals": ["PropertiesChanged"]
},
{
"path": "/xyz/openbmc_project/led/groups/enclosure_identify",
"interface": "xyz.openbmc_project.Led.Group",
"signals": ["PropertiesChanged"]
},
{
"path": "/xyz/openbmc_project/state/host0",
"interface": "xyz.openbmc_project.State.Host",
"signals": ["PropertiesChanged"]
},
{
"path": "/xyz/openbmc_project/control/host0/boot/one_time",
"interface": "xyz.openbmc_project.Object.Enable",
"signals": ["PropertiesChanged"]
},
{
"path": "/xyz/openbmc_project/control/host0/boot",
"interface": "xyz.openbmc_project.Control.Boot.Source",
"signals": ["PropertiesChanged"]
},
{
"path": "/xyz/openbmc_project/watchdog/host0",
"interface": "xyz.openbmc_project.State.Watchdog",
"signals": ["PropertiesChanged"]
}
]
},
"paths": {
"/xyz/openbmc_project/logging/entry": {
"interface": "xyz.openbmc_project.Logging.Entry",
"resource": "LogEntry",
"origin": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/"
},
"/xyz/openbmc_project/led/groups/enclosure_identify_blink": {
"interface": "xyz.openbmc_project.Led.Group",
"redfish-resource": "ComputerSystem",
"redfish-property": "IndicatorLED",
"redfish-uri": "/redfish/v1/Systems/system/"
},
"/xyz/openbmc_project/led/groups/enclosure_identify": {
"interface": "xyz.openbmc_project.Led.Group",
"redfish-resource": "ComputerSystem",
"redfish-property": "IndicatorLED",
"redfish-uri": "/redfish/v1/Systems/system/"
},
"/xyz/openbmc_project/state/host0": {
"interface": "xyz.openbmc_project.State.Host",
"redfish-resource": "ComputerSystem",
"redfish-property": "PowerState",
"redfish-uri": "/redfish/v1/Systems/system/"
},
"/xyz/openbmc_project/control/host0/boot/one_time": {
"interface": "xyz.openbmc_project.Object.Enable",
"redfish-resource": "ComputerSystem",
"redfish-property": "BootSourceOverrideEnabled",
"redfish-uri": "/redfish/v1/Systems/system/"
},
"/xyz/openbmc_project/control/host0/boot": {
"interface": "xyz.openbmc_project.Control.Boot.Source",
"redfish-resource": "ComputerSystem",
"redfish-property": "BootSourceOverrideTarget",
"redfish-uri": "/redfish/v1/Systems/system/"
},
"/xyz/openbmc_project/watchdog/host0": {
"interface": "xyz.openbmc_project.State.Watchdog",
"redfish-resource": "ComputerSystem",
"redfish-property": "HostWatchdogTimer",
"redfish-uri": "/redfish/v1/Systems/system/"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment