示例#1
0
def listhbas():
    """
    \b
    NAME
        listhbas - will show a list of hbas
    SYNOPSIS
        listhbas [OPTIONS]
    DESCRIPTION
        Will list out available hbas seen by the LightSpeed
        No options are available for this command
    """
    targetHBAStable = DataModel()
    cmd = "SELECT id,wwn from target_hbas"
    q = targetHBAStable.GetListOfQuery(cmd)
    cli_logger.info('List of available target HBAs: ')
    cli_logger.info(
        '---------------------------------------------------------------------------'
    )
    for row in q:
        cli_logger.info('ID: {0} | HBA: {1}'.format(row[0], row[1]))
        cli_logger.info(
            '---------------------------------------------------------------------------'
        )