mirror of
https://github.com/containers/podman.git
synced 2026-07-09 06:44:58 -04:00
Add a podman volume rename command, REST API endpoint, and bindings for renaming volumes. The rename updates both the VolumeConfig and VolumeState tables in a single transaction and moves the volume directory on disk, rolling back if the transaction fails. Renaming an anonymous volume converts it to a named volume. Volumes that are in use, mounted, or backed by a volume plugin or the image driver cannot be renamed. Fixes: #28189 Signed-off-by: MayorFaj <mayorfaj@gmail.com>
15 lines
563 B
Go
15 lines
563 B
Go
//go:build !remote && (linux || freebsd) && !cgo
|
|
|
|
package libpod
|
|
|
|
// isSQLiteConstraint reports whether err is a SQLite constraint violation.
|
|
//
|
|
// The github.com/mattn/go-sqlite3 driver and its typed errors are only
|
|
// available with cgo, and the driver itself requires cgo to function, so this
|
|
// build can never actually talk to SQLite at runtime. This stub exists solely
|
|
// so the package still compiles for CGO-free static analysis (for example the
|
|
// FreeBSD lint run performed by "make validatepr").
|
|
func isSQLiteConstraint(_ error) bool {
|
|
return false
|
|
}
|