aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard/testing_utils.py
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/dashboard/testing_utils.py
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/dashboard/testing_utils.py')
-rw-r--r--src/dashboard/testing_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dashboard/testing_utils.py b/src/dashboard/testing_utils.py
index d7a346e..5be6379 100644
--- a/src/dashboard/testing_utils.py
+++ b/src/dashboard/testing_utils.py
@@ -96,11 +96,11 @@ def make_network(name, lab, grb, public):
lab.vlan_manager.reserve_public_vlan(public_net.vlan)
network.vlan_id = public_net.vlan
else:
- private_net = lab.vlan_manager.get_vlan()
- if not private_net:
+ private_nets = lab.vlan_manager.get_vlans(count=1)
+ if not private_nets:
raise Exception("No more generic vlans are available")
- lab.vlan_manager.reserve_vlans([private_net])
- network.vlan_id = private_net
+ lab.vlan_manager.reserve_vlans(private_nets)
+ network.vlan_id = private_nets[0]
network.save()
return network