Skip to content

Commit

Permalink
Merge branch 'feat/OTA-2377/hardwareids-packages' into 'master'
Browse files Browse the repository at this point in the history
[OTA-2377] Add hardwareIdsWithPackages method to reposerverClient

Closes OTA-2377

See merge request torizon-platform/ota-tuf!348
  • Loading branch information
Ben Clouser committed Sep 5, 2024
2 parents da1997a + 30992c5 commit 6adb5d3
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 6adb5d3

Please sign in to comment.