Rename a variable: ipv6s -> ipv6_list
This commit is contained in:
parent
68a65b7bc7
commit
52e53d479e
1 changed files with 6 additions and 6 deletions
|
@ -252,9 +252,9 @@ class OpenNebulaManager():
|
||||||
|
|
||||||
:return: An IP address string, if it exists else returns None
|
:return: An IP address string, if it exists else returns None
|
||||||
"""
|
"""
|
||||||
all_ipv6s = self.get_vm_ipv6_addresses(vm_id)
|
ipv6_list = self.get_vm_ipv6_addresses(vm_id)
|
||||||
if len(all_ipv6s) > 0:
|
if len(ipv6_list) > 0:
|
||||||
return all_ipv6s[0]
|
return ipv6_list[0]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -265,12 +265,12 @@ class OpenNebulaManager():
|
||||||
:param vm_id: The ID of the vm
|
:param vm_id: The ID of the vm
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
ipv6s = []
|
ipv6_list = []
|
||||||
vm = self.get_vm(vm_id)
|
vm = self.get_vm(vm_id)
|
||||||
for nic in vm.template.nics:
|
for nic in vm.template.nics:
|
||||||
if hasattr(nic, 'ip6_global'):
|
if hasattr(nic, 'ip6_global'):
|
||||||
ipv6s.append(nic.ip6_global)
|
ipv6_list.append(nic.ip6_global)
|
||||||
return ipv6s
|
return ipv6_list
|
||||||
|
|
||||||
def get_primary_ipv4(self, vm_id):
|
def get_primary_ipv4(self, vm_id):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue