Get real number of slots for VM

Before it was theoretical, now it's real (a response from a query the VM, not the hypervisor settings)

Related to saltstack/salt#27089 Saltcloud virtualbox provider
This commit is contained in:
LoveIsGrief 2016-01-10 20:40:58 +01:00
parent 64411a2986
commit 6fb7161aaa

View File

@ -197,7 +197,7 @@ def vb_get_network_addresses(machine_name=None, machine=None):
if machine_name:
machine = vb_get_box().findMachine(machine_name)
total_slots = vb_get_max_network_slots()
total_slots = int(machine.getGuestPropertyValue("/VirtualBox/GuestInfo/Net/Count"))
ip_addresses = []
for i in range(total_slots):
try: