Add value restriction on string config options
Bug #1123043 reported by
Ionuț Arțăriși
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Wishlist
|
Davanum Srinivas (DIMS) |
Bug Description
It would be great to have a way to restrict the values that a config option can take and have the option parser raise a descriptive error when this happens.
This could just be an extra argument to cfg.StrOpt (e.g. cfg.StrOpt(
To post a comment you must log in.
Yeah, something like argparse's choices would be nice http:// docs.python. org/dev/ library/ argparse. html#choices