diff --git a/gen/com/ibm/VPD/FRUManager/meson.build b/gen/com/ibm/VPD/FRUManager/meson.build deleted file mode 100644 index 776b42af..00000000 --- a/gen/com/ibm/VPD/FRUManager/meson.build +++ /dev/null @@ -1,38 +0,0 @@ -# Generated file; do not modify. - -sdbusplus_current_path = 'com/ibm/VPD/FRUManager' - -generated_sources += custom_target( - 'com/ibm/VPD/FRUManager__cpp'.underscorify(), - input: ['../../../../../yaml/com/ibm/VPD/FRUManager.interface.yaml'], - output: [ - 'common.hpp', - 'server.hpp', - 'server.cpp', - 'aserver.hpp', - 'client.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/FRUManager', - ], - install: should_generate_cpp, - install_dir: [ - get_option('includedir') / sdbusplus_current_path, - get_option('includedir') / sdbusplus_current_path, - false, - get_option('includedir') / sdbusplus_current_path, - get_option('includedir') / sdbusplus_current_path, - ], - build_by_default: should_generate_cpp, -) - diff --git a/gen/com/ibm/VPD/meson.build b/gen/com/ibm/VPD/meson.build index 0986867c..3d9563e6 100644 --- a/gen/com/ibm/VPD/meson.build +++ b/gen/com/ibm/VPD/meson.build @@ -1,6 +1,5 @@ # Generated file; do not modify. subdir('Collection') -subdir('FRUManager') subdir('Manager') sdbusplus_current_path = 'com/ibm/VPD' @@ -49,28 +48,6 @@ generated_markdown += custom_target( build_by_default: should_generate_markdown, ) -generated_markdown += custom_target( - 'com/ibm/VPD/FRUManager__markdown'.underscorify(), - input: ['../../../../yaml/com/ibm/VPD/FRUManager.interface.yaml'], - output: ['FRUManager.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/FRUManager', - ], - install: should_generate_markdown, - install_dir: [inst_markdown_dir / sdbusplus_current_path], - build_by_default: should_generate_markdown, -) - generated_markdown += custom_target( 'com/ibm/VPD/Manager__markdown'.underscorify(), input: ['../../../../yaml/com/ibm/VPD/Manager.interface.yaml'], diff --git a/yaml/com/ibm/VPD/FRUManager.interface.yaml b/yaml/com/ibm/VPD/FRUManager.interface.yaml deleted file mode 100644 index 3a758595..00000000 --- a/yaml/com/ibm/VPD/FRUManager.interface.yaml +++ /dev/null @@ -1,164 +0,0 @@ -description: > - Implement to manage VPD in the system. - -methods: - - name: WriteKeyword - description: > - Method to update a single keyword's value based on the input - parameters. - parameters: - - name: path - type: string - description: > - Path where the data resides (D-Bus inventory path/EEPROM path - etc). - - name: paramsToWriteData - type: - variant[struct[string,string,array[byte]], - struct[string,array[byte]]] - description: > - Parameters in required format to write the keyword's value. - returns: - - name: bytesUpdated - type: ssize - description: > - On success, returns the number of bytes updated. On failure, - returns -1. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - - - name: WriteKeywordOnHardware - description: > - Method to update a single keyword's value on the hardware. - parameters: - - name: path - type: string - description: > - EEPROM path of the FRU. - - name: paramsToWriteData - type: - variant[struct[string,string,array[byte]], - struct[string,array[byte]]] - description: > - Parameters in required format to write the keyword's value. - returns: - - name: bytesUpdated - type: ssize - description: > - On success, returns the number of bytes updated. On failure, - returns -1. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - - - name: ReadKeyword - description: > - Method to read a single keyword's value based on the input parameters. - parameters: - - name: path - type: string - description: > - Path where the data resides (D-Bus inventory path/EEPROM path - etc). - - name: paramsToReadData - type: variant[struct[string,string],struct[string]] - description: > - Parameters in required format to read the keyword's value. - returns: - - name: keywordValue - type: variant[array[byte]] - description: > - On success, returns the keyword's value. On failure, throws an - exception. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - - - name: GetLocationCode - description: > - Method to get location code from the D-Bus inventory path. - parameters: - - name: inventoryPath - type: object_path - description: > - D-Bus inventory path of the FRU. - returns: - - name: locationCode - type: string - description: > - On success, returns location code. On failure, throws an - exception. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - - - name: GetExpandedLocationCode - description: > - Method to get expanded location code for a given un-expanded location - code. - parameters: - - name: locationCode - type: string - description: > - Location code in un-expanded format. - - name: nodeNumber - type: size - description: > - Denotes the node in case of multi-node configuration. Defaulted - in case of single node configuration. - returns: - - name: locationCode - type: string - description: > - On success, returns location code in expanded format. On - failure, throws an exception. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - - - name: deleteFRUVPD - description: > - Method to remove the FRU VPD. - parameters: - - name: inventoryPath - type: object_path - description: > - D-Bus inventory path of the FRU. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - - - name: CollectFRUVPD - description: > - Method to perform single FRU VPD collection. - parameters: - - name: inventoryPath - type: object_path - description: > - D-Bus inventory path of the FRU. - errors: - - xyz.openbmc_project.Common.Error.InvalidArgument - - xyz.openbmc_project.Common.Error.InternalFailure - -properties: - - name: CollectionStatus - type: enum[self.Status] - default: NotStarted - description: > - VPD collection status of the system. - -enumerations: - - name: Status - description: > - VPD collection status of the system. - values: - - name: NotStarted - description: > - VPD collection has not started. - - name: InProgress - description: > - VPD collection is in progress. - - name: Completed - description: > - VPD collection is completed. diff --git a/yaml/com/ibm/VPD/Manager.interface.yaml b/yaml/com/ibm/VPD/Manager.interface.yaml index da0e799f..dda5946d 100644 --- a/yaml/com/ibm/VPD/Manager.interface.yaml +++ b/yaml/com/ibm/VPD/Manager.interface.yaml @@ -21,11 +21,85 @@ methods: type: array[byte] description: > Value to be updated for the keyword. + returns: + - name: bytesUpdated + type: ssize + description: > + On success, returns the number of bytes updated. On failure, + returns -1. + errors: + - xyz.openbmc_project.Common.Error.InvalidArgument + + - name: UpdateKeyword + description: > + Method to update a single keyword's value based on the input + parameters. + parameters: + - name: path + type: string + description: > + Path where the data resides (D-Bus inventory path/EEPROM path + etc). + - name: paramsToWriteData + type: + variant[struct[string,string,array[byte]], + struct[string,array[byte]]] + description: > + Parameters in required format to write the keyword's value. + returns: + - name: bytesUpdated + type: ssize + description: > + On success, returns the number of bytes updated. On failure, + returns -1. errors: - xyz.openbmc_project.Common.Error.InvalidArgument - - com.ibm.VPD.Error.PathNotFound - - com.ibm.VPD.Error.RecordNotFound - - com.ibm.VPD.Error.KeywordNotFound + + - name: WriteKeywordOnHardware + description: > + Method to update a single keyword's value on the hardware. + parameters: + - name: path + type: string + description: > + EEPROM path of the FRU. + - name: paramsToWriteData + type: + variant[struct[string,string,array[byte]], + struct[string,array[byte]]] + description: > + Parameters in required format to write the keyword's value. + returns: + - name: bytesUpdated + type: ssize + description: > + On success, returns the number of bytes updated. On failure, + returns -1. + errors: + - xyz.openbmc_project.Common.Error.InvalidArgument + + - name: ReadKeyword + description: > + Method to read a single keyword's value based on the input parameters. + parameters: + - name: path + type: string + description: > + Path from where to read the data (D-Bus inventory path/EEPROM + path etc). + - name: paramsToReadData + type: variant[struct[string,string],string] + description: > + Parameters in required format to read the keyword's value. + returns: + - name: keywordValue + type: variant[array[byte]] + description: > + On success, returns the keyword's value. On failure, throws an + exception. + errors: + - xyz.openbmc_project.Common.Error.InvalidArgument + - xyz.openbmc_project.Common.Device.Error.ReadFailure - name: GetFRUsByUnexpandedLocationCode description: > @@ -49,8 +123,6 @@ methods: code. errors: - xyz.openbmc_project.Common.Error.InvalidArgument - - com.ibm.VPD.Error.LocationNotFound - - com.ibm.VPD.Error.NodeNotFound - name: GetFRUsByExpandedLocationCode description: > @@ -69,8 +141,6 @@ methods: code. errors: - xyz.openbmc_project.Common.Error.InvalidArgument - - com.ibm.VPD.Error.LocationNotFound - - com.ibm.VPD.Error.NodeNotFound - name: GetExpandedLocationCode description: > @@ -94,15 +164,11 @@ methods: Location code in expanded format. errors: - xyz.openbmc_project.Common.Error.InvalidArgument - - com.ibm.VPD.Error.LocationNotFound - - com.ibm.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: > @@ -119,16 +185,7 @@ methods: - 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. + An api to collect VPD of a given FRU. parameters: - name: inventoryPath type: object_path @@ -136,3 +193,39 @@ methods: Dbus path of the FRU whose VPD needs to be collected. errors: - xyz.openbmc_project.Common.Error.InvalidArgument + + - name: GetHardwarePath + description: > + Method to get the hardware path for the corresponding inventory path. + parameters: + - name: inventoryPath + type: object_path + description: > + Dbus inventory path of the FRU. + errors: + - xyz.openbmc_project.Common.Error.InvalidArgument + +properties: + - name: CollectionStatus + type: enum[self.Status] + default: NotStarted + description: > + VPD collection status of the system. + +enumerations: + - name: Status + description: > + VPD collection status of the system. + values: + - name: NotStarted + description: > + VPD collection has not started. + - name: InProgress + description: > + VPD collection is in progress. + - name: Completed + description: > + VPD collection is completed. + - name: Failure + description: > + VPD collection has failed.