1b1b4d261SWilliam A. Kennington IIIdescription: > 2b1b4d261SWilliam A. Kennington III Implement to provide DBus service lookup features. 3b1b4d261SWilliam A. Kennington III 4b1b4d261SWilliam A. Kennington III Any OpenBMC implementation must provide exactly one implementation of 5b1b4d261SWilliam A. Kennington III xyz.openbmc_project.ObjectMapper on /xyz/openbmc_project/ObjectMapper. 6037a43e5SPatrick Williams 7b1b4d261SWilliam A. Kennington IIImethods: 8b1b4d261SWilliam A. Kennington III - name: GetObject 9b1b4d261SWilliam A. Kennington III description: > 10a1347418SPatrick Williams Obtain a dictionary of service -> implemented interface(s) for the 11a1347418SPatrick Williams given path. 12b1b4d261SWilliam A. Kennington III parameters: 13b1b4d261SWilliam A. Kennington III - name: path 146f96e056SPatrick Williams type: string 15b1b4d261SWilliam A. Kennington III description: > 16b1b4d261SWilliam A. Kennington III The object path for which the result should be fetched. 17b1b4d261SWilliam A. Kennington III - name: interfaces 18b1b4d261SWilliam A. Kennington III type: array[string] 19b1b4d261SWilliam A. Kennington III description: > 20b1b4d261SWilliam A. Kennington III An array of result set constraining interfaces. 21b1b4d261SWilliam A. Kennington III returns: 22b1b4d261SWilliam A. Kennington III - name: services 23b1b4d261SWilliam A. Kennington III type: dict[string,array[string]] 24b1b4d261SWilliam A. Kennington III description: > 25b1b4d261SWilliam A. Kennington III A dictionary of service -> implemented interface(s). 26b1b4d261SWilliam A. Kennington III errors: 27b1b4d261SWilliam A. Kennington III - xyz.openbmc_project.Common.Error.ResourceNotFound 28b1b4d261SWilliam A. Kennington III - name: GetAncestors 29b1b4d261SWilliam A. Kennington III description: > 30b1b4d261SWilliam A. Kennington III Obtain a dictionary of ancestor -> services where ancestor is an 31a1347418SPatrick Williams ancestor of path and services is of the type returned by the GetObject 32a1347418SPatrick Williams method. 33b1b4d261SWilliam A. Kennington III parameters: 34b1b4d261SWilliam A. Kennington III - name: path 356f96e056SPatrick Williams type: string 36b1b4d261SWilliam A. Kennington III description: > 37b1b4d261SWilliam A. Kennington III The path for which the result should be fetched. 38b1b4d261SWilliam A. Kennington III - name: interfaces 39b1b4d261SWilliam A. Kennington III type: array[string] 40b1b4d261SWilliam A. Kennington III description: > 41b1b4d261SWilliam A. Kennington III An array of result set constraining interfaces. 42b1b4d261SWilliam A. Kennington III returns: 43b1b4d261SWilliam A. Kennington III - name: ancestors 446f96e056SPatrick Williams type: dict[string,dict[string,array[string]]] 45b1b4d261SWilliam A. Kennington III description: > 46b1b4d261SWilliam A. Kennington III A dictionary of ancestor -> services. 47b1b4d261SWilliam A. Kennington III errors: 48b1b4d261SWilliam A. Kennington III - xyz.openbmc_project.Common.Error.ResourceNotFound 49b1b4d261SWilliam A. Kennington III - name: GetSubTree 50b1b4d261SWilliam A. Kennington III description: > 51a1347418SPatrick Williams Obtain a dictionary of path -> services where path is in sutbtree and 52a1347418SPatrick Williams services is of the type returned by the GetObject method. 53b1b4d261SWilliam A. Kennington III parameters: 54b1b4d261SWilliam A. Kennington III - name: subtree 556f96e056SPatrick Williams type: string 56b1b4d261SWilliam A. Kennington III description: > 57b1b4d261SWilliam A. Kennington III The subtree path for which the result should be fetched. 58b1b4d261SWilliam A. Kennington III - name: depth 59b1b4d261SWilliam A. Kennington III type: int32 60b1b4d261SWilliam A. Kennington III description: > 61b1b4d261SWilliam A. Kennington III The maximum subtree depth for which results should be fetched. 62b1b4d261SWilliam A. Kennington III For unconstrained fetches use a depth of zero. 63b1b4d261SWilliam A. Kennington III - name: interfaces 64b1b4d261SWilliam A. Kennington III type: array[string] 65b1b4d261SWilliam A. Kennington III description: > 66b1b4d261SWilliam A. Kennington III An array of result set constraining interfaces. 67b1b4d261SWilliam A. Kennington III returns: 68b1b4d261SWilliam A. Kennington III - name: objects 696f96e056SPatrick Williams type: dict[string,dict[string,array[string]]] 70b1b4d261SWilliam A. Kennington III description: > 71b1b4d261SWilliam A. Kennington III A dictionary of path -> services. 72b1b4d261SWilliam A. Kennington III errors: 73b1b4d261SWilliam A. Kennington III - xyz.openbmc_project.Common.Error.ResourceNotFound 74b1b4d261SWilliam A. Kennington III - name: GetSubTreePaths 75b1b4d261SWilliam A. Kennington III description: > 76b1b4d261SWilliam A. Kennington III Obtain an array of paths where array elements are in subtree. 77b1b4d261SWilliam A. Kennington III parameters: 78b1b4d261SWilliam A. Kennington III - name: subtree 796f96e056SPatrick Williams type: string 80b1b4d261SWilliam A. Kennington III description: > 81b1b4d261SWilliam A. Kennington III The subtree path for which the result should be fetched. 82b1b4d261SWilliam A. Kennington III - name: depth 83b1b4d261SWilliam A. Kennington III type: int32 84b1b4d261SWilliam A. Kennington III description: > 85b1b4d261SWilliam A. Kennington III The maximum subtree depth for which results should be fetched. 86b1b4d261SWilliam A. Kennington III For unconstrained fetches use a depth of zero. 87b1b4d261SWilliam A. Kennington III - name: interfaces 88b1b4d261SWilliam A. Kennington III type: array[string] 89b1b4d261SWilliam A. Kennington III description: > 90b1b4d261SWilliam A. Kennington III An array of result set constraining interfaces. 91b1b4d261SWilliam A. Kennington III returns: 92b1b4d261SWilliam A. Kennington III - name: paths 936f96e056SPatrick Williams type: array[string] 94b1b4d261SWilliam A. Kennington III description: > 95b1b4d261SWilliam A. Kennington III An array of paths. 96b1b4d261SWilliam A. Kennington III errors: 97b1b4d261SWilliam A. Kennington III - xyz.openbmc_project.Common.Error.ResourceNotFound 988e56f4cdSWilly Tu - name: GetAssociatedSubTree 998e56f4cdSWilly Tu description: > 100a1347418SPatrick Williams Same as GetSubTree, but only return the dbus paths that are an 101a1347418SPatrick Williams association endpoint on associatedPath 1028e56f4cdSWilly Tu parameters: 1038e56f4cdSWilly Tu - name: associatedPath 104b78a0704SPatrick Williams type: object_path 1058e56f4cdSWilly Tu description: > 1068e56f4cdSWilly Tu The path where the associated endpoint is fetched from. 1078e56f4cdSWilly Tu - name: subtree 108b78a0704SPatrick Williams type: object_path 1098e56f4cdSWilly Tu description: > 1108e56f4cdSWilly Tu The subtree path for which the result should be fetched. 1118e56f4cdSWilly Tu - name: depth 1128e56f4cdSWilly Tu type: int32 1138e56f4cdSWilly Tu description: > 1148e56f4cdSWilly Tu The maximum subtree depth for which results should be fetched. 1158e56f4cdSWilly Tu For unconstrained fetches use a depth of zero. 1168e56f4cdSWilly Tu - name: interfaces 1178e56f4cdSWilly Tu type: array[string] 1188e56f4cdSWilly Tu description: > 1198e56f4cdSWilly Tu An array of result set constraining interfaces. 1208e56f4cdSWilly Tu returns: 1218e56f4cdSWilly Tu - name: objects 1226f96e056SPatrick Williams type: dict[string,dict[string,array[string]]] 1238e56f4cdSWilly Tu description: > 1248e56f4cdSWilly Tu A dictionary of path -> services. 1258e56f4cdSWilly Tu errors: 1268e56f4cdSWilly Tu - xyz.openbmc_project.Common.Error.ResourceNotFound 1278e56f4cdSWilly Tu - name: GetAssociatedSubTreePaths 1288e56f4cdSWilly Tu description: > 129a1347418SPatrick Williams Same as GetSubTreePaths, but only return the dbus paths that are an 130a1347418SPatrick Williams association endpoint on associatedPath 1318e56f4cdSWilly Tu parameters: 1328e56f4cdSWilly Tu - name: associatedPath 1336f96e056SPatrick Williams type: string 1348e56f4cdSWilly Tu description: > 1358e56f4cdSWilly Tu The path where the associated endpoint is fetched from. 1368e56f4cdSWilly Tu - name: subtree 1376f96e056SPatrick Williams type: string 1388e56f4cdSWilly Tu description: > 1398e56f4cdSWilly Tu The subtree path for which the result should be fetched. 1408e56f4cdSWilly Tu - name: depth 1418e56f4cdSWilly Tu type: int32 1428e56f4cdSWilly Tu description: > 1438e56f4cdSWilly Tu The maximum subtree depth for which results should be fetched. 1448e56f4cdSWilly Tu For unconstrained fetches use a depth of zero. 1458e56f4cdSWilly Tu - name: interfaces 1468e56f4cdSWilly Tu type: array[string] 1478e56f4cdSWilly Tu description: > 1488e56f4cdSWilly Tu An array of result set constraining interfaces. 1498e56f4cdSWilly Tu returns: 1508e56f4cdSWilly Tu - name: paths 1516f96e056SPatrick Williams type: array[string] 1528e56f4cdSWilly Tu description: > 1538e56f4cdSWilly Tu An array of paths. 1548e56f4cdSWilly Tu errors: 1558e56f4cdSWilly Tu - xyz.openbmc_project.Common.Error.ResourceNotFound 156*2fa32228SLakshmi Yadlapati - name: GetAssociatedSubTreeById 157*2fa32228SLakshmi Yadlapati description: > 158*2fa32228SLakshmi Yadlapati Retrieves a dictionary of D-Bus paths -> services of associated 159*2fa32228SLakshmi Yadlapati endpoints with the provided identifier, filtering based on their 160*2fa32228SLakshmi Yadlapati association with specified endpoint interfaces. 161*2fa32228SLakshmi Yadlapati 162*2fa32228SLakshmi Yadlapati Implementation steps: 163*2fa32228SLakshmi Yadlapati 164*2fa32228SLakshmi Yadlapati 1. Retrieve the subtree D-Bus paths that implement the 165*2fa32228SLakshmi Yadlapati "subtreeInterfaces" and have the path endpoint "id". 166*2fa32228SLakshmi Yadlapati 2. Create an association path by concatenating the subtree path with 167*2fa32228SLakshmi Yadlapati "/" and "association" 168*2fa32228SLakshmi Yadlapati associationPath = subtreePath + "/" + "association" 169*2fa32228SLakshmi Yadlapati 3. Call getAssociatedSubTree to get the endpoint path -> services of 170*2fa32228SLakshmi Yadlapati the associationPath that implements the "endpointInterfaces". 171*2fa32228SLakshmi Yadlapati parameters: 172*2fa32228SLakshmi Yadlapati - name: id 173*2fa32228SLakshmi Yadlapati type: string 174*2fa32228SLakshmi Yadlapati description: > 175*2fa32228SLakshmi Yadlapati The leaf name of the dbus path, uniquely identifying a specific 176*2fa32228SLakshmi Yadlapati component or entity within the system. For example, in the path 177*2fa32228SLakshmi Yadlapati `/xyz/openbmc_project/inventory/system/{ChassisId}/motherboard/{FanId}`, 178*2fa32228SLakshmi Yadlapati the identifiers would be {FanId}. 179*2fa32228SLakshmi Yadlapati - name: objectPath 180*2fa32228SLakshmi Yadlapati type: string 181*2fa32228SLakshmi Yadlapati description: > 182*2fa32228SLakshmi Yadlapati The object path for which the result should be fetched. 183*2fa32228SLakshmi Yadlapati - name: subtreeInterfaces 184*2fa32228SLakshmi Yadlapati type: array[string] 185*2fa32228SLakshmi Yadlapati description: > 186*2fa32228SLakshmi Yadlapati An array of interfaces used to retrieve dbus paths with the 187*2fa32228SLakshmi Yadlapati specified identifier. 188*2fa32228SLakshmi Yadlapati - name: association 189*2fa32228SLakshmi Yadlapati type: string 190*2fa32228SLakshmi Yadlapati description: > 191*2fa32228SLakshmi Yadlapati The endpoint association. 192*2fa32228SLakshmi Yadlapati - name: endpointInterfaces 193*2fa32228SLakshmi Yadlapati type: array[string] 194*2fa32228SLakshmi Yadlapati description: > 195*2fa32228SLakshmi Yadlapati An array of interfaces used to filter associated endpoint paths. 196*2fa32228SLakshmi Yadlapati returns: 197*2fa32228SLakshmi Yadlapati - name: objects 198*2fa32228SLakshmi Yadlapati type: dict[string,dict[string,array[string]]] 199*2fa32228SLakshmi Yadlapati description: > 200*2fa32228SLakshmi Yadlapati A dictionary of path -> services. 201*2fa32228SLakshmi Yadlapati errors: 202*2fa32228SLakshmi Yadlapati - xyz.openbmc_project.Common.Error.ResourceNotFound 203*2fa32228SLakshmi Yadlapati - name: GetAssociatedSubTreePathsById 204*2fa32228SLakshmi Yadlapati description: > 205*2fa32228SLakshmi Yadlapati Retrieves the D-Bus paths of associated endpoints with the provided 206*2fa32228SLakshmi Yadlapati identifier, filtering based on their association with specified 207*2fa32228SLakshmi Yadlapati endpoint interfaces. 208*2fa32228SLakshmi Yadlapati 209*2fa32228SLakshmi Yadlapati Implementation steps: 210*2fa32228SLakshmi Yadlapati 211*2fa32228SLakshmi Yadlapati 1. Retrieve the subtree D-Bus paths that implement the 212*2fa32228SLakshmi Yadlapati "subtreeInterfaces" and have the path endpoint "id". 213*2fa32228SLakshmi Yadlapati 2. Create an association path by concatenating the subtree path with 214*2fa32228SLakshmi Yadlapati "/" and "association" 215*2fa32228SLakshmi Yadlapati associationPath = subtreePath + "/" + "association" 216*2fa32228SLakshmi Yadlapati 3. Call getAssociatedSubTreePaths to get the endpoint paths of the 217*2fa32228SLakshmi Yadlapati associationPath that implements the "endpointInterfaces". 218*2fa32228SLakshmi Yadlapati parameters: 219*2fa32228SLakshmi Yadlapati - name: id 220*2fa32228SLakshmi Yadlapati type: string 221*2fa32228SLakshmi Yadlapati description: > 222*2fa32228SLakshmi Yadlapati The leaf name of the dbus path, uniquely identifying a specific 223*2fa32228SLakshmi Yadlapati component or entity within the system. For example, in the path 224*2fa32228SLakshmi Yadlapati `/xyz/openbmc_project/inventory/system/{ChassisId}/motherboard/{FanId}`, 225*2fa32228SLakshmi Yadlapati the identifiers would be {FanId}. 226*2fa32228SLakshmi Yadlapati - name: objectPath 227*2fa32228SLakshmi Yadlapati type: string 228*2fa32228SLakshmi Yadlapati description: > 229*2fa32228SLakshmi Yadlapati The object path for which the result should be fetched. 230*2fa32228SLakshmi Yadlapati - name: subtreeInterfaces 231*2fa32228SLakshmi Yadlapati type: array[string] 232*2fa32228SLakshmi Yadlapati description: > 233*2fa32228SLakshmi Yadlapati An array of interfaces used to retrieve dbus paths with the 234*2fa32228SLakshmi Yadlapati specified identifier. 235*2fa32228SLakshmi Yadlapati - name: association 236*2fa32228SLakshmi Yadlapati type: string 237*2fa32228SLakshmi Yadlapati description: > 238*2fa32228SLakshmi Yadlapati The endpoint association. 239*2fa32228SLakshmi Yadlapati - name: endpointInterfaces 240*2fa32228SLakshmi Yadlapati type: array[string] 241*2fa32228SLakshmi Yadlapati description: > 242*2fa32228SLakshmi Yadlapati An array of interfaces used to filter associated endpoint paths. 243*2fa32228SLakshmi Yadlapati returns: 244*2fa32228SLakshmi Yadlapati - name: paths 245*2fa32228SLakshmi Yadlapati type: array[string] 246*2fa32228SLakshmi Yadlapati description: > 247*2fa32228SLakshmi Yadlapati An array of paths. 248*2fa32228SLakshmi Yadlapati errors: 249*2fa32228SLakshmi Yadlapati - xyz.openbmc_project.Common.Error.ResourceNotFound 250037a43e5SPatrick Williams 251037a43e5SPatrick Williamsservice_names: 252037a43e5SPatrick Williams - default: xyz.openbmc_project.ObjectMapper 253037a43e5SPatrick Williams 254037a43e5SPatrick Williamspaths: 255037a43e5SPatrick Williams - instance: /xyz/openbmc_project/object_mapper 256