diff --git a/test/control_peer/test_install_brick.py b/test/control_peer/test_install_brick.py index 72e8623c9f24aca3dc1b9ecbc5a8f41e3d7252b1..4614bf4cc829b1b461fb8837679b68614bc3abae 100644 --- a/test/control_peer/test_install_brick.py +++ b/test/control_peer/test_install_brick.py @@ -51,7 +51,7 @@ async def pac_man(): server = HttpServer(web.Application()) await server.start_server() server.app.router._frozen = False - server.app.router.add_get(f"/packagemanager/bricks/{BRICK_ID}", respond) + server.app.router.add_get(f"/packagemanager/source/{BRICK_ID}.zip", respond) configuration.packagemanager_address = f"http://127.0.0.1:{server.port}/packagemanager" diff --git a/titanfe/apps/control_peer/services.py b/titanfe/apps/control_peer/services.py index 3693a7dc35c0463c74cd0e782313adb439bdf958..604e70de378cfded26a808e10e3c0fe8551abd5f 100644 --- a/titanfe/apps/control_peer/services.py +++ b/titanfe/apps/control_peer/services.py @@ -83,6 +83,10 @@ class PackageManager(ControlPeerServiceRegistration): def brick_endpoint(self): return f"{self.address}/bricks" + @property + def brick_code_endpoint(self): + return f"{self.address}/source" + @property def control_peer_endpoint(self): return f"{self.address}/controlpeers" @@ -103,7 +107,8 @@ class PackageManager(ControlPeerServiceRegistration): async def get_source_files(self, brick_id): """get the source files archive from the package manager""" - return await self.get(self.brick_endpoint + "/" + brick_id, "Downloading source files") + return await self.get(self.brick_code_endpoint + "/" + brick_id + ".zip", + "Downloading source files") class GridManager(ControlPeerServiceRegistration):