diff --git a/manila/share/drivers/infinidat/infinibox.py b/manila/share/drivers/infinidat/infinibox.py index 6f8aa475d4..2014b26873 100644 --- a/manila/share/drivers/infinidat/infinibox.py +++ b/manila/share/drivers/infinidat/infinibox.py @@ -330,7 +330,7 @@ class InfiniboxShareDriver(driver.ShareDriver): # try treating the ip_address parameter as a range of IP addresses: ip_network = ipaddress.ip_network(ip_address, strict=False) ip_network_hosts = list(ip_network.hosts()) - if len(ip_network_hosts) == 0: # /32, single IP address + if len(ip_network_hosts) < 2: # /32, single IP address return ip_address.split('/')[0] return "{}-{}".format(ip_network_hosts[0], ip_network_hosts[-1]) diff --git a/releasenotes/notes/bug-1934345-fix-ipaddress-hosts-invocation-80d419d7e62a5f51.yaml b/releasenotes/notes/bug-1934345-fix-ipaddress-hosts-invocation-80d419d7e62a5f51.yaml new file mode 100644 index 0000000000..381807ad8f --- /dev/null +++ b/releasenotes/notes/bug-1934345-fix-ipaddress-hosts-invocation-80d419d7e62a5f51.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + The Infinidat driver's been fixed to process single IP Addresses (/32) + correctly. See `bug 1934345 `_ for + more details.