コード例 #1
0
ファイル: onefs.py プロジェクト: willnx/vlab_cli
def get_formatted_table(images):
    """Return a human friendly table of different OneFS deployment options

    :Returns: String

    :param images: The different images available, sorted by version number
    :type images: List
    """
    header_a = [
        '7.2.1 (Orca)',
        '8.0.0 (Riptide)',
        '8.0.1 (Halfpipe)',
        '8.1.0 (FreightTrain)',
    ]
    header_b = [
        '8.1.1 (Niijima)', '8.1.2 (Kanagawa)', '8.1.3 (Seismic)',
        '8.2.0 (Pipeline)'
    ]
    header_c = [
        '8.2.1 (Acela)', '8.2.2 (Beachcomber)', '9.0.0 (Cascades)',
        '9.1.0 (Deccan)'
    ]
    header_d = ['9.2.0 (Empire)', '9.2.1 (Flying Scotsman)', '9.3.0 (Gotham)']
    header_z = ['Update your vLab CLI']
    orca = sorted([x for x in images if '7.2.0' < x < '8.0.0.0'])
    riptide = sorted([x for x in images if '7.2.1.9' < x < '8.0.1.0'])
    halfpipe = sorted([x for x in images if '8.0.0.9' < x < '8.1.0.0'])
    freight_train = sorted([x for x in images if '8.0.1.9' < x < '8.1.1.0'])
    niijima = sorted([x for x in images if '8.1.0.9' < x < '8.1.2.0'])
    kanagawa = sorted([x for x in images if '8.1.1.9' < x < '8.1.3.0'])
    seismic = sorted([x for x in images if '8.1.2.9' < x < '8.2.0.0'])
    pipeline = sorted([x for x in images if '8.2.0' <= x < '8.2.1.0'])
    acela = sorted([x for x in images if '8.2.1' < x < '8.2.2.0'])
    beachcomber = sorted([x for x in images if '8.2.2' < x < '8.2.3.0'])
    cascades = sorted([x for x in images if '9.0.0.0' <= x < '9.1.0.0'])
    deccan = sorted([x for x in images if '9.1.0' < x < '9.2.0.0'])
    empire = sorted([x for x in images if '9.2.0' < x < '9.2.1.0'])
    flying_scotsman = sorted([x for x in images if '9.2.1' < x < '9.3.0.0'])
    gotham = sorted([x for x in images if '9.3.0' < x < '9.4.0.0'])
    net_new = sorted([x for x in images if '9.4.0' <= x])
    table_a = columned_table(header_a,
                             [orca, riptide, halfpipe, freight_train])
    table_b = columned_table(header_b, [niijima, kanagawa, seismic, pipeline])
    table_c = columned_table(header_c, [acela, beachcomber, cascades, deccan])
    table_d = columned_table(header_d, [empire, flying_scotsman, gotham])
    if net_new:
        table_z = columned_table(header_z, [net_new])
        table = '{}\n\n{}\n\n{}\n\n{}\n\n{}'.format(table_a, table_b, table_c,
                                                    table_d, table_z)
    else:
        table = '{}\n\n{}\n\n{}\n\n{}'.format(table_a, table_b, table_c,
                                              table_d)
    return table
コード例 #2
0
def get_formatted_table(images):
    """Obtain a human-friendly table of available Data Domain versions

    :Returns: String

    :param images: The available version/images of Data Domain, ordered by version number
    :type images: List
    """
    header = ['Data Domain']
    table = columned_table(header, [images])
    return table
コード例 #3
0
ファイル: superna.py プロジェクト: willnx/vlab_cli
def get_formatted_table(images):
    """A human handy table of the different variants of Superna Eyeglass servers,
    and versions that can be deployed.

    :Returns: String

    :param images: The available version/images of Superna Eyeglass servers, ordered by version number
    :type images: List
    """
    header = ['Superna Eyeglass']
    table = columned_table(header, [images])
    return table
コード例 #4
0
ファイル: windows.py プロジェクト: willnx/vlab_cli
def get_formatted_table(images):
    """A human friendly table of the different Windows Desktop clients versions
    that are available for deployment.

    :Returns: String

    :param images: The available versions/images of Windows, ordered by version number
    :type images: List
    """
    header = ['Windows Desktop Clients']
    table = columned_table(header, [images])
    return table
コード例 #5
0
ファイル: esrs.py プロジェクト: willnx/vlab_cli
def get_formatted_table(images):
    """A human handy table of the different variants of ESRS, and versions
    that can be deployed.

    :Returns: String

    :param images: The available version/images of ESRS, ordered by version number
    :type images: List
    """
    header = ['ESRS (Virtual Edition)']
    table = columned_table(header, [images])
    return table
コード例 #6
0
ファイル: router.py プロジェクト: willnx/vlab_cli
def get_formatted_table(images):
    """A human handy table of the different versions of network routers that can
    be deployed.

    :Returns: String

    :param images: The available versions of network routers, ordered by version number
    :type images: List
    """
    header = ['VyOS Router']
    table = columned_table(header, [images])
    return table
コード例 #7
0
ファイル: iiq.py プロジェクト: willnx/vlab_cli
def get_formatted_table(images):
    """A human handy table of the different branches of InsightIQ, and versions
    that can be deployed.

    :Returns: String

    :param images: The available version/images of IIQ, ordered by version number
    :type images: List
    """
    header = [
        '2.5 (Candle)', '3.0 (Lantern)', '3.1 (Beacon)', '3.2 (Lumen)',
        '4.0 (Aurora)', '4.1 (Sol)'
    ]
    candle = [x for x in images if '2.5' < x < '3.0']
    lantern = [x for x in images if '3.0' < x < '3.1.0']
    beacon = [x for x in images if '3.1' < x < '3.2.0']
    lumen = [x for x in images if '3.2' < x < '4.0.0']
    aurora = [x for x in images if '4.0' < x < '4.1.0']
    sol = [x for x in images if '4.1' < x < '4.2.0']
    table = columned_table(header,
                           [candle, lantern, beacon, lumen, aurora, sol])
    return table