vmdk

package
v0.0.0-...-96d2ce7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolumeDriver

type VolumeDriver struct {
	utils.PluginDriver
	// contains filtered or unexported fields
}

VolumeDriver - VMDK driver struct

func NewVolumeDriver

func NewVolumeDriver(cfg config.Config, mountDir string) *VolumeDriver

NewVolumeDriver creates Driver which to real ESX (useMockEsx=False) or a mock

func (*VolumeDriver) Capabilities

func (d *VolumeDriver) Capabilities(r volume.Request) volume.Response

Capabilities - Report plugin scope to Docker

func (*VolumeDriver) Create

func (d *VolumeDriver) Create(r volume.Request) volume.Response

Create creates a volume.

func (*VolumeDriver) DetachVolume

func (d *VolumeDriver) DetachVolume(name string) error

DetachVolume - detach a volume from the VM

func (*VolumeDriver) Get

Get info about a single volume

func (*VolumeDriver) GetVolume

func (d *VolumeDriver) GetVolume(name string) (map[string]interface{}, error)

GetVolume - return volume meta-data.

func (*VolumeDriver) List

List volumes known to the driver

func (*VolumeDriver) Mount

Mount - Provide a volume to docker container - called once per container start. We need to keep refcount and unmount on refcount drop to 0

The serialization of operations per volume is assured by the volume/store of the docker daemon. As long as the refCountsMap is protected is unnecessary to do any locking at this level during create/mount/umount/remove.

func (*VolumeDriver) MountVolume

func (d *VolumeDriver) MountVolume(name string, fstype string, id string, isReadOnly bool, skipAttach bool) (string, error)

MountVolume - Request attach and then mounts the volume. Actual mount - send attach to ESX and do the in-guest magic Returns mount point and error (or nil)

func (*VolumeDriver) Path

Path - give docker a reminder of the volume mount path

func (*VolumeDriver) Remove

func (d *VolumeDriver) Remove(r volume.Request) volume.Response

Remove - removes individual volume. Docker would call it only if is not using it anymore

func (*VolumeDriver) Unmount

Unmount request from Docker. If mount refcount is drop to 0. Unmount and detach from VM

func (*VolumeDriver) UnmountVolume

func (d *VolumeDriver) UnmountVolume(name string) error

UnmountVolume - Unmounts the volume and then requests detach

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL