diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2014-12-21 23:31:12 +0000 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2014-12-21 23:31:12 +0000 |
commit | b9b0aa522e549c518e5a1ef3f302b2a8e3681be8 (patch) | |
tree | 986203342d6d4bb93a1d00dc2c14ee67ee8b076f | |
parent | feb6452857669cd2ef85bfcdd4cf6576a7f464e5 (diff) | |
download | vland-b9b0aa522e549c518e5a1ef3f302b2a8e3681be8.tar.gz |
Add get_vlan_tag_by_id()
Change-Id: I314f7fcdbf19b7f4fdcc5466236a3e8305291a2a
-rw-r--r-- | db/db.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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): |