Filter out 'dom0' from selectable netvm list

This is workaround until #757 will be done.
This commit is contained in:
Marek Marczykowski-Górecki 2014-06-07 04:05:03 +02:00
parent ba0cced495
commit aca43a46da
2 changed files with 3 additions and 1 deletions

View File

@ -108,6 +108,8 @@ class NewVmDlg (QDialog, Ui_NewVMDlg):
def filter_netvm(vm): def filter_netvm(vm):
if vm.internal: if vm.internal:
return False return False
if vm.qid == 0:
return False
if vm.is_netvm(): if vm.is_netvm():
return True return True
if vm.is_proxyvm(): if vm.is_proxyvm():

View File

@ -254,7 +254,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
if (not self.vm.is_netvm() or self.vm.is_proxyvm()): if (not self.vm.is_netvm() or self.vm.is_proxyvm()):
netvm_list = [vm for vm in self.qvm_collection.values() if not vm.internal and vm.is_netvm()] netvm_list = [vm for vm in self.qvm_collection.values() if not vm.internal and vm.is_netvm() and vm.qid != 0]
self.netvm_idx = -1 self.netvm_idx = -1
text = "default ("+self.qvm_collection.get_default_netvm().name+")" text = "default ("+self.qvm_collection.get_default_netvm().name+")"