'Get the instance type from instance.'

def _get_instance_type(self, context, instance, prefix, migration):

    stashed_flavors = (migration.migration_type in ('resize',))
    if stashed_flavors:
        return getattr(instance, ('%sflavor' % prefix))
    else:
        return instance.flavor
