def _get_image_info(hypervisor, name, **kwargs):
 ret = {}
 if (hypervisor in ['esxi', 'vmware']):
  ret['disktype'] = 'vmdk'
  ret['filename'] = '{0}{1}'.format(name, '.vmdk')
  ret['pool'] = '[{0}] '.format(kwargs.get('pool', '0'))
 elif (hypervisor in ['kvm', 'qemu']):
  ret['disktype'] = 'qcow2'
  ret['filename'] = '{0}{1}'.format(name, '.qcow2')
  ret['pool'] = __salt__['config.option']('virt.images')
 return ret

def _get_image_info ( hypervisor , name , ** kwargs ) : ret = { } if ( hypervisor in [ 'esxi' , 'vmware' ] ) : ret [ 'disktype' ] = 'vmdk' ret [ 'filename' ] = '{0}{1}' . format ( name , '.vmdk' ) ret [ 'pool' ] = '[{0}] ' . format ( kwargs . get ( 'pool' , '0' ) ) elif ( hypervisor in [ 'kvm' , 'qemu' ] ) : ret [ 'disktype' ] = 'qcow2' ret [ 'filename' ] = '{0}{1}' . format ( name , '.qcow2' ) ret [ 'pool' ] = __salt__ [ 'config.option' ] ( 'virt.images' ) return ret
determine disk image info .