]> git.ipfire.org Git - pakfire.git/commitdiff
hub: Drop unused methods
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Oct 2023 16:12:58 +0000 (16:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Oct 2023 16:12:58 +0000 (16:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/hub.py

index 92c5979cb88ae8d03dfc73f0e56499a0c9d6e8f7..6d819673e1b13cb173c1172c2a2accffafa3d604 100644 (file)
@@ -258,61 +258,8 @@ class Hub(object):
 
                return krb5_context
 
-       # Test functions
-
-       async def test(self):
-               """
-                       Tests the connection
-               """
-               return await self._request("GET", "/test")
-
-       # Build actions
-
-       def get_build(self, uuid):
-               return self._request("/api/v1/builds/%s" % uuid, decode="json")
-
-       async def build(self, path, repo=None, arches=None,
-                       disable_test_builds=False):
-               """
-                       Create a new build on the hub
-               """
-               # Upload the souce file to the server
-               upload_id = await self.upload(path)
-
-               log.debug("%s has been uploaded as %s" % (path, upload_id))
-
-               # Create a new build
-               build_id = await self._request("POST", "/api/v1/builds",
-                       upload_id=upload_id,
-                       repo=repo,
-                       arches=arches,
-                       disable_test_builds=disable_test_builds,
-               )
-
-               log.debug("Build creates as %s" % build_id)
-
-               return build_id
-
-       # Job actions
-
-       def get_job(self, uuid):
-               return self._request("/jobs/%s" % uuid, decode="json")
-
-       # Package actions
-
-       def get_package(self, uuid):
-               return self._request("/packages/%s" % uuid, decode="json")
-
        # Uploads
 
-       async def list_uploads(self):
-               """
-                       Returns a list of all uploads
-               """
-               response = await self._request("GET", "/api/v1/uploads")
-
-               return response.get("uploads")
-
        async def upload(self, path, filename=None, show_progress=True):
                """
                        Uploads the file to the hub returning the upload ID
@@ -464,33 +411,6 @@ class Hub(object):
                """
                return await self._proxy(JobControlConnection, *args, **kwargs)
 
-       # Repositories
-
-       async def list_repos(self, distro):
-               """
-                       Lists all repositories
-               """
-               return await self._request("GET", "/api/v1/repos/%s" % distro)
-
-       async def get_repo(self, distro, name):
-               """
-                       Fetches repository information
-               """
-               return await self._request("GET", "/api/v1/repos/%s/%s" % (distro, name))
-
-       async def create_repo(self, distro, name, description=None):
-               """
-                       Creates a new repository
-               """
-               return await self._request("POST", "/api/v1/repos/%s" % distro,
-                       name=name, description=description)
-
-       async def delete_repo(self, distro, name):
-               """
-                       Deletes a repository
-               """
-               await self._request("DELETE", "/api/v1/repos/%s/%s" % (distro, name))
-
 
 class HubObject(object):
        # Disable Nagle's algorithm?