fix redfish validator error for Update interface
Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example, in case the flash_bios feature is not enabled, the
populateSoftwareInformation shouldn't return an error.
Tested -
Before Fix: Redfish Validator failed with errors -
1 err.Bios.Bios errors in /redfish/v1/Systems/system
1 err.Collection(Manager.Manager) errors in /redfish/v1/Systems/system
2 failProp errors in /redfish/v1/Systems/system
2 fails errors in /redfish/v1/Systems/system
1 failGet errors in /redfish/v1/Systems/system/Bios
1 fails errors in /redfish/v1/Systems/system/Bios
…
err.Bios.Bios: 1
err.Collection(Manager.Manager): 3
err.Collection(Resource.Item): 1
…
Validation has failed: 16 problems found
After Fix: Redfish Validator Passed -
Metadata: Namespaces missing from $metadata: set()
Elapsed time: 0:00:33
missingRedfishAlias: 1
pass: 4343
passAction: 16
passGet: 217
passRedfishUri: 208
skipNoSchema: 3
skipOptional: 4001
unvalidated: 1
unverifiedAdditional.complex: 1
warnDeprecated: 5
warningPresent: 6
warnings: 4
Validation has succeeded.
Change-Id: I881c6a780b9f2662fb81a17c258ff09f352668d7
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index fc15783..ad0994e 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -104,7 +104,8 @@
{
BMCWEB_LOG_ERROR("error_code = {}", ec);
BMCWEB_LOG_ERROR("error msg = {}", ec.message());
- messages::internalError(asyncResp->res);
+ // No functional software for this swVersionPurpose, so just
+ // return
return;
}