diff options
author | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-02-13 03:04:40 +0000 |
---|---|---|
committer | Steve McIntyre <steve.mcintyre@linaro.org> | 2015-02-13 03:04:40 +0000 |
commit | 2811409f1d067080c0a6f3b4d3161b7b3f63390d (patch) | |
tree | be267903314bf0224587634649c3b2104a760cc0 /util.py | |
parent | e7062098029b35c52293254f8514a35762a3d280 (diff) |
Check for locking on set_port_mode
Change-Id: I643aaf5f67ea0c85371d686cc8f703a5773efc7f
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -431,6 +431,8 @@ class VlanUtil: port = db.get_port_by_id(port_id) if port is None: raise InputError("Port ID %d does not exist" % port_id) + if port.is_locked: + raise InputError("Port ID %d is locked" % port_id) if mode == 'trunk' and port.is_trunk: raise InputError("Port ID %d is already in trunk mode") if mode == 'access' and not port.is_trunk: |