From 566658a6d4875e40658c0feec768879489df483e Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Mon, 5 Jan 2015 07:59:33 -0700 Subject: [PATCH] Remove usage of BayLocked The API had an exception that is not being used (BayLocked) being executed. The API calling the exception is not used by the codebase. Change-Id: Ib4c6ea7f3a7bf82a136e4234c7d618444413b46d --- magnum/db/sqlalchemy/api.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/magnum/db/sqlalchemy/api.py b/magnum/db/sqlalchemy/api.py index fa0ff1c147..940e5bb6f1 100644 --- a/magnum/db/sqlalchemy/api.py +++ b/magnum/db/sqlalchemy/api.py @@ -91,17 +91,6 @@ def add_identity_filter(query, value): raise exception.InvalidIdentity(identity=value) -def _check_port_change_forbidden(port, session): - bay_id = port['bay_id'] - if bay_id is not None: - query = model_query(models.Bay, session=session) - query = query.filter_by(id=bay_id) - bay_ref = query.one() - if bay_ref['reservation'] is not None: - raise exception.BayLocked(bay=bay_ref['uuid'], - host=bay_ref['reservation']) - - def _paginate_query(model, limit=None, marker=None, sort_key=None, sort_dir=None, query=None): if not query: