virtual_media: use configured manager URI name
The VirtualMedia handlers compared the manager path segment against a hardcoded "bmc" instead of BMCWEB_REDFISH_MANAGER_URI_NAME. That constant comes from the redfish-manager-uri-name meson option, which defaults to "bmc" but may be set to any value. When the option is set to another value, Manager still advertises VirtualMedia at /redfish/v1/Managers/<name>/VirtualMedia, but the VirtualMedia handlers rejected that URI with resourceNotFound. The collection GET, the resource GET, and the InsertMedia and EjectMedia actions were all unreachable, so Manager published a dangling link. Compare against BMCWEB_REDFISH_MANAGER_URI_NAME instead, matching how managers.hpp, network_protocol.hpp, and update_service.hpp already validate the manager segment. Behavior is unchanged for the default option value. Tested: Built bmcweb with -Dredfish-manager-uri-name=manager. Verified GET /redfish/v1/Managers/manager/VirtualMedia works. Verified the default manager URI behavior remains unchanged. Change-Id: I2375398d6a2780ef403870061d6583b3ae699551 Signed-off-by: Rython Cai <rython_cai@jabil.com>
R
Rython Cai committed
ab29c5fa3e1238ce5e4eff5eaf708ce73d16b9ff
Parent: 6506e42