From 9f426a2ab31b60383e1c73fb2948c06656435ba3 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Thu, 22 Oct 2020 13:06:39 -0400 Subject: Fix quick booking allocation of private vlans for pods Signed-off-by: Sawyer Bergeron Change-Id: Ie515da2c28fcbc51d8fa87e24a3ff64c234d1bee Signed-off-by: Sawyer Bergeron --- src/resource_inventory/resource_manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/resource_inventory') diff --git a/src/resource_inventory/resource_manager.py b/src/resource_inventory/resource_manager.py index 81f4747..140cc09 100644 --- a/src/resource_inventory/resource_manager.py +++ b/src/resource_inventory/resource_manager.py @@ -77,9 +77,10 @@ class ResourceManager: vlan_manager.reserve_public_vlan(public_net.vlan) networks[network.name] = public_net.vlan else: - vlan = vlan_manager.get_vlan() - vlan_manager.reserve_vlans(vlan) - networks[network.name] = vlan + # already throws if can't get requested count, so can always index in @ 0 + vlans = vlan_manager.get_vlans(count=1) + vlan_manager.reserve_vlans(vlans[0]) + networks[network.name] = vlans[0] return networks def instantiateTemplate(self, resource_template): -- cgit 1.2.3-korg