Skip to content

Commit

Permalink
1060: Move Error yaml to VPD
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Alpana07 committed Nov 27, 2023
1 parent 1e36361 commit c894d8f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 42 deletions.
15 changes: 15 additions & 0 deletions gen/com/ibm/VPD/VPD/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated file; do not modify.
generated_sources += custom_target(
'com/ibm/VPD/VPD__cpp'.underscorify(),
input: [ '../../../../../yaml/com/ibm/VPD/VPD.errors.yaml', ],
output: [ 'error.cpp', 'error.hpp', ],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog, '--command', 'cpp',
'--output', meson.current_build_dir(),
'--tool', sdbusplusplus_prog,
'--directory', meson.current_source_dir() / '../../../../../yaml',
'com/ibm/VPD/VPD',
],
)

15 changes: 15 additions & 0 deletions gen/com/ibm/VPD/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,18 @@ generated_others += custom_target(
],
)

subdir('VPD')
generated_others += custom_target(
'com/ibm/VPD/VPD__markdown'.underscorify(),
input: [ '../../../../yaml/com/ibm/VPD/VPD.errors.yaml', ],
output: [ 'VPD.md' ],
depend_files: sdbusplusplus_depfiles,
command: [
sdbuspp_gen_meson_prog, '--command', 'markdown',
'--output', meson.current_build_dir(),
'--tool', sdbusplusplus_prog,
'--directory', meson.current_source_dir() / '../../../../yaml',
'com/ibm/VPD/VPD',
],
)

51 changes: 9 additions & 42 deletions yaml/com/ibm/VPD/Manager.interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ methods:
Value to be updated for the keyword.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument
- com.ibm.VPD.Error.PathNotFound
- com.ibm.VPD.Error.RecordNotFound
- com.ibm.VPD.Error.KeywordNotFound
- com.ibm.VPD.VPD.Error.PathNotFound
- com.ibm.VPD.VPD.Error.RecordNotFound
- com.ibm.VPD.VPD.Error.KeywordNotFound

- name: GetFRUsByUnexpandedLocationCode
description: >
Expand All @@ -49,8 +49,8 @@ methods:
code.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument
- com.ibm.VPD.Error.LocationNotFound
- com.ibm.VPD.Error.NodeNotFound
- com.ibm.VPD.VPD.Error.LocationNotFound
- com.ibm.VPD.VPD.Error.NodeNotFound

- name: GetFRUsByExpandedLocationCode
description: >
Expand All @@ -69,8 +69,8 @@ methods:
code.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument
- com.ibm.VPD.Error.LocationNotFound
- com.ibm.VPD.Error.NodeNotFound
- com.ibm.VPD.VPD.Error.LocationNotFound
- com.ibm.VPD.VPD.Error.NodeNotFound

- name: GetExpandedLocationCode
description: >
Expand All @@ -94,45 +94,12 @@ methods:
Location code in expanded format.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument
- com.ibm.VPD.Error.LocationNotFound
- com.ibm.VPD.Error.NodeNotFound
- com.ibm.VPD.VPD.Error.LocationNotFound
- com.ibm.VPD.VPD.Error.NodeNotFound

- name: PerformVPDRecollection
description: >
An api to check for FRUs replaced and if required, perform
recollection of VPD data for them.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument

- name: deleteFRUVPD
description: >
An api to delete VPD of a given FRU and set its Present property as
false on DBus. This api is to be called before requesting VPD parser
to collect VPD of any given FRU in case of concurrent maintenance.
parameters:
- name: inventoryPath
type: object_path
description: >
Dbus path of the FRU whose VPD needs to be removed.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument

- name: CollectFRUVPD
description: >
An api to collect VPD of a given FRU by launching the parser exe
asynchronously. It can be used to collect VPD of any given FRU in case
of concurrent maintenance. As a pre-requisite for this api,
deleteFRUVPD api needs to be called for that particular FRU. As this
api makes async call to the parser, caller needs to register for
Present property change signal for that FRU on DBus to ensure
successful execution of VPD parser for that FRU. The caller is also
suggested to have a timer of around two mins at their end and in case
the present property is not set to true in that timeline, can mark the
call as failed.
parameters:
- name: inventoryPath
type: object_path
description: >
Dbus path of the FRU whose VPD needs to be collected.
errors:
- xyz.openbmc_project.Common.Error.InvalidArgument
25 changes: 25 additions & 0 deletions yaml/com/ibm/VPD/VPD.errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- name: LocationNotFound
description: Location is not found.
- name: NodeNotFound
description: Node number is not found.
- name: PathNotFound
description: Inventory path is not found.
- name: RecordNotFound
description: Record not found.
- name: KeywordNotFound
description: Keyword is not found.
- name: BlankSystemVPD
description:
System VPD is blank on both hardware and cache. On IBM systems, certain
VPD data must be available for the system to boot. This error is used to
indicate that no valid data was found by the BMC.
- name: InvalidEepromPath
description: EEPROM path is invalid. Parser failed to access the path.
- name: InvalidVPD
description: VPD file is not valid. Mandatory records are missing in VPD file.
- name: EccCheckFailed
desciption: Invalid VPD data. Ecc check for the data failed.
- name: InvalidJson
description: Invalid Json file.
- name: DbusFailure
description: DBus error occurred.

0 comments on commit c894d8f

Please sign in to comment.