Skip to content

Commit

Permalink
[OTA-2377] Add hardwareIdsWithPackages method to reposerverClient
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Clouser <dev@benclouser.com>
  • Loading branch information
bclouser authored and Ben Clouser committed Sep 4, 2024
1 parent da1997a commit 30992c5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

}

0 comments on commit 30992c5

Please sign in to comment.