From 3c61a3ac0386e12220f753e6bef7251412c237da Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 1 Nov 2023 12:02:34 -0400 Subject: [PATCH] Remove duplicate confirmation for VM restart Having both restart_opt and confirm_opt resulted in a duplicate confirmation message, at least if neither --restart/--no-restart is specified. This is not necessary as the confirmation is already given by the restart_opt or the relevant --restart/--no-restart flag. --- client-cli/pvc/cli/cli.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index 2538de5c..2d3c26a0 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -1917,7 +1917,6 @@ def cli_vm_vcpu_get(domain, format_function): help="Use an alternative topology for the vCPUs in the CSV form ,,. SxCxT must equal VCPUS.", ) @restart_opt -@confirm_opt("Restart virtual machine {domain}") def cli_vm_vcpu_set(domain, vcpus, topology, restart_flag): """ Set the vCPU count of the virtual machine DOMAIN to VCPUS. @@ -1991,7 +1990,6 @@ def cli_vm_memory_get(domain, format_function): @click.argument("domain") @click.argument("memory") @restart_opt -@confirm_opt("Restart virtual machine {domain}") def cli_vm_memory_set(domain, memory, restart_flag): """ Set the provisioned memory of the virtual machine DOMAIN to MEMORY; MEMORY must be an integer in MB. @@ -2087,7 +2085,6 @@ def cli_vm_network_get(domain, format_function): help="Immediately live-attach device to VM [default] or disable this behaviour.", ) @restart_opt -@confirm_opt("Restart virtual machine {domain}") def cli_vm_network_add( domain, net, @@ -2158,7 +2155,6 @@ def cli_vm_network_add( help="Immediately live-detach device to VM [default] or disable this behaviour.", ) @restart_opt -@confirm_opt("Restart virtual machine {domain}") def cli_vm_network_remove(domain, net, macaddr, sriov_flag, live_flag, restart_flag): """ Remove the network NET from the virtual machine DOMAIN. @@ -2259,7 +2255,6 @@ def cli_vm_volume_get(domain, format_function): help="Immediately live-attach device to VM [default] or disable this behaviour.", ) @restart_opt -@confirm_opt("Restart virtual machine {domain}") def cli_vm_volume_add(domain, volume, disk_id, bus, disk_type, live_flag, restart_flag): """ Add the volume VOLUME to the virtual machine DOMAIN. @@ -2291,7 +2286,6 @@ def cli_vm_volume_add(domain, volume, disk_id, bus, disk_type, live_flag, restar help="Immediately live-detach device to VM [default] or disable this behaviour.", ) @restart_opt -@confirm_opt("Restart virtual machine {domain}") def cli_vm_volume_remove(domain, volume, live_flag, restart_flag): """ Remove VOLUME from the virtual machine DOMAIN; VOLUME must be a file path or RBD path in 'pool/volume' format.