def _get_zfcp_devices():
    """
    Return list of zfcp devices
    """
    device_paths = utils.get_directories(syspath_zfcp)
    zfcp_devices = []
    for path in device_paths:
        device = utils.get_dirname(path)
        if device:
            zfcp_devices.append(device)
    return zfcp_devices
def _get_dasdeckd_devices():
    """
    Return list of dasd-eckd devices
    """
    device_paths = utils.get_directories(syspath_eckd)
    dasdeckd_devices = []
    for path in device_paths:
        device = utils.get_dirname(path)
        if device:
            dasdeckd_devices.append(device)
    return dasdeckd_devices
Example #3
0
def _get_zfcp_devices():
    """
    Return list of zfcp devices
    """
    device_paths = utils.get_directories(syspath_zfcp)
    zfcp_devices = []
    for path in device_paths:
        device = utils.get_dirname(path)
        if device:
            zfcp_devices.append(device)
    return zfcp_devices
Example #4
0
def _get_dasdeckd_devices():
    """
    Return list of dasd-eckd devices
    """
    device_paths = utils.get_directories(syspath_eckd)
    dasdeckd_devices = []
    for path in device_paths:
        device = utils.get_dirname(path)
        if device:
            dasdeckd_devices.append(device)
    return dasdeckd_devices
def _list_devicesinfo(devicesinfo_dict, paths):
    """
    :param devicesinfo_dict: dict with key as device id and
            value as dict having all device info
    :param paths:list of device paths along with device Ids
    :return:list of dictionaries for the devices
            present in devicesinfo_dict and paths
    """
    devicesinfo = []
    if devicesinfo_dict and paths:
        for path in paths:
            device = utils.get_dirname(path)
            key = devicesinfo_dict.get(device)
            if key:
                devicesinfo.append(key)
    return devicesinfo
Example #6
0
def _list_devicesinfo(devicesinfo_dict, paths):
    """
    :param devicesinfo_dict: dict with key as device id and
            value as dict having all device info
    :param paths:list of device paths along with device Ids
    :return:list of dictionaries for the devices
            present in devicesinfo_dict and paths
    """
    devicesinfo = []
    if devicesinfo_dict and paths:
        for path in paths:
            device = utils.get_dirname(path)
            key = devicesinfo_dict.get(device)
            if key:
                devicesinfo.append(key)
    return devicesinfo