mds_plugin/compute.py
def format_shapes(items) -> str:
    """Formats a given list of objects in a human readable form

    Args:
        items: Either a list of objects or a single object

    Returns:
       The objects formated as str
    """

    # If a single db_system was given, wrap it in a list
    if not type(items) is list:
        items = [items]

    # return objects in READABLE text output
    # cSpell:ignore gbps
    out = ""
    id = 1
    for i in items:
        out += (f"{id:>4} " +
                core.fixed_len(i.shape, 26, ' ', True) +
                core.fixed_len(str(i.ocpus), 7, ' ', align_right=True) +
                core.fixed_len(i.processor_description, 35, ' ') +
                core.fixed_len(
                    str(i.memory_in_gbs), 7, ' ', align_right=True) +
                core.fixed_len(
                    str(i.networking_bandwidth_in_gbps), 7, '\n',
                    align_right=True))
        id += 1

    return out
Formats a given list of objects in a human readable form

    Args:
        items: Either a list of objects or a single object

    Returns:
       The objects formated as str
    
Formats a given list of objects in a human readable form
Formats a given list of objects in a human readable form
def format_shapes(items) -> str:
    if not type(items) is list:
        items = [items]
    out = ""
    id = 1
    for i in items:
        out += (f"{id:>4} " +
                core.fixed_len(i.shape, 26, ' ', True) +
                core.fixed_len(str(i.ocpus), 7, ' ', align_right=True) +
                core.fixed_len(i.processor_description, 35, ' ') +
                core.fixed_len(
                    str(i.memory_in_gbs), 7, ' ', align_right=True) +
                core.fixed_len(
                    str(i.networking_bandwidth_in_gbps), 7, '\n',
                    align_right=True))
        id += 1
    return out
def format_shapes ( items ) -> str : if not type ( items ) is list : items = [ items ] out = "" id = 1 for i in items : out += ( f"{id:>4} " + core . fixed_len ( i . shape , 26 , ' ' , True ) + core . fixed_len ( str ( i . ocpus ) , 7 , ' ' , align_right = True ) + core . fixed_len ( i . processor_description , 35 , ' ' ) + core . fixed_len ( str ( i . memory_in_gbs ) , 7 , ' ' , align_right = True ) + core . fixed_len ( str ( i . networking_bandwidth_in_gbps ) , 7 , '\n' , align_right = True ) ) id += 1 return out
Formats a given list of objects in a human readable form
Formats a given list of objects in a human readable form
"""Formats a given list of objects in a human readable form

    Args:
        items: Either a list of objects or a single object

    Returns:
       The objects formated as str
    """ # If a single db_system was given, wrap it in a list
 # return objects in READABLE text output
 # cSpell:ignore gbps

The objects formated as str
The objects formated as str
items
Either a list of objects or a single object
Either a list of objects or a single object