You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This decorator is extremely old, virtual_interface_get_by_instance
started using it in 0d9d248 (Folsom).
virtual_interface_get_by_instance is the only thing still using it
and doesn't need to. The only thing which calls that DB API is
VirtualInterfaceList.get_by_instance_uuid and everything calling that
handles an empty list (and InstanceNotFound is probably unexpected
in anything using those anyway, i.e. they'd need to already get the
instance to lookup the VIFs).
The decorator is also not fast - it calls instance_get_by_uuid
which builds up a query on the Instance model and also joins on
the metadata and system_metadata tables which is totally unnecessary
for an existence type check.
Anyway, there seems to be no good reason for having that decorator
anymore as nothing else uses it, for example
block_device_mapping_get_all_by_instance.
Change-Id: I7dcb47f916908319ae58db12e9ab3dd8dad9ff39
Closes-Bug: #1823794
0 commit comments