summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/mount.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-01 15:30:06 +0100
committerGitHub <noreply@github.com>2020-12-01 15:30:06 +0100
commite3f0b7db7508f1e1ecfdb23adb53531c89a29b99 (patch)
treec14bd42ae7fe6fd90679455efe932bd37d1f7a24 /pkg/varlinkapi/mount.go
parent1316b2927be632ff717d9f7fd6a1633198c1ccaf (diff)
parentf62a356515e387b0bbcf1f08b4831d139c2039b7 (diff)
downloadpodman-e3f0b7db7508f1e1ecfdb23adb53531c89a29b99.tar.gz
podman-e3f0b7db7508f1e1ecfdb23adb53531c89a29b99.tar.bz2
podman-e3f0b7db7508f1e1ecfdb23adb53531c89a29b99.zip
Merge pull request #8400 from rhatdan/varlink
Remove varlink support from podman
Diffstat (limited to 'pkg/varlinkapi/mount.go')
-rw-r--r--pkg/varlinkapi/mount.go49
1 files changed, 0 insertions, 49 deletions
diff --git a/pkg/varlinkapi/mount.go b/pkg/varlinkapi/mount.go
deleted file mode 100644
index 6fd4de709..000000000
--- a/pkg/varlinkapi/mount.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// +build varlink
-
-package varlinkapi
-
-import iopodman "github.com/containers/podman/v2/pkg/varlink"
-
-// ListContainerMounts ...
-func (i *VarlinkAPI) ListContainerMounts(call iopodman.VarlinkCall) error {
- mounts := make(map[string]string)
- allContainers, err := i.Runtime.GetAllContainers()
- if err != nil {
- return call.ReplyErrorOccurred(err.Error())
- }
- for _, container := range allContainers {
- mounted, mountPoint, err := container.Mounted()
- if err != nil {
- return call.ReplyErrorOccurred(err.Error())
- }
- if mounted {
- mounts[container.ID()] = mountPoint
- }
- }
- return call.ReplyListContainerMounts(mounts)
-}
-
-// MountContainer ...
-func (i *VarlinkAPI) MountContainer(call iopodman.VarlinkCall, name string) error {
- container, err := i.Runtime.LookupContainer(name)
- if err != nil {
- return call.ReplyErrorOccurred(err.Error())
- }
- path, err := container.Mount()
- if err != nil {
- return call.ReplyErrorOccurred(err.Error())
- }
- return call.ReplyMountContainer(path)
-}
-
-// UnmountContainer ...
-func (i *VarlinkAPI) UnmountContainer(call iopodman.VarlinkCall, name string, force bool) error {
- container, err := i.Runtime.LookupContainer(name)
- if err != nil {
- return call.ReplyErrorOccurred(err.Error())
- }
- if err := container.Unmount(force); err != nil {
- return call.ReplyErrorOccurred(err.Error())
- }
- return call.ReplyUnmountContainer()
-}