Project

Profile

Help

Story #220

closed

[RFE] support importers/distributors in repository binding

Added by dgregor@redhat.com about 9 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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 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.

Also available in: Atom PDF