def storage_list(storage_name=None):
    """List the storage IDs for the unit"""
    _args = ['storage-list', '--format=json']
    if storage_name:
        _args.append(storage_name)
    try:
        return json.loads(subprocess.check_output(_args).decode('UTF-8'))
    except ValueError:
        return None
    except OSError as e:
        import errno
        if e.errno == errno.ENOENT:
            # storage-list does not exist
            return []
        raise
def storage_list ( storage_name = None ) : _args = [ 'storage-list' , '--format=json' ] if storage_name : _args . append ( storage_name ) try : return json . loads ( subprocess . check_output ( _args ) . decode ( 'UTF-8' ) ) except ValueError : return None except OSError as e : import errno if e . errno == errno . ENOENT : return [ ] raise
List the storage IDs for the unit