aboutsummaryrefslogtreecommitdiffstats
path: root/src/account
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/account
parentc9c18a40b54af4a2fa501e55d0d5147d14a0a62d (diff)
parent9f426a2ab31b60383e1c73fb2948c06656435ba3 (diff)
Merge "Fix quick booking allocation of private vlans for pods"2.0.99
Diffstat (limited to 'src/account')
-rw-r--r--src/account/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/account/models.py b/src/account/models.py
index 2d0293f..40de4d8 100644
--- a/src/account/models.py
+++ b/src/account/models.py
@@ -80,12 +80,12 @@ class VlanManager(models.Model):
# if they use QinQ or a vxlan overlay, for example
allow_overlapping = models.BooleanField()
- def get_vlan(self, count=1):
+ def get_vlans(self, count=1):
"""
- Return the ID of available vlans, but does not reserve them.
+ Return the IDs of available vlans as a list[int], but does not reserve them.
Will throw index exception if not enough vlans are available.
- If count == 1, the return value is an int. Otherwise, it is a list of ints.
+ Always returns a list of ints
"""
allocated = []
vlans = json.loads(self.vlans)