def METHOD_NAME(self, server, flavor_name, flavor_id,
                        vcpus, ram, disk, ephemeral, is_public):
    openstack = local_session(self.manager.session_factory).client()
    server_flavor_name = server.flavor.original_name
    flavor = openstack.get_flavor(server_flavor_name)
    if not flavor:
        return False
    if flavor_name and flavor.name != flavor_name:
        return False
    if flavor_id and flavor.id != flavor_id:
        return False
    if vcpus and flavor.vcpus != int(vcpus):
        return False
    if ram and flavor.ram != int(ram):
        return False
    if disk and flavor.disk != int(disk):
        return False
    if ephemeral and flavor.ephemeral != int(ephemeral):
        return False
    if is_public is not None and flavor.is_public != is_public:
        return False
    return True