cloudmesh / client

Deprecated: Version 3 of cloudmesh is a light weight cloud client to manage virtual clusters
http://cloudmesh.github.io/client
Other
3 stars 12 forks source link

cm vm rename #156

Open laszewsk opened 8 years ago

laszewsk commented 8 years ago

P:21

we need to add the ability to rename vms

vm rename NAME_OR_ID NEW_NAME

in case vms with the same name multiple times exist:

In case multiple vms with the same name exist the uuid needs to be used for renaming. Remember that we also have an id, which is just an integer in the db, which could also be used

nice would be the ability to have an auto-rename, that finds unique names and renames the vms with these unique names.

Gould would be also to have Parameter lists/hostlists so i can say

vm rename myname myname-[0-3]

this would rename a non unique vm name myname for each of the 3 occurences to myvmname-0 and so forth

also

vm rename name-[0-3] name[10-13] should be possible

examples

vm rename --select

opens in interactive window to select the vm by id than the new name is asked. This only works on a single vm

vm rename OLDNAMES NEWNAMES

OLDNAMES: names given in hostlist format NEWNAMES: names given in hostlistformat, must have the same number of hosts as OLDNAMES

before executing this it will be checked if any of the new names exists, if they do an error is thrown and the command is not executed on any of the specified renamed vms. It is expected that newnames do not exist

vm rename --select

pops up an interactive query which vm is to be renamed. We print a table with an integer id, and the id is used to identify the vm

vaglomangirish commented 8 years ago

Implemented- vm rename [NAME]... [--new=NEWNAME] [--cloud=CLOUD]

Please note that I have made the NAME and --new parameters optional. NAME would default to the last vm in DB and --new would default to - format similar to the one used in vm boot. Name can be VM name or UUID. Also delivered the nosetest and manual doc change for the same.

Further items:-

vaglomangirish commented 8 years ago

Implemented interactive renaming of vms with same name. Changes delivered to dev branch.

vaglomangirish commented 8 years ago

Further tasks:-