sysinv is_valid_domain_or_ip function rejects IP ending in single digit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Yuxing |
Bug Description
Brief Description
-----------------
The is_valid_
>>> from sysinv.common.utils import is_valid_
>>> is_valid_
False
>>> is_valid_
True
>>> is_valid_
False
>>>
>>> from sysinv.common.utils import is_valid_domain
>>> is_valid_
False
>>> is_valid_
True
>>> is_valid_
True
>>> is_valid_
True
>>> is_valid_
True
>>> is_valid_
False
>>>
As a result, using something like "url: 10.10.10.
The rejection stems from the regex used in the is_valid_domain function:
https:/
Severity
--------
Minor - workaround is available (specify 10.10.10.1:5000 instead)
Expected Behavior
------------------
is_valid_
Actual Behavior
----------------
Returns False
Reproducibility
---------------
Reproducible
Branch/Pull Time/Commit
-------
master, as of Oct 7, 2020
Workaround
----------
Specify port, ie. 10.10.10.1:5000 to fall through to the IP/port check of the function.
stx.5.0 / medium priority - would be nice to fix to avoid the workaround