summaryrefslogtreecommitdiff
path: root/libpod/volume.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-27 23:24:00 +0100
committerGitHub <noreply@github.com>2020-02-27 23:24:00 +0100
commit52876dc821a1a97df2ffb7388439662c45e490a3 (patch)
tree53e92d9d41921e7871947164a2ca45707e30c784 /libpod/volume.go
parentbe2e5c4b2dd9b8d0c80593f9c6f2f0d15bf7e430 (diff)
parent306b44380fec7a6653baf8fa8e2929a8f0115659 (diff)
downloadpodman-52876dc821a1a97df2ffb7388439662c45e490a3.tar.gz
podman-52876dc821a1a97df2ffb7388439662c45e490a3.tar.bz2
podman-52876dc821a1a97df2ffb7388439662c45e490a3.zip
Merge pull request #5319 from baude/apiv2volumestests
binding tests for volumes
Diffstat (limited to 'libpod/volume.go')
-rw-r--r--libpod/volume.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/volume.go b/libpod/volume.go
index 1ffed872e..70099d6f4 100644
--- a/libpod/volume.go
+++ b/libpod/volume.go
@@ -126,3 +126,10 @@ func (v *Volume) GID() int {
func (v *Volume) CreatedTime() time.Time {
return v.config.CreatedTime
}
+
+// Config returns the volume's configuration.
+func (v *Volume) Config() (*VolumeConfig, error) {
+ config := VolumeConfig{}
+ err := JSONDeepCopy(v.config, &config)
+ return &config, err
+}