ObjectMapper: match interfaces with reality
The documented ObjectMapper interfaces do not match the reference
implementation in phosphor-objmgr. Lots of code currently uses
hand-written dbus calls to the ObjectMapper, using the real interfaces
and not the documented ones. Refactoring all of these implementations
is quite a bit of effort, which could be staged at a later time (or
leverage a versioned interface). Update the interface to match reality
so that generated bindings could be leveraged.
Tested:
Ran the reference implementation and compared the signatures with the
YAML and updated as necessary.
```
$ busctl --user introspect xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.GetAncestors method sas a{sa{sas}} -
.GetAssociatedSubTree method ooias a{sa{sas}} -
.GetAssociatedSubTreePaths method ooias as -
.GetObject method sas a{sas} -
.GetSubTree method sias a{sa{sas}} -
.GetSubTreePaths method sias as -
```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If6fc6a403d602d6c18c6e30dc1a216a47d059860
diff --git a/yaml/xyz/openbmc_project/ObjectMapper.interface.yaml b/yaml/xyz/openbmc_project/ObjectMapper.interface.yaml
index 9cde19a..c7b8c78 100644
--- a/yaml/xyz/openbmc_project/ObjectMapper.interface.yaml
+++ b/yaml/xyz/openbmc_project/ObjectMapper.interface.yaml
@@ -10,7 +10,7 @@
given path.
parameters:
- name: path
- type: object_path
+ type: string
description: >
The object path for which the result should be fetched.
- name: interfaces
@@ -31,7 +31,7 @@
method.
parameters:
- name: path
- type: object_path
+ type: string
description: >
The path for which the result should be fetched.
- name: interfaces
@@ -40,7 +40,7 @@
An array of result set constraining interfaces.
returns:
- name: ancestors
- type: dict[object_path,dict[string,array[string]]]
+ type: dict[string,dict[string,array[string]]]
description: >
A dictionary of ancestor -> services.
errors:
@@ -51,7 +51,7 @@
services is of the type returned by the GetObject method.
parameters:
- name: subtree
- type: object_path
+ type: string
description: >
The subtree path for which the result should be fetched.
- name: depth
@@ -65,7 +65,7 @@
An array of result set constraining interfaces.
returns:
- name: objects
- type: dict[object_path,dict[string,array[string]]]
+ type: dict[string,dict[string,array[string]]]
description: >
A dictionary of path -> services.
errors:
@@ -75,7 +75,7 @@
Obtain an array of paths where array elements are in subtree.
parameters:
- name: subtree
- type: object_path
+ type: string
description: >
The subtree path for which the result should be fetched.
- name: depth
@@ -89,7 +89,7 @@
An array of result set constraining interfaces.
returns:
- name: paths
- type: array[object_path]
+ type: array[string]
description: >
An array of paths.
errors:
@@ -118,7 +118,7 @@
An array of result set constraining interfaces.
returns:
- name: objects
- type: dict[object_path,dict[string,array[string]]]
+ type: dict[string,dict[string,array[string]]]
description: >
A dictionary of path -> services.
errors:
@@ -129,11 +129,11 @@
association endpoint on associatedPath
parameters:
- name: associatedPath
- type: object_path
+ type: string
description: >
The path where the associated endpoint is fetched from.
- name: subtree
- type: object_path
+ type: string
description: >
The subtree path for which the result should be fetched.
- name: depth
@@ -147,7 +147,7 @@
An array of result set constraining interfaces.
returns:
- name: paths
- type: array[object_path]
+ type: array[string]
description: >
An array of paths.
errors: