Comment 11 for bug 1475717

Revision history for this message
Li Ma (nick-ma-z) wrote :

In the current implementation, all the protocol parameters are defined as individual constant in the codebase:

https://github.com/openstack/neutron/blob/master/neutron/common/constants.py#L119

and only tcp/udp/icmp/icmp6 are respected.

When we map all the necessary protocols, I don't suggest to follow the original implementation by defining lots of individual constants. Instead, a map is given to hold all these constants as follows:

PROTOCOL_MAP = {
    'tcp': 6, 'udp': 17, 'icmp': 1, 'icmpv6': 58, ...
}

Any comments on this refactor? Do I need to propose a blueprint to discuss with it?