mds_plugin/object_store.py
def format_buckets_listing(buckets, current_bucket=None):
    """Returns a formated list of buckets.

    Args:
        buckets (list): A list of buckets objects.

    Returns:
        The formated list as string
    """
    import re

    out = ""
    i = 1
    for b in buckets:
        # Shorten to 24 chars max, remove linebreaks
        name = re.sub(r'[\n\r]', ' ',
                      b.name[:22] + '..'
                      if len(b.name) > 24
                      else b.name)

        index = f"*{i:>3}" if current_bucket == b.name else f"{i:>4}"
        out += (f"{index} {name:24} {b.time_created:%Y-%m-%d %H:%M}\n")
        i += 1

    return out
Returns a formated list of buckets.

    Args:
        buckets (list): A list of buckets objects.

    Returns:
        The formated list as string
    
Returns a formated list of buckets.
Returns a formated list of buckets .
def format_buckets_listing(buckets, current_bucket=None):
    import re
    out = ""
    i = 1
    for b in buckets:
        name = re.sub(r'[\n\r]', ' ',
                      b.name[:22] + '..'
                      if len(b.name) > 24
                      else b.name)
        index = f"*{i:>3}" if current_bucket == b.name else f"{i:>4}"
        out += (f"{index} {name:24} {b.time_created:%Y-%m-%d %H:%M}\n")
        i += 1
    return out
def format_buckets_listing ( buckets , current_bucket = None ) : import re out = "" i = 1 for b in buckets : name = re . sub ( r'[\n\r]' , ' ' , b . name [ : 22 ] + '..' if len ( b . name ) > 24 else b . name ) index = f"*{i:>3}" if current_bucket == b . name else f"{i:>4}" out += ( f"{index} {name:24} {b.time_created:%Y-%m-%d %H:%M}\n" ) i += 1 return out
Returns a formated list of buckets.
Returns a formated list of buckets .
"""Returns a formated list of buckets.

    Args:
        buckets (list): A list of buckets objects.

    Returns:
        The formated list as string
    """ # Shorten to 24 chars max, remove linebreaks

The formated list as string
The formated list as string
buckets
A list of buckets objects.
A list of buckets objects .
current_bucket