'Find the specified flavor by name or id.
:param flavor: the name of the flavor to find
:returns: the id of :flavor:'

def find_flavor_by_name_or_id(self, flavor):

    try:
        return self.client().flavors.get(flavor).id
    except exceptions.NotFound:
        return self.client().flavors.find(name=flavor).id
