From 13c3a04755d3fa88506b4607c24eea01c0a353fb Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sat, 5 Mar 2011 15:13:31 +0100 Subject: [PATCH] Fix typo 'templete' --- dom0/aux-tools/reset_vm_configs.py | 2 +- dom0/qvm-core/qubes.py | 10 +++++----- dom0/qvm-tools/qvm-backup | 2 +- dom0/qvm-tools/qvm-backup-restore | 16 ++++++++-------- dom0/qvm-tools/qvm-create | 2 +- dom0/qvm-tools/qvm-ls | 10 +++++----- dom0/qvm-tools/qvm-prefs | 4 ++-- dom0/qvm-tools/qvm-remove | 2 +- dom0/qvm-tools/qvm-set-default-template | 2 +- dom0/qvm-tools/qvm-template-commit | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dom0/aux-tools/reset_vm_configs.py b/dom0/aux-tools/reset_vm_configs.py index 6930a1fa..faaf54b3 100755 --- a/dom0/aux-tools/reset_vm_configs.py +++ b/dom0/aux-tools/reset_vm_configs.py @@ -14,7 +14,7 @@ def main(): if tvm is None: print 'Template', templ, 'does not exist' sys.exit(1) - if not tvm.is_templete(): + if not tvm.is_template(): print templ, 'is not a template' sys.exit(1) for vm in qvm_collection.values(): diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 6e6fe16f..3ab0ba83 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -261,7 +261,7 @@ class QubesVm(object): # We can always downgrade a VM to non-updateable... self.updateable = False - def is_templete(self): + def is_template(self): return isinstance(self, QubesTemplateVm) def is_appvm(self): @@ -1150,7 +1150,7 @@ class QubesDisposableVm(QubesVm): qid = kwargs["qid"] assert template_vm is not None, "Missing template_vm for DisposableVM!" - if not template_vm.is_templete(): + if not template_vm.is_template(): print "ERROR: template_qid={0} doesn't point to a valid TempleteVM".\ format(new_vm.template_vm.qid) return False @@ -1196,7 +1196,7 @@ class QubesAppVm(QubesVm): dir_path = kwargs["dir_path"] assert template_vm is not None, "Missing template_vm for AppVM!" - if not template_vm.is_templete(): + if not template_vm.is_template(): print "ERROR: template_qid={0} doesn't point to a valid TempleteVM".\ format(new_vm.template_vm.qid) return False @@ -1593,7 +1593,7 @@ class QubesVmCollection(dict): return vm def set_default_template_vm(self, vm): - assert vm.is_templete(), "VM {0} is not a TempleteVM!".format(vm.name) + assert vm.is_template(), "VM {0} is not a TempleteVM!".format(vm.name) self.default_template_qid = vm.qid def get_default_template_vm(self): @@ -1813,7 +1813,7 @@ class QubesVmCollection(dict): self.default_template_qid - # Then, read in the TemplateVMs, because a reference to templete VM + # Then, read in the TemplateVMs, because a reference to template VM # is needed to create each AppVM for element in tree.findall("QubesTemplateVm"): try: diff --git a/dom0/qvm-tools/qvm-backup b/dom0/qvm-tools/qvm-backup index 664b6050..52975f31 100755 --- a/dom0/qvm-tools/qvm-backup +++ b/dom0/qvm-tools/qvm-backup @@ -135,7 +135,7 @@ def main(): print s - template_vms_worth_backingup = [ vm for vm in vms_list if (vm.is_templete() and not vm.installed_by_rpm)] + template_vms_worth_backingup = [ vm for vm in vms_list if (vm.is_template() and not vm.installed_by_rpm)] if len (template_vms_worth_backingup): for vm in template_vms_worth_backingup: vm_sz = vm.get_disk_utilization() diff --git a/dom0/qvm-tools/qvm-backup-restore b/dom0/qvm-tools/qvm-backup-restore index 6ddaf82c..2c2be89f 100755 --- a/dom0/qvm-tools/qvm-backup-restore +++ b/dom0/qvm-tools/qvm-backup-restore @@ -47,18 +47,18 @@ fields = { "name": {"func": "('=>' if backup_collection.get_default_template_vm() is not None\ and vm.qid == backup_collection.get_default_template_vm().qid else '')\ - + ('[' if vm.is_templete() else '')\ + + ('[' if vm.is_template() else '')\ + ('{' if vm.is_netvm() else '')\ + vm.name \ - + (']' if vm.is_templete() else '')\ + + (']' if vm.is_template() else '')\ + ('}' if vm.is_netvm() else '')"}, - "type": {"func": "'Tpl' if vm.is_templete() else \ + "type": {"func": "'Tpl' if vm.is_template() else \ (' Net' if vm.is_netvm() else 'App')"}, "updbl" : {"func": "'Yes' if vm.is_updateable() else ''"}, - "template": {"func": "'n/a' if vm.is_templete() or vm.is_netvm() else\ + "template": {"func": "'n/a' if vm.is_template() or vm.is_netvm() else\ backup_collection[vm.template_vm.qid].name"}, "netvm": {"func": "'n/a' if vm.is_netvm() else\ @@ -193,11 +193,11 @@ def main(): template_vm_on_host = host_collection.get_vm_by_name (templatevm_name) # No template on the host? - if not ((template_vm_on_host is not None) and template_vm_on_host.is_templete): + if not ((template_vm_on_host is not None) and template_vm_on_host.is_template): # Maybe the (custom) template is in the backup? template_vm_on_backup = backup_collection.get_vm_by_name (templatevm_name) - if not ((template_vm_on_backup is not None) and template_vm_on_backup.is_templete): + if not ((template_vm_on_backup is not None) and template_vm_on_backup.is_template): s += " <-- No matching template on the host or in the backup found!" there_are_missing_templates = True good_to_go = False if not (options.ignore_missing) else True @@ -282,13 +282,13 @@ def main(): if vm.is_updateable(): restore_vm_file (backup_dir, vm.rootcow_img) - elif vm.is_templete(): + elif vm.is_template(): restore_vm_dir (backup_dir, vm.dir_path, qubes_templates_dir); else: print "ERROR: VM '{0}', type='{1}': unsupported VM type!".format(vm.name, vm.type) # Add templates... - for vm in [ vm for vm in vms_to_restore if vm.is_templete()]: + for vm in [ vm for vm in vms_to_restore if vm.is_template()]: print "-> Adding Template VM {0}...".format(vm.name) updateable = vm.updateable vm = host_collection.add_new_templatevm(vm.name, diff --git a/dom0/qvm-tools/qvm-create b/dom0/qvm-tools/qvm-create index 9ff9c6c0..b0f227ab 100755 --- a/dom0/qvm-tools/qvm-create +++ b/dom0/qvm-tools/qvm-create @@ -68,7 +68,7 @@ def main(): if template_vm is None: print "There is no (Templete)VM with the name '{0}'".format(options.template) exit (1) - if not template_vm.is_templete(): + if not template_vm.is_template(): print "VM '{0}' is not a TemplateVM".format(options.template) exit (1) if (options.verbose): diff --git a/dom0/qvm-tools/qvm-ls b/dom0/qvm-tools/qvm-ls index ced8f585..1bb241f0 100755 --- a/dom0/qvm-tools/qvm-ls +++ b/dom0/qvm-tools/qvm-ls @@ -30,21 +30,21 @@ fields = { "name": {"func": "('=>' if qvm_collection.get_default_template_vm() is not None\ and vm.qid == qvm_collection.get_default_template_vm().qid else '')\ - + ('[' if vm.is_templete() else '')\ + + ('[' if vm.is_template() else '')\ + ('<' if vm.is_disposablevm() else '')\ + ('{' if vm.is_netvm() else '')\ + vm.name \ - + (']' if vm.is_templete() else '')\ + + (']' if vm.is_template() else '')\ + ('>' if vm.is_disposablevm() else '')\ + ('}' if vm.is_netvm() else '')"}, - "type": {"func": "'Tpl' if vm.is_templete() else \ + "type": {"func": "'Tpl' if vm.is_template() else \ (' Fw' if vm.is_fwvm() else \ (' Net' if vm.is_netvm() else ''))"}, "updbl" : {"func": "'Yes' if vm.is_updateable() else ''"}, - "template": {"func": "'n/a' if vm.is_templete() or vm.is_netvm() else\ + "template": {"func": "'n/a' if vm.is_template() or vm.is_netvm() else\ qvm_collection[vm.template_vm.qid].name"}, "netvm": {"func": "'n/a' if vm.is_netvm() and not vm.is_fwvm() else\ @@ -142,7 +142,7 @@ def main(): # Now, the template, and all its AppVMs... for tvm in vms_list: - if tvm.is_templete(): + if tvm.is_template(): vms_to_display.append (tvm) for vm in vms_list: if (vm.is_appvm() or vm.is_disposablevm()) and vm.template_vm.qid == tvm.qid: diff --git a/dom0/qvm-tools/qvm-prefs b/dom0/qvm-tools/qvm-prefs index f9c129ff..743de112 100755 --- a/dom0/qvm-tools/qvm-prefs +++ b/dom0/qvm-tools/qvm-prefs @@ -42,7 +42,7 @@ def do_list(vm): print fmt.format ("config", vm.conf_file) if not vm.is_appvm(): print fmt.format ("root img", vm.root_img) - if vm.is_templete(): + if vm.is_template(): print fmt.format ("root COW img", vm.rootcow_img) if vm.is_appvm(): print fmt.format ("root img", vm.template_vm.root_img) @@ -115,7 +115,7 @@ def set_updateable(vms, vm, args): print "If you want to make this AppVM updateable, you must first make the Template VM nonupdateable." return False - if vm.is_templete(): + if vm.is_template(): # Make sure that all the AppVMs are non-updateable... for appvm in vm.appvms.values(): if appvm.is_updateable(): diff --git a/dom0/qvm-tools/qvm-remove b/dom0/qvm-tools/qvm-remove index 06e39af5..50beaf65 100755 --- a/dom0/qvm-tools/qvm-remove +++ b/dom0/qvm-tools/qvm-remove @@ -42,7 +42,7 @@ def main(): print "A VM with the name '{0}' does not exist in the system.".format(vmname) exit(1) - if vm.is_templete(): + if vm.is_template(): dependent_vms = qvm_collection.get_vms_based_on(vm.qid) if len(dependent_vms) > 0: print "The following AppVMs use '{0}' as a template:".format(vmname) diff --git a/dom0/qvm-tools/qvm-set-default-template b/dom0/qvm-tools/qvm-set-default-template index 429d34ad..98003bc0 100755 --- a/dom0/qvm-tools/qvm-set-default-template +++ b/dom0/qvm-tools/qvm-set-default-template @@ -39,7 +39,7 @@ def main(): print "A VM with the name '{0}' does not exist in the system.".format(vmname) exit(1) - if not vm.is_templete(): + if not vm.is_template(): print "VM '{0}' is not a TemplateVM".format(vmname) exit (1) diff --git a/dom0/qvm-tools/qvm-template-commit b/dom0/qvm-tools/qvm-template-commit index 8ccd39fe..a82249d0 100755 --- a/dom0/qvm-tools/qvm-template-commit +++ b/dom0/qvm-tools/qvm-template-commit @@ -46,7 +46,7 @@ def main(): print "A VM with the name '{0}' does not exist in the system.".format(vmname) exit(1) - if not vm.is_templete(): + if not vm.is_template(): print "A VM '{0}' is not template.".format(vmname) exit(1)