Remove FlavorNotFound dead code condition in API.resize

The condition removed in this change is dead code because
of the block above where new_instance_type is set. If a new
flavor is specified (resize) then flavors.get_flavor_by_flavor_id
will either find it or raise FlavorNotFound.

Change-Id: If66a28c07c619cb89d77ee926f60b5d48cbfd351
This commit is contained in:
Matt Riedemann 2019-04-17 12:17:13 -04:00
parent 8951149c52
commit cf489d58b9
1 changed files with 0 additions and 3 deletions

View File

@ -3652,9 +3652,6 @@ class API(base.Base):
reason = _('Resize to zero disk flavor is not allowed.')
raise exception.CannotResizeDisk(reason=reason)
if not new_instance_type:
raise exception.FlavorNotFound(flavor_id=flavor_id)
current_instance_type_name = current_instance_type['name']
new_instance_type_name = new_instance_type['name']
LOG.debug("Old instance type %(current_instance_type_name)s, "