aboutsummaryrefslogtreecommitdiffstats
path: root/src/resource_inventory
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2020-10-22 13:06:39 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2020-10-22 14:45:02 -0400
commit9f426a2ab31b60383e1c73fb2948c06656435ba3 (patch)
treeccb691918d0da26cd8cc17f7f2f6208b5f9f7b62 /src/resource_inventory
parentf7ae02595a6f84ecfa4e5bbac91a0b17f275482a (diff)
Fix quick booking allocation of private vlans for pods
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Change-Id: Ie515da2c28fcbc51d8fa87e24a3ff64c234d1bee Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/resource_inventory')
-rw-r--r--src/resource_inventory/resource_manager.py7
1 files changed, 4 insertions, 3 deletions
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):