New <range-in> spec DSL operator feature request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.utils |
Fix Released
|
Wishlist
|
Adam Rozman |
Bug Description
I would like to propose the addition of an "range-in" operator to grammar used in the "specs_matcher" module of the "oslo_utils" library. The "range_in" operator would test whether the "value string" fits in a inclusive numeric range or not.
The "range_in" operator would compare a single numeric floating point value (x) against 2 other floating point value such as the first floating point value (y) would be an inclusive lower limit of the range while the other value (z) would be the inclusive upper limit of the range. In other words x would be matched successfully against the range if y >= x <= z is true.
An example for the use of the "range-in" operator could be the situation when the user has to specify a range of acceptable disk sizes e.g.
"range-in 500 2000" that would mean that the acceptable disk size for example for a root disk is between 500 GiB and 2000 GiB.
In case such a need would arise, "range-ex" could be added to give the option of a range with exclusive limits such as y > x < z and the naming scheme would stay consistent even in this situation.
EDIT:
Clarifying grammar.
Changed in oslo.utils: | |
assignee: | nobody → Adam Rozman (rozzix) |
status: | New → In Progress |
Changed in oslo.utils: | |
importance: | Undecided → Wishlist |
description: | updated |
Fix proposed to branch: master /review. opendev. org/c/openstack /oslo.utils/ +/908289
Review: https:/