agent: move kbs:// scheme out of get_cdh_resource() helper

With the plugins support added to CoCo Resource URI scheme,
users may want to use get_cdh_resource() to pull resources
from Trustee plugins.

Currently, get_cdh_resource() unconditionally uses kbs://
scheme which prevents callers to specify plugin paths as
kbs+<plugin>://.

Move kbs:// scheme out of get_cdh_resource() helper and update
call sites accordingly. Currently, only s390x path uses this
so only one caller needs to be updated.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
Mikko Ylinen
2026-07-17 13:29:13 +03:00
committed by Fabiano Fidêncio
parent 7e48711ec6
commit 3d5dad473e
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ impl CDHClient {
pub async fn get_resource(&self, resource_path: &str) -> Result<Vec<u8>> {
let req = GetResourceRequest {
ResourcePath: format!("kbs://{resource_path}"),
ResourcePath: resource_path.to_string(),
..Default::default()
};
let res = self

View File

@@ -277,7 +277,7 @@ async fn check_ap_device(address: ap::Address) -> Result<()> {
#[cfg(target_arch = "s390x")]
async fn associate_ap_device(apqn: &Apqn, mkvp: &str) -> Result<()> {
let resource_path = format!("/vfio_ap/{mkvp}");
let resource_path = format!("kbs:///vfio_ap/{mkvp}");
let secret_resource_path = format!("{resource_path}/secret");
let secret_id_resource_path = format!("{resource_path}/secret_id");