xref: /openbmc/phosphor-dbus-interfaces/yaml/com/ibm/VPD/Manager.interface.yaml (revision cd2bca45b82f9bc050d1ac5bef8f1e853bda51c4)
1description: >
2    Implement to manage VPD data in system.
3methods:
4    - name: WriteKeyword
5      description: >
6          A method to update the keyword value for a given VPD record.
7      parameters:
8          - name: path
9            type: object_path
10            description: >
11                Path to the D-Bus object that represents the FRU.
12          - name: record
13            type: string
14            description: >
15                Record whose keyword value needs to be modified.
16          - name: keyword
17            type: string
18            description: >
19                Keyword whose value needs to be updated.
20          - name: value
21            type: array[byte]
22            description: >
23                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.
55      errors:
56          - xyz.openbmc_project.Common.Error.InvalidArgument
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
103
104    - name: GetFRUsByUnexpandedLocationCode
105      description: >
106          A method to get list of FRU D-BUS object paths for a given unexpanded
107          location code.
108      parameters:
109          - name: locationCode
110            type: string
111            description: >
112                An un-expanded Location code.
113          - name: nodeNumber
114            type: uint16
115            description: >
116                Denotes the node in case of a multi-node configuration, ignored
117                on a single node system.
118      returns:
119          - name: inventoryList
120            type: array[object_path]
121            description: >
122                List of all the FRUs D-Bus object paths for the given location
123                code.
124      errors:
125          - xyz.openbmc_project.Common.Error.InvalidArgument
126
127    - name: GetFRUsByExpandedLocationCode
128      description: >
129          A method to get list of FRU D-BUS object paths for a given expanded
130          location code.
131      parameters:
132          - name: locationCode
133            type: string
134            description: >
135                Location code in expanded format.
136      returns:
137          - name: inventoryList
138            type: array[object_path]
139            description: >
140                List of all the FRUs D-Bus object path for the given location
141                code.
142      errors:
143          - xyz.openbmc_project.Common.Error.InvalidArgument
144
145    - name: GetExpandedLocationCode
146      description: >
147          An api to get expanded location code corresponding to a given
148          un-expanded location code. Expanded location codes gives the location
149          of the FRU in the system.
150      parameters:
151          - name: locationCode
152            type: string
153            description: >
154                Location code in un-expanded format.
155          - name: nodeNumber
156            type: uint16
157            description: >
158                Denotes the node in case of multi-node configuration. Ignored in
159                case of single node configuration.
160      returns:
161          - name: locationCode
162            type: string
163            description: >
164                Location code in expanded format.
165      errors:
166          - xyz.openbmc_project.Common.Error.InvalidArgument
167
168    - name: PerformVPDRecollection
169      description: >
170          An api to check for FRUs replaced and if required, perform
171          recollection of VPD data for them.
172
173    - name: DeleteFRUVPD
174      description: >
175          An api to delete VPD of a given FRU and set its Present property as
176          false on DBus. This api is to be called before requesting VPD parser
177          to collect VPD of any given FRU in case of concurrent maintenance.
178      parameters:
179          - name: inventoryPath
180            type: object_path
181            description: >
182                Dbus path of the FRU whose VPD needs to be removed.
183      errors:
184          - xyz.openbmc_project.Common.Error.InvalidArgument
185
186    - name: CollectFRUVPD
187      description: >
188          An api to collect VPD of a given FRU.
189      parameters:
190          - name: inventoryPath
191            type: object_path
192            description: >
193                Dbus path of the FRU whose VPD needs to be collected.
194      errors:
195          - 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
208properties:
209    - name: CollectionStatus
210      type: enum[self.Status]
211      default: NotStarted
212      description: >
213          VPD collection status of the system.
214
215enumerations:
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.
232