'Get a list of all flavors.
:param detailed: Whether flavor needs to be return with details
(optional).
:param is_public: Filter flavors with provided access type (optional).
None means give all flavors and only admin has query
access to all flavor types.
:param marker: Begin returning flavors that appear later in the flavor
list than that represented by this flavor id (optional).
:param min_disk: Filters the flavors by a minimum disk space, in GiB.
:param min_ram: Filters the flavors by a minimum RAM, in MB.
:param limit: maximum number of flavors to return (optional).
:param sort_key: Flavors list sort key (optional).
:param sort_dir: Flavors list sort direction (optional).
:returns: list of :class:`Flavor`.'

def list(self, detailed=True, is_public=True, marker=None, min_disk=None, min_ram=None, limit=None, sort_key=None, sort_dir=None):

    qparams = {}
    if marker:
        qparams['marker'] = str(marker)
    if min_disk:
        qparams['minDisk'] = int(min_disk)
    if min_ram:
        qparams['minRam'] = int(min_ram)
    if limit:
        qparams['limit'] = int(limit)
    if sort_key:
        qparams['sort_key'] = str(sort_key)
    if sort_dir:
        qparams['sort_dir'] = str(sort_dir)
    if (not is_public):
        qparams['is_public'] = is_public
    qparams = sorted(qparams.items(), key=(lambda x: x[0]))
    query_string = (('?%s' % parse.urlencode(qparams)) if qparams else '')
    detail = ''
    if detailed:
        detail = '/detail'
    return self._list(('/flavors%s%s' % (detail, query_string)), 'flavors')
