#NEWLINE# def instance_filter_exists( self , instance , network_info ) : #NEWLINE# #INDENT# 'Check nova-instance-instance-xxx exists' #NEWLINE# for ( network , mapping ) in network_info : #NEWLINE# #INDENT# nic_id = mapping [ 'mac' ] . replace ( ':' , '' ) #NEWLINE# instance_filter_name = self . _instance_filter_name ( instance , nic_id ) #NEWLINE# try : #NEWLINE# #INDENT# self . _conn . nwfilterLookupByName ( instance_filter_name ) #NEWLINE# #UNINDENT# except libvirt . libvirtError : #NEWLINE# #INDENT# name = instance . name #NEWLINE# LOG . debug ( ( _ ( 'The nwfilter(%(instance_filter_name)s) for%(name)s is not found.' ) % locals ( ) ) ) #NEWLINE# return False #NEWLINE# #UNINDENT# #UNINDENT# return True