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

Accept id's directly as parameters #4

Open
andrestc opened this issue Jul 31, 2016 · 1 comment
Open

Accept id's directly as parameters #4

andrestc opened this issue Jul 31, 2016 · 1 comment

Comments

@andrestc
Copy link
Contributor

andrestc commented Jul 31, 2016

Currently, the driver accepts most of its parameters as name, e.g --cloudstack-template uses the name of the template. This can be a problem since cloudstack does not enforce the name to be an unique field.

It would be interesting if the user could use the id of the field, and not the name, directly. I think this can be done in two ways:

  1. add command line args for all fields accepting id directly, eg: --cloudstack-template-id, --cloudstack-zone-id etc.

  2. Use the same arguments as now, but check if the provided string matches an id, if not, tries to fetch the id using the provided string as name.

I would be happy to send a PR for this.

What`s your opinion on this, @atsaki?

@atsaki
Copy link
Owner

atsaki commented Aug 1, 2016

This can be a problem since cloudstack does not enforce the name to be an unique field.

You're right. This can be a problem when there are duplicate names.
I think 1 is better because it is clear that the argument is id and other drivers like openstack do so too.

I would be happy to send a PR for this.

I'm happy if you would do so. 😄

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

No branches or pull requests

2 participants