ciao-project / ciao

Ciao - Cloud Integrated Advanced Orchestrator
Apache License 2.0
214 stars 51 forks source link

Friendly instance naming #517

Open mrkz opened 8 years ago

mrkz commented 8 years ago

Right, now, if ciao user want's to remove an instance by using the ciao-clli CLI, the following command should be used:

$ ciao-cli instance delete -instance UUID

The user experience could be improved if we could create friendly names for every instance created (e.g: docker provides the option to specify a name for the container it's being launched, creating a random friendly name like modest_northcutt if no name was specified for the container)

OpenStack also provides this feature, allowing the user to specify which instance to remove by specifying the instance name (and forcing to specify the instance ID if there's > 1 instance with the same name)

So the proper command to run if user wants to remove instance named friendly_richard could be like:

$ ciao-cli instance delete -instance fiendly_richard

or even more simple command line by removing the -instance specification:

$ ciao-cli instance delete friendly-richard

However, notice that this should fail if 2 instances have the same name

albertomurillo commented 8 years ago

I would suggest something like:

ciao-cli instance delete -instance unfriendly-uuid
ciao-cli instance delete -name friendly-fire
mrkz commented 8 years ago

In the case more than 1 instance is launched with the same name, we could also follow openstack method; appending the Instance number after the instance name specified.

E.g: launch 3 instances with the name web-server would give us web-server1 web-server2 web-server3 as the instance names.