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/account/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/account/models.py') 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) -- cgit 1.2.3-korg