aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/db.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/db.py b/db/db.py
index e1a0126..0b50420 100644
--- a/db/db.py
+++ b/db/db.py
@@ -407,6 +407,13 @@ class VlanDB:
def get_vlan_name_by_id(self, vlan_id):
return self._get_element("vlan_name", "vlan", "vlan_id", vlan_id)
+ # Simple lookup: look up a VLAN by ID, and return the tag of that
+ # VLAN.
+ #
+ # Returns None on failure.
+ def get_vlan_tag_by_id(self, vlan_id):
+ return self._get_element("tag", "vlan", "vlan_id", vlan_id)
+
# Grab one row of a query on one column; useful as a quick wrapper
def _get_row(self, table, field, value):