#NEWLINE# def _are_security_groups_equal( self , backend_security_group , nc_security_group ) : #NEWLINE# #INDENT# if ( backend_security_group . name != nc_security_group . name ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( len ( backend_security_group . rules ) != nc_security_group . rules . count ( ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# for ( backend_rule , nc_rule ) in zip ( backend_security_group . rules , nc_security_group . rules . all ( ) ) : #NEWLINE# #INDENT# if ( not self . _are_rules_equal ( backend_rule , nc_rule ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True