-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add publication() #1194
Add publication() #1194
Conversation
Required PR: pulp/pulp-smash#1194 closes #4378 https://pulp.plan.io/issues/4378
client = api.Client(cfg, api.json_handler) | ||
call_report = client.post(path, data) | ||
tasks = tuple(api.poll_spawned_tasks(cfg, call_report)) | ||
return client.get(tasks[-1]["created_resources"][0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task_handler
already does this for generic task based resource creation
https://github.com/PulpQE/pulp-smash/blob/master/pulp_smash/api.py#L205-L268
The only difference right now is that it is reading tasks[0]
assuming it has only one, we can change to read tasks[-1]
or make it a parameter.
@@ -139,6 +139,27 @@ def publish(cfg, publisher, repo, version_href=None): | |||
return client.get(tasks[-1]["created_resources"][0]) | |||
|
|||
|
|||
def publication(cfg, path, repo, version_href=None, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ipanova , can we add a simple commit message? If there is a related issue even better. Just to be consistent with what we have been doing. |
Required PR: pulp/pulp-smash#1194 closes #4378 https://pulp.plan.io/issues/4378
based on the comments i am closing the pr and going to use task_hander. |
Required PR: pulp/pulp-smash#1194 closes #4378 https://pulp.plan.io/issues/4378
Required PR: pulp/pulp-smash#1194 closes #4378 https://pulp.plan.io/issues/4378
No description provided.