From 82dbc15a05125a812c140a3c8cff81c366482229 Mon Sep 17 00:00:00 2001 From: "Jason M. Bills" Date: Mon, 7 Dec 2020 13:45:20 -0800 Subject: Update to internal 0.26 Signed-off-by: Jason M. Bills --- ...-Fix-Image-and-ImageName-values-in-schema.patch | 38 ---------------------- 1 file changed, 38 deletions(-) delete mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Fix-Image-and-ImageName-values-in-schema.patch (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Fix-Image-and-ImageName-values-in-schema.patch') diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Fix-Image-and-ImageName-values-in-schema.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Fix-Image-and-ImageName-values-in-schema.patch deleted file mode 100644 index c182822a6..000000000 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0006-Fix-Image-and-ImageName-values-in-schema.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 15305d3a9db371af924482e5a6959bbf7812cf6c Mon Sep 17 00:00:00 2001 -From: Przemyslaw Czarnowski -Date: Wed, 29 Jul 2020 15:56:57 +0200 -Subject: [PATCH] Fix Image and ImageName values in schema - -According to design document and schema Image shall contain URL of -image location and ImageName only name of the image. - -Change-Id: Ie1a906c66aa2a10113c307eb1e7d2d7da2810fbd -Signed-off-by: Przemyslaw Czarnowski ---- - redfish-core/lib/virtual_media.hpp | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp -index 183abbe..0345e7b 100644 ---- a/redfish-core/lib/virtual_media.hpp -+++ b/redfish-core/lib/virtual_media.hpp -@@ -97,7 +97,15 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface, - std::get_if(&imageUrlProperty->second); - if (imageUrlValue && !imageUrlValue->empty()) - { -- aResp->res.jsonValue["ImageName"] = *imageUrlValue; -+ std::size_t lastIndex = imageUrlValue->rfind("/"); -+ if (lastIndex == std::string::npos) -+ { -+ aResp->res.jsonValue["ImageName"] = *imageUrlValue; -+ } -+ -+ aResp->res.jsonValue["ImageName"] = -+ imageUrlValue->substr(lastIndex + 1); -+ aResp->res.jsonValue["Image"] = *imageUrlValue; - aResp->res.jsonValue["Inserted"] = *activeValue; - if (*activeValue == true) - { --- -2.25.0 - -- cgit v1.2.3