mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-10 12:58:27 +03:00
cli: Drop useless get_uuid helper
This commit is contained in:
parent
d1edce1ca5
commit
6c7439d625
@ -105,7 +105,9 @@ def main(conn=None):
|
||||
cli.get_name(guest, options.name or image.name)
|
||||
cli.get_memory(guest, options.memory or (image.domain.memory and
|
||||
int(image.domain.memory)))
|
||||
cli.get_uuid(guest, options.uuid)
|
||||
|
||||
if options.uuid:
|
||||
guest.uuid = options.uuid
|
||||
cli.get_vcpus(guest, options.vcpus or image.domain.vcpu or "",
|
||||
options.check_cpu)
|
||||
cli.get_cpuset(guest, options.cpuset)
|
||||
|
@ -495,14 +495,16 @@ def build_guest_instance(conn, options):
|
||||
convert_old_disks(options)
|
||||
cli.convert_old_features(options)
|
||||
|
||||
# Install options
|
||||
# non-xml install options
|
||||
guest.installer.extraargs = options.extra_args or ""
|
||||
guest.installer.initrd_injections = options.initrd_inject
|
||||
cli.set_os_variant(guest, options.distro_type, options.distro_variant)
|
||||
guest.os.init = options.init
|
||||
guest.autostart = options.autostart
|
||||
|
||||
# Guest configuration
|
||||
cli.get_uuid(guest, options.uuid)
|
||||
guest.os.init = options.init
|
||||
if options.uuid:
|
||||
guest.uuid = options.uuid
|
||||
cli.get_vcpus(guest, options.vcpus, options.check_cpu)
|
||||
cli.parse_numatune(guest, options.numatune)
|
||||
cli.parse_cpu(guest, options.cpu)
|
||||
@ -511,7 +513,6 @@ def build_guest_instance(conn, options):
|
||||
cli.parse_features(guest, options.features)
|
||||
cli.parse_clock(guest, options.clock)
|
||||
|
||||
guest.autostart = options.autostart
|
||||
guest.description = options.description
|
||||
|
||||
# Non-default devices
|
||||
|
@ -564,15 +564,6 @@ def get_memory(guest, memory):
|
||||
func=check_memory)
|
||||
|
||||
|
||||
def get_uuid(guest, uuid):
|
||||
if not uuid:
|
||||
return
|
||||
try:
|
||||
guest.uuid = uuid
|
||||
except ValueError, e:
|
||||
fail(e)
|
||||
|
||||
|
||||
def get_vcpus(guest, vcpus, check_cpu):
|
||||
if vcpus is None:
|
||||
vcpus = ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user