Skip to content

Rework KbsUri crate? #1294

@fitzthum

Description

@fitzthum

We have a KbsUri crate that handles constructing, serializing, deserializing, etc KBS URIs. This is kind of useful, but this is not how we figure out where to send requests. The KBS URI actually implements serialization into a URL, but this URL follows the KBS URI spec. This is not the same as the URL we send a request to.

In addition to the serialization in the KBS URI crate, we construct the URL for the Trustee request manually in several places. For example, the RCAR client does this.

let mut remote_url = format!(
    "{}/{KBS_PREFIX}/resource/{}/{}/{}",
     self.kbs_host_url, resource_uri.repository, resource_uri.r#type, resource_uri.tag
);

Maybe we should consolidate this logic into one place and have the KBS URI crate be able to produce the Trustee URL directly? On the other hand, perhaps the KBS URI logic is supposed to be generic and shouldn't have anything to do with Trustee. Since this isn't too important either way, I have just made this as an issue for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions