aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/db.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/db/db.py b/db/db.py
index 0b50420..b50bf48 100644
--- a/db/db.py
+++ b/db/db.py
@@ -540,31 +540,6 @@ class VlanDB:
raise
return port_id
- # Return a port back to its base VLAN
- #
- # Constraints:
- # 1. The port must already exist
- # 2. The port must not be a trunk port
- # 3. The port must not be locked
- def restore_base_vlan(self, port_id):
- port = self.get_port_by_id(port_id)
- if port is None:
- raise InputError("Port ID %d does not exist" % int(port_id))
-
- if port.is_trunk or port.is_locked:
- raise CriticalError("The port is locked")
-
- try:
- sql = "UPDATE port SET current_vlan_id=base_vlan_id WHERE port_id=%s RETURNING port_id"
- data = (port_id,)
- self.cursor.execute(sql, data)
- port_id = self.cursor.fetchone()[0]
- self.connection.commit()
- except:
- self.connection.rollback()
- raise
- return port_id
-
# Trivial helper function to return all the rows in a given table
def _dump_table(self, table):
result = []