← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1431367] [NEW] Inefficient validation functions

 

Public bug reported:

In the functions validate_port_range and validate_ip_protocol are very
inefficient. For the a valid value, the function does a comparison of
the entire range in a list of possible valid integers.

x in range(-1, 65536)  should be replaced with -1 <= x  < 65536

** Affects: horizon
     Importance: Undecided
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1431367

Title:
  Inefficient validation functions

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  In the functions validate_port_range and validate_ip_protocol are very
  inefficient. For the a valid value, the function does a comparison of
  the entire range in a list of possible valid integers.

  x in range(-1, 65536)  should be replaced with -1 <= x  < 65536

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1431367/+subscriptions


Follow ups

References