def _validate_ethertype_and_protocol(self, rule):
        if rule['protocol'] in [constants.PROTO_NAME_IPV6_ENCAP,
                                constants.PROTO_NAME_IPV6_FRAG,
                                constants.PROTO_NAME_IPV6_ICMP,
                                n_const.PROTO_NAME_IPV6_ICMP_LEGACY,
                                constants.PROTO_NAME_IPV6_NONXT,
                                constants.PROTO_NAME_IPV6_OPTS,
                                constants.PROTO_NAME_IPV6_ROUTE]:
            if rule['ethertype'] == constants.IPv4:
                raise ext_sg.SecurityGroupEthertypeConflictWithProtocol(
                        ethertype=rule['ethertype'], protocol=rule['protocol'])
If applicable, returns a L{_IRequestEncoder} instance which will encode
dataset/ETHPy150Open openstack/neutron/neutron/db/securitygroups_db.py/SecurityGroupDbMixin._validate_ethertype_and_protocol--crossover with--dataset/ETHPy150Open scrapy/scrapy/scrapy/xlib/tx/iweb.py/_IRequestEncoderFactory.encoderForRequest