def define_vol_xml_str(xml):
 poolname = __salt__['config.get']('libvirt:storagepool', 'default')
 conn = __get_conn()
 pool = conn.storagePoolLookupByName(str(poolname))
 return (pool.createXML(xml, 0) is not None)

def define_vol_xml_str ( xml ) : poolname = __salt__ [ 'config.get' ] ( 'libvirt:storagepool' , 'default' ) conn = __get_conn ( ) pool = conn . storagePoolLookupByName ( str ( poolname ) ) return ( pool . createXML ( xml , 0 ) is not None )
define a volume based on the xml passed to the function cli example: .