#NEWLINE# @ property #NEWLINE# def supported_qos_rule_types( self ) : #NEWLINE# #INDENT# if ( not self . ordered_mech_drivers ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# rule_types = set ( qos_consts . VALID_RULE_TYPES ) #NEWLINE# binding_driver_found = False #NEWLINE# for driver in self . ordered_mech_drivers : #NEWLINE# #INDENT# driver_obj = driver . obj #NEWLINE# if driver_obj . _supports_port_binding : #NEWLINE# #INDENT# binding_driver_found = True #NEWLINE# if hasattr ( driver_obj , 'supported_qos_rule_types' ) : #NEWLINE# #INDENT# new_rule_types = ( rule_types & set ( driver_obj . supported_qos_rule_types ) ) #NEWLINE# dropped_rule_types = ( new_rule_types - rule_types ) #NEWLINE# if dropped_rule_types : #NEWLINE# #INDENT# LOG . info ( _LI ( '%(rule_types)s rule types disabled for ml2 because %(driver)s does not support them' ) , { #NEWLINE# #INDENT# 'rule_types' : ', ' . join ( dropped_rule_types ) , #NEWLINE# 'driver' : driver . name , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# rule_types = new_rule_types #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . warning ( _LW ( '%s does not support QoS; no rule types available' ) , driver . name ) #NEWLINE# return [ ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if binding_driver_found : #NEWLINE# #INDENT# rule_types = list ( rule_types ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# rule_types = [ ] #NEWLINE# #UNINDENT# LOG . debug ( 'Supported QoS rule types (common subset for all mech drivers): %s' , rule_types ) #NEWLINE# return rule_types