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      errors:
25          - xyz.openbmc_project.Common.Error.InvalidArgument
26          - com.ibm.VPD.Error.PathNotFound
27          - com.ibm.VPD.Error.RecordNotFound
28          - com.ibm.VPD.Error.KeywordNotFound
29
30    - name: GetFRUsByUnexpandedLocationCode
31      description: >
32          A method to get list of FRU D-BUS object paths for a given unexpanded
33          location code.
34      parameters:
35          - name: locationCode
36            type: string
37            description: >
38                An un-expanded Location code.
39          - name: nodeNumber
40            type: uint16
41            description: >
42                Denotes the node in case of a multi-node configuration, ignored
43                on a single node system.
44      returns:
45          - name: inventoryList
46            type: array[object_path]
47            description: >
48                List of all the FRUs D-Bus object paths for the given location
49                code.
50      errors:
51          - xyz.openbmc_project.Common.Error.InvalidArgument
52          - com.ibm.VPD.Error.LocationNotFound
53          - com.ibm.VPD.Error.NodeNotFound
54
55    - name: GetFRUsByExpandedLocationCode
56      description: >
57          A method to get list of FRU D-BUS object paths for a given expanded
58          location code.
59      parameters:
60          - name: locationCode
61            type: string
62            description: >
63                Location code in expanded format.
64      returns:
65          - name: inventoryList
66            type: array[object_path]
67            description: >
68                List of all the FRUs D-Bus object path for the given location
69                code.
70      errors:
71          - xyz.openbmc_project.Common.Error.InvalidArgument
72          - com.ibm.VPD.Error.LocationNotFound
73          - com.ibm.VPD.Error.NodeNotFound
74
75    - name: GetExpandedLocationCode
76      description: >
77          An api to get expanded location code corresponding to a given
78          un-expanded location code. Expanded location codes gives the location
79          of the FRU in the system.
80      parameters:
81          - name: locationCode
82            type: string
83            description: >
84                Location code in un-expanded format.
85          - name: nodeNumber
86            type: uint16
87            description: >
88                Denotes the node in case of multi-node configuration. Ignored in
89                case of single node configuration.
90      returns:
91          - name: locationCode
92            type: string
93            description: >
94                Location code in expanded format.
95      errors:
96          - xyz.openbmc_project.Common.Error.InvalidArgument
97          - com.ibm.VPD.Error.LocationNotFound
98          - com.ibm.VPD.Error.NodeNotFound
99
100    - name: PerformVPDRecollection
101      description: >
102          An api to check for FRUs replaced and if required, perform
103          recollection of VPD data for them.
104      errors:
105          - xyz.openbmc_project.Common.Error.InvalidArgument
106
107    - name: DeleteFRUVPD
108      description: >
109          An api to delete VPD of a given FRU and set its Present property as
110          false on DBus. This api is to be called before requesting VPD parser
111          to collect VPD of any given FRU in case of concurrent maintenance.
112      parameters:
113          - name: inventoryPath
114            type: object_path
115            description: >
116                Dbus path of the FRU whose VPD needs to be removed.
117      errors:
118          - xyz.openbmc_project.Common.Error.InvalidArgument
119
120    - name: CollectFRUVPD
121      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.
132      parameters:
133          - name: inventoryPath
134            type: object_path
135            description: >
136                Dbus path of the FRU whose VPD needs to be collected.
137      errors:
138          - xyz.openbmc_project.Common.Error.InvalidArgument
139