Skip to content

Commit 50c5fa3

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Delete require_instance_exists_using_uuid"
2 parents 929cd32 + 083eb4b commit 50c5fa3

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

nova/db/sqlalchemy/api.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -172,20 +172,6 @@ def wrapper(*args, **kwargs):
172172
return wrapper
173173

174174

175-
def require_instance_exists_using_uuid(f):
176-
"""Decorator to require the specified instance to exist.
177-
178-
Requires the wrapped function to use context and instance_uuid as
179-
their first two arguments.
180-
"""
181-
@functools.wraps(f)
182-
def wrapper(context, instance_uuid, *args, **kwargs):
183-
instance_get_by_uuid(context, instance_uuid)
184-
return f(context, instance_uuid, *args, **kwargs)
185-
186-
return wrapper
187-
188-
189175
def select_db_reader_mode(f):
190176
"""Decorator to select synchronous or asynchronous reader mode.
191177
@@ -1578,7 +1564,6 @@ def virtual_interface_get_by_uuid(context, vif_uuid):
15781564

15791565

15801566
@require_context
1581-
@require_instance_exists_using_uuid
15821567
@pick_context_manager_reader_allow_async
15831568
def virtual_interface_get_by_instance(context, instance_uuid):
15841569
"""Gets all virtual interfaces for instance.

0 commit comments

Comments
 (0)