SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 1 | description: > |
| 2 | Implement to manage VPD data in system. |
| 3 | methods: |
| 4 | - name: WriteKeyword |
| 5 | description: > |
| 6 | A method to update the keyword value for a given VPD record. |
| 7 | parameters: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 8 | - name: path |
Patrick Williams | b78a070 | 2022-10-24 12:32:56 -0500 | [diff] [blame] | 9 | type: object_path |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 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. |
Rekha Aparna | cd2bca4 | 2025-05-22 23:20:59 -0500 | [diff] [blame^] | 24 | returns: |
| 25 | - name: bytesUpdated |
| 26 | type: ssize |
| 27 | description: > |
| 28 | On success, returns the number of bytes updated. On failure, |
| 29 | returns -1. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 30 | errors: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 31 | - xyz.openbmc_project.Common.Error.InvalidArgument |
Rekha Aparna | cd2bca4 | 2025-05-22 23:20:59 -0500 | [diff] [blame^] | 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 |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 103 | |
| 104 | - name: GetFRUsByUnexpandedLocationCode |
| 105 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 106 | A method to get list of FRU D-BUS object paths for a given unexpanded |
| 107 | location code. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 108 | parameters: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 109 | - name: locationCode |
| 110 | type: string |
| 111 | description: > |
| 112 | An un-expanded Location code. |
| 113 | - name: nodeNumber |
| 114 | type: uint16 |
| 115 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 116 | Denotes the node in case of a multi-node configuration, ignored |
| 117 | on a single node system. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 118 | returns: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 119 | - name: inventoryList |
Patrick Williams | b78a070 | 2022-10-24 12:32:56 -0500 | [diff] [blame] | 120 | type: array[object_path] |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 121 | description: > |
| 122 | List of all the FRUs D-Bus object paths for the given location |
| 123 | code. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 124 | errors: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 125 | - xyz.openbmc_project.Common.Error.InvalidArgument |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 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: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 132 | - name: locationCode |
| 133 | type: string |
| 134 | description: > |
| 135 | Location code in expanded format. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 136 | returns: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 137 | - name: inventoryList |
Patrick Williams | b78a070 | 2022-10-24 12:32:56 -0500 | [diff] [blame] | 138 | type: array[object_path] |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 139 | description: > |
| 140 | List of all the FRUs D-Bus object path for the given location |
| 141 | code. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 142 | errors: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 143 | - xyz.openbmc_project.Common.Error.InvalidArgument |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 144 | |
| 145 | - name: GetExpandedLocationCode |
| 146 | description: > |
| 147 | An api to get expanded location code corresponding to a given |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 148 | un-expanded location code. Expanded location codes gives the location |
| 149 | of the FRU in the system. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 150 | parameters: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 151 | - name: locationCode |
| 152 | type: string |
| 153 | description: > |
| 154 | Location code in un-expanded format. |
| 155 | - name: nodeNumber |
| 156 | type: uint16 |
| 157 | description: > |
Patrick Williams | a134741 | 2022-12-06 10:56:22 -0600 | [diff] [blame] | 158 | Denotes the node in case of multi-node configuration. Ignored in |
| 159 | case of single node configuration. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 160 | returns: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 161 | - name: locationCode |
| 162 | type: string |
| 163 | description: > |
| 164 | Location code in expanded format. |
SunnySrivastava1984 | 26ff1c8 | 2020-02-26 05:48:39 -0600 | [diff] [blame] | 165 | errors: |
Patrick Williams | 8da396c | 2022-03-14 14:21:02 -0500 | [diff] [blame] | 166 | - xyz.openbmc_project.Common.Error.InvalidArgument |
SunnySrivastava1984 | 9c3dab3 | 2020-09-07 03:47:05 -0500 | [diff] [blame] | 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. |
Sunny Srivastava | ec18d80 | 2021-06-02 01:52:58 -0500 | [diff] [blame] | 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: > |
Rekha Aparna | cd2bca4 | 2025-05-22 23:20:59 -0500 | [diff] [blame^] | 188 | An api to collect VPD of a given FRU. |
Sunny Srivastava | ec18d80 | 2021-06-02 01:52:58 -0500 | [diff] [blame] | 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 |
Rekha Aparna | cd2bca4 | 2025-05-22 23:20:59 -0500 | [diff] [blame^] | 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. |