<s> from oslo_versionedobjects import base as obj_base <EOL> from oslo_versionedobjects import fields as obj_fields <EOL> from neutron import manager <EOL> from neutron . objects import base <EOL> from neutron . services . qos import qos_consts <EOL> class RuleTypeField ( obj_fields . BaseEnumField ) : <EOL> def __init__ ( self , ** kwargs ) : <EOL> self . AUTO_TYPE = obj_fields . Enum ( <EOL> valid_values = qos_consts . VALID_RULE_TYPES ) <EOL> super ( RuleTypeField , self ) . __init__ ( ** kwargs ) <EOL> @ obj_base . VersionedObjectRegistry . register <EOL> class QosRuleType ( base . NeutronObject ) : <EOL> VERSION = '<STR_LIT>' <EOL> fields = { <EOL> '<STR_LIT:type>' : RuleTypeField ( ) , <EOL> } <EOL> @ classmethod <EOL> def get_objects ( cls , ** kwargs ) : <EOL> cls . validate_filters ( ** kwargs ) <EOL> core_plugin = manager . NeutronManager . get_plugin ( ) <EOL> return [ cls ( type = type_ ) <EOL> for type_ in core_plugin . supported_qos_rule_types ] </s>
