summaryrefslogtreecommitdiff
path: root/libpod/runtime_volume_linux.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-07-15 14:55:20 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-08-02 15:08:30 -0400
commit8b72a72ca2171a8545023ee45ab42de9a78ae5f4 (patch)
treea3088463cf5c93883a1bf09498e927a35ae70793 /libpod/runtime_volume_linux.go
parent3cc9ab8992833ddf952df479ffb239c61845fa2e (diff)
downloadpodman-8b72a72ca2171a8545023ee45ab42de9a78ae5f4.tar.gz
podman-8b72a72ca2171a8545023ee45ab42de9a78ae5f4.tar.bz2
podman-8b72a72ca2171a8545023ee45ab42de9a78ae5f4.zip
Implement backend for 'volume inspect'
Begin to separate the internal structures and frontend for inspect on volumes. We can't rely on keeping internal data structures for external presentation - separating presentation and internal data format is good practice. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/runtime_volume_linux.go')
-rw-r--r--libpod/runtime_volume_linux.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index ac6fd02c3..84703787d 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"strings"
+ "time"
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/events"
@@ -42,14 +43,10 @@ func (r *Runtime) newVolume(ctx context.Context, options ...VolumeCreateOption)
if volume.config.Name == "" {
volume.config.Name = stringid.GenerateNonCryptoID()
}
- // TODO: support for other volume drivers
if volume.config.Driver == "" {
volume.config.Driver = "local"
}
- // TODO: determine when the scope is global and set it to that
- if volume.config.Scope == "" {
- volume.config.Scope = "local"
- }
+ volume.config.CreatedTime = time.Now()
// Create the mountpoint of this volume
volPathRoot := filepath.Join(r.config.VolumePath, volume.config.Name)