Add ability to get a runtime that renumbers

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2019-02-18 16:50:44 -05:00
parent f9c548219b
commit 43db7734e8

View File

@ -8,8 +8,17 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
) )
// GerRuntimeRenumber gets a libpod runtime that will perform a lock renumber
func GetRuntimeRenumber(c *cliconfig.PodmanCommand) (*libpod.Runtime, error) {
return getRuntime(c, true)
}
// GetRuntime generates a new libpod runtime configured by command line options // GetRuntime generates a new libpod runtime configured by command line options
func GetRuntime(c *cliconfig.PodmanCommand) (*libpod.Runtime, error) { func GetRuntime(c *cliconfig.PodmanCommand) (*libpod.Runtime, error) {
return getRuntime(c, false)
}
func getRuntime(c *cliconfig.PodmanCommand, renumber bool) (*libpod.Runtime, error) {
options := []libpod.RuntimeOption{} options := []libpod.RuntimeOption{}
storageOpts, volumePath, err := util.GetDefaultStoreOptions() storageOpts, volumePath, err := util.GetDefaultStoreOptions()