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

How to upload with a tag and reuse it later to download? #168

Open
akarasulu opened this issue Dec 10, 2017 · 9 comments
Open

How to upload with a tag and reuse it later to download? #168

akarasulu opened this issue Dec 10, 2017 · 9 comments
Assignees
Labels

Comments

@akarasulu
Copy link
Contributor

We added a feature to add tags (labels to files uploaded). I would like to document how this feature works. How do I upload a file to Gorjun providing a tag, and use that to retrieve it? Please show me the mechanics of this with curl calls.

My specific use case is to upload a version of a file and use the tag for the version. This way the file name in Gorjun stays the same while I can still access older versions of the file using this version tag.

@akarasulu akarasulu changed the title How do I uploading and providing a tag which I can reuse later to download? How to upload with a tag and reuse it later to download? Dec 10, 2017
@dilshat
Copy link
Member

dilshat commented Dec 11, 2017

Gorjun supports tags only for templates.

@akarasulu
Copy link
Contributor Author

Gorjun supports tags only for templates.

  1. Ok, can you please show how it can be used?

  2. Why can't we use this on any artifact type?

@emli
Copy link
Contributor

emli commented Dec 11, 2017

You can check curl calls here https://github.com/subutai-io/gorjun/wiki/v1#kurjunresttemplatetag

@akarasulu
Copy link
Contributor Author

@emli show me how in a command sequence with curl:

  1. I can upload 3 different files (different md5 etc) but using same name
  • foo.tgz with tag 1.0
  • foo.tgz with tag 1.1
  • foo.tgz with tag 2.0
  1. show how i can get these files back from Gorjun by specifying name and tag value

@emli
Copy link
Contributor

emli commented Dec 11, 2017

  1. We can get files by name and id of template. By tag not implemented

@akarasulu
Copy link
Contributor Author

How about by name and by version?

@emli
Copy link
Contributor

emli commented Dec 11, 2017

By name and by version also not implemented, currently implemented only by name and id

@akarasulu
Copy link
Contributor Author

  1. I can query by name to get a list of ids right?
  2. Then I can select the id that has a version or tag I am looking for right?
  3. Then I can use that to download the artifact correct?

@dilshat
Copy link
Member

dilshat commented Dec 12, 2017

  1. Yes, for example this request https://cdn.subut.ai:8338/kurjun/rest/template/info?name=ubuntu
    returns ubuntu14 and ubuntu16
  2. Yes, response contains json array with version and tags if any
  3. Yes, download can be done then with this request https://cdn.subut.ai:8338/kurjun/rest/template/download?id=c0d9f79ca76a7eb7e9f0a4f8ed522585

@emli emli removed their assignment May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants