aboutsummaryrefslogtreecommitdiffstats
path: root/src/dashboard
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2020-10-22 19:00:45 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-10-22 19:00:45 +0000
commit204076852d5518ae515d79c362d5e4beea17d8e4 (patch)
treebfad74f1ce2d9b7ad7eda231d79582bebb5a588e /src/dashboard
parentc9c18a40b54af4a2fa501e55d0d5147d14a0a62d (diff)
parent9f426a2ab31b60383e1c73fb2948c06656435ba3 (diff)
Merge "Fix quick booking allocation of private vlans for pods"2.0.99
Diffstat (limited to 'src/dashboard')
-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