Skip to content

Commit

Permalink
ost_utils: vmconsole - use ip_interface for better readability
Browse files Browse the repository at this point in the history
Change-Id: I20678e6eb9dfa30e09711f305ebf3b92b11f7302

Signed-off-by: Eitan Raviv <eraviv@redhat.com>
  • Loading branch information
erav committed May 29, 2022
1 parent ccc82fe commit 1dcbe6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ost_utils/vmconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _logout(self):

def add_static_ip(self, vm_id, ip, iface):
ips = self.shell(vm_id, (Shell.ip_address_add(ip, iface), Shell.get_ips(iface)))
ip_version = ipaddress.ip_address(ip.split('/')[0]).version
ip_version = ipaddress.ip_interface(ip).version
return Shell.next_ip(ips.splitlines(), ip_version)

def get_ip(self, vm_id, iface, ip_version):
Expand Down

0 comments on commit 1dcbe6a

Please sign in to comment.