diff --git a/libtuf-server/src/main/scala/com/advancedtelematic/libtuf_server/repo/client/ReposerverClient.scala b/libtuf-server/src/main/scala/com/advancedtelematic/libtuf_server/repo/client/ReposerverClient.scala index 128685c1..ae5452af 100644 --- a/libtuf-server/src/main/scala/com/advancedtelematic/libtuf_server/repo/client/ReposerverClient.scala +++ b/libtuf-server/src/main/scala/com/advancedtelematic/libtuf_server/repo/client/ReposerverClient.scala @@ -269,6 +269,8 @@ trait ReposerverClient { def fetchDelegationsInfo(namespace: Namespace): Future[Map[DelegatedRoleName, DelegationInfo]] def refreshDelegatedRole(namespace: Namespace, fileName: DelegatedRoleName): Future[Unit] + + def hardwareIdsWithPackages(namespace: Namespace): Future[PaginationResult[HardwareIdentifier]] } object ReposerverHttpClient extends ServiceHttpClientSupport { @@ -815,4 +817,10 @@ class ReposerverHttpClient(reposerverUri: Uri, } } + override def hardwareIdsWithPackages( + namespace: Namespace): Future[PaginationResult[HardwareIdentifier]] = { + val req = HttpRequest(HttpMethods.GET, uri = apiV2Uri(Path(s"user_repo/hardwareids-packages"))) + execHttpUnmarshalledWithNamespace[PaginationResult[HardwareIdentifier]](namespace, req).ok + } + } diff --git a/libtuf/src/main/scala/com/advancedtelematic/libtuf/data/ClientDataType.scala b/libtuf/src/main/scala/com/advancedtelematic/libtuf/data/ClientDataType.scala index ac2f3191..15fd04e7 100644 --- a/libtuf/src/main/scala/com/advancedtelematic/libtuf/data/ClientDataType.scala +++ b/libtuf/src/main/scala/com/advancedtelematic/libtuf/data/ClientDataType.scala @@ -277,7 +277,7 @@ object ClientDataType { case class PubKeyInfo(pubkey: String, meta: Option[PubKeyMeta]) - case class PubKeyMeta(name: String) + case class PubKeyMeta(name: Option[String]) trait EnumeratumUnmarshaller[T <: EnumEntry] { this: Enum[T] =>