diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-02-05 17:52:10 +0000 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-02-17 19:24:00 +0000 |
commit | 257014bb74a19274b66aeda9b66c7fe7ee0c679d (patch) | |
tree | 0d8154a9bf4a900f75fa48494cfb091376f36056 /ansible/roles/docker/tasks | |
parent | 5ea891398c0f7404d568bbe813100b2488d677ed (diff) |
Fix error in address input format in "_ip_range_action_partial"
IP address format introduced in [1] should be unicode instead of string.
"ipaddress.IPv4Address(min_value)" doesn't parse correctly the input
parameter unless the parameter is in unicode format; this is valid both
for Python version 2 and 3.
Execution error if the parameter is a string:
>>> int(ipaddress.IPv4Address('10.0.3.2'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/ipaddress.py",
line 1391, in __init__
self._check_packed_address(address, 4)
File "/usr/local/lib/python2.7/dist-packages/ipaddress.py",
line 554, in _check_packed_address
expected_len, self._version))
ipaddress.AddressValueError: '10.0.3.2' (len 8 != 4) is not permitted
as an IPv4 address. Did you pass in a bytes (str in Python 2) instead
of a unic
[1]https://github.com/opnfv/yardstick/blob/e5775e7efbc55f116b4d4ac11ff87b8d8553247e/yardstick/network_services/traffic_profile/traffic_profile.py#L87-L88
JIRA: YARDSTICK-996
Change-Id: Ic727a79044834b181c99789f0f5efc21c68f0ff2
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'ansible/roles/docker/tasks')
0 files changed, 0 insertions, 0 deletions