From 1ae34c19608c0c8be890871d40756b867b68ae92 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 22 Jun 2021 04:31:02 -0400 Subject: [PATCH] Fix bad messages in volume remove --- client-cli/cli_lib/vm.py | 2 +- client-cli/pvc.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client-cli/cli_lib/vm.py b/client-cli/cli_lib/vm.py index 41406895..d06e4821 100644 --- a/client-cli/cli_lib/vm.py +++ b/client-cli/cli_lib/vm.py @@ -912,7 +912,7 @@ def vm_volumes_remove(config, vm, volume, restart): xml = domain_information.get('xml', None) if xml is None: - return False, "VM does not have a valid XML doccument." + return False, "VM does not have a valid XML document." try: parsed_xml = fromstring(xml) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index 966ccb45..cd573666 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -1506,7 +1506,7 @@ def vm_volume_add(domain, volume, disk_id, bus, disk_type, restart, confirm_flag 'domain' ) @click.argument( - 'vni' + 'volume' ) @click.option( '-r', '--restart', 'restart', is_flag=True, default=False, @@ -1518,9 +1518,9 @@ def vm_volume_add(domain, volume, disk_id, bus, disk_type, restart, confirm_flag help='Confirm the restart' ) @cluster_req -def vm_volume_remove(domain, vni, restart, confirm_flag): +def vm_volume_remove(domain, volume, restart, confirm_flag): """ - Remove the volume VNI to the virtual machine DOMAIN. + Remove VOLUME from the virtual machine DOMAIN; VOLUME must be a file path or RBD path in 'pool/volume' format. """ if restart and not confirm_flag and not config['unsafe']: try: @@ -1528,7 +1528,7 @@ def vm_volume_remove(domain, vni, restart, confirm_flag): except Exception: restart = False - retcode, retmsg = pvc_vm.vm_volumes_remove(config, domain, vni, restart) + retcode, retmsg = pvc_vm.vm_volumes_remove(config, domain, volume, restart) if retcode and not restart: retmsg = retmsg + " Changes will be applied on next VM start/restart." cleanup(retcode, retmsg)