Do not check flavor.id after Microversion 2.46

flavor.id is longer included in server info after Microversion
2.46, so change to checking flavor info if 'id' is not in flavor.

Note: We needn't check whether 'id' should be in flavor or not in
different microversions because schema check already covers it.

Besides, this is to make resize_server in base.py instance method,
because it's not likely to be used in resource_setup, and so we can
use assert check in it.

Ref: https://developer.openstack.org/api-ref/compute/#rebuild-server-rebuild-action

Implements blueprint: clear-deprecated-api

Change-Id: Id376de39662a4799909b56ec1148c85910d95814
6 files changed