#NEWLINE# def _filters_for_instance( self , chain_name , network_info ) : #NEWLINE# #INDENT# ips_v4 = [ ip [ 'ip' ] for ( _n , mapping ) in network_info for ip in mapping [ 'ips' ] ] #NEWLINE# ipv4_rules = self . _create_filter ( ips_v4 , network_info ) #NEWLINE# ipv6_rules = [ ] #NEWLINE# if FLAGS . use_ipv6 : #NEWLINE# #INDENT# ips_v6 = [ ip [ 'ip' ] for ( _n , mapping ) in network_info for ip in mapping [ 'ip6s' ] ] #NEWLINE# ipv6_rules = self . _create_filter ( ips_v6 , chain_name ) #NEWLINE# #UNINDENT# return ( ipv4_rules , ipv6_rules )