#NEWLINE# def _split_sgr_by_ethertype( self , security_group_rules ) : #NEWLINE# #INDENT# ipv4_sg_rules = [ ] #NEWLINE# ipv6_sg_rules = [ ] #NEWLINE# for rule in security_group_rules : #NEWLINE# #INDENT# if ( rule . get ( 'ethertype' ) == constants . IPv4 ) : #NEWLINE# #INDENT# ipv4_sg_rules . append ( rule ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( rule . get ( 'ethertype' ) == constants . IPv6 ) : #NEWLINE# #INDENT# if ( rule . get ( 'protocol' ) == 'icmp' ) : #NEWLINE# #INDENT# rule [ 'protocol' ] = 'ipv6-icmp' #NEWLINE# #UNINDENT# ipv6_sg_rules . append ( self ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ( ipv4_sg_rules , ipv6_sg_rules )