pyvolume package

Submodules

pyvolume.exceptions module

exception pyvolume.exceptions.NeedOptionsException[source]

Bases: exceptions.Exception

Raised when more options are needed during Create.

pyvolume.local module

pyvolume.manager module

pyvolume.sshfs module

pyvolume.zkfuse module

Module providing ZKFileSystem implementation.

class pyvolume.zkfuse.ZKFileSystem(base, zkfuse_opt=u'-d')[source]

Bases: object

Mounts an external directory pointed by remote_path onto base (/mnt by default) and passes it to Docker to use as a volume. Uses vol_dict to keep track of different volumes.

cleanup()[source]

Unmounts and removes mount paths when shutting down.

create(volname, options)[source]

Creates the directories but does not mount it yet.

list()[source]

Lists the existing volumes being managed.

mount(volname)[source]

Mount the remote onto local for volname.

mount_check(volname)[source]

Check if the volume is already mounted. If mounted, return its path.

path(volname)[source]

Check if the volume is already mounted. If mounted, return its path.

remove(volname)[source]

Removes the volume. It unmounts the remote if necessary, tolerates if already unmounted. After which, it removes the mounted directory.

scope()[source]

Returns scope of this - global.

umount(volname)[source]

Module contents