예제 #1
0
def mount_overlay_fs(image_obj, top_layer):
    '''Given the image object and the top most layer, mount all the layers
    until the top layer using overlayfs'''
    tar_layers = []
    for index in range(0, top_layer + 1):
        tar_layers.append(image_obj.layers[index].tar_file)
    target = rootfs.mount_diff_layers(tar_layers)
    return target
예제 #2
0
def mount_overlay_fs(image_obj, top_layer, driver):
    '''Given the image object and the top most layer, mount all the layers
    until the top layer using overlayfs'''
    layer_paths = []
    for index in range(0, top_layer + 1):
        layer_paths.append(image_obj.layers[index].get_untar_dir())
    target = rootfs.mount_diff_layers(layer_paths, driver)
    return target