def set_kv(vol_path, key, val):
    vol_meta = kvESX.load(vol_path)

    if not vol_meta:
        return False

    vol_meta[key] = val

    return kvESX.save(vol_path, vol_meta)
示例#2
0
def set_kv(vol_path, key, val):
    vol_meta = kvESX.load(vol_path)

    if not vol_meta:
        return False

    vol_meta[key] = val

    return kvESX.save(vol_path, vol_meta)
def get_kv(vol_path, key):
    """
    Return a string value for the given key, or None if the key is not present.
    """
    vol_meta = kvESX.load(vol_path)

    if not vol_meta:
        return None

    if key in vol_meta:
        return vol_meta[key]
    else:
        return None
示例#4
0
def get_kv(vol_path, key):
    """
    Return a string value for the given key, or None if the key is not present.
    """
    vol_meta = kvESX.load(vol_path)

    if not vol_meta:
        return None

    if key in vol_meta:
        return vol_meta[key]
    else:
        return None
def remove(vol_path, key):
    """
    Remove a key/value pair from the store. Return true on success, false on
    error.
    """
    vol_meta = kvESX.load(vol_path)

    if not vol_meta:
        return False

    if key in vol_meta:
        del vol_meta[key]

    return kvESX.save(vol_path, vol_meta)
示例#6
0
def remove(vol_path, key):
    """
    Remove a key/value pair from the store. Return true on success, false on
    error.
    """
    vol_meta = kvESX.load(vol_path)

    if not vol_meta:
        return False

    if key in vol_meta:
        del vol_meta[key]

    return kvESX.save(vol_path, vol_meta)
def getAll(vol_path):
    """
    Return the entire meta-data for the given vol_path.
    Return true if successful, false otherwise
    """
    return kvESX.load(vol_path)
示例#8
0
def getAll(vol_path):
    """
    Return the entire meta-data for the given vol_path.
    Return true if successful, false otherwise
    """
    return kvESX.load(vol_path)