Bug 1059288 - [RFE] support importers/distributors in repository binding
Summary: [RFE] support importers/distributors in repository binding
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: 2.3
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks: 1059289
TreeView+ depends on / blocked
 
Reported: 2014-01-29 15:13 UTC by Dennis Gregorovic
Modified: 2015-02-28 23:41 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1059289 (view as bug list)
Environment:
Last Closed: 2015-02-19 01:12:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 220 0 None None None Never

Description Dennis Gregorovic 2014-01-29 15:13:48 UTC
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

Comment 1 Michael Hrivnak 2014-01-29 17:13:41 UTC
Since you already have a patch, if you'd like to submit a pull request with unit tests, we'll happily merge it.

Comment 2 Brian Bouterse 2015-02-19 01:12:40 UTC
Moved to https://pulp.plan.io/issues/220


Note You need to log in before you can comment on or make changes to this bug.