Skip to content

Commit 473b136

Browse files
committed
Using Manager interface file to add new APIs
Currently there are two interface files defined for VPD Manager service. APIs from FRU.Manager interface are moved to Manager interface. Single yaml file is maintained for VPD.Manager service. Change-Id: Iea6d6bf86aae1b25303e2e2f4f5641ef0915e99a Signed-off-by: Rekha Aparna <[email protected]>
1 parent fd382fe commit 473b136

File tree

2 files changed

+114
-185
lines changed

2 files changed

+114
-185
lines changed

yaml/com/ibm/VPD/FRUManager.interface.yaml

Lines changed: 0 additions & 164 deletions
This file was deleted.

yaml/com/ibm/VPD/Manager.interface.yaml

Lines changed: 114 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,85 @@ methods:
2121
type: array[byte]
2222
description: >
2323
Value to be updated for the keyword.
24+
returns:
25+
- name: bytesUpdated
26+
type: ssize
27+
description: >
28+
On success, returns the number of bytes updated. On failure,
29+
returns -1.
30+
errors:
31+
- xyz.openbmc_project.Common.Error.InvalidArgument
32+
33+
- name: UpdateKeyword
34+
description: >
35+
Method to update a single keyword's value based on the input
36+
parameters.
37+
parameters:
38+
- name: path
39+
type: string
40+
description: >
41+
Path where the data resides (D-Bus inventory path/EEPROM path
42+
etc).
43+
- name: paramsToWriteData
44+
type:
45+
variant[struct[string,string,array[byte]],
46+
struct[string,array[byte]]]
47+
description: >
48+
Parameters in required format to write the keyword's value.
49+
returns:
50+
- name: bytesUpdated
51+
type: ssize
52+
description: >
53+
On success, returns the number of bytes updated. On failure,
54+
returns -1.
2455
errors:
2556
- xyz.openbmc_project.Common.Error.InvalidArgument
26-
- com.ibm.VPD.Error.PathNotFound
27-
- com.ibm.VPD.Error.RecordNotFound
28-
- com.ibm.VPD.Error.KeywordNotFound
57+
58+
- name: WriteKeywordOnHardware
59+
description: >
60+
Method to update a single keyword's value on the hardware.
61+
parameters:
62+
- name: path
63+
type: string
64+
description: >
65+
EEPROM path of the FRU.
66+
- name: paramsToWriteData
67+
type:
68+
variant[struct[string,string,array[byte]],
69+
struct[string,array[byte]]]
70+
description: >
71+
Parameters in required format to write the keyword's value.
72+
returns:
73+
- name: bytesUpdated
74+
type: ssize
75+
description: >
76+
On success, returns the number of bytes updated. On failure,
77+
returns -1.
78+
errors:
79+
- xyz.openbmc_project.Common.Error.InvalidArgument
80+
81+
- name: ReadKeyword
82+
description: >
83+
Method to read a single keyword's value based on the input parameters.
84+
parameters:
85+
- name: path
86+
type: string
87+
description: >
88+
Path from where to read the data (D-Bus inventory path/EEPROM
89+
path etc).
90+
- name: paramsToReadData
91+
type: variant[struct[string,string],string]
92+
description: >
93+
Parameters in required format to read the keyword's value.
94+
returns:
95+
- name: keywordValue
96+
type: variant[array[byte]]
97+
description: >
98+
On success, returns the keyword's value. On failure, throws an
99+
exception.
100+
errors:
101+
- xyz.openbmc_project.Common.Error.InvalidArgument
102+
- xyz.openbmc_project.Common.Device.Error.ReadFailure
29103

30104
- name: GetFRUsByUnexpandedLocationCode
31105
description: >
@@ -49,8 +123,6 @@ methods:
49123
code.
50124
errors:
51125
- xyz.openbmc_project.Common.Error.InvalidArgument
52-
- com.ibm.VPD.Error.LocationNotFound
53-
- com.ibm.VPD.Error.NodeNotFound
54126

55127
- name: GetFRUsByExpandedLocationCode
56128
description: >
@@ -69,8 +141,6 @@ methods:
69141
code.
70142
errors:
71143
- xyz.openbmc_project.Common.Error.InvalidArgument
72-
- com.ibm.VPD.Error.LocationNotFound
73-
- com.ibm.VPD.Error.NodeNotFound
74144

75145
- name: GetExpandedLocationCode
76146
description: >
@@ -94,15 +164,11 @@ methods:
94164
Location code in expanded format.
95165
errors:
96166
- xyz.openbmc_project.Common.Error.InvalidArgument
97-
- com.ibm.VPD.Error.LocationNotFound
98-
- com.ibm.VPD.Error.NodeNotFound
99167

100168
- name: PerformVPDRecollection
101169
description: >
102170
An api to check for FRUs replaced and if required, perform
103171
recollection of VPD data for them.
104-
errors:
105-
- xyz.openbmc_project.Common.Error.InvalidArgument
106172
107173
- name: DeleteFRUVPD
108174
description: >
@@ -119,20 +185,47 @@ methods:
119185

120186
- name: CollectFRUVPD
121187
description: >
122-
An api to collect VPD of a given FRU by launching the parser exe
123-
asynchronously. It can be used to collect VPD of any given FRU in case
124-
of concurrent maintenance. As a pre-requisite for this api,
125-
DeleteFRUVPD api needs to be called for that particular FRU. As this
126-
api makes async call to the parser, caller needs to register for
127-
Present property change signal for that FRU on DBus to ensure
128-
successful execution of VPD parser for that FRU. The caller is also
129-
suggested to have a timer of around two mins at their end and in case
130-
the present property is not set to true in that timeline, can mark the
131-
call as failed.
188+
An api to collect VPD of a given FRU.
132189
parameters:
133190
- name: inventoryPath
134191
type: object_path
135192
description: >
136193
Dbus path of the FRU whose VPD needs to be collected.
137194
errors:
138195
- xyz.openbmc_project.Common.Error.InvalidArgument
196+
197+
- name: GetHardwarePath
198+
description: >
199+
Method to get the hardware path for the corresponding inventory path.
200+
parameters:
201+
- name: inventoryPath
202+
type: object_path
203+
description: >
204+
Dbus inventory path of the FRU.
205+
errors:
206+
- xyz.openbmc_project.Common.Error.InvalidArgument
207+
208+
properties:
209+
- name: CollectionStatus
210+
type: enum[self.Status]
211+
default: NotStarted
212+
description: >
213+
VPD collection status of the system.
214+
215+
enumerations:
216+
- name: Status
217+
description: >
218+
VPD collection status of the system.
219+
values:
220+
- name: NotStarted
221+
description: >
222+
VPD collection has not started.
223+
- name: InProgress
224+
description: >
225+
VPD collection is in progress.
226+
- name: Completed
227+
description: >
228+
VPD collection is completed.
229+
- name: Failure
230+
description: >
231+
VPD collection has failed.

0 commit comments

Comments
 (0)