Open laszewsk opened 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
Further items:-
Implemented interactive renaming of vms with same name. Changes delivered to dev branch.
Further tasks:-
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