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 resize -s to take a string size rather than ID #101

Closed
kura opened this issue Apr 28, 2014 · 3 comments
Closed

Allow resize -s to take a string size rather than ID #101

kura opened this issue Apr 28, 2014 · 3 comments

Comments

@kura
Copy link

kura commented Apr 28, 2014

While writing a bash completion script for Tugboat I discovered that using tugboat resize droplet -s 1GB fails as it expects the ID of the size from tugboat sizes

I'm not sure if the --size flag is any different but I think it would make more sense for both to support the string representation of the size.

In terms of the bash completio it makes a lot more sense since you cannot display the Human readable string representation to the user but actually submit the ID to the command.

@pearkes
Copy link
Collaborator

pearkes commented Apr 28, 2014

I think this is a good idea. Sizes aren't every going to return a huge number of results, so we can definitely just parse the output searching for a string match and grab the corresponding ID. It's not perfect but I think the only real choice we have, based on the API as it is now.

@kura
Copy link
Author

kura commented Apr 29, 2014

Cool. Glad you agree. Sadly I am awful at Ruby otherwise I'd do the work myself.

Just FYI, my bash completion are at https://github.com/kura/tugboat-bash-completion under MIT license, feel free to link, submodules or ignore at will.

Once the changes are in place for resize I can finish that last completion.

The only downside right now is that nothing is cached within tubrug so each command that requires a droplet or image name requires an API call which takes time. Ruby itself may be a factor in this too, not sure since tubrug help is fast enough.

@petems
Copy link
Owner

petems commented Oct 23, 2015

Closed by #161 (New API uses string slugs)

@petems petems closed this as completed Oct 23, 2015
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