mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +00:00 
			
		
		
		
	Fixed Checking KVM
This commit is contained in:
		
							parent
							
								
									eac356b50a
								
							
						
					
					
						commit
						e6f0116908
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -1,12 +1,11 @@
 | 
				
			||||||
import re
 | 
					 | 
				
			||||||
import random
 | 
					import random
 | 
				
			||||||
import libxml2
 | 
					import libxml2
 | 
				
			||||||
import libvirt
 | 
					import libvirt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def is_kvm_available(xml):
 | 
					def is_kvm_available(xml):
 | 
				
			||||||
    capabilites = re.search('kvm', xml)
 | 
					    kvm_domains = get_xml_path(xml, "//domain/@type='kvm'")
 | 
				
			||||||
    if capabilites:
 | 
					    if kvm_domains > 0:
 | 
				
			||||||
        return True
 | 
					        return True
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue