Bug 1059288

Summary: [RFE] support importers/distributors in repository binding
Product: [Retired] Pulp Reporter: Dennis Gregorovic <dgregor>
Component: API/integrationAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: unspecified Docs Contact:
Priority: low    
Version: 2.3CC: mhrivnak
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1059289 (view as bug list) Environment:
Last Closed: 2015-02-19 01:12:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1059289    

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