Story #220
closed[RFE] support importers/distributors in repository binding
0%
Description
++ This bug was initially created as a clone of Bugzilla Bug #1059288 ++
Description of problem:
The RepositoryAPI.repository method should support the optional parameters in the /pulp/api/v2/repositories/<repo_id>/ API.
diff --git a/bindings/pulp/bindings/repository.py b/bindings/pulp/bindings/repository.py
index e3a0a40..69782a7 100644
--- a/bindings/pulp/bindings/repository.py
+++ b/bindings/pulp/bindings/repository.py
@ -91,9 +91,14
@ class RepositoryAPI(PulpAPI):
}
return self.server.POST (path, repo_data)
- def repository(self, id):
+ def repository(self, id, details=None, importers=None, distributors=None):
path = self.base_path + ("%s/" % id)
- return self.server.GET (path)
+ parameters = {}
+ if details or importers:
+ parameters['importers'] = True
+ if details or distributors:
+ parameters['distributors'] = True
+ return self.server.GET (path, parameters)
def delete(self, id):
path = self.base_path + "%s/" % id
--- Additional comment from mhrivnak@redhat.com at 01/29/2014 17:13:41 ---
Since you already have a patch, if you'd like to submit a pull request with unit tests, we'll happily merge it.
Updated by bmbouter over 4 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 4 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.