Skip to content

cm vm rename #156

@laszewsk

Description

@laszewsk

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:

  • the command needs to list all such names and return with a meaning full Console.error error

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

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions