#NEWLINE# def _clean_updated_sg_member_conntrack_entries( self ) : #NEWLINE# #INDENT# updated_device_ids = set ( ) #NEWLINE# for device in self . updated_sg_members : #NEWLINE# #INDENT# sec_group_change = False #NEWLINE# device_info = self . filtered_ports . get ( device ) #NEWLINE# pre_device_info = self . _pre_defer_filtered_ports . get ( device ) #NEWLINE# if ( ( not pre_device_info ) or ( not pre_device_info ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for sg_id in pre_device_info . get ( 'security_groups' , [ ] ) : #NEWLINE# #INDENT# if ( sg_id not in device_info . get ( 'security_groups' , [ ] ) ) : #NEWLINE# #INDENT# sec_group_change = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( not sec_group_change ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# for ethertype in [ constants . IPv4 , constants . IPv6 ] : #NEWLINE# #INDENT# self . ipconntrack . delete_conntrack_state_by_remote_ips ( [ device_info ] , ethertype , set ( ) ) #NEWLINE# #UNINDENT# updated_device_ids . add ( device ) #NEWLINE# #UNINDENT# for id in updated_device_ids : #NEWLINE# #INDENT# self . updated_sg_members . remove ( id )