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

Document how to use image_id: vs image: for Droplet.new() #30

Open
hh opened this issue Mar 3, 2015 · 7 comments
Open

Document how to use image_id: vs image: for Droplet.new() #30

hh opened this issue Mar 3, 2015 · 7 comments

Comments

@hh
Copy link

hh commented Mar 3, 2015

I'm not sure where the names come from for calls to Droplet.new(name:) when I want to specify my own images.

I ended up using the image_id: in the name: parameter to accomplish what I wanted, but it was confusing.

@bobbytables
Copy link
Contributor

To clarify, image_id did work right? You're just looking for better documentation?

@hh
Copy link
Author

hh commented Mar 3, 2015

It's the image: parameter, which get's fed from apps using the library (like test-kitchen). Knowing how name names map to image id's would be great.

@bobbytables
Copy link
Contributor

Yeah, right now the best way to see slugs is to retrieve only distribution images from /images

https://developers.digitalocean.com/documentation/v2/#list-all-distribution-images

@hh
Copy link
Author

hh commented Mar 3, 2015

I'm guessing no slugs are created by default for snapshot / application images.

@bobbytables
Copy link
Contributor

Application images should also have slugs.

@VinceG3
Copy link

VinceG3 commented May 31, 2017

How do I actually do this with DropletKit, see the image ids? What's the magic spell? I see the api documentation link, but that doesn't tell me how to actually do it with the ruby gem. I don't understand why this is so hard. Do I really need to go figure out how to do it with curl before I can figure out how to do it with the gem? What's the point then of maintaining the gem?

Would it be too hard to just add a endpoint or something that doesn't require a bunch of auth just to get this basic usage info?

@VinceG3
Copy link

VinceG3 commented May 31, 2017

This is the magic spell for anyone else coming across this:

client.images.all.each{|i| puts "#{i.id}: #{i.distribution} #{i.name}" }

The gem specifies that the returns are POROs but the return from the .all method doesn't give a hint as to how to get at those POROs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants