Skip to content

Commit c894d8f

Browse files
committed
1060: Move Error yaml to VPD
This commit is to move yaml/com/ibm/VPD.errors.yaml into yaml/com/ibm/VPD directory Test: Tested the patch on Rainier system. Reached successfully standby - runtime - standby Change-Id: I4e04a865164f7e1a4548ffd7a80b4f035a31573d Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
1 parent 1e36361 commit c894d8f

File tree

4 files changed

+64
-42
lines changed

4 files changed

+64
-42
lines changed

gen/com/ibm/VPD/VPD/meson.build

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Generated file; do not modify.
2+
generated_sources += custom_target(
3+
'com/ibm/VPD/VPD__cpp'.underscorify(),
4+
input: [ '../../../../../yaml/com/ibm/VPD/VPD.errors.yaml', ],
5+
output: [ 'error.cpp', 'error.hpp', ],
6+
depend_files: sdbusplusplus_depfiles,
7+
command: [
8+
sdbuspp_gen_meson_prog, '--command', 'cpp',
9+
'--output', meson.current_build_dir(),
10+
'--tool', sdbusplusplus_prog,
11+
'--directory', meson.current_source_dir() / '../../../../../yaml',
12+
'com/ibm/VPD/VPD',
13+
],
14+
)
15+

gen/com/ibm/VPD/meson.build

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,18 @@ generated_others += custom_target(
2828
],
2929
)
3030

31+
subdir('VPD')
32+
generated_others += custom_target(
33+
'com/ibm/VPD/VPD__markdown'.underscorify(),
34+
input: [ '../../../../yaml/com/ibm/VPD/VPD.errors.yaml', ],
35+
output: [ 'VPD.md' ],
36+
depend_files: sdbusplusplus_depfiles,
37+
command: [
38+
sdbuspp_gen_meson_prog, '--command', 'markdown',
39+
'--output', meson.current_build_dir(),
40+
'--tool', sdbusplusplus_prog,
41+
'--directory', meson.current_source_dir() / '../../../../yaml',
42+
'com/ibm/VPD/VPD',
43+
],
44+
)
45+

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

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ methods:
2323
Value to be updated for the keyword.
2424
errors:
2525
- xyz.openbmc_project.Common.Error.InvalidArgument
26-
- com.ibm.VPD.Error.PathNotFound
27-
- com.ibm.VPD.Error.RecordNotFound
28-
- com.ibm.VPD.Error.KeywordNotFound
26+
- com.ibm.VPD.VPD.Error.PathNotFound
27+
- com.ibm.VPD.VPD.Error.RecordNotFound
28+
- com.ibm.VPD.VPD.Error.KeywordNotFound
2929

3030
- name: GetFRUsByUnexpandedLocationCode
3131
description: >
@@ -49,8 +49,8 @@ methods:
4949
code.
5050
errors:
5151
- xyz.openbmc_project.Common.Error.InvalidArgument
52-
- com.ibm.VPD.Error.LocationNotFound
53-
- com.ibm.VPD.Error.NodeNotFound
52+
- com.ibm.VPD.VPD.Error.LocationNotFound
53+
- com.ibm.VPD.VPD.Error.NodeNotFound
5454

5555
- name: GetFRUsByExpandedLocationCode
5656
description: >
@@ -69,8 +69,8 @@ methods:
6969
code.
7070
errors:
7171
- xyz.openbmc_project.Common.Error.InvalidArgument
72-
- com.ibm.VPD.Error.LocationNotFound
73-
- com.ibm.VPD.Error.NodeNotFound
72+
- com.ibm.VPD.VPD.Error.LocationNotFound
73+
- com.ibm.VPD.VPD.Error.NodeNotFound
7474

7575
- name: GetExpandedLocationCode
7676
description: >
@@ -94,45 +94,12 @@ methods:
9494
Location code in expanded format.
9595
errors:
9696
- xyz.openbmc_project.Common.Error.InvalidArgument
97-
- com.ibm.VPD.Error.LocationNotFound
98-
- com.ibm.VPD.Error.NodeNotFound
97+
- com.ibm.VPD.VPD.Error.LocationNotFound
98+
- com.ibm.VPD.VPD.Error.NodeNotFound
9999

100100
- name: PerformVPDRecollection
101101
description: >
102102
An api to check for FRUs replaced and if required, perform
103103
recollection of VPD data for them.
104104
errors:
105105
- 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

yaml/com/ibm/VPD/VPD.errors.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
- name: LocationNotFound
2+
description: Location is not found.
3+
- name: NodeNotFound
4+
description: Node number is not found.
5+
- name: PathNotFound
6+
description: Inventory path is not found.
7+
- name: RecordNotFound
8+
description: Record not found.
9+
- name: KeywordNotFound
10+
description: Keyword is not found.
11+
- name: BlankSystemVPD
12+
description:
13+
System VPD is blank on both hardware and cache. On IBM systems, certain
14+
VPD data must be available for the system to boot. This error is used to
15+
indicate that no valid data was found by the BMC.
16+
- name: InvalidEepromPath
17+
description: EEPROM path is invalid. Parser failed to access the path.
18+
- name: InvalidVPD
19+
description: VPD file is not valid. Mandatory records are missing in VPD file.
20+
- name: EccCheckFailed
21+
desciption: Invalid VPD data. Ecc check for the data failed.
22+
- name: InvalidJson
23+
description: Invalid Json file.
24+
- name: DbusFailure
25+
description: DBus error occurred.

0 commit comments

Comments
 (0)