Skip to content
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

Allow users to upload role versions #14

Merged
merged 2 commits into from Apr 23, 2018
Merged

Conversation

daviddavis
Copy link
Contributor

README.rst Outdated

Create a content unit and point it to your Artifact and Role

``$ http POST http://localhost:8000/api/v3/content/ansible/roles/3965b515-53a0-4667-a540-a76714a903d4/versions/ version=0.0.1 artifact="http://localhost:8000/api/v3/artifacts/7d39e3f6-535a-4b6e-81e9-c83aa56aa19e/"``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these use exported variables so it can be copy/paste? That is such a nice format.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see why this is hard, the API doesn't give you an easy way to parse artifact results unless you know the digest or size value. We should consider using a wget of an actual tarball from github and then making the example for that.

README.rst Outdated
@@ -94,6 +94,63 @@ Look at the new Repository Version created
}


Upload ``pulp-0.0.1.tar`` to Pulp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a command added above that makes this file? I know it's trivial but it's a gap in the copy/paste approach.

Add content to repository ``foo``
---------------------------------

``$ http POST $REPO_HREF'versions/' add_content_units:="[\"$CONTENT_HREF\"]"``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had trouble with this command. It says:

(pulp) [vagrant@pulp3 ~]$ http POST $REPO_HREF'versions/' add_content_units:="[\"$CONTENT_HREF\"]"
HTTP/1.1 400 Bad Request
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Date: Mon, 23 Apr 2018 20:00:09 GMT
Server: WSGIServer/0.2 CPython/3.6.2
Vary: Accept

[
    "URI http://localhost:8000/api/v3/content/ansible/roles/069d5cf7-bc77-46b7-a2cf-95b390f03548/versions/3f7bacb8-4b62-4208-bbeb-e74226bf3984/ is not a valid content."
]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the fix:

pulp/pulp#3468

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That other PR got merged so I resumed my testing.

Copy link
Member

@bmbouter bmbouter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to use the last command to correctly add an uploaded content unit to a repository version. It showed 12 units total; 11 from syncing with galaxy and 1 I uploaded.

Thanks @daviddavis for making this great capability! 😀 👍

@daviddavis daviddavis merged commit 437d2d7 into pulp:master Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants