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.