#NEWLINE# def run( self , **kwargs ) : #NEWLINE# #INDENT# faulty_hosts = [ ] #NEWLINE# for cloud in [ self . src_cloud , self . dst_cloud ] : #NEWLINE# #INDENT# nova_compute = cloud . resources [ utils . COMPUTE_RESOURCE ] #NEWLINE# hosts = nova_compute . get_compute_hosts ( ) #NEWLINE# for host in hosts : #NEWLINE# #INDENT# runner = remote_runner . RemoteRunner ( host , cloud . cloud_config . cloud . ssh_user ) #NEWLINE# qemu_version_cmd = "kvm -version | sed -E 's/QEMU emulator version ([0-9]\\.[0-9]\\.?[0-9]?).*/\\1/'" #NEWLINE# version = runner . run ( qemu_version_cmd ) #NEWLINE# if ( self . REQUIRED_QEMU_VERSION not in version ) : #NEWLINE# #INDENT# faulty_hosts . append ( host ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if faulty_hosts : #NEWLINE# #INDENT# msg = 'qemu must be upgraded to v{required} on following hosts: {hosts}' . format ( required = self . REQUIRED_QEMU_VERSION , hosts = faulty_hosts ) #NEWLINE# LOG . error ( msg ) #NEWLINE# raise RuntimeError ( msg )